Mercurial > repos > biomonika > linkyx
view scripts/get_sequences_based_on_ids.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 source
use Bio::DB::Fasta; my $fastaFile = shift; my $queryFile = shift; my $db = Bio::DB::Fasta->new( $fastaFile ); open (IN, $queryFile); while (<IN>){ chomp; $seq = $_; my $sequence = $db->seq($seq); if (!defined( $sequence )) { die "Sequence $seq not found. \n" } print ">$seq\n", "$sequence\n"; }