How to use the goatools.grouper.grprdflts.GrouperDflts function in goatools

To help you get started, we’ve selected a few goatools examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tanghaibao / goatools / tests / test_sorter.py View on Github external
def _get_grprdflt():
    """Get Grouper defaults."""
    gosubdag = _get_gosubdag()
    fin_slim = os.path.join(REPO, 'goslim_generic.obo')
    return GrouperDflts(gosubdag, fin_slim)
github tanghaibao / goatools / tests / test_sorter_desc2nts.py View on Github external
def _get_sortobj():
    """Get object for grouping GO IDs."""
    fin_godag = os.path.join(REPO, "go-basic.obo")
    godag = get_godag(fin_godag, prt=None, loading_bar=False, optional_attrs=['relationship'])
    gosubdag = GoSubDag(USER_GOS, godag, relationships=True, tcntobj=None)
    grprdflt = GrouperDflts(gosubdag)
    hdrobj = HdrgosSections(gosubdag, grprdflt.hdrgos_dflt, SECTIONS)
    grprobj = Grouper("wrusrgos", USER_GOS, hdrobj, gosubdag)
    return Sorter(grprobj)
github tanghaibao / goatools / tests / test_altid_gosubdag.py View on Github external
def _get_grprdflt(gosubdag):
    """Get Grouper defaults."""
    fin_slim = os.path.join(REPO, 'goslim_generic.obo')
    return GrouperDflts(gosubdag, fin_slim)
github tanghaibao / goatools / tests / test_wr_sections_txt.py View on Github external
def _get_grprdflt(gosubdag=None):
    """Get Grouper defaults."""
    fin_slim = os.path.join(REPO, 'goslim_generic.obo')
    return GrouperDflts(gosubdag, fin_slim)
github tanghaibao / goatools / tests / test_grprobj.py View on Github external
def _get_grprdflt():
    """Get Grouper defaults."""
    gosubdag = _get_gosubdag()
    fin_slim = os.path.join(REPO, 'goslim_generic.obo')
    return GrouperDflts(gosubdag, fin_slim)
github tanghaibao / goatools / goatools / cli / gosubdag_plot.py View on Github external
def _get_grprobj(self, goids, sections):
        """Get Grouper, given GO IDs and sections."""
        grprdflt = GrouperDflts(self.gosubdag, "goslim_generic.obo")
        hdrobj = HdrgosSections(self.gosubdag, grprdflt.hdrgos_dflt, sections)
        return Grouper("sections", goids, hdrobj, self.gosubdag)
github tanghaibao / goatools / goatools / cli / find_enrichment.py View on Github external
def __init__(self, objcli, godag_version):
        # _goids = set(o.id for o in godag.values() if not o.children)
        _goids = set(r.GO for r in objcli.results_all)
        _tobj = TermCounts(objcli.godag, objcli.objgoeans.get_assoc())
        # pylint: disable=line-too-long
        self.gosubdag = GoSubDag(_goids, objcli.godag, relationships=True, tcntobj=_tobj, prt=sys.stdout)
        self.grprdflt = GrouperDflts(self.gosubdag, objcli.args.goslim)
        self.hdrobj = HdrgosSections(self.grprdflt.gosubdag, self.grprdflt.hdrgos_dflt, objcli.sections)
        self.pval_fld = objcli.get_pval_field()  # primary pvalue of interest
        self.ver_list = [godag_version,
                         self.grprdflt.ver_goslims,
                         "Sections: {S}".format(S=objcli.args.sections)]
        # self.objaartall = self._init_objaartall()