Return description of this GoSubDag object.
769776
def prt_objdesc(self, prt):
        """"""
        txt = "INITIALIZING GoSubDag: {N:3} sources in {M:3} GOs rcnt({R}). {A} alt GO IDs\n"
        alt2obj = {go:o for go, o in self.go2obj.items() if go != o.id}
        prt.write(txt.format(
            N=len(self.go_sources),
            M=len(self.go2obj),
            R=self.rcntobj is not None,
            A=len(alt2obj)))
        prt.write("             GoSubDag: namedtuple fields: {FLDS}\n".format(
            FLDS=" ".join(self.prt_attr['flds'])))
        prt.write("             GoSubDag: relationships: {RELS}\n".format(RELS=self.relationships))
1028002
def get_descriptions(fastas):
    
    id2desc = {}
    for fasta in fastas:
        for seq in parse_fasta(fasta):
            header = seq[0].split('>')[1].split(' ')
            id = header[0]
            if len(header) > 1:
                desc = ' '.join(header[1:])
            else:
                desc = 'n/a'
            length = float(len([i for i in seq[1].strip() if i != '*']))
            id2desc[id] = [fasta, desc, length]
    return id2desc
702720
def _get_plt_data(self, hdrgos_usr):
        """"""
        hdrgo2usrgos = self.grprobj.get_hdrgo2usrgos(hdrgos_usr)
        usrgos_actual = set([u for us in hdrgo2usrgos.values() for u in us])
        go2obj = self.gosubdag.get_go2obj(usrgos_actual.union(hdrgo2usrgos.keys()))
        return hdrgo2usrgos, go2obj
500390
def get_grouped(self, go_ntsets, go_all, gosubdag, **kws):
        """"""
        kws_grpd = {k:v for k, v in kws.items() if k in Grouped.kws_dict}
        kws_grpd['go2nt'] = self._init_go2ntpresent(go_ntsets, go_all, gosubdag)
        return Grouped(gosubdag, self.godag.version, **kws_grpd)
1005757
def description(cls):
        """"""
        lines = [s.strip() for s in cls.__doc__.splitlines()]
        note_i = lines.index("Notes")
        return "\n".join(lines[note_i + 2:])
794515
def key_description(self):
        ""
        vk, scan, flags = self._get_key_info()
        desc = ''
        if vk:
            if vk in CODE_NAMES:
                desc = CODE_NAMES[vk]
            else:
                desc = "VK %d"% vk
        else:
            desc = "%s"% self.key

        return desc
470975
def description(self):
        
        if self._closed:
            return

        description = []
        for col in self._result["cols"]:
            description.append((col,
                                None,
                                None,
                                None,
                                None,
                                None,
                                None))
        return tuple(description)
17077
def description(self):
        """"""
        result = ""
        if isinstance(self._element, ValueElement):
            if self._element.kind is not None:
                result = "{}({}) | {}".format(self._element.dtype, self._element.kind,
                                          self._element.summary)
            else:
                result = "{} | {}".format(self._element.dtype,
                                          self._element.summary)
        elif isinstance(self._element, Executable):
            result = "({})".format(self._element.parameters_as_string())
        elif isinstance(self._element, str):
            result = "Intrinsic Fortran Symbol"
        elif isinstance(self._element, TypeExecutable):
            result = self._type_description()

        #Clean off any line breaks from the XML and excessive whitespace.
        cleaned = re.sub("\s+", " ", result.replace("\n", " "))
        return cleaned
432924
def get_info(self):
        
        info = {
            "name":     self.name,
            "mode":     self.mode & 0o7777,
            "uid":      self.uid,
            "gid":      self.gid,
            "size":     self.size,
            "mtime":    self.mtime,
            "chksum":   self.chksum,
            "type":     self.type,
            "linkname": self.linkname,
            "uname":    self.uname,
            "gname":    self.gname,
            "devmajor": self.devmajor,
            "devminor": self.devminor
        }

        if info["type"] == DIRTYPE and not info["name"].endswith("/"):
            info["name"] += "/"

        return info
681552
def get_description(self, obj):
        """"""
        search_description = self.get_model_config_value(obj, 'search_description')

        if not search_description:
            return super().get_description(obj)

        return search_description.format(**obj.__dict__)
362844
def get_description(self):
        """"""
        if self._description:
            return self._description

        try:
            trailerURL= "http://trailers.apple.com%s" % self.baseURL
            response = urllib.request.urlopen(trailerURL)
            Reader = codecs.getreader("utf-8")
            responseReader = Reader(response)
            trailerHTML = responseReader.read()
            description = re.search('<meta *name="Description" *content="(.*?)" *[/]*>'
                                    ,trailerHTML)
            if description:
                self._description = description.group(1)
            else:
                self._description = "None"
        except:
            self._description = "Error"
        return self._description
955827
def description(self):
    ""
    if self.lastx is None: return
    if type(self.lastx) not in (sqparse2.SelectX,sqparse2.UpdateX,sqparse2.InsertX): return
    if type(self.lastx) in (sqparse2.UpdateX,sqparse2.InsertX) and self.lastx.ret is None: return
    # at this point we know this is an operation that returns rows
    if type(self.lastx) in (sqparse2.UpdateX,sqparse2.InsertX):
      raise NotImplementedError('todo: Cursor.description for non-select')
    else: # select case
      return [description_from_colx(self.connection,self.lastx,colx) for colx in self.lastx.cols.children]
