Esempio n. 1
0
 def __init__(self, source, target, cmds, remove=False):
     self.source = listify(source)
     self.target = listify(target)
     self.cmds = listify(cmds)
     if remove:
         rm_cmd = "rm -f {0}".format(" ".join(self.target))
         self.cmds = [rm_cmd] + self.cmds
Esempio n. 2
0
 def __init__(self, taxon, chr, pos, ref_allele, alt_allele, profile):
     self.taxon = taxon
     self.chr = chr
     self.pos = pos
     self.ref_nt = listify(ref_allele)
     self.ref_allele = listify(ref_allele)
     self.alt_allele = listify(alt_allele)
     self.update(profile)
Esempio n. 3
0
 def __init__(self, taxon, chr, pos, ref_allele, alt_allele, profile):
     self.taxon = taxon
     self.chr = chr
     self.pos = pos
     self.ref_nt = listify(ref_allele)
     self.ref_allele = listify(ref_allele)
     self.alt_allele = listify(alt_allele)
     self.update(profile)
Esempio n. 4
0
 def __init__(self, source, target, cmds, id, remove=False):
     self.id = id
     self.source = listify(source)
     self.target = listify(target)
     self.cmds = listify(cmds)
     if remove:
         rm_cmd = "rm -f {0}".format(" ".join(self.target))
         self.cmds = [rm_cmd] + self.cmds
Esempio n. 5
0
    def wrapper(*args, **kwargs):
        assert outfile in kwargs, "You need to specify `outfile=` on function call"
        if infile in kwargs:
            infilename = listify(kwargs[infile])
            for x in infilename:
                assert op.exists(
                    x), "The specified infile `{0}` does not exist".format(x)

        outfilename = kwargs[outfile]
        if need_update(infilename, outfilename):
            return func(*args, **kwargs)
        else:
            msg = "File `{0}` exists. Computation skipped.".format(outfilename)
            logging.debug(msg)

        outfilename = listify(outfilename)

        for x in outfilename:
            assert op.exists(
                x), "Something went wrong, `{0}` not found".format(x)

        return outfilename
Esempio n. 6
0
    def wrapper(*args, **kwargs):
        assert outfile in kwargs, \
            "You need to specify `outfile=` on function call"
        if infile in kwargs:
            infilename = listify(kwargs[infile])
            for x in infilename:
                assert op.exists(x), \
                    "The specified infile `{0}` does not exist".format(x)

        outfilename = kwargs[outfile]
        if need_update(infilename, outfilename):
            return func(*args, **kwargs)
        else:
            msg = "File `{0}` exists. Computation skipped." \
                .format(outfilename)
            logging.debug(msg)

        outfilename = listify(outfilename)

        for x in outfilename:
            assert op.exists(x), \
                    "Something went wrong, `{0}` not found".format(x)

        return outfilename
Esempio n. 7
0
File: base.py Progetto: yangjl/jcvi
def normalize_axes(axes):
    axes = listify(axes)
    for ax in axes:
        ax.set_xlim(0, 1)
        ax.set_ylim(0, 1)
        ax.set_axis_off()
Esempio n. 8
0
def normalize_axes(axes):
    axes = listify(axes)
    for ax in axes:
        ax.set_xlim(0, 1)
        ax.set_ylim(0, 1)
        ax.set_axis_off()
Esempio n. 9
0
    def __init__(self, target, args):

        for x in args:
            x = listify(x)
            self.append(Process(target=target, args=x))
Esempio n. 10
0
 def add(self, source, target, cmds, remove=False):
     self.ndeps += 1
     d = Dependency(source, target, cmds, self.ndeps, remove=remove)
     self.append(d)
     self.targets |= set(listify(target))
Esempio n. 11
0
 def add(self, source, target, cmds, remove=False):
     self.ndeps += 1
     d = Dependency(source, target, cmds, self.ndeps, remove=remove)
     self.append(d)
     self.targets |= set(listify(target))
Esempio n. 12
0
    def __init__(self, target, args):

        for x in args:
            x = listify(x)
            self.append(Process(target=target, args=x))
Esempio n. 13
0
File: grid.py Progetto: rrane/jcvi
 def __init__(self, source, target, cmds):
     self.source = listify(source)
     self.target = listify(target)
     self.cmds = listify(cmds)