Mercurial > repos > biomonika > linkyx
comparison scripts/get_sequence_based_on_id.pl @ 22:7997c93ee479
last attempt to install perl as part of linkyx
| author | biomonika <biomonika@psu.edu> |
|---|---|
| date | Thu, 11 Sep 2014 19:40:01 -0400 |
| parents | 1955f03f092e |
| children |
comparison
equal
deleted
inserted
replaced
| 21:55a373f7e669 | 22:7997c93ee479 |
|---|---|
| 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"; |
