Skip to content
Snippets Groups Projects
Commit 8fa41805 authored by Rachel  LEGENDRE's avatar Rachel LEGENDRE
Browse files

bash error when star (pass2) input is fastq.gz

parent 305e929b
No related branches found
No related tags found
No related merge requests found
...@@ -53,11 +53,11 @@ rule sortmerna: ...@@ -53,11 +53,11 @@ rule sortmerna:
if [[ ${{#infiles[@]}} -eq 2 ]]; if [[ ${{#infiles[@]}} -eq 2 ]];
then then
sortmerna --ref ${{fasta}} --idx-dir ${{idxdir}} --workdir {params.tmpdir} -threads {threads} --reads ${{infiles[0]}} --reads ${{infiles[1]}} --aligned {output.rRNA} --fastx --out2 --paired_out --other {output.no_rRNA} -v > {log.out} 2> {log.err} sortmerna --ref ${{fasta}} --idx-dir ${{idxdir}} --workdir {params.tmpdir}/{wildcards.SAMPLE} -threads {threads} --reads ${{infiles[0]}} --reads ${{infiles[1]}} --aligned out_paired_ribo --fastx --out2 --paired_out --other out_paired -v > {log.out} 2> {log.err}
mv {output.no_rRNA}_fwd.fastq {output.no_rRNA}[0] mv out_paired_fwd.fastq {output.no_rRNA[0]}
mv {output.no_rRNA}_rev.fastq {output.no_rRNA}[1] mv out_paired_rev.fastq {output.no_rRNA[1]}
mv {output.rRNA}_fwd.fastq {output.rRNA}[0] mv out_paired_ribo_fwd.fastq {output.rRNA[0]}
mv {output.rRNA}_rev.fastq {output.rRNA}[1] mv out_paired_ribo_rev.fastq {output.rRNA[1]}
else else
sortmerna --ref ${{fasta}} --idx-dir ${{idxdir}} --workdir {params.tmpdir} -threads {threads} --reads ${{infiles[0]}} --aligned {output.rRNA} --fastx --other {output.no_rRNA} -v > {log.out} 2> {log.err} sortmerna --ref ${{fasta}} --idx-dir ${{idxdir}} --workdir {params.tmpdir} -threads {threads} --reads ${{infiles[0]}} --aligned {output.rRNA} --fastx --other {output.no_rRNA} -v > {log.out} 2> {log.err}
...@@ -66,5 +66,6 @@ rule sortmerna: ...@@ -66,5 +66,6 @@ rule sortmerna:
fi fi
rm {params.tmpdir}/{wildcards.SAMPLE}
""" """
...@@ -46,10 +46,7 @@ rule star_mapping_pass2: ...@@ -46,10 +46,7 @@ rule star_mapping_pass2:
star_mapping_pass2_logs star_mapping_pass2_logs
shell: shell:
""" """
tmp="{input}" if [[ {input.fastq[0]} =~ \.gz$ ]]
infiles=($tmp)
if [[ ${{infiles[0]}} == "*.gz" ]]
then then
STAR --genomeDir {params.index} \ STAR --genomeDir {params.index} \
--readFilesIn {input.fastq} \ --readFilesIn {input.fastq} \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment