def validateAndSanitizeOptions(self,options) :

        StrelkaSharedWorkflowOptionsBase.validateAndSanitizeOptions(self,options)

        checkFixTabixListOption(options.noiseVcfList,"noise vcf")

        groomBamList(options.normalBamList,"normal sample")
        groomBamList(options.tumorBamList, "tumor sample")

        def checkRequired(bamList,label):
            if (bamList is None) or (len(bamList) == 0) :
                raise OptParseException("No %s sample BAM/CRAM files specified" % (label))

        checkRequired(options.tumorBamList,"tumor")

        bamSetChecker = BamSetChecker()

        def singleAppender(bamList,label):
            if bamList is None : return
            if len(bamList) > 1 :
                raise OptParseException("More than one %s sample BAM/CRAM files specified" % (label))
            bamSetChecker.appendBams(bamList,label)

        singleAppender(options.normalBamList,"normal")
        singleAppender(options.tumorBamList,"tumor")
        bamSetChecker.check(options.htsfileBin,
                     options.referenceFasta)
    def validateAndSanitizeOptions(self, options):

        StrelkaSharedWorkflowOptionsBase.validateAndSanitizeOptions(
            self, options)

        def checkFixTabixIndexedFileOption(tabixFile, label):
            checkOptionalTabixIndexedFile(tabixFile, label)
            if tabixFile is None: return None
            return os.path.abspath(tabixFile)

        if options.excludedRegions is not None:
            for excludeIndex in range(len(options.excludedRegions)):
                options.excludedRegions[excludeIndex] = \
                    checkFixTabixIndexedFileOption(options.excludedRegions[excludeIndex],"excluded-regions bed")

        if options.knownVariants is not None:
            options.knownVariants = \
                checkFixTabixIndexedFileOption(options.knownVariants,"known-variants vcf")

        groomBamList(options.bamList, "input")

        bamSetChecker = BamSetChecker()

        def singleAppender(bamList, label):
            if len(bamList) > 1:
                raise OptParseException(
                    "More than one %s sample BAM/CRAM files specified" %
                    (label))
            bamSetChecker.appendBams(bamList, label)

        singleAppender(options.bamList, "Input")
        bamSetChecker.check(options.htsfileBin, options.referenceFasta)
示例#3
0
    def validateAndSanitizeOptions(self, options):

        StrelkaSharedWorkflowOptionsBase.validateAndSanitizeOptions(
            self, options)

        groomBamList(options.bamList, "input")

        bamSetChecker = BamSetChecker()
        bamSetChecker.appendBams(options.bamList, "Input")
        bamSetChecker.check(options.samtoolsBin, options.referenceFasta)
示例#4
0
    def validateAndSanitizeOptions(self, options):

        StrelkaSharedWorkflowOptionsBase.validateAndSanitizeOptions(
            self, options)

        options.ploidyFilename = checkFixTabixIndexedFileOption(
            options.ploidyFilename, "ploidy file")
        options.noCompressBed = checkFixTabixIndexedFileOption(
            options.noCompressBed, "no-compress bed")
        if options.snvScoringModelFile is None:
            if options.isRNA:
                options.snvScoringModelFile = options.rnaSnvScoringModelFile
            else:
                options.snvScoringModelFile = options.germlineSnvScoringModelFile

        if options.indelScoringModelFile is None:
            if options.isRNA:
                options.indelScoringModelFile = options.rnaIndelScoringModelFile
            else:
                options.indelScoringModelFile = options.germlineIndelScoringModelFile

        # Disable dynamic error estimation for Exome
        if options.isExome:
            options.isEstimateSequenceError = False

        # Disable dynamic error estimation for RNA
        if options.isRNA:
            options.isEstimateSequenceError = False

        groomBamList(options.bamList, "input")

        def safeLen(x):
            if x is None: return 0
            return len(x)

        if safeLen(options.bamList) == 0:
            raise OptParseException(
                "No input sample alignment files specified")

        bamSetChecker = BamSetChecker()
        bamSetChecker.appendBams(options.bamList, "Input")
        bamSetChecker.check(options.htsfileBin, options.referenceFasta)