[BioRuby] GFF3
Naohisa GOTO
ngoto at gen-info.osaka-u.ac.jp
Mon Aug 16 08:17:36 EDT 2010
On Mon, 16 Aug 2010 13:22:56 +0200
Pjotr Prins <pjotr.public14 at thebird.nl> wrote:
> On Fri, Aug 13, 2010 at 12:12:05AM +0900, Naohisa GOTO wrote:
> > > Now, to print FASTA I now do:
> > >
> > > gff3.sequences.each do | item |
> > > print item.to_fasta(item.entry_id, 70)
> > > end
> >
> > gff3.sequences.each do | item |
> > print item.output(:fasta)
> > end
>
> As it stands, it is not a direct replacement as the entry_id gets
> printed twice. Also when I replace
This is considered to be a bug.
The bug was reported previously, but was postponed.
http://lists.open-bio.org/pipermail/bioruby/2009-April/000897.html
> line 971: @sequences.collect { |s| s.to_fasta(s.entry_id, 70) }.join('')
>
> with the output(:fasta) equivalent, the unit test in BioRuby fails,
> because the ID becomes 'test01 test01' instead of 'test01'.
>
> Does it mean we have to modify 's', to get the proper output?
>
The workaround is
s.output(:fasta, :header=>s.entry_id, :width=>70)
Naohisa Goto
ngoto at gen-info.osaka-u.ac.jp / ng at bioruby.org
More information about the BioRuby
mailing list