goatools.anno.idtogos_reader module

Reads a Annotation File in text format with data in id2gos line

class goatools.anno.idtogos_reader.IdToGosReader(filename=None, **kws)[source]

Bases: AnnoReaderBase

Reads a Annotation File in text format with data in id2gos line

exp_kws = {'godag', 'namespaces', 'obsolete'}
static wr_id2gos(fout_txt, id2gos)[source]

Write annotations into a text file

prt_summary_anno2ev(prt=sys.stdout)[source]

Print a summary of all Evidence Codes seen in annotations

reduce_annotations(associations, options)[source]

Return full annotations due to lack of Evidence_code or Qualifier in this format

nts_ev_nd()[source]

Get annotations where Evidence_code == ‘ND’ (No biological data)

nts_qual_not()[source]

Get annotations having Qualifiers containing NOT

chk_associations(fout_err=None)[source]

Check GO IDs in the id2gos association file for validity.

Scans each GO ID in the file and reports any that do not match the expected format GO:NNNNNNN (7 digits). Call this after loading annotations to identify formatting problems such as extra spaces introduced by using “; “ instead of “;” as a separator.

Parameters:

fout_err – optional filename to write invalid-ID lines to

Returns:

number of invalid GO IDs found