Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to extract 500bp sequence before and after miRNA by perl

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how perl extract miRNA before and after 500bp sequence, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to understand it!

Extract the sequence of 500bp before and after miRNA when there is no location information.

When extracting 500bp sequences before and after miRNA, if there is no location information, it will be troublesome to extract. You can use the following methods to extract:

1. Firstly, the precursor sequence of miRNA is compared with the genome by using blast software to obtain the position information of the precursor sequence.

Makeblastdb-in Donkey_Hic_genome.20180408.fa-dbtype nucl-title Donkey_Hic_genome.20180408.fablastall-I miRNA_Pre.fa-d Donkey_Hic_genome.20180408.fa-p blastn-e 0.01-b 5-v 5-m 8-o blast.out#Donkey_Hic_genome.20180408.fa reference genome chromosome sequence # miRNA_Pre.fa miRNA precursor sequence

Because the sequence may be short, the e-value value can be adjusted higher. The comparison results are as follows:

Bta-miR-34c Chr20 100.00 113 00 1 113 39385825 39385713 6e-57 224bta-miR-370 Chr07 100.00 109 00 1 109 70327160 70327268 1e-54 216bta-miR-34b Chr20 100.00 112 00 1 112 39386420 39386309 2e-56 222bta-miR-383 Chr27 100.00 110 00 1 110 21958895 21959004 4e-55 218bta-miR-449a Chr01 100.00 112 00 1 112 103603665 103603554 2e-56 222bta-miR-378 Chr09 100.00 111 00 1 111 51049164 51049054 9e-56 220bta-miR-378 Chr13 96.88 32 10 67 98 32631593 32631624 3e-06 56.0bta-miR-378 Chr13 93.94 33 20 62 94 29900614 29900582 2e-04 50.1bta-miR-378 Chr07 100.00 27 00 71 97 65072541 65072515 1e-05 54.0bta-miR-378 Chr30 96.55 29 10 69 97 28926810 28926782 2e-04 50.1bta-miR-378 Chr18 93.94 33 20 62 94 21721834 21721866 2e-04 50.1bta-miR-206 Chr08 100 . 00 112 00 1 112 78794660 78794771 2e-56 222bta-miR-1 Chr15 100.00 108 00 1 108 48711439 48711546 5e-54 214bta-miR-1 Chr07 88.89 63 7 0 32 94 26712206 26712268 2e-10 69. 9bta-let-7c Chr18 100.00 112 00 1 112 32412721 32412610 2e-56 222bta-let-7c Chr20 89.19 74 8 0 18 91 29703021 29703094 1e-14 83.8

Then compare and filter the results, try to choose the exact match, and the longest matching length. The filtered blast.out results are as follows:

Bta-miR-34c Chr20 100.00 113 00 1 113 39385825 39385713 6e-57 224bta-miR-370 Chr07 100.00 109 00 1 109 70327160 70327268 1e-54 216bta-miR-34b Chr20 100.00 112 00 1 112 39386420 39386309 2e-56 222bta-miR-383 Chr27 100.00 110 00 1 110 21958895 21959004 4e-55 218bta-miR-449a Chr01 100.00 112 00 1 112 103603665 103603554 2e-56 222bta-miR-378 Chr09 100.00 111 00 1 111 51049164 51049054 9e-56 220bta-miR-206 Chr08 100.00 112 00 1 112 78794660 78794771 2e-56 222bta-miR-1 Chr15 100.00 108 00 1 108 48711439 48711546 5e-54 214bta-let-7c Chr18 100.00 112 00 1 112 32412721 32412610 2e-56 222

3. Then you can extract the sequence. I have provided the script, oh, usage:

Perl / share/work/wangq/script/lv/miRNA_500_fasta.pl-id blast.out-fa Donkey_Hic_genome.20180408.fa-out result.fa-miR miRNA.fa-l500

-id followed by screened blast results;-fa followed by reference genomic chromosome sequence;-miR followed by miRNA sequence file;-l followed by extraction of miRNA sequence before and after the length of the sequence.

Extraction result (miRNA sequence marked in uppercase, other lowercase):

