Compare two or more sets of GO IDs. Best done using sections.
354602
def run():
    """"""
    obj = CompareGOsCli()
    obj.write(obj.kws.get('xlsx'), obj.kws.get('ofile'), obj.kws.get('verbose', False))
138871
def compare_files(pyc_filename1, pyc_filename2, verify):
    """"""
    (version1, timestamp, magic_int1, code_obj1, is_pypy,
     source_size) = uncompyle6.load_module(pyc_filename1)
    (version2, timestamp, magic_int2, code_obj2, is_pypy,
        source_size) = uncompyle6.load_module(pyc_filename2)
    if (magic_int1 != magic_int2) and verify == 'verify':
         verify = 'weak_verify'
    cmp_code_objects(version1, is_pypy, code_obj1, code_obj2, verify)
735022
def sectionByID(self, sectionID):
        
        if not self._sectionsByID or sectionID not in self._sectionsByID:
            self.sections()
        return self._sectionsByID[sectionID]
913904
def get_goids(self, go_args, fin_goids, prt):
        """"""
        goids = set()
        if fin_goids is not None:
            goids.update(self.rdtxt_gos(fin_goids, prt))
        if go_args:
            goids.update(self.get_goargs(go_args, prt))
        return goids
660964
def get_go2sectiontxt(self):
        """"""
        go2txt = {}
        _get_secs = self.hdrobj.get_sections
        hdrgo2sectxt = {h:" ".join(_get_secs(h)) for h in self.get_hdrgos()}
        usrgo2hdrgo = self.get_usrgo2hdrgo()
        for goid, ntgo in self.go2nt.items():
            hdrgo = ntgo.GO if ntgo.is_hdrgo else usrgo2hdrgo[ntgo.GO]
            go2txt[goid] = hdrgo2sectxt[hdrgo]
        return go2txt
980435
def get_items(self, gos):
        """"""
        items = []
        for go_id in gos:
            items.extend(self.go2items.get(go_id, []))
        return set(items)
777902
def prt_goids(self, prt):
        """"""
        fmt = self.gosubdag.prt_attr['fmta']
        nts = sorted(self.gosubdag.go2nt.values(), key=lambda nt: [nt.NS, nt.depth, nt.alt])
        _get_color = self.pydotnodego.go2color.get
        for ntgo in nts:
            gostr = fmt.format(**ntgo._asdict())
            col = _get_color(ntgo.GO, "")
            prt.write("{COLOR:7} {GO}\n".format(COLOR=col, GO=gostr))
351548
def get_goids_sections(sections):
        """"""
        goids_all = set()
        for _, goids_sec in sections:
            goids_all |= set(goids_sec)
        return goids_all
1358927
def scan(self, ids=range(254)):
        
        return [id for id in ids if self.ping(id)]
271972
def _summary_matching_gos(prt, pattern, matching_gos, all_gos):
        """"""
        msg = 'Found {N} GO(s) out of {M} matching pattern("{P}")\n'
        num_gos = len(matching_gos)
        num_all = len(all_gos)
        prt.write(msg.format(N=num_gos, M=num_all, P=pattern))
1295997
def deep_compare(self, other, settings):
        

        if not self._is_compatible_with(other):
            return False

        first, middle, last = self._compare_components(other, settings)

        return first and middle and last
957661
def _get_goid2dbids(associations):
        """"""
        go2ids = cx.defaultdict(set)
        for ntd in associations:
            go2ids[ntd.GO_ID].add(ntd.DB_ID)
        return dict(go2ids)
1130033
def report_collection_diff(from_collection, to_collection, from_id, to_id):
    
    if from_collection == to_collection:
        return None

    diff = unified_diff(from_collection, to_collection, fromfile=from_id, tofile=to_id)
    error_message = (
        u"Different tests were collected between {from_id} and {to_id}. "
        u"The difference is:\n"
        u"{diff}"
    ).format(from_id=from_id, to_id=to_id, diff="\n".join(diff))
    msg = "\n".join([x.rstrip() for x in error_message.split("\n")])
    return msg
481282
def _chk_sections(sections):
        """"""
        if sections:
            assert len(sections[0]) == 2, \
                "SECTIONS DATA MUST BE A 2-D LIST. FOUND: {S}".format(S=sections)
            for _, hdrgos in sections:
                chk_goids(hdrgos, "HdrgosSections::_chk_sections()")
825727
private int compareIdentifiers(String ident1, String ident2) {
        if (isInt(ident1) && isInt(ident2)) {
            return Integer.parseInt(ident1) - Integer.parseInt(ident2);
        } else {
            return ident1.compareTo(ident2);
        }
    }
208520
@Pure
	protected int compareSegments(ST s1, ST s2) {
		assert s1 != null && s2 != null;
		return s1.hashCode() - s2.hashCode();
	}
677059
def _get_goids(gostr):
        """"""
        if 'GO:' in gostr:
            return gostr.split(',')
        elif os.path.exists(gostr):
            return GetGOs().get_goids(None, gostr, sys.stdout)