Mercurial > repos > biomonika > linkyx
diff scripts/get_sequence_based_on_id.pl @ 0:05c27700e5ca
initial commit
| author | biomonika <biomonika@psu.edu> |
|---|---|
| date | Thu, 04 Sep 2014 18:24:19 -0400 |
| parents | |
| children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/get_sequence_based_on_id.pl Thu Sep 04 18:24:19 2014 -0400 @@ -0,0 +1,14 @@ +use Bio::DB::Fasta; + +my $fastaFile = shift; +my $queryFile = shift; + +my $db = Bio::DB::Fasta->new( $fastaFile ); + $seq = $queryFile; + chomp($queryFile); + + my $sequence = $db->seq($seq); + if (!defined( $sequence )) { + die "Sequence $seq not found. \n" + } + print ">$seq\n", "$sequence\n"; \ No newline at end of file
