Skip to content

Commit

Permalink
Merge pull request #10 from cbg-ethz/master
Browse files Browse the repository at this point in the history
Merging new changes from cbg-ethz/v-pipe
  • Loading branch information
GeertvanGeest authored Oct 30, 2024
2 parents 7013890 + 7037675 commit c0e6833
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 7 deletions.
3 changes: 2 additions & 1 deletion config/config.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions workflow/envs/bcftools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ channels:
- conda-forge
- bioconda
dependencies:
- bcftools = 1.13
- cyvcf2 = 0.30.11
- bcftools = 1.20
- cyvcf2 = 0.31.0
2 changes: 1 addition & 1 deletion workflow/envs/lollipop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ channels:
- conda-forge
- bioconda
dependencies:
- lollipop =0.3.0
- lollipop =0.4.1
11 changes: 10 additions & 1 deletion workflow/rules/common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -685,11 +685,20 @@ for srec in sample_list:
# in adition to standard VCF files, ShoRAH2 also produces CSV tables
if config.general["snv_caller"] == "shorah":
results.append(os.path.join(sdir, "variants/SNVs/snvs.csv"))
elif config.general["snv_caller"] == "viloca":
results.append(
os.path.join(sdir, "variants/SNVs/snv/cooccurring_mutations.csv")
)
# all snv callers ('shorah', 'lofreq') produce standard VCF files
results.append(os.path.join(sdir, "variants/SNVs/snvs.vcf"))
# local haplotypes
if config.output["local"]:
results.append(os.path.join(sdir, "variants/SNVs/snvs.csv"))
if config.general["snv_caller"] == "shorah":
results.append(os.path.join(sdir, "variants/SNVs/snvs.csv"))
elif config.general["snv_caller"] == "viloca":
results.append(
os.path.join(sdir, "variants/SNVs/snv/cooccurring_mutations.csv")
)
# global haplotypes
if config.output["global"]:
if config.general["haplotype_reconstruction"] == "savage":
Expand Down
5 changes: 4 additions & 1 deletion workflow/rules/signatures.smk
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,9 @@ rule deconvolution:
if config.deconvolution["variants_dates"]
else []
),
filters=(
config.deconvolution["filters"] if config.deconvolution["filters"] else []
),
output:
deconvoluted=cohortdir("deconvoluted.tsv.zst"),
deconv_json=cohortdir("deconvoluted_upload.json"),
Expand All @@ -343,7 +346,7 @@ rule deconvolution:
threads: config.deconvolution["threads"]
shell:
"""
{params.LOLLIPOP} deconvolute "--output={output.deconvoluted}" "--out-json={output.deconv_json}" "--var={input.var_conf}" "--vd={input.var_dates}" "--dec={input.deconv_conf}" {params.out_format} {params.seed} "{input.tallymut}" 2> >(tee -a {log.errfile} >&2) > >(tee -a {log.outfile})
{params.LOLLIPOP} deconvolute "--output={output.deconvoluted}" "--out-json={output.deconv_json}" "--var={input.var_conf}" "--vd={input.var_dates}" "--dec={input.deconv_conf}" "--filters={input.filters}" {params.out_format} {params.seed} "{input.tallymut}" 2> >(tee -a {log.errfile} >&2) > >(tee -a {log.outfile})
"""


Expand Down
2 changes: 1 addition & 1 deletion workflow/rules/snv.smk
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ rule viloca:
# Get absolute path for input files
CWD=${{PWD}}
WORK_DIR="$(realpath -m {ouput.WORK_DIR})"
WORK_DIR="$(realpath -m {output.WORK_DIR})"
BAM="$(realpath {input.BAM})"
REF="$(realpath {input.REF})"
OUTFILE="$(realpath -m {log.outfile})"
Expand Down
6 changes: 6 additions & 0 deletions workflow/schemas/config_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1661,6 +1661,12 @@
"default": "lines",
"description": "Format of the output CSV.\n- `lines`(default) - each variants a separate entry on a separate line.\n- `columns` - one column per variant",
"examples": ["columns"]
},
"filters": {
"type": "string",
"default": "",
"description": "List of filters for removing problematic mutations from tally. Some mutations might be problematic and need to be taken out -- e.g. due to drop-outs in the multiplex PCR amplification, they do not show up in the data and this could be misinterpreted by LolliPop as proof of absence of a variant.",
"examples": ["filters_preprint.yaml"]
}
},
"default": {},
Expand Down

0 comments on commit c0e6833

Please sign in to comment.