Mercurial > repos > biomonika > linkyx
comparison scripts/get_sequence_based_on_id.pl @ 0:1955f03f092e
initial commit
| author | biomonika <biomonika@psu.edu> |
|---|---|
| date | Tue, 02 Sep 2014 14:16:04 -0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:1955f03f092e |
|---|---|
| 1 use Bio::DB::Fasta; | |
| 2 | |
| 3 my $fastaFile = shift; | |
| 4 my $queryFile = shift; | |
| 5 | |
| 6 my $db = Bio::DB::Fasta->new( $fastaFile ); | |
| 7 $seq = $queryFile; | |
| 8 chomp($queryFile); | |
| 9 | |
| 10 my $sequence = $db->seq($seq); | |
| 11 if (!defined( $sequence )) { | |
| 12 die "Sequence $seq not found. \n" | |
| 13 } | |
| 14 print ">$seq\n", "$sequence\n"; |
