zhxiaokang / RASflow

RNA-Seq analysis workflow
MIT License
105 stars 58 forks source link

Strange problem with shopt -s extglob (related to issue #13) #19

Closed AdrianS85 closed 3 years ago

AdrianS85 commented 3 years ago

Dear Dr Kang,

First of all, well done, and thank You for RASflow - You made sequencing pipeline truly easy to understand and expand.

Still, I found a wierd behavior in rule getReads of align_count_genome.rules, which possibly generalizes to other extglob-based rules. When running this rule with TRIMMED: yes, it returns...

Command ' set -euo pipefail;  
            shopt -s extglob
            scp -i None /tmp/data/output/test/trim/MSG3701204_small?(.*).f*q.gz /tmp/data/output/test/genome/reads/MSG3701204_small.fastq.gz ' returned non-zero exit status 1.

... despite the file (MSG3701204_small_trimmed.fq.gz) being present in the directory.

The curious thing is, the same rule (getReads) in trim.rules works perfectly well. Similarly, when running align_count_genome.rules with TRIMMED: no, the pipeline finishes fine.

I'm running RASflow inside Singularity container (see: https://github.com/AdrianS85/rnaseq/blob/main/rasflow_sing). My config file: https://github.com/AdrianS85/rnaseq/blob/main/config_main.yaml.

Please let me know if You are interested in any other information.

Best regards, Adrian

zhxiaokang commented 3 years ago

Hi Andrian,

Thank you for pointing this out! The issue came from the name of the trimmed files (the current RegExp {sample}?(.*).f*q.gz can't take the trimmed files, since trimGalore will always add _trimmed).

I've modified the RegExp to {sample}?(_*)?(.*).f*q.gz to take this into consideration with commit fix RegExp of single-end fastq to adapt to trimming Please update the code and try again, and let me know whether that works.

Best, Xiaokang