[BioRuby] Re: BioRuby PDB Classes
Alex Gutteridge
alexg at ebi.ac.uk
Fri Feb 13 04:51:37 EST 2004
>> My question(s) to the list are:
>>
>> 1. Am I treading on other peoples toes here? Is someone else actively
>> developing the pdb.rb module? Naohisa Goto?
>
> I'm Naohisa Goto, but I'm not actively developing the pdb.rb now,
> and no one (except you) are doing, as far as I know.
> So, you can freely modify the pdb.rb.
>
> If you want to change existing class/method's name, or massively change
> existing class/method's specification or definition, please tell us.
I've left the main PDB class alone except for:
- I've changed the seqres method to return Bio::Seq objects rather than
just strings
- I've removed the old model parsing section and replaced it with mine
>> 2. If not, should I post the code to the mailing list, or somewhere
>> else? I'm sure it needs some tidying up and bioruby-fication. It would
>> be great if someone more experienced than I could give some
>> comments/criticisms.
>
> If the code is short, please post to the mailing list.
> For long codes, please send to staff at bioruby.org, or you can use
> the BioRuby Project Wiki page (http://wiki.bioruby.org/English/).
pdb.rb is now ~2000 lines, so I won't post it to the list! I'll post it
to staff at bioruby.org (the wiki seems to be broken at the moment).
pdb.rb probably needs splitting up into separate files, but like I
said, I'm not sure what the BioRuby conventions are for doing this
(would it need a new bio/db/pdb directory?). Currently it looks like
this:
module bio
#This module provides some generic mixin methods that all classes use
module PDBUtils
[snip!]
end
#There are several *Finder mixins which provide some of the searching
methods
module AtomFinder
[snip!]
end
#This is the main PDB class that was here originally - I've only added
methods
#so all the old interface is still here (apart from .seqres and .model)
class PDB
#There are a few modules and classes here used for the old style
parsing
class FieldDef
[snip!]
end
class Record < Hash
[snip!]
end
[snip!]
#My new classes for atoms, residues, chains and modules go here
class Atom
[snip!]
end
class Residue
[snip!]
end
class Chain
[snip!]
end
class Model
[snip!]
end
end #class PDB
end #module Bio
Perhaps the PDBUtils and Finder modules should go inside the PDB class?
Or a separate file for each class and the mixins?
Alex Gutteridge
European Bioinformatics Institute
Cambridge CB10 1SD
UK
Tel: 01223 492550
Email: alexg at ebi.ac.uk
More information about the BioRuby
mailing list