Print GOEA results in text format.
545457
def prt_txt(prt, goea_results, prtfmt=None, **kws):
        """"""
        objprt = PrtFmt()
        if prtfmt is None:
            flds = ['GO', 'NS', 'p_uncorrected',
                    'ratio_in_study', 'ratio_in_pop', 'depth', 'name', 'study_items']
            prtfmt = objprt.get_prtfmt_str(flds)
        prtfmt = objprt.adjust_prtfmt(prtfmt)
        prt_flds = RPT.get_fmtflds(prtfmt)
        data_nts = MgrNtGOEAs(goea_results).get_goea_nts_prt(prt_flds, **kws)
        RPT.prt_txt(prt, data_nts, prtfmt, prt_flds, **kws)
        return data_nts
91444
def pprint(self):
        """"""

        items = sorted(self.items())
        return u"\n".join(u"%s=%s" % (k, v.pprint()) for k, v in items)
1224180
def prt_results(self, goea_results):
        """"""
        # objaart = self.prepgrp.get_objaart(goea_results) if self.prepgrp is not None else None
        if self.args.outfile is None:
            self._prt_results(goea_results)
        else:
            # Users can print to both tab-separated file and xlsx file in one run.
            outfiles = self.args.outfile.split(",")
            grpwr = self.prepgrp.get_objgrpwr(goea_results) if self.prepgrp else None
            if grpwr is None:
                self.prt_outfiles_flat(goea_results, outfiles)
            else:
                grpwr.prt_outfiles_grouped(outfiles)
512449
def _textOutput(self, gaObjects):
        
        for variantAnnotation in gaObjects:
            print(
                variantAnnotation.id, variantAnnotation.variant_id,
                variantAnnotation.variant_annotation_set_id,
                variantAnnotation.created, sep="\t", end="\t")
            for effect in variantAnnotation.transcript_effects:
                print(effect.alternate_bases, sep="|", end="|")
                for so in effect.effects:
                    print(so.term, sep="&", end="|")
                    print(so.term_id, sep="&", end="|")
                print(effect.hgvs_annotation.transcript,
                      effect.hgvs_annotation.protein, sep="|", end="\t")
            print()
730306
def print_table(lines, separate_head=True):
	""""""
	#Count the column width
	widths = []
	for line in lines:
			for i,size in enumerate([len(x) for x in line]):
					while i >= len(widths):
							widths.append(0)
					if size > widths[i]:
							widths[i] = size
	   
	#Generate the format string to pad the columns
	print_string = ""
	for i,width in enumerate(widths):
			print_string += "{" + str(i) + ":" + str(width) + "} | "
	if (len(print_string) == 0):
			return
	print_string = print_string[:-3]
	   
	#Print the actual data
	for i,line in enumerate(lines):
			print(print_string.format(*line))
			if (i == 0 and separate_head):
					print("-"*(sum(widths)+3*(len(widths)-1)))
522749
def print_hits(results):
    "  "
    print_search_stats(results)
    for hit in results['hits']['hits']:
        # get created date for a repo and fallback to authored_date for a commit
        created_at = parse_date(hit['_source'].get('created_at', hit['_source']['authored_date']))
        print('/%s/%s/%s (%s): %s' % (
                hit['_index'], hit['_type'], hit['_id'],
                created_at.strftime('%Y-%m-%d'),
                hit['_source']['description'].split('\n')[0]))

    print('=' * 80)
    print()
772578
def get_nts_strpval(self, fmt="{:8.2e}"):
        """"""
        objntmgr = MgrNts(self.goea_results)
        dcts = objntmgr.init_dicts()
        # pylint: disable=line-too-long
        pval_flds = set(k for k in self._get_fieldnames(next(iter(self.goea_results))) if k[:2] == 'p_')
        for fld_float in pval_flds:
            fld_str = "s_" + fld_float[2:]
            objntmgr.add_f2str(dcts, fld_float, fld_str, fmt)
        return objntmgr.mknts(dcts)
