Skip to content

Commit

Permalink
catch errors when rnaseq is not provided (exitron/altsplicing calling…
Browse files Browse the repository at this point in the history
…) and add reference genome index as input for indel calling (htcaller)
  • Loading branch information
riasc committed Jun 21, 2024
1 parent 0ee4444 commit 44749dd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
17 changes: 11 additions & 6 deletions workflow/rules/common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ def all_identical(l):

# load up the config
config['data'] = data_structure(config['data'])
print(config)

########### PREPROCESSING ##########
def get_raw_reads(wildcards):
Expand Down Expand Up @@ -734,18 +735,22 @@ def get_prioritization_long_indels(wildcards):
def get_prioritization_exitrons(wildcards):
exitrons = []
if config["exitronsplicing"]["activate"]:
exitrons += expand("results/{sample}/annotation/exitrons.vcf",
sample=config["data"]["name"])

if len(config["data"]["rnaseq"]) != 0:
exitrons += expand("results/{sample}/annotation/exitrons.vcf",
sample=config["data"]["name"])
else:
print('rnaseq data has not been specified in the config file, but exitron calling is activated - skipping...')
return exitrons


def get_prioritization_altsplicing(wildcards):
altsplicing = []
if config["altsplicing"]["activate"]:
altsplicing += expand("results/{sample}/annotation/altsplicing.vcf",
sample=config["data"]["name"])

if len(config["data"]["rnaseq"]) != 0:
altsplicing += expand("results/{sample}/annotation/altsplicing.vcf",
sample=config["data"]["name"])
else:
print('rnaseq data has not been specified in the config file, but alternative splicing calling is activated - skipping...')
return altsplicing

def get_prioritization_custom(wildcards):
Expand Down
3 changes: 2 additions & 1 deletion workflow/rules/germline.smk
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ rule detect_variants_htc_first_round:
input:
bam="results/{sample}/{seqtype}/align/{group}_final_BWA_split/{chr}.bam",
idx="results/{sample}/{seqtype}/align/{group}_final_BWA_split/{chr}.bam.bai",
ref="resources/refs/genome.fasta"
ref="resources/refs/genome.fasta",
ref_idx="resources/refs/genome.fasta.fai"
output:
vcf="results/{sample}/{seqtype}/indel/htcaller/{group}_variants.1rd/{chr}.vcf"
message:
Expand Down

0 comments on commit 44749dd

Please sign in to comment.