Example #1
0
 def __init__(self, halFile, phyloPModel, bedFileDict, jobsPerGenome, threshold):
     Target.__init__(self)
     self.halFile = halFile
     self.phyloPModel = phyloPModel
     self.bedFileDict = bedFileDict
     self.jobsPerGenome = jobsPerGenome
     self.threshold = threshold
Example #2
0
 def __init__(self, halfile, names, outdir, maxOut, minIn):
     Target.__init__(self)
     self.halfile = halfile
     self.names = names
     self.outdir = outdir
     self.maxOut = maxOut
     self.minIn = minIn
Example #3
0
 def __init__(self, options, outdir, halfile, genome2seq2len, type):
     Target.__init__(self)
     self.options = options
     self.outdir = outdir
     self.halfile = halfile
     self.genome2seq2len = genome2seq2len
     self.type = type #type has to be bed or wiggle
Example #4
0
 def __init__(self, cactusDisk, flowerName, finalResultsFile, blastOptions):
     Target.__init__(self)
     self.cactusDisk = cactusDisk
     self.flowerName = flowerName
     self.finalResultsFile = finalResultsFile
     self.blastOptions = blastOptions
     blastOptions.roundsOfCoordinateConversion = 2
Example #5
0
 def __init__(self, indir, outdir, pattern, filteredSamples, includeCoverage=False):
     Target.__init__(self, time=0.25)
     self.indir = indir
     self.outdir = outdir
     self.pattern = pattern
     self.includeCoverage = includeCoverage
     self.filteredSamples = filteredSamples
Example #6
0
 def __init__(self, options, refseq, outdir, readdir):
     #Target.__init__(self, time=0.00025)
     Target.__init__(self)
     self.options = options
     self.refseq = refseq
     self.outdir = outdir
     self.readdir = readdir
Example #7
0
 def __init__(self, halFile, genome, bedForJob, modelFile, output):
     Target.__init__(self)
     self.halFile = halFile
     self.genome = genome
     self.bedForJob = bedForJob
     self.modelFile = modelFile
     self.output = output
Example #8
0
 def __init__(self, options, outdir, halfile, genome2seq2len, type):
     Target.__init__(self)
     self.options = options
     self.outdir = outdir
     self.halfile = halfile
     self.genome2seq2len = genome2seq2len
     self.type = type  #type has to be bed or wiggle
 def __init__(self, readFastqFile, referenceFastaFile, outputSamFile,
              options):
     Target.__init__(self)
     self.readFastqFile = readFastqFile
     self.referenceFastaFile = referenceFastaFile
     self.outputSamFile = outputSamFile
     self.options = options  #These are the options from cactus_expectationMaximisation
Example #10
0
 def __init__(self, samplenames, pair2stat, outbase, attr, opts):
     Target.__init__(self)
     self.names = samplenames
     self.pair2stat = pair2stat
     self.outbase = outbase
     self.attr = attr
     self.opts = opts
Example #11
0
 def __init__(self, indir, outdir, size, topFreqs, samSizes):
     Target.__init__(self)
     self.indir = indir #simSampleTempDir
     self.outdir = outdir #simTempDir/sampleID
     self.size = size
     self.topFreqs = topFreqs
     self.samSizes = samSizes
Example #12
0
 def __init__(self, indir, outdir, opts=None, *args):
     Target.__init__(self)
     self.indir = indir
     self.outdir = outdir
     self.opts = opts
     self.args = args
     self.name2obj = None
Example #13
0
    def __init__(self, outputDir, experiments):
        Target.__init__(self)
        self.experiments = experiments
        self.outputDir = outputDir

        #Quadruples of (readFastqFile, readType, referenceFastaFile, mapper) to pairs of (analyses, resultsDir)
        self.experimentHash = {}
        #Mappers
        self.mappers = set()
        #Read file readType double
        self.readFastqFiles = set()
        #Reference files
        self.referenceFastaFiles = set()
        #readTypes
        self.readTypes = set()
        #base mappers (lastz, last, bwa, blasr)
        self.baseMappers = set()

        #Store all this stuff
        for readFastqFile, readType, referenceFastaFile, mapper, analyses, resultsDir in self.experiments:
            self.experimentHash[((readFastqFile, readType), referenceFastaFile,
                                 mapper)] = (analyses, resultsDir)
            self.mappers.add(mapper)
            self.readFastqFiles.add((readFastqFile, readType))
            self.referenceFastaFiles.add(referenceFastaFile)
            self.readTypes.add(readType)
            self.baseMappers.add(re.findall("[A-Z][a-z]*", mapper.__name__)[0])