409067
def print_results(results, outfile):
    
    for stanza_words, scheme in results:
        outfile.write(str(' ').join(stanza_words) + str('\n'))
        outfile.write(str(' ').join(map(str, scheme)) + str('\n\n'))
    outfile.close()
    logging.info("Wrote result")
1158413
def OneResult(parser):
    ""
    def parse(text):
        results = parser(text)
        assert len(results) == 1, "Expected one result but got %r" % (results,)
        return results[0]
    return parse
1033269
def plt_goea_results(fout_img, goea_results, **kws):
    """"""
    go_sources = [rec.GO for rec in goea_results]
    go2obj = {rec.GO:rec.goterm for rec in goea_results}
    gosubdag = GoSubDag(go_sources, go2obj, rcntobj=True)
    godagplot = GoSubDagPlot(gosubdag, goea_results=goea_results, **kws)
    godagplot.plt_dag(fout_img)
1293705
def _print_summary_map(strm, result_map, ftype):
        """"""
        if len(result_map) == 0:
            return 0
        npass = len([x for k, x in result_map.iteritems() if len(x) == 0])
        strm.write('=====%d/%d %s files passed check=====\n' % (npass, len(result_map), ftype))
        for fname, emap in result_map.iteritems():
            if len(emap) == 0:
                continue
            strm.write('%s: %d Errors of %d Categories map=%s\n' % (
                fname, sum(emap.values()), len(emap), str(emap)))
        return len(result_map) - npass
439424
def _pprint(dic):
    """"""
    for key, value in dic.items():
        print("        {0}: {1}".format(key, value))
350434
def _print_results(file, status):
        

        file_color = c.Fore.GREEN
        status_color = c.Fore.RED
        if status == 'Success':
            status_color = c.Fore.GREEN
        elif status == 'Skipped':
            status_color = c.Fore.YELLOW
        print(
            '{}{!s:<13}{}{!s:<35}{}{!s:<8}{}{}'.format(
                c.Fore.CYAN,
                'Downloading:',
                file_color,
                file,
                c.Fore.CYAN,
                'Status:',
                status_color,
                status,
            )
        )
100021
def _format(self, _, result):
        
        return self._fmt.format(six.text_type(result))
688152
def plt_goea_results(fout_png, goea_results, *args, **kws):
    """"""
    engine = kws['engine'] if 'engine' in kws else 'pydot'
    godagsmall = OboToGoDagSmall(goea_results=goea_results).godag
    godagplot = GODagSmallPlot(godagsmall, *args, goea_results=goea_results, **kws)
    godagplot.plt(fout_png, engine)
208718
function printResults(results){
    var output = "";
    var dependenciesTimes = [];
    var devDependenciesTimes = [];

    dependenciesTimes = Object.keys(results.moduleTimes.dependencies).map(function(depen){
        var val = results.moduleTimes.dependencies[depen];

        return [
            chalk.gray(depen),
            " : ",
            chalk.white(val === -1 ? "Cannot be required" : val)
        ];
    });

    devDependenciesTimes = Object.keys(results.moduleTimes.devDependencies).map(function(depen){
        var val = results.moduleTimes.devDependencies[depen];

        return [
            chalk.gray(depen),
            " : ",
            chalk.white(val === -1 ? "Cannot be required" : val)
        ];
    });

    if(dependenciesTimes.length > 0){
        output += chalk.white("Dependencies: \n");
        output += table(dependenciesTimes, {align: ["l", "l"]});
    }

    if(devDependenciesTimes.length > 0){
        output += chalk.white("\n\nDevDependencies: \n");
        output += table(devDependenciesTimes, {align : ["l", "l"]});
    }

    output += chalk.white("\n\nModule load time: " + (results.loadTime === -1 ? "Cannot be required" : results.loadTime));
    console.log(output);
}
760746
def print_infos(results):
    
    print('transactions: %i' % results.total_transactions)
    print('timers: %i' % results.total_timers)
    print('errors: %i' % results.total_errors)
    print('test start: %s' % results.start_datetime)
    print('test finish: %s\n' % results.finish_datetime)