[Bioperl-l] [How to add features in genbank flat file]

Sebastien Moretti moretti at igs.cnrs-mrs.fr
Tue Feb 15 09:25:38 EST 2005

I saw that Genbank web site have changed:
Now, features like 'SNPs' are no more included in the EST flat files.
At the NCBI web site, we must click on 'features: SNP' to add them in our flat 

With BioPerl, 1.4 or 1.5, it's the same, the variation features are no more 
included in the EST flat files that I upload.

Here is the script I use:
	#!/usr/bin/perl -w
	use strict;
	use Bio::DB::GenBank;
	use Bio::DB::Query::GenBank;
	use Bio::SeqIO;
	my $acc=$ARGV[0] or die "\n\tThe accession number you seek for is missing.
\n\tTry something like: $0 NM_178432\n\n";
	my $query_string = "$acc";
	my $query = Bio::DB::Query::GenBank->new(-db=>'nucleotide',
	my $gb = new Bio::DB::GenBank;
	my $stream = $gb->get_Stream_by_query($query);
	my $out=Bio::SeqIO->new(-format=>'genbank');
	my $seq = $stream->next_seq();
	my $result=$out->write_seq($seq);
	$result =~ s/^1.*$//;
	#print $out->write_seq($seq);
	print $result;

How can I add most of features to my nucleotide flat files ?


Sebastien Moretti
31 chemin Joseph Aiguier
13402 Marseille cedex

More information about the Bioperl-l mailing list