Пример #1
0
def runM3D(infile, outfile, root, design):
    job_options = "-l mem_free=4G -pe dedicated 1"
    groups = [x for x in itertools.combinations(EXPERIMENTS, 2)]

    # **code repeated - refactor**
    for pair in groups:
        pair = [re.sub("-agg", "", str(x)) for x in pair]
        pair1, pair2 = pair
        pair1_split = pair1.split("-")
        pair2_split = pair2.split("-")
        # only want pairs with one difference
        # e.g treatment or tissue but not both
        if not (pair1_split[0] != pair2_split[0]
                and pair1_split[1] != pair2_split[1]):
            outfile = ("%(root)s%(pair1)s_vs_%(pair2)s.tsv" % locals())
            if pair1_split[0] != pair2_split[0]:
                groups = [pair1_split[0], pair2_split[0]]
            elif pair1_split[1] != pair2_split[1]:
                groups = [pair1_split[1], pair2_split[1]]
            else:
                E.error(
                    "This pair does not contain any comparisons: %(pair)s" %
                    locals())

            RRBS.calculateM3DStat(infile,
                                  outfile,
                                  design,
                                  pair=pair,
                                  groups=groups,
                                  submit=True,
                                  job_options=job_options)
Пример #2
0
def runM3DSpikeClusters(infiles, outfile):
    job_options = "-l mem_free=4G -pe dedicated 1"
    infile, design = infiles
    RRBS.calculateM3DStat(infile,
                          outfile,
                          design,
                          submit=True,
                          job_options=job_options)