[BioRuby] trouble on the FASTA.QUAL format (Bio::FastaNumericFormat)
Naohisa GOTO
ngoto at gen-info.osaka-u.ac.jp
Wed Jan 20 13:36:29 UTC 2010
Hi,
This is a bug, and will be fixed.
Indeed, Bio::FastaNumericFormat does not contain sequence,
and I forgot to take care about calling to_biosequence.
For a workaroud,
qual = Bio::FastaNumericFormat.new(FASTA_QUAL)
bs = Bio::Sequence.new('')
bs.quality_scores = qual.data
puts bs.output(:fasta_numeric)
Naohisa Goto
ngoto at gen-info.osaka-u.ac.jp / ng at bioruby.org
On Wed, 20 Jan 2010 18:17:50 +0900
"MISHIMA, Hiroyuki" <missy at be.to> wrote:
> Hi all,
>
> I am using BioRuby 1.4.0., and have a trouble in handling the FASTA.QUAL
> format using Bio::FastaNumericFormat.
>
> Please see the following code:
> ========================
> require 'rubygems'
> require 'bio'
>
> FASTA_QUAL =<<'EOS'
> >SAMPLE1
> 30 30 29 42
> EOS
>
> qual = Bio::FastaNumericFormat.new(FASTA_QUAL)
> bs = qual.to_biosequence
> puts bs.output(:raw)
> =========================
>
> The last line raise an error:
>
> =========================
> (eval):2:in `__get__seq': undefined method `seq' for
> #<Bio::FastaNumericFormat:0x2b182810ceb0> (NoMethodError)
> from (eval):4:in `seq'
> from
> /home/misshie/.gem/ruby/1.8/gems/bio-1.4.0/lib/bio/sequence/format_raw.rb:19:in
> `output'
> from
> /home/misshie/.gem/ruby/1.8/gems/bio-1.4.0/lib/bio/sequence/format.rb:97:in
> `output'
> from
> /home/misshie/.gem/ruby/1.8/gems/bio-1.4.0/lib/bio/sequence/format.rb:172:in
> `output'
> from fasta_numeric_format.rb:11
> =========================
>
> In the last line, using :fasta, :fasta_numeric etc. make same results.
>
> Please let me know if you have ideas to solve this problem.
>
> Hiro.
> --
> MISHIMA, Hiroyuki, DDS, Ph.D.
> COE Research Fellow
> Department of Human Genetics
> Nagasaki University Graduate School of Biomedical Sciences
> _______________________________________________
> BioRuby Project - http://www.bioruby.org/
> BioRuby mailing list
> BioRuby at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioruby
More information about the BioRuby
mailing list