[BioRuby] trace files (scf/abi) and ruby/bioruby

Anthony Underwood email2ants at gmail.com
Mon Oct 20 14:05:35 UTC 2008


Work on the chromatogram reading classes in making good progress.  
Using a fork of the github bioruby repository I have been  
incorporating the classes into bioruby in the hope that it can be   
merged into the main bioruby repository.

However I have run into a problem with the to_biosequence method.
I have a Scf class that is a subclass of Chromatogram

Chromatogram has a method
     def to_biosequence
       Bio::Sequence.adapter(self, Bio::Sequence::Adapter::Chromatogram)
     end

I have added a line to autoload the  
Bio::Sequence::Adapter::Chromatogram module in the  
Bio::Sequence::Adapter Class.

The problem is that the to_biosequence method returns nil.

I have also found that this is the case when I test fasta and genbank  
sequences using  the existing Bio::FastaFormat and Bio::Genbank  
Classes when I use a fresh checkout of the main bioruby repository  
from github, so I don't think it's something I've done.

I see that the Bio::Sequence adapter method that to_biosequence calls  
is as follows

   def self.adapter(source_data, adapter_module)
     biosequence = self.new(nil)
     biosequence.instance_eval {
       remove_instance_variable(:@seq)
       @source_data = source_data
     }
     biosequence.extend(adapter_module)
     biosequence
   end

the last line does not return a biosequence even though if I puts  
biosequence.class just before the last line the output is Bio::Sequence.

Strangely if I insert the method call  biosequence.seq just before the  
last line of the adapter method everything is fine.

Does anybody know what's occurring here. Any help much appreciated.

Thanks

Anthony
On 3 Oct 2008, at 04:42, Naohisa GOTO wrote:

> Hi,
>
> For ABI traces, as far as I know, some person made previously,
> but all codes are lost now.
>
> http://open-bio.org/pipermail/bioruby/2005-September/000128.html
> but I cannot access to the URL described in the above archive.
>
> I don't remember why it wasn't included in bioruby, but,
> the thread of ML archive suggests that no one made any efforts
> to change the code adopting the development guideline.
>
> As Jan says, looking at bioperl, biopython, biojava, Staden, etc.
> and to write your own code seems good.
>
> Naohisa Goto
> ngoto at gen-info.osaka-u.ac.jp / ng at bioruby.org
>
> On Thu, 2 Oct 2008 19:04:45 +0100
> "Jan Aerts" <jan.aerts at gmail.com> wrote:
>
>> If there's nothing there yet, you might have a look at the bioperl  
>> version
>> and take that as a guide.
>>
>> jan.
>>
>> 2008/10/2 Anthony Underwood <email2ants at gmail.com>
>>
>>> Hi all,
>>>
>>> Does anybody know if there is or someone is working on a ruby  
>>> module for
>>> reading abi/scf trace files. I was thinking of perhaps having a go  
>>> at this
>>> but thought I would check that there is no work in progress that I  
>>> should
>>> know about. I have done a few Google searches but come up with  
>>> nothing so
>>> thought I would ask on this list as well.
>>>
>>> Many thanks
>>>
>>> Anthony
>>> _______________________________________________
>>> BioRuby mailing list
>>> BioRuby at lists.open-bio.org
>>> http://lists.open-bio.org/mailman/listinfo/bioruby
>>>
>> _______________________________________________
>> BioRuby mailing list
>> BioRuby at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/bioruby
>
> _______________________________________________
> BioRuby mailing list
> BioRuby at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioruby




More information about the BioRuby mailing list