[Biopython] Bio.Sequencing.Ace

Peter biopython at maubp.freeserve.co.uk
Sun Jun 28 09:17:23 EDT 2009


On Sun, Jun 28, 2009 at 1:53 PM, Fungazid<fungazid at yahoo.com> wrote:
>
> Thanks Peter and David,
>
> contig.sequence and contig.quality parameters are more or less
> the solution I basically wanted.
>
> Any additional tips are more than welcomed (For example:
> getting specific qualities of reads. I think this requires parsing
> the Phd file which is used as part of the assembly process. In
> addition: getting read strand).

I'm not sure about the read qualities off hand, but you can get
the read strand from the cryptically named property uorc, short
for U (uncomplemented, i.e. forward) or C (complemented, i.e.
reversed). This name reflects how the strand is stored in the
raw Ace file.

from Bio.Sequencing import Ace
handle = open("example.ace")
for ace_contig in Ace.parse(handle) :
    if ace_contig.uorc == "C" :
        print ace_contig.name, "reverse"
    else :
        assert ace_contig.uorc == "U"
        print ace_contig.name, "forward"

Peter


More information about the Biopython mailing list