def constructor(self):

        self.input("bam", BamBai)
        self.input("intervals", Bed)
        self.input("sample_name", String)
        self.input("header_lines", File)
        self.input("reference", FastaWithDict)

        # vardict options
        self.input("allele_freq_threshold", Float, default=0.05)
        self.input("min_mapping_qual", Int(optional=True))
        self.input("filter", String(optional=True))
        self.input("no_sv_call", Boolean(optional=True))

        self.step(
            "vardict",
            VarDictGermline_1_6_0(
                intervals=self.intervals,
                bam=self.bam,
                reference=self.reference,
                sampleName=self.sample_name,
                var2vcfSampleName=self.sample_name,
                alleleFreqThreshold=self.allele_freq_threshold,
                var2vcfAlleleFreqThreshold=self.allele_freq_threshold,
                vcfFormat=True,
                chromColumn=1,
                regStartCol=2,
                geneEndCol=3,
                threads=4,
                minMappingQual=self.min_mapping_qual,
                filter=self.filter,
                noStructuralVariants=self.no_sv_call,
            ),
        )
        self.step(
            "annotate",
            BcfToolsAnnotate_1_5(vcf=self.vardict.out,
                                 headerLines=self.header_lines),
        )
        self.step("compressvcf",
                  BGZipLatest(file=self.annotate.out, stdout=True))
        self.step("tabixvcf", TabixLatest(inp=self.compressvcf.out))

        self.step(
            "splitnormalisevcf",
            SplitMultiAllele(vcf=self.annotate.out, reference=self.reference),
        )
        self.step("trim", TrimIUPAC_0_0_5(vcf=self.splitnormalisevcf.out))
        self.step(
            "filterpass",
            VcfToolsvcftoolsLatest(
                vcf=self.trim.out,
                removeFileteredAll=True,
                recode=True,
                recodeINFOAll=True,
            ),
        )

        self.output("variants", source=self.tabixvcf.out)
        self.output("out", source=self.filterpass.out)
    def constructor(self):

        self.input("normal_bam", BamBai)
        self.input("tumor_bam", BamBai)
        self.input("normal_name", String)
        self.input("tumor_name", String)
        self.input("intervals", Bed)
        self.input("header_lines", File)
        self.input("reference", FastaWithDict)

        # vardict options
        self.input("allele_freq_threshold", Float(), 0.05)
        self.input("minMappingQual", Int(optional=True))
        self.input("filter", String(optional=True))

        self.step(
            "vardict",
            VarDictSomatic_1_6_0(
                normalBam=self.normal_bam,
                tumorBam=self.tumor_bam,
                intervals=self.intervals,
                reference=self.reference,
                normalName=self.normal_name,
                tumorName=self.tumor_name,
                alleleFreqThreshold=self.allele_freq_threshold,
                vcfFormat=True,
                chromColumn=1,
                regStartCol=2,
                geneEndCol=3,
                threads=4,
                minMappingQual=self.minMappingQual,
                filter=self.filter,
            ),
        )
        self.step(
            "annotate",
            BcfToolsAnnotate_1_5(vcf=self.vardict.out,
                                 headerLines=self.header_lines),
        )
        self.step("compressvcf",
                  BGZipLatest(file=self.annotate.out, stdout=True))
        self.step("tabixvcf", TabixLatest(inp=self.compressvcf.out))

        self.step(
            "splitnormalisevcf",
            SplitMultiAllele(vcf=self.annotate.out, reference=self.reference),
        )
        self.step("trim", TrimIUPAC_0_0_5(vcf=self.splitnormalisevcf.out))
        self.step("filterpass", FilterVardictSomaticVcf(vcf=self.trim.out))

        self.output("variants", source=self.tabixvcf.out)
        self.output("out", source=self.filterpass.out)
Exemplo n.º 3
0
    def constructor(self):

        self.input("bam", BamBai)
        self.input("intervals", Bed)

        self.input("sample_name", String)
        self.input("allele_freq_threshold", Float, default=0.5)
        self.input("header_lines", File)

        self.input("reference", FastaWithDict)

        self.step(
            "vardict",
            VarDictGermline_1_6_0(
                intervals=self.intervals,
                bam=self.bam,
                reference=self.reference,
                sampleName=self.sample_name,
                var2vcfSampleName=self.sample_name,
                alleleFreqThreshold=self.allele_freq_threshold,
                var2vcfAlleleFreqThreshold=self.allele_freq_threshold,
                chromNamesAreNumbers=True,
                vcfFormat=True,
                chromColumn=1,
                regStartCol=2,
                geneEndCol=3,
            ),
        )
        self.step(
            "annotate",
            BcfToolsAnnotate_1_5(file=self.vardict.out,
                                 headerLines=self.header_lines),
        )
        self.step(
            "split_multi_allele",
            SplitMultiAllele(vcf=self.annotate.out, reference=self.reference),
        )
        self.step("trim", TrimIUPAC_0_0_5(vcf=self.split_multi_allele.out))

        self.output("vardict_variants", source=self.vardict.out)
        self.output("out", source=self.trim.out)