Example #14
0
def find_analyses(target, recordsToAnalyze, templateFastqFiles, complementFastqFiles, references, outputDir):
    """takes a set of records to analyze and finds the corresponding sequences and creates alignment targets"""
    files = {"template":[], "complement":[]}

    logger.info("Finding template analyses")
    for fastqFile in templateFastqFiles:
        for name, seq, qual in fastqRead(fastqFile):
            if name in recordsToAnalyze:
                outfile = os.path.join(target.getGlobalTempDir(), "template_" + name)
                files["template"].append(outfile)
                ref_name, ref_start, ref_stop = recordsToAnalyze[name]
                ref_seq = references[ref_name][ref_start : ref_stop]
                analysis = [name, seq, ref_name, ref_seq, outfile]
                target.addChildTarget(Target.makeTargetFn(analyze, args=analysis))

    logger.info("Finding complement analyses")
    for fastqFile in complementFastqFiles:
        for name, seq, qual in fastqRead(fastqFile):
            if name in recordsToAnalyze:
                outfile = os.path.join(target.getGlobalTempDir(), "complement_" + name)
                files["complement"].append(outfile)
                ref_name, ref_start, ref_stop = recordsToAnalyze[name]
                ref_seq = references[ref_name][ref_start : ref_stop]
                analysis = [name, seq, ref_name, ref_seq, outfile]
                target.addChildTarget(Target.makeTargetFn(analyze, args=analysis))

    target.setFollowOnTargetFn(merge, args=(files, outputDir))
	def __init__(self, options): 
		Target.__init__(self)
		self.options=options
		self.events=[]
		self.totalp=0
		self.edges=[]
		self.historyScores=[]	
Example #16
0
def find_analyses(target, recordsToAnalyze, templateFastqFiles,
                  complementFastqFiles, references, outputDir):
    """takes a set of records to analyze and finds the corresponding sequences and creates alignment targets"""
    files = {"template": [], "complement": []}

    logger.info("Finding template analyses")
    for fastqFile in templateFastqFiles:
        for name, seq, qual in fastqRead(fastqFile):
            if name in recordsToAnalyze:
                outfile = os.path.join(target.getGlobalTempDir(),
                                       "template_" + name)
                files["template"].append(outfile)
                ref_name, ref_start, ref_stop = recordsToAnalyze[name]
                ref_seq = references[ref_name][ref_start:ref_stop]
                analysis = [name, seq, ref_name, ref_seq, outfile]
                target.addChildTarget(
                    Target.makeTargetFn(analyze, args=analysis))

    logger.info("Finding complement analyses")
    for fastqFile in complementFastqFiles:
        for name, seq, qual in fastqRead(fastqFile):
            if name in recordsToAnalyze:
                outfile = os.path.join(target.getGlobalTempDir(),
                                       "complement_" + name)
                files["complement"].append(outfile)
                ref_name, ref_start, ref_stop = recordsToAnalyze[name]
                ref_seq = references[ref_name][ref_start:ref_stop]
                analysis = [name, seq, ref_name, ref_seq, outfile]
                target.addChildTarget(
                    Target.makeTargetFn(analyze, args=analysis))

    target.setFollowOnTargetFn(merge, args=(files, outputDir))
Example #17
0
 def __init__(self, args):
     Target.__init__(self)
     self.clonefile = args[0]
     self.vfile = args[1]
     self.jfile = args[2]
     self.dfile = args[3]
     self.outdir = args[4]
