[Biopython-dev] [Bug 2643] Proposal: fastPhaseOutputIO for SeqIO

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Sun Nov 9 17:41:26 UTC 2008


http://bugzilla.open-bio.org/show_bug.cgi?id=2643





------- Comment #15 from dalloliogm at gmail.com  2008-11-09 12:41 EST -------
(In reply to comment #10)
> (In reply to comment #8)
> > > If fastPHASE files SHOULD always come in allele groups (of the same
> > > length), then it would be better to integrate the parser into Bio.AlignIO
> > > giving pairwise alignments (and you would be able to read it via Bio.SeqIO
> > > automatically as well).
> > 
> > This is good idea, I didn't think of it.
> > But how should I modify the module to produce AlignIO objects?
> 
> Essentially Instead of:
> 
> yield record_one
> yield record_two
> 
> you'd do something like this:
> 
> alignment = Alignment(generic_dna)
> alignment.add_sequence(id_one, seq_one)
> alignment.add_sequence(id_two, seq_two)
> yield alignment


I have modified the module so it returns Alignment objects instead of
SeqRecords.
The problem is that Alignment.add_sequence doesn't support SeqRecords objects
as inputs; it only requires an id and the sequence.
This causes that some information is lost: to be more precise, everything I was
putting in 'description' (subpop. label: 6  (internally 1)) is lost, because
there is not a way to store it in the Alignment object.
Moreover, now the parser only returns a single Alignment object per file (I
think it is not supposed to be possible to have two fastphase outputs in the
same file), because I thought it was the most useful thing.
However, I left an option to have SeqRecord objects returned instead of
Alignments (unfortunately I removed them from the doctests :().


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the Biopython-dev mailing list