1001863
def _get_kwsdag(self, goids, go2obj, **kws_all):
        """"""
        kws_dag = {}
        # Term Counts for GO Term information score
        tcntobj = self._get_tcntobj(goids, go2obj, **kws_all)  # TermCounts or None
        if tcntobj is not None:
            kws_dag['tcntobj'] = tcntobj
        # GO letters specified by the user
        if 'go_aliases' in kws_all:
            fin_go_aliases = kws_all['go_aliases']
            if os.path.exists(fin_go_aliases):
                go2letter = read_d1_letter(fin_go_aliases)
                if go2letter:
                    kws_dag['go2letter'] = go2letter
        return kws_dag
697818
def description(self):
        """"""
        try:
            return self.__cog_cleaned_doc__
        except AttributeError:
            self.__cog_cleaned_doc__ = cleaned = inspect.getdoc(self)
            return cleaned
1281211
def get_tcntobj(self, go_all, **kws):
        """"""
        # kws: gaf (gene2go taxid)
        if 'gaf' in kws or 'gene2go' in kws:
            # Get a reduced go2obj set for TermCounts
            _gosubdag = GoSubDag(go_all, self.godag, rcntobj=False, prt=None)
            return get_tcntobj(_gosubdag.go2obj, **kws)
494863
def info(self):
        """"""
        itext = self.class_info
        if self.prop.info:
            itext += ' (each item is {})'.format(self.prop.info)
        if self.max_length is None and self.min_length is None:
            return itext
        if self.max_length is None:
            lentext = 'length >= {}'.format(self.min_length)
        elif self.max_length == self.min_length:
            lentext = 'length of {}'.format(self.min_length)
        else:
            lentext = 'length between {mn} and {mx}'.format(
                mn='0' if self.min_length is None else self.min_length,
                mx=self.max_length,
            )
        return '{} with {}'.format(itext, lentext)
575256
def _get_gosubdagplotnts(self, hdrgo, usrgos, pltargs, go2parentids):
        """"""
        dotgraphs = []
        go2color = pltargs.get_go2color_inst(hdrgo)
        # namedtuple fields: hdrgo gosubdag tot_usrgos parentcnt desc
        ntpltgo0 = self._get_pltdag_ancesters(hdrgo, usrgos, desc="")
        ntpltgo1 = self._get_pltdag_path_hdr(hdrgo, usrgos, desc="pruned")
        num_go0 = len(ntpltgo0.gosubdag.go2obj)
        num_go1 = len(ntpltgo1.gosubdag.go2obj)
        title = "{GO} {NAME}; {N} GO sources".format(
            GO=hdrgo,
            NAME=self.gosubdag.go2obj[hdrgo].name,
            N=len(ntpltgo0.gosubdag.go_sources))
        # print("PltGroupedGos::_get_gosubdagplotnts TITLE", title)
        if num_go0 < pltargs.max_gos:
            # print("PltGroupedGos::_get_gosubdagplotnts ntpltgo0 ALWAYS IF NOT TOO BIG")
            dotgraphs.append(self._get_gosubdagplotnt(ntpltgo0, title, go2color, pltargs))
        # PLOT A: Plot the entire GO ID group under GO header, hdrgo, if not too big
        if num_go0 < pltargs.max_gos and \
            ntpltgo0.tot_usrgos == ntpltgo1.tot_usrgos:
            # print("PltGroupedGos::_get_gosubdagplotnts ntpltgo0 AAAAAAAAAAAAAAAAA")
            dotgraphs.append(self._get_gosubdagplotnt(ntpltgo0, title, go2color, pltargs))
        # PLOT B: Plot only the GO ID group passing thru the GO header, hdrgo, if not too big
        elif num_go1 < pltargs.max_gos and ntpltgo0.tot_usrgos != ntpltgo1.tot_usrgos:
            # print("PltGroupedGos::_get_gosubdagplotnts ntpltgo1(pruned) BBBBBBBBBBBBBBBBB")
            dotgraphs.append(self._get_gosubdagplotnt(ntpltgo1, title, go2color, pltargs))
        # PLOT C: If DAG is large, just print upper portion
        # PLOT D: If DAG is large, just print upper portion passing through the GO header
        elif num_go1 >= pltargs.upper_trigger:
            # print("PltGroupedGos::_get_gosubdagplotnts upper_pruned CCCCCCCCCCCCCCCCC")
            gos_upper = self._get_gos_upper(ntpltgo1, pltargs.max_upper, go2parentids)
            #ntpltgo2 = self._get_pltdag_ancesters(hdrgo, gos_upper, "{BASE}_upper.png")
            ntpltgo3 = self._get_pltdag_path_hdr(hdrgo, gos_upper, "upper_pruned")
            # Middle GO terms chosen to be start points will be green unless reset back
            for goid in gos_upper:
                if goid not in go2color:
                    go2color[goid] = 'white'
            dotgraphs.append(self._get_gosubdagplotnt(ntpltgo3, title, go2color, pltargs))
        else:
            # print("PltGroupedGos::_get_gosubdagplotnts EEEEEEEEEEEEEEEEE")
            self._no_ntplt(ntpltgo0)
        return dotgraphs