AGP.py - working with AGP files

This module contains a parser for reading from agp formatted files.

Code

class AGP.AGP

Bases: object

Parser for AGP formatted files.

readFromFile(infile)

read an agp file.

Example line:

scaffold_1      1       1199    1       W       contig_13       1       1199    +

This method converts coordinates to zero-based coordinates using open/closed notation.

In AGP nomenclature (http://www.ncbi.nlm.nih.gov/genome/guide/Assembly/AGP_Specification.html) objects (obj) like scaffolds are assembled from components (com) like contigs.

Component types are:

W

WGS sequence

N

gap of specified length.

mapLocation(id, start, end)

map a genomic location.

Raises

KeyError – If id is not present.