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:
AnnoReaderBaseReads a Annotation File in text format with data in id2gos line
- exp_kws = {'godag', 'namespaces', 'obsolete'}¶
- 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
- 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