snakemake-workflows / dna-seq-varlociraptor

A Snakemake workflow for calling small and structural variants under any kind of scenario (tumor/normal, tumor/normal/relapse, germline, pedigree, populations) via the unified statistical model of Varlociraptor.
MIT License
81 stars 37 forks source link

may need to modify the rule mark_ duplicates #215

Closed user-tq closed 1 year ago

user-tq commented 1 year ago

When trying to allow this pipeline, I encountered an error

 bams = snakemake.input.bams
           ^^^^^^^^^^^^^^^^^^^^
AttributeError: 'InputFiles' object has no attribute 'bams'

Due to network reasons, localized wrapper and varlocaliraptor and forced varlocaliraptor to use version 1.23.5 wrapper, which made it relatively easy for me to find the problem.(Or maybe this is a problem created by me. Sorry, I'm not an expert in this field)

I insert in the picard/markduplicates/wrapper.py

print(snakemake.__dict__)
print(snakemake.input.__dict__)

image

i think is wrong to write

rule mark_duplicates:
    input:
        lambda wc: "results/mapped/{sample}.bam"
        if units.loc[wc.sample, "umis"].isnull().any()
        else "results/mapped/{sample}.annotated.bam",

maybe it should be

rule mark_duplicates:
    input:
        bams=lambda wc: "results/mapped/{sample}.bam"
        if units.loc[wc.sample, "umis"].isnull().any()
        else "results/mapped/{sample}.annotated.bam",
dlaehnemann commented 1 year ago

Yes, you are right that the wrapper changed and the workflow here doesn't reflect that change in the input specification. Would you feel comfortable submitting a pull request with your suggested change (which should indeed fix this)?

dlaehnemann commented 1 year ago

Closed by #217 .