Example #18
0
 def __init__(self, sample1, sample2, c2n2s_dir, outfile, opts):
     Target.__init__(self)
     self.sample1 = sample1
     self.sample2 = sample2
     self.c2n2s_dir = c2n2s_dir
     self.outfile = outfile
     self.opts = opts
Example #19
0
 def __init__(self, clone, indir, outfile, opts, s2g):
     Target.__init__(self)
     self.clone = clone
     self.indir = indir
     self.outfile = outfile
     self.opts = opts
     self.s2g = s2g
Example #20
0
 def __init__(self, c2n2s_dir, sams, indir, outdir, opts):
     Target.__init__(self)
     self.c2n2s_dir = c2n2s_dir
     self.sams = sams
     self.outdir = outdir
     self.indir = indir
     self.opts = opts
Example #21
0
 def __init__(self, indir, outdir, size, pair, cutoffs):
     Target.__init__(self, time=0.00025)
     self.indir = indir #simTempDir (which has simTempDir/sampleId/rep.pickle)
     self.outdir = outdir #outdir/sims/batchId/sim-Id/sampling-Id
     self.size = size
     self.pair = pair
     self.cutoffs = cutoffs
Example #22
0
 def __init__(self, exp, ref, sample, outdir, options):
     Target.__init__(self)
     self.exp = exp
     self.ref = ref
     self.sample = sample
     self.outdir = outdir
     self.options = options
 def __init__(self, options,
              sequences, 
              newickTree,
              outputDir,
              params):
              #requiredSpecies,
              #singleCopySpecies,
              #referenceAlgorithm, minimumBlockDegree, 
              #blastAlignmentString, baseLevel, maxNumberOfChains, permutations,
              #theta, useSimulatedAnnealing, heldOutSequence):
     Target.__init__(self, cpu=4, memory=4000000000)
     self.sequences = sequences
     self.newickTree = newickTree
     #self.requiredSpecies = requiredSpecies
     #self.singleCopySpecies = singleCopySpecies
     self.outputDir = outputDir
     #self.referenceAlgorithm = referenceAlgorithm
     #self.minimumBlockDegree = int(minimumBlockDegree)
     #self.blastAlignmentString = blastAlignmentString
     #self.baseLevel = baseLevel
     #self.maxNumberOfChains = maxNumberOfChains
     #self.permutations = permutations
     #self.theta = theta
     #self.useSimulatedAnnealing = useSimulatedAnnealing
     self.options = options
     #self.heldOutSequence = heldOutSequence
     self.params = params
Example #24
0
 def __init__(self, genomes, genome2seq2len, halfile, options, outdir):
     Target.__init__(self)
     self.genomes = genomes
     self.genome2seq2len = genome2seq2len
     self.halfile = halfile
     self.options = options
     self.outdir = outdir
Example #25
0
 def __init__(self, outputss, outPaths, doSamplings, numSampless, headers):
     Target.__init__(self)
     self.outputss = outputss
     self.outPaths = outPaths
     self.doSamplings = doSamplings
     self.numSampless = numSampless
     self.headers = headers
Example #26
0
	def __init__(self, i, i2, options, events, datadir): 
		Target.__init__(self)
		self.options=options
		self.i=i
		self.i2=i2
		self.outdir=datadir
		self.events=events
Example #27
0
 def __init__(self, genome, seq2len, halfile, outdir, options):
     Target.__init__(self)
     self.genome = genome
     self.seq2len = seq2len
     self.halfile = halfile
     self.outdir = outdir
     self.options = options
Example #28
0
    def __init__(self, experiment, sample, dir, outdir, mask):
        Target.__init__(self, time=0.00025)
        self.exp = experiment
        self.sample = sample
        self.dir = dir
	self.outdir = outdir
        self.mask = mask
 def __init__(self, nodesList, leafsDict, options):
     Target.__init__(self)
     self.options = options
     self.nodesList = nodesList
     self.nodeParentDict = lsc.buildNodeParentDict(self.nodesList)
     self.leafsDict = leafsDict
     self.nodeDict = lsc.buildNodesDict(self.nodesList, self.leafsDict)
