in reply to BioPerl sequences
I'm going to take a guess, and say that while you may be searching the correct database (i.e. nucleotide), you are likely using the wrong id to perform your search.
Using an id of NC_000016, results in fetching sequence data with the annotation that you expect.
The code below will result in a fasta file that contains NC_000016 Homo sapiens chromosome 16, GRCh38.p2 Primary Assembly in the header. It may take a while for the script to finish, since this is a big sequence. The output.fasta file is around 100 MB.
#!/usr/bin/perl use strict; use warnings; use Bio::DB::GenBank; use Bio::SeqIO; my $output = Bio::SeqIO->new(-format=>"fasta",-file=>">output.fasta"); my $gb = Bio::DB::GenBank->new(); my $id = 'NC_000016'; my $seq = $gb->get_Seq_by_id($id); $output->write_seq($seq); exit;
|
|---|