Skip to content

Commit

Permalink
Added parameter to allow users to drop silent mutations in simulation…
Browse files Browse the repository at this point in the history
…s if the mutational dataset has no silent mutations reported
  • Loading branch information
ctokheim committed Sep 10, 2018
1 parent 5c1bda3 commit f750ffc
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ cv="--cv"
# number of trees in RF
ntrees=config['ntrees']
ntrees2=5*ntrees
# indication of whether to drop silent mutations
drop_silent="no"
if "drop_silent" in config:
drop_silent = config['drop_silent']
if drop_silent == "yes":
drop_silent_flag = "--drop-silent"
else:
drop_silent_flag = ""

# params for simulations
num_iter=10
Expand Down Expand Up @@ -116,11 +124,12 @@ rule simMaf:
MUTATIONS=mutations
params:
min_recur=min_recur,
data_dir=config["data_dir"]
data_dir=config["data_dir"],
dropsilent=drop_silent_flag
output:
join(output_dir, "simulated_summary/chasm_sim_maf{iter,[0-9]+}.txt")
shell:
"mut_annotate --log-level=INFO "
"mut_annotate --log-level=INFO {params.dropsilent} "
" -b {params.data_dir}/snvboxGenes.bed -i {params.data_dir}/snvboxGenes.fa -c 1.5 "
" -m {input.MUTATIONS} -p 0 -n 1 --maf --seed=$(({wildcards.iter}*42)) "
" -r {params.min_recur} --unique -o {output}"
Expand All @@ -131,11 +140,12 @@ rule simSummary:
MUTATIONS=mutations
params:
min_recur=min_recur,
data_dir=config["data_dir"]
data_dir=config["data_dir"],
dropsilent=drop_silent_flag
output:
join(output_dir, "simulated_summary/chasm_sim_summary{iter}.txt")
shell:
"mut_annotate --log-level=INFO "
"mut_annotate --log-level=INFO {params.dropsilent} "
" -b {params.data_dir}/snvboxGenes.bed -i {params.data_dir}/snvboxGenes.fa "
" -c 1.5 -m {input.MUTATIONS} -p 0 -n 1 --summary --seed=$(({wildcards.iter}*42)) "
" --score-dir={params.data_dir}/scores "
Expand Down

0 comments on commit f750ffc

Please sign in to comment.