コード例 #1
0
ファイル: diversity_tab.py プロジェクト: ngannguyen/aimseqtk
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()
コード例 #2
0
ファイル: similarity_tab.py プロジェクト: ngannguyen/aimseqtk
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()
コード例 #3
0
ファイル: trackclone_tab.py プロジェクト: ngannguyen/aimseqtk
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()
コード例 #4
0
ファイル: repsize.py プロジェクト: ngannguyen/aimseqtk
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()
コード例 #5
0
ファイル: tabcommon.py プロジェクト: ngannguyen/aimseqtk
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()