snakemake-workflows / rna-seq-star-deseq2

RNA-seq workflow using STAR and DESeq2
MIT License
327 stars 203 forks source link

fixed trimmed fastq filename in get_fq() #61

Closed aryazand closed 1 year ago

aryazand commented 1 year ago

Currently, the output of the cutadapt_pe and cutadapt_se recipes (in the trim.smk) have the pattern results/trimmed/{sample}-{unit}_R1.fastq.gz and results/trimmed/{sample}-{unit}_single.fastq.gz, respectively. However the getfq() function (in common.smk) refers to these files as `results/trimmed/{sample}{unit}{group}.fastq.gzandtrimmed/{sample}{unit}_single.fastq.gz(notice the underscore between{sample}and{unit}` instead of a hyphen). Because of this the pipeline fails when trimming is activated.

In this bug fix, I changed the get_fq() function to refer to the files using the hyphen.

dlaehnemann commented 1 year ago

Hi @aryazand ,

thanks for catching this and proposing the fix. I usually prefer sticking to snake_case wherever possible, so I won't have to remember where I used a hyphen (-) and where I used an underscore (_). So I went and adjusted all occurrences to read {sample}_{unit} and similar. I hope that's also OK for you?

aryazand commented 1 year ago

@dlaehnemann this is a better solution than I proposed. thank you very much!