Example #30
0
 def __init__(self, halfile, tree, bigbeddir, maxOut, minIn):
     Target.__init__(self)
     self.halfile = halfile
     self.tree = tree
     self.bigbeddir = bigbeddir
     self.maxOut = maxOut
     self.minIn = minIn
 def __init__(self, options, trueMaf, predictedMaf, outputFile, params):
     Target.__init__(self)
     self.options = options
     self.trueMaf = trueMaf
     self.predictedMaf = predictedMaf
     self.outputFile = outputFile
     self.params = params
 def __init__(self, options):
     Target.__init__(self)
     self.options = options
     self.events = []
     self.totalp = 0
     self.edges = []
     self.historyScores = []
Example #33
0
 def __init__(self, halfile, tree, bigbeddir, maxOut, minIn):
     Target.__init__(self)
     self.halfile = halfile
     self.tree = tree
     self.bigbeddir = bigbeddir
     self.maxOut = maxOut
     self.minIn = minIn
Example #34
0
 def __init__(self, halfile, names, outdir, maxOut, minIn):
     Target.__init__(self)
     self.halfile = halfile
     self.names = names
     self.outdir = outdir
     self.maxOut = maxOut
     self.minIn = minIn
 def __init__(self, opts, positions, outputFile, speciesTree, positionSet):
     Target.__init__(self)
     self.opts = opts
     self.positions = positions
     self.outputFile = outputFile
     self.speciesTree = speciesTree
     self.positionSet = positionSet
Example #36
0
 def __init__(self, vj, sams, indir, outfile, sizetype):
     Target.__init__(self)
     self.vj = vj
     self.sams = sams
     self.indir = indir
     self.outfile = outfile
     self.sizetype = sizetype
	def __init__(self, blocks, events, i, outputdir, options): 
		Target.__init__(self)
		self.options=options
		self.blocks=blocks
		self.events=events
		self.outputdir=outputdir
		self.i = i
Example #38
0
 def __init__(self, tree, event, sleepTime, startTime, cpu):
     Target.__init__(self, cpu=cpu)
     self.tree = tree
     self.event = event
     self.sleepTime = sleepTime
     self.startTime = startTime
     self.cpu = cpu
Example #39
0
 def __init__(self, sample, samdir, outfile, func, *func_args):
     Target.__init__(self)
     self.sample = sample
     self.samdir = samdir
     self.outfile = outfile
     self.func = func
     self.func_args = func_args
Example #40
0
 def __init__(self, experiment, sample, dir, outdir, mask):
     Target.__init__(self, time=0.00025)
     self.exp = experiment
     self.sample = sample
     self.dir = dir
     self.outdir = outdir
     self.mask = mask
 def __init__(self, tree, event, sleepTime, startTime, cpu):
     Target.__init__(self, cpu=cpu)
     self.tree = tree
     self.event = event
     self.sleepTime = sleepTime
     self.startTime = startTime
     self.cpu = cpu
Example #42
0
 def __init__(self, outDir, dataDir, genomes, psls, primaryKeyColumn):
     Target.__init__(self)
     self.outDir = outDir
     self.genomes = genomes
     self.psls = psls
     self.primaryKeyColumn = primaryKeyColumn
     self.tmpDir = dataDir
 def __init__(self, events, pedgesfile, historyScores, totalp, ignore_cn):
     Target.__init__(self)
     self.events = events
     self.pedgesfile = pedgesfile
     self.historyScores = historyScores
     self.totalp = totalp
     self.ignore_cn = ignore_cn
Example #44
0
 def __init__(self, indir, minsam, maxsam, outdir, sampling):
     Target.__init__(self)
     self.indir = indir
     self.minsam = minsam
     self.maxsam = maxsam
     self.outdir = outdir
     self.sampling = sampling
Example #45
0
 def __init__(self, blocks, events, i, outputdir, options):
     Target.__init__(self)
     self.options = options
     self.blocks = blocks
     self.events = events
     self.outputdir = outputdir
     self.i = i
Example #46
0
 def __init__(self, genomeoutdir, wig, genome, othergenome, halfile, outdir):
     Target.__init__(self)
     self.genomeoutdir = genomeoutdir
     self.wig = wig
     self.genome = genome
     self.othergenome = othergenome
     self.halfile = halfile
     self.outdir = outdir
Example #47
0
 def __init__(self, data_frame, signature_name, positive_samples, negative_samples, parameters, directory):
     Target.__init__(self, time=10000)
     self.data_frame = data_frame
     self.signature_name = signature_name
     self.positive_samples = positive_samples
     self.negative_samples = negative_samples
     self.parameters = parameters
     self.directory = directory
Example #48
0
 def __init__(self, indir, halfile, genome2seq2len, bigwigdir, noLiftover, outdir):
     Target.__init__(self)
     self.indir = indir
     self.halfile = halfile
     self.genome2seq2len = genome2seq2len
     self.bigwigdir = bigwigdir
     self.noLiftover = noLiftover
     self.outdir = outdir
Example #49
0
 def __init_(self, cladedir, halfile, query, queryBed, target, chrsizefile):
     Target.__init__(self)
     self.cladedir = cladedir
     self.halfile = halfile
     self.query = query
     self.queryBed = queryBed
     self.target = target
     self.chrsizefile = chrsizefile
Example #50
0
 def __init__(self, uuid, path, out_dir, graph):
     Target.__init__(self)
     self.counts = defaultdict(float)
     self.normalizing = 0.0
     self.uuid = uuid
     self.path = path
     self.out_dir = out_dir
     self.graph = graph
 def __init__(self, peventsfile, trueID, historyScores, outname, outputdir,
              binwidth):
     Target.__init__(self)
     self.events = pickle.load(open(peventsfile, 'rb'))
     self.outname = outname
     self.trueID = trueID
     self.historyScores = historyScores
     self.outputdir = outputdir
     self.binwidth = binwidth
 def __init__(self, outDir, resultsDir, simTrueMafDir, simName,
              cactusRunTime):
     Target.__init__(self)
     self.outDir = outDir
     self.resultsDir = resultsDir  #Directory contains cactus cactusDisk and jobTree
     #self.simNum = simNum
     self.simTrueMafDir = simTrueMafDir
     self.simName = simName
     self.cactusRunTime = cactusRunTime
Example #53
0
 def __init__(self, readFastqFile, readType, referenceFastaFile, samFile,
              outputDir):
     Target.__init__(self)
     self.readFastqFile = readFastqFile
     self.referenceFastaFile = referenceFastaFile
     self.samFile = samFile
     self.outputDir = outputDir
     self.readType = readType
     print(str(self.samFile))
Example #54
0
 def __init__(self, newickTree, haplotypeSequences, assemblyFile, outputDir,
              configFile, options):
     Target.__init__(self, cpu=1, memory=8000000000)
     self.newickTree = newickTree
     self.haplotypeSequences = haplotypeSequences
     self.assemblyFile = assemblyFile
     self.outputDir = outputDir
     self.configFile = configFile
     self.options = options
Example #55
0
 def __init__(self, analysis, paradigm_setup, directory, nulls=None):
     Target.__init__(self, time=10000)
     self.analysis = analysis
     self.paradigm_setup = paradigm_setup
     self.directory = directory
     if nulls is None:
         self.nulls = self.paradigm_setup.nulls
     else:
         self.nulls = nulls
Example #56
0
 def __init__(self, newickTree, haplotypeSequences, assembliesDir,
              outputDir, configFile, options):
     Target.__init__(self)
     self.newickTree = newickTree
     self.haplotypeSequences = haplotypeSequences
     self.assembliesDir = assembliesDir
     self.outputDir = outputDir
     self.configFile = configFile
     self.options = options
Example #57
0
    def __init__(self, region, databaseString, outputDir, refSpecies, geneDir):
        Target.__init__(self, time=120)
        self.region = region
        self.dbStr = databaseString
        self.refSpecies = refSpecies
        self.outputFile = os.path.join(outputDir,
                                       "%s-%s.xml" % ("genemapChain", region))

        self.geneFile = os.path.join(geneDir, "refGeneConverted.bed")