view scripts/get_sequence_based_on_id.pl @ 2:0d8315be76b7

Uploaded
author biomonika
date Tue, 17 Feb 2015 21:59:51 -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";