Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict after changes to Delly2 DAG in WGS SV Annotation #258

Closed
eudesbarbosa opened this issue Nov 30, 2022 · 1 comment · Fixed by #262
Closed

Conflict after changes to Delly2 DAG in WGS SV Annotation #258

eudesbarbosa opened this issue Nov 30, 2022 · 1 comment · Fixed by #262

Comments

@eudesbarbosa
Copy link
Member

Issue
After changes to Delly DAG in WGS SV Calling, it no longer outputs an merged file, *.delly2.merge_genotypes*.
Error:

11-29 21:51 snakemake.logging WARNING  Building DAG of jobs...
MissingInputException in rule wgs_sv_annotation_vcf_sv_filter  in line 71 of /path/to/snappy-pipeline/snappy_pipeline/workflows/wgs_sv_annotation/Snakefile:
Missing input files for rule wgs_sv_annotation_vcf_sv_filter:
    output: work/bwa.delly2.annotated.<LIBRARY_NAME>/out/bwa.delly2.annotated.<LIBRARY_NAME>.vcf.gz, work/bwa.delly2.annotated.<LIBRARY_NAME>/out/bwa.delly2.annotated.<LIBRARY_NAME>.vcf.gz.tbi, work/bwa.delly2.annotated.<LIBRARY_NAME>/out/bwa.delly2.annotated.<LIBRARY_NAME>.vcf.gz.md5, work/bwa.delly2.annotated.<LIBRARY_NAME>/out/bwa.delly2.annotated.<LIBRARY_NAME>.vcf.gz.tbi.md5
    wildcards: mapper=bwa, caller=delly2, index_ngs_library=<LIBRARY_NAME>
    affected files:
        /path/to/wgs_sv_calling/work/bwa.delly2.merge_genotypes/out/bwa.delly2.merge_genotypes.bcf.csi
        /path/to/wgs_sv_calling/work/bwa.delly2.merge_genotypes/out/bwa.delly2.merge_genotypes.bcf
11-29 21:51 snakemake.logging ERROR    MissingInputException in rule wgs_sv_annotation_vcf_sv_filter  in line 71 of /path/to/snappy-pipeline/snappy_pipeline/workflows/wgs_sv_annotation/Snakefile:
Missing input files for rule wgs_sv_annotation_vcf_sv_filter:
    output: work/bwa.delly2.annotated.<LIBRARY_NAME>/out/bwa.delly2.annotated.<LIBRARY_NAME>.vcf.gz, work/bwa.delly2.annotated.<LIBRARY_NAME>/out/bwa.delly2.annotated.<LIBRARY_NAME>.vcf.gz.tbi, work/bwa.delly2.annotated.<LIBRARY_NAME>/out/bwa.delly2.annotated.<LIBRARY_NAME>.vcf.gz.md5, work/bwa.delly2.annotated.<LIBRARY_NAME>/out/bwa.delly2.annotated.<LIBRARY_NAME>.vcf.gz.tbi.md5
    wildcards: mapper=bwa, caller=delly2, index_ngs_library=<LIBRARY_NAME>
    affected files:
        /path/to/wgs_sv_calling/work/bwa.delly2.merge_genotypes/out/bwa.delly2.merge_genotypes.bcf.csi
        /path/to/wgs_sv_calling/work/bwa.delly2.merge_genotypes/out/bwa.delly2.merge_genotypes.bcf

To Reproduce
Required relevant config parts to reproduce the behavior:

  wgs_sv_annotation:
    tool_ngs_mapping_variant_calling: bwa 
    tool_variant_calling: gatk_hc
    tools_ngs_mapping: [bwa]
    tools_wgs_sv_calling: [delly2]

  wgs_sv_calling:
    path_ngs_mapping: ../ngs_mapping
    tools:
      dna:
      - delly2
      - manta

  wgs_sv_export:
    release: GRCh37  # REQUIRED: default 'GRCh37'
    path_refseq_ser: ...

Called with cubi-tk snappy kickoff

Expected behavior
The correct file name convention should be set in wgs_sv_annotation.
From snappy-pipeline/snappy_pipeline/workflows/wgs_sv_annotation/__init__.py:

class VcfSvFilterStepPart(BaseStepPart):

     ...

    def get_input_files(self, action):
        """Return path to pedigree input file"""
        assert action == "run"

        @dictify
        def input_function(wildcards):
            if wildcards.caller == "popdel":
                name_pattern = "internal.concat_calls"
                key_ext = {"bcf": ".vcf.gz", "csi": ".vcf.gz.tbi"}
            else:  # delly2
                name_pattern = "merge_genotypes"
                key_ext = {"bcf": ".bcf", "csi": ".bcf.csi"}

            tpl = "work/write_pedigree.{index_ngs_library}/out/{index_ngs_library}.ped"
            yield "ped", tpl.format(**wildcards)
            # TODO: make work for non-Delly?
            tpl = (
                "work/{mapper}.{caller}.{index_ngs_library}/out/"
                "{mapper}.{caller}.{index_ngs_library}"
            )
            # SVs
            wgs_sv_calling = self.parent.sub_workflows["wgs_sv_calling"]
            for key, ext in key_ext.items():
                yield "sv_" + key, wgs_sv_calling(
                    tpl.replace("{index_ngs_library}", name_pattern) + ext
                ).format(**wildcards)

Additional context
Changed output and removed Delly dependency from WGS SV Annotation: #188
WGS SV Export and Annotation have a dependency in kickoff based on PopDel usage, not Delly. But I assume still need to be called...?

@eudesbarbosa
Copy link
Member Author

CC @Nicolai-vKuegelgen

@eudesbarbosa eudesbarbosa changed the title Conflict after changes to Delly2 DAG in WGS SV Export Conflict after changes to Delly2 DAG in WGS SV Annotation Nov 30, 2022
eudesbarbosa added a commit that referenced this issue Dec 5, 2022
* Fixed bug in VCF SV Filter wrapper and expanded coverage (#260)

* Update Delly output file name in wgs_sv_annotation (#258)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant