def __init__(self,params) : cleanPyEnv() self.params=params # normalize boolean option input: safeSetBool(self.params,"enableRemoteReadRetrievalForInsertionsInGermlineCallingModes") safeSetBool(self.params,"enableRemoteReadRetrievalForInsertionsInCancerCallingModes") safeSetBool(self.params,"useOverlapPairEvidence") # Use RNA option for minCandidate size if self.params.isRNA: self.params.minCandidateVariantSize = self.params.rnaMinCandidateVariantSize # format bam lists: if self.params.normalBamList is None : self.params.normalBamList = [] if self.params.tumorBamList is None : self.params.tumorBamList = [] # make sure run directory is setup: self.params.runDir=os.path.abspath(self.params.runDir) ensureDir(self.params.runDir) # everything that's not intended to be a final result should dump directories/files in workDir self.params.workDir=os.path.join(self.params.runDir,"workspace") ensureDir(self.params.workDir) # all finalized pretty results get transfered to resultsDir self.params.resultsDir=os.path.join(self.params.runDir,"results") ensureDir(self.params.resultsDir) self.params.statsDir=os.path.join(self.params.resultsDir,"stats") ensureDir(self.params.statsDir) self.params.variantsDir=os.path.join(self.params.resultsDir,"variants") ensureDir(self.params.variantsDir) self.params.evidenceDir=os.path.join(self.params.resultsDir,"evidence") ensureDir(self.params.evidenceDir) # self.params.reportsDir=os.path.join(self.params.resultsDir,"reports") # ensureDir(self.params.reportsDir) indexRefFasta=self.params.referenceFasta+".fai" if self.params.referenceFasta is None: raise Exception("No reference fasta defined.") else: checkFile(self.params.referenceFasta,"reference fasta") checkFile(indexRefFasta,"reference fasta index") # read fasta index (self.params.chromOrder,self.params.chromSizes) = getFastaChromOrderSize(indexRefFasta) # determine subset of chroms where we can skip calling entirely (self.params.callRegionList, self.params.chromIsSkipped) = getCallRegions(self.params) self.paths = PathInfo(self.params) self.params.isHighDepthFilter = (not (self.params.isExome or self.params.isRNA)) self.params.isIgnoreAnomProperPair = (self.params.isRNA) # always use overlapping pairs for RNA calling if (self.params.isRNA) : self.params.useOverlapPairEvidence = True
def __init__(self, params, iniSections): cleanPyEnv() self.params = params self.iniSections = iniSections # Use RNA option for minCandidate size if self.params.isRNA: self.params.minCandidateVariantSize = self.params.rnaMinCandidateVariantSize # format bam lists: if self.params.normalBamList is None: self.params.normalBamList = [] if self.params.tumorBamList is None: self.params.tumorBamList = [] # make sure run directory is setup: self.params.runDir = os.path.abspath(self.params.runDir) ensureDir(self.params.runDir) # everything that's not intended to be a final result should dump directories/files in workDir self.params.workDir = os.path.join(self.params.runDir, "workspace") ensureDir(self.params.workDir) # all finalized pretty results get transfered to resultsDir self.params.resultsDir = os.path.join(self.params.runDir, "results") ensureDir(self.params.resultsDir) self.params.statsDir = os.path.join(self.params.resultsDir, "stats") ensureDir(self.params.statsDir) self.params.variantsDir = os.path.join(self.params.resultsDir, "variants") ensureDir(self.params.variantsDir) self.params.evidenceDir = os.path.join(self.params.resultsDir, "evidence") ensureDir(self.params.evidenceDir) # self.params.reportsDir=os.path.join(self.params.resultsDir,"reports") # ensureDir(self.params.reportsDir) indexRefFasta = self.params.referenceFasta + ".fai" if self.params.referenceFasta is None: raise Exception("No reference fasta defined.") else: checkFile(self.params.referenceFasta, "reference fasta") checkFile(indexRefFasta, "reference fasta index") # read fasta index (self.params.chromOrder, self.params.chromSizes) = getFastaChromOrderSize(indexRefFasta) # determine subset of chroms where we can skip calling entirely (self.params.callRegionList, self.params.chromIsSkipped) = getCallRegions(self.params) self.paths = PathInfo(self.params) self.params.isHighDepthFilter = (not (self.params.isExome or self.params.isRNA)) self.params.isIgnoreAnomProperPair = (self.params.isRNA)
def __init__(self,params,iniSections) : cleanPyEnv() self.params=params self.iniSections=iniSections # format bam lists: if self.params.normalBamList is None : self.params.normalBamList = [] if self.params.tumorBamList is None : self.params.tumorBamList = [] # make sure run directory is setup: self.params.runDir=os.path.abspath(self.params.runDir) ensureDir(self.params.runDir) # everything that's not intended to be a final result should dump directories/files in workDir self.params.workDir=os.path.join(self.params.runDir,"workspace") ensureDir(self.params.workDir) # all finalized pretty results get transfered to resultsDir self.params.resultsDir=os.path.join(self.params.runDir,"results") ensureDir(self.params.resultsDir) self.params.statsDir=os.path.join(self.params.resultsDir,"stats") ensureDir(self.params.statsDir) self.params.variantsDir=os.path.join(self.params.resultsDir,"variants") ensureDir(self.params.variantsDir) # self.params.reportsDir=os.path.join(self.params.resultsDir,"reports") # ensureDir(self.params.reportsDir) indexRefFasta=self.params.referenceFasta+".fai" if self.params.referenceFasta is None: raise Exception("No reference fasta defined.") else: checkFile(self.params.referenceFasta,"reference fasta") checkFile(indexRefFasta,"reference fasta index") # read fasta index (self.params.chromOrder,self.params.chromSizes) = getFastaChromOrderSize(indexRefFasta) self.paths = PathInfo(self.params) self.params.isHighDepthFilter = (not (self.params.isExome or self.params.isRNA)) self.params.isIgnoreAnomProperPair = (self.params.isRNA)
def __init__(self, params, PathInfoType): cleanPyEnv() self.params = params # make sure run directory is setup: self.params.runDir = os.path.abspath(self.params.runDir) ensureDir(self.params.runDir) # everything that's not intended to be a final result should dump directories/files in workDir self.params.workDir = os.path.join(self.params.runDir, "workspace") ensureDir(self.params.workDir) # all finalized pretty results get transferred to resultsDir self.params.resultsDir = os.path.join(self.params.runDir, "results") ensureDir(self.params.resultsDir) self.params.variantsDir = os.path.join(self.params.resultsDir, "variants") ensureDir(self.params.variantsDir) # timings and other stats go into statsDir self.params.statsDir = os.path.join(self.params.resultsDir, "stats") ensureDir(self.params.statsDir) self.paths = PathInfoType(self.params) referenceFastaIndex = self.params.referenceFasta + ".fai" if self.params.referenceFasta is None: raise Exception("No reference fasta defined.") else: checkFile(self.params.referenceFasta, "reference fasta") checkFile(referenceFastaIndex, "reference fasta index") # read fasta index (self.params.chromOrder, self.params.chromSizes) = getFastaChromOrderSize(referenceFastaIndex) # determine subset of chroms where we can skip calling entirely self.params.chromIsSkipped = getChromIsSkipped(self) self.params.isHighDepthFilter = (not (self.params.isExome or self.params.isRNA))