Mercurial > repos > biomonika > linkyx
annotate scripts/get_sequences_based_on_ids.pl @ 2:0d8315be76b7
Uploaded
author | biomonika |
---|---|
date | Tue, 17 Feb 2015 21:59:51 -0500 |
parents | 05c27700e5ca |
children |
rev | line source |
---|---|
0 | 1 use Bio::DB::Fasta; |
2 | |
3 my $fastaFile = shift; | |
4 my $queryFile = shift; | |
5 | |
6 my $db = Bio::DB::Fasta->new( $fastaFile ); | |
7 open (IN, $queryFile); | |
8 while (<IN>){ | |
9 chomp; | |
10 $seq = $_; | |
11 my $sequence = $db->seq($seq); | |
12 if (!defined( $sequence )) { | |
13 die "Sequence $seq not found. \n" | |
14 } | |
15 print ">$seq\n", "$sequence\n"; | |
16 } |