[Biopython-dev] SeqIO and qual: Question about reading and writing qual files
Peter
biopython at maubp.freeserve.co.uk
Tue Mar 24 11:23:20 EDT 2009
On Tue, Mar 24, 2009 at 9:49 AM, Peter <biopython at maubp.freeserve.co.uk> wrote:
>
> This was one area of the new SeqRecord slicing I was a little unsure
> about - slicing a qual file's SeqRecord (or any SeqRecord with a None
> for the sequence). I hadn't done anything about it immediately as I
> couldn't think of a use case for it - so that's solved ;)
>
> One solution would be to introduce an UnknownSeq object, which
> would be much nicer to deal with than a None object, as it would have
> a length and support slicing. I've mentioned this idea before, but
> haven't yet put forward any actual code. This seems most elegant.
>
> Another option would be to special case handle slicing a SeqRecord
> with a None sequence, where we'd slice its per-letter-annotation.
That should now be working with the change I've just checked into CVS,
but the combination of slicing per-letter-annotation while the sequence
is None is a real pain.
I'm almost tempted to back out the qual parser for the next release
(FASTQ support is fine), but let's see if if we can reach a consensus on
a new UnknownSeq class instead (see my earlier email on this - what
would you expect to happen if you read in a QUAL file and tried to
save it as a FASTA file?).
Peter
More information about the Biopython-dev
mailing list