bihealth / seasnap-pipeline

SeA-SnaP: (Se)q (A)nalysis (Sna)kemake (P)ipeline
1 stars 2 forks source link

Changes in sample_info 'stranded' field to not trigger rerun of STAR mapping #27

Open Nicolai-vKuegelgen opened 11 months ago

Nicolai-vKuegelgen commented 11 months ago

Sometimes one wants/needs to change the information in the 'stranded' field of the sample_info.yaml file, i.e. if information was wrong or not available before the first run. A change in this parameter should trigger a rerun of STAR and all downstream rules. However, this does currently not happen.

Proposed solution: with the newerst snakemake version a rerun can be triggered by changes in the rule params. Therefore adding the following line (adapted form from the run block) to the params section in the STAR rule should fix this issue: count_col = lambda wildcards: {"unstranded":2, "forward":3, "reverse":4}[config["sample_info"][wildcards.sample]["stranded"]]