goatools.anno.gaf_reader module

Read a GO Annotation File (GAF) and store the data in a Python object.

Annotations available from the Gene Ontology Consortium:

http://current.geneontology.org/annotations/

class goatools.anno.gaf_reader.GafReader(filename=None, **kws)[source]

Bases: AnnoReaderBase

Reads a Gene Annotation File (GAF). Returns a Python object.

exp_kws = {'allow_missing_symbol', 'godag', 'hdr_only', 'namespaces', 'prt'}
read_gaf(namespace='BP', **kws)[source]

Read Gene Association File (GAF). Return associations.

static wr_txt(fout_gaf, nts)[source]

Write namedtuples into a gaf format

chk_associations(fout_err='gaf.err')[source]

Check that fields are legal in GAF

has_ns()[source]

Return True if namespace field, NS exists on annotation namedtuples