[Bioperl-l] How do you create a genbank file?

Marc Logghe Marc.Logghe at devgen.com
Fri Oct 17 05:49:03 EDT 2003


> My question is how do I set the following?
> 
> mRNA (instead of dna)
> MAM (instead of UNK)
> VERSION     AB050006.1  GI:26453358		<- I can't get 
> this line to appear
> SOURCE      Bos taurus (cow)
>    ORGANISM  Bos taurus
> 
> 
To set the version you should use:
$seq->seq_version($version);  # $version is e.g. 1
Problem is, it is not possible to set the GI number. As far as I know, when you pass a genbank file, Bio::SeqIO does not even  parse it, at least it does not show up when you Data::Dump the resulting Bio::Seq::RichSeq object.
There is no slot for that information, because it does not exist in e.g. an EMBL sequence record.
Concerning the organism, first create the Bio::Species object. In case you only have the string 'Bos taurus' in your fasta, of course you can not generate the full classification. At least not using only your fasta data.
my $species = Bio::Species->new([reverse split /\s/, $organism]);
$seq->species($species);

gives you:
SOURCE      Bos taurus
  ORGANISM  Bos taurus
            Bos.

HTH,
Marc



More information about the Bioperl-l mailing list