view scripts/get_sequence_based_on_id.pl @ 7:90098d9cb691 default tip

workflows updated
author biomonika <biomonika@psu.edu>
date Fri, 20 Feb 2015 18:34:34 -0500
parents 05c27700e5ca
children
line wrap: on
line source

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";