def ttest_latex(outfile, lines): f = open(outfile, 'w') libcommon.write_doc_start(f) colnames = ["Index", "Group 1", "Group 2", "p value", "Mean 1 $\pm$ Std 1", "Mean 2 $\pm$ Std 2"] libcommon.tab_header(f, colnames) ttest_latex_tab(f, lines) caption = '' label = '' libcommon.tab_closer(f, caption, label) libcommon.write_doc_end(f) f.close()
def group_cmp_latex(outfile, lines): f = open(outfile, 'w') libcommon.write_doc_start(f) colnames = ["Category 1", "Category 2", "p value", "Mean 1 $\pm$ Std 1", "Mean 2 $\pm$ Std 2"] libcommon.tab_header(f, colnames) group_cmp_latex_tab(f, lines) caption = '' label = '' libcommon.tab_closer(f, caption, label) libcommon.write_doc_end(f) f.close()
def trackclone_latex(groups, clone2groups, outfile): f = open(outfile, 'w') libcommon.write_doc_start(f) colnames = ["V", "Sequence", "J"] + groups colnames = [c.replace('_', "\_") for c in colnames] libcommon.tab_header(f, colnames) trackclone_latex_tab(f, clone2groups) caption = '' label = '' libcommon.tab_closer(f, caption, label) libcommon.write_doc_end(f) f.close()
def repsize_latex(samples, outfile, avrnames=[]): f = open(outfile, 'w') libcommon.write_doc_start(f) colnames = ["Sample", "Clones", "Reads"] libcommon.tab_header(f, colnames) repsize_latex_tab(f, samples, avrnames) caption = ("Repertoire size summary. Columns: `Sample': sample name, " + "`Clones': number of unique clones, `Reads': number of " + "reads. Rows: different samples, where the shaded rows " + "show the average of statistics of each group.") label = '' libcommon.tab_closer(f, caption, label) libcommon.write_doc_end(f) f.close()
def table_latex(objs, outfile, colfields, caption='', label='', listattr=None): f = open(outfile, 'w') libcommon.write_doc_start(f) colnames = ["Sample"] + colfields colnames = [c.replace('_', '\_') for c in colnames] libcommon.tab_header(f, colnames) if listattr: # if want to print an obj attr which is a list table_latex_tab_list(f, objs, listattr) else: # print all colfields attr table_latex_tab(f, objs, colfields) #caption = "Diversity colfields" libcommon.tab_closer(f, caption, label) libcommon.write_doc_end(f) f.close()