> bta-miR-34cacaaggcacagcatcacccgccgccctgctgggaggaggccgccaccctccgcggcgaactgccgacccgaagcgtttgagaggagaaagctgcgcttcgagactggatgcgtcagcatttcttccgcgcggcgcggcgagcgcgtggtccgcgtgcgagcaaaccccctgcaaacgcaggcgggctgatgcttctagctggagttaaacagttagctatcactaggagtaaaagcaagattgggcgatcccatgtaaggaaagcaaaatctggggcgtttagtagctttaattgtaaggtgtaaagacatttgaattgctgggggaagccccctgtgtaacgttcagagctgtgagtcactgtgcctattttccattgtttatcagggtactcaccaatccaccaactaaagtgagtaccacggagccagtgatctgcctgtcacgacgcatgggggcaccaacttgagactgaagtttgtgatgaaagtaaagcttttttgctgtgagtctagttactAGGCAGTGTAGTTAGCTGATTGctaataataccaatcactaaccacacggccaggtaaaaagatttgggaattcatccagatgagctgcgtgtgcacaccagtgggtttgggggcaagaaggggattggaataccctaatagtacgcattgcctgtttatccatagctcagccaagagagaaatcagcattttagctgctaaatatacaacatatgtagtaaatatacatttttaacatataatttttcaatattccttcaggcgcttaaccaaaaaaattttcagatatattgaggaatagaggttttctctcttagctcatttatgtcattgtgtaaacttgtgattattttgaactatctgtaagactgtattactattttgaaagaataaagtgccctaaagtcataaattgtggtcattcatgtgtccattgcctttcctaagttggctttatgatgtccttctcagcgcctgccacagtaattataactttcctatcgctaaaatggttaaattgttcctagattaacaaaatctcccgggaaggctattcacaagcactttttagtatttttctaagaacacgtta > bta-miR-370tgtttattgttcgtgtctcagagttgctctgaggccagtgtgctgggcacccagcaggccatctgggaggggagaaaggaagctagccatgtatgtcagtaggggtcagcgtggaggcctttggggtttctgggaaacggttcgaacatggagaatctcgtgatgtggacgcccccgagggcagccccatttcatgaactggatcccttagtcggatttctgttttccagggcacttgtttaagctttcatgccgtgtccaaaaaaaagagcagatcccaagagtttcctgcccgaggcccgtcttgccagaagccctcggcttggcctgagcatcgagatcattcctctaatcagcctgggggtggtctgacccgcggggtgggcggcgtggggcggggaggggcagggcgtgtgcggggcgggagctgctgggggagctggcggcggttcctttcaccctcgccgtggacccgcgggggcgtggctgtcctcggtctacaaatcgcgcaagtcggggcacaagacagagaggccaggtcacgtctctgcagttacacagctcatgagtGCCTGCTGGGGTGGAACCTGGTctgtctgtctgtctagcaccacagctcgggcgctgctgcagagggaacaaagatttgggtgagggcctcagagacgggctggggaaggggtttactcgggctgactttgacatgaaaacaatagctaattctgcttggggcctagtgctgtgactatcttacagatgggaaacaggcacagacaggttagttaactttcctgatgctttccagctcatcaggattggaggctggatttggaggcaggcggtgtggttcgagcatatgtgctctaaccattgggaaacactgcctcctgactgtgagcacacgtagagatggcacatggagtccaagaatctgggtttgagtccttttaccactgcctggtgggtgtactgtccagtcaatcatacatatttcattcttcctcttgacagagtctctgcagaggcccagcgagtcgttggcccgtgggaaatatttttttaagaatgcatgtgtgtgatagaattttatatctatcgaaggggagggg

The script code is as follows:

#! / usr/bin/perl-wuse strict;use Getopt::Long;use Bio::SeqIO;use Bio::Seq;my $version = "1.3"; my% opts;GetOptions (\% opts," id=s "," fa=s "," miR=s "," lenses "," out=s "," h ") If (! defined ($opts {out}) | |! defined ($opts {fa}) | |! defined ($opts {miR}) | |! defined ($opts {id}) | | defined ($opts {h}) {print "$opts {fa}",-format = > 'Fasta'); my% fasta;while (my $seq = $in- > next_seq ()) {my ($id,$sequence) = ($seq- > id,$seq- > seq); $fasta {$id} = $sequence } my $ina = Bio::SeqIO- > new (- file = > "$opts {miR}",-format = > 'Fasta'); my% mi;while (my $seq = $ina- > next_seq ()) {my ($id,$sequence) = ($seq- > id,$seq- > seq); $mi {$id} = $sequence;} open (IN, "$opts {id}") | die "open file $opts {id} faild.\ n" Open (OUT, "> $opts {out}") | | die "open file $opts {out} faild.\ n"; while () {chomp;my @ line = split ("\ t"); if ($line [8])

< $line[9]){my $miR = lc(substr( $fasta{$line[1]},$line[8]-1, $line[9] - $line[8]+1));my $small = lc($mi{$line[0]});$miR =~ s/$small/$mi{$line[0]}/;my $before = lc(substr( $fasta{$line[1]},$line[8]-$len-1, $len));my $laft = lc(substr( $fasta{$line[1]},$line[9], $len));print OUT ">

$line [0]\ n$before$miR$laft\ n ";} elsif ($line [8] > $line [9]) {my $miR = lc (substr ($fasta {$line [1]}, $line [9]-1, $line [8]-$line [9] + 1)); my $before = lc (substr ($fasta {$line [1]}, $line [9]-$len-1, $len)); my $laft = lc (substr ($fasta {$line [1]}, $line [8], $len)); my $gene = $before.$miR.$laft $gene = & reverse_complement_IUPAC ($gene); my $small = lc ($mi {$line [0]}); $gene = ~ s/$small/$mi {$line [0]} /; print OUT "> $line [0]\ n$gene\ n";} close (IN); close (OUT); sub reverse_complement_IUPAC {my $dna = shift; # reverse the DNA sequence my $revcomp = reverse ($dna); # complement the reversed DNA sequence $revcomp = ~ tr/ABCDGHMNRSTUVWXYabcdghmnrstuvwxy/TVGHCDKNYSAABWXRtvghcdknysaabwxr/; return $revcomp } these are all the contents of the article "how to extract 500bp sequences before and after miRNA by perl". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report