from Bio.Sequencing import Ace

fn = '/home/sb/bt/biopython-1.50/Tests/Ace/contig1.ace'
acefilerecord =

# For each contig:
for ctg in acefilerecord.contigs:
    print '=========================================='
    print 'Contig name: %s'
    print 'Bases: %s'%ctg.nbases
    print 'Reads: %s'%ctg.nreads
    print 'Segments: %s'%ctg.nsegments
    print 'Sequence: %s'%ctg.sequence
    print 'Quality: %s'%ctg.quality
    # For each read in contig:
    for read in ctg.reads:
        print 'Read name: %s'
        print 'Align start: %s'
        print 'Align end: %s'
        print 'Qual start: %s'
        print 'Qual end: %s'
        print 'Read sequence: %s'%read.rd.sequence
        print '=========================================='

This code is part of the book "Python for Bioinformatics", by Sebastian Bassi ( Return to home page.