Skip to content

Commit

Permalink
Call SNVs with respect to the reference sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
sposadac committed May 18, 2020
1 parent b43d350 commit c94f299
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions rules/common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ class VpipeConfig(object):
'threads': __RECORD__(value=0, type=int),
'conda': __RECORD__(value='', type=str),

'consensus': __RECORD__(value=True, type=bool),
'alpha': __RECORD__(value=0.1, type=float),
'ignore_indels': __RECORD__(value=False, type=bool),
'coverage': __RECORD__(value=0, type=int),
Expand All @@ -227,6 +228,7 @@ class VpipeConfig(object):
'time': __RECORD__(value=60, type=int),
'conda': __RECORD__(value='', type=str),

'consensus': __RECORD__(value=True, type=bool),
'extra': __RECORD__(value='', type=str),
}),
('alignment_coverage', {
Expand Down
5 changes: 2 additions & 3 deletions rules/snv.smk
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,9 @@ def read_len(wildcards):
read_len = patient_dict[patient_tuple]
return read_len


rule snv:
input:
REF = "variants/cohort_consensus.fasta",
REF = "variants/cohort_consensus.fasta" if config.snv['consensus'] else reference_file,
BAM = "{dataset}/alignments/REF_aln.bam",
TSV = "{dataset}/variants/coverage_intervals.tsv",
output:
Expand Down Expand Up @@ -233,7 +232,7 @@ rule samtools_index:

rule lofreq:
input:
REF = "variants/cohort_consensus.fasta",
REF = "variants/cohort_consensus.fasta" if config.lofreq['consensus'] else reference_file,
REF_IDX = "variants/cohort_consensus.fasta.fai",
BAM = "{dataset}/alignments/REF_aln.bam",
output:
Expand Down

0 comments on commit c94f299

Please sign in to comment.