Skip to content

Commit

Permalink
Add user-configurable options in the contamination module
Browse files Browse the repository at this point in the history
  • Loading branch information
sposadac committed May 21, 2020
1 parent c94f299 commit 6284bc1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions rules/common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,15 @@ class VpipeConfig(object):
'time': __RECORD__(value=235, type=int),
'threads': __RECORD__(value=0, type=int),
'conda': __RECORD__(value='', type=str),

'ref_panel': __RECORD__(value='references/5-Virus-Mix.fasta', type=str),
}),
('coverage_QA', {
'mem': __RECORD__(value=1250, type=int),
'time': __RECORD__(value=235, type=int),
'conda': __RECORD__(value=f'{VPIPE_BASEDIR}/envs/smallgenomeutilities.yaml', type=str),

'target': __RECORD__(value='HXB2:6614-6812,7109-7217,7376-7478,7601-7634', type=str),
}),
('msa', {
'mem': __RECORD__(value=10000, type=int),
Expand Down
5 changes: 3 additions & 2 deletions rules/contamination.smk
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ __email__ = "[email protected]"
rule bwa_QA:
input:
patient_ref = "{dataset}/references/ref_{kind}.fasta",
virusmix_ref = "references/5-Virus-Mix.fasta",
virusmix_ref = config.bwa_QA['ref_panel'],
FASTQ = input_align,
output:
SAM = temp("{dataset}/QA_alignments/bwa_QA_{kind}.sam"),
Expand Down Expand Up @@ -63,6 +63,7 @@ rule coverage_QA:
scratch = '1250',
mem = config.coverage_QA['mem'],
time = config.coverage_QA['time'],
TARGET = config.coverage_QA['target'],
COV_STATS = config.applications['coverage_stats'],
log:
outfile = "{dataset}/QA_alignments/coverage_QA_{kind}.out.log",
Expand All @@ -86,7 +87,7 @@ rule coverage_QA:
# 2. collect coverage stats
# we only collect statistics in the loop regions
# of HIV-1 in order
{params.COV_STATS} -t HXB2:6614-6812,7109-7217,7376-7478,7601-7634 -i {input.BAM} -o {output} -m {input.MSA} --select "${{CONSENSUS_NAME}}" > {log.outfile} 2> >(tee {log.errfile} >&2)
{params.COV_STATS} -t {params.TARGET} -i {input.BAM} -o {output} -m {input.MSA} --select "${{CONSENSUS_NAME}}" > {log.outfile} 2> >(tee {log.errfile} >&2)
"""


0 comments on commit 6284bc1

Please sign in to comment.