Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@scottcain
Created September 20, 2017 15:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottcain/ac33bd47bc338047b89e729caa1fd48b to your computer and use it in GitHub Desktop.
Save scottcain/ac33bd47bc338047b89e729caa1fd48b to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings;
use Bio::DB::Fasta;
use Bio::SeqIO;
my $db = Bio::DB::Fasta->new('dmel-all-chromosome-r6.13.fasta');
my $out = Bio::SeqIO->new(-file => "out.fasta", -format => 'fasta');
while(<DATA>) {
chomp;
my $seq = $db->get_Seq_by_id($_);
# print $_, "\t", $seq->subseq(1,10) , "\n";
print $out->write_seq($seq);
}
__DATA__
211000022278279
211000022278436
211000022278449
211000022278760
211000022279165
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment