def __init__(self,params) : global PathInfo super(StrelkaGermlineWorkflow,self).__init__(params,PathInfo) # format bam lists: if self.params.bamList is None : self.params.bamList = [] # format other: safeSetBool(self.params,"isWriteRealignedBam") if self.params.isWriteRealignedBam : self.params.realignedDir=os.path.join(self.params.resultsDir,"realigned") ensureDir(self.params.realignedDir) if self.params.isExome : self.params.isEVS = False
def __init__(self, params, iniSections): global PathInfo super(StrelkaPedigreeWorkflow, self).__init__(params, iniSections, PathInfo) # format bam lists: if self.params.probandBamList is None: self.params.probandBamList = [] if self.params.parentBamList is None: self.params.parentBamList = [] if self.params.siblingBamList is None: self.params.siblingBamList = [] # bools coming from the ini file need to be cleaned up: safeSetBool(self.params, "isWriteRealignedBam") if self.params.isOutputCallableRegions: self.params.regionsDir = os.path.join(self.params.resultsDir, "regions") ensureDir(self.params.regionsDir)
def __init__(self,params) : global PathInfo super(StrelkaSomaticWorkflow,self).__init__(params, PathInfo) # format bam lists: if self.params.normalBamList is None : self.params.normalBamList = [] if self.params.tumorBamList is None : self.params.tumorBamList = [] # bools coming from the ini file need to be cleaned up: safeSetBool(self.params,"isWriteRealignedBam") if self.params.isOutputCallableRegions : self.params.regionsDir=os.path.join(self.params.resultsDir,"regions") ensureDir(self.params.regionsDir) if self.params.isWriteRealignedBam : self.params.realignedDir=os.path.join(self.params.resultsDir,"realigned") ensureDir(self.params.realignedDir)
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): global PathInfo super(StrelkaGermlineWorkflow, self).__init__(params, iniSections, PathInfo) # format bam lists: if self.params.bamList is None: self.params.bamList = [] # format other: safeSetBool(self.params, "isWriteRealignedBam") if self.params.isWriteRealignedBam: self.params.realignedDir = os.path.join(self.params.resultsDir, "realigned") ensureDir(self.params.realignedDir) if self.params.isExome: self.params.isEVS = False if self.params.isRNA: self.params.germlineSnvScoringModelFile = joinFile( self.params.configDir, 'RNAVariantScoringModels.json') self.params.germlineIndelScoringModelFile = None
def test_safeSetBool(self): class Foo: pass configureUtil.safeSetBool(Foo, "bar") self.assertFalse(Foo.bar)
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