Skip to content

Commit

Permalink
clear error, fixes #962 (#966)
Browse files Browse the repository at this point in the history
* clear error, fixes #962

* printf to convert \n to newline

---------

Co-authored-by: Siebren Frölich <48289046+siebrenf@users.noreply.github.com>
  • Loading branch information
Maarten-vd-Sande and siebrenf committed Mar 21, 2023
1 parent f940133 commit 696d8bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ All changed fall under either one of these types: `Added`, `Changed`, `Deprecate

- edge case when a GSM sample is a reanalysis of another GSM sample.
- error message referring to `--config` while it should be `--configfile`
- clear error message when downloading single-end data annotated as paired-end.

## [0.9.8] - 2023-02-01

Expand Down
8 changes: 6 additions & 2 deletions seq2science/rules/get_fastq.smk
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,14 @@ rule sra2fastq_PE:
--threads {threads} --split-e --skip-technical --dumpbase \
--readids --clip --read-filter pass --defline-seq '@$ac.$si.$sg/$ri' \
--defline-qual '+' --gzip >> {log} 2>&1
# check if the files exist
if ! compgen -G "{output.tmpdir}/*_1*" > /dev/null ; then printf "ERROR: Couldn't find read 1.fastq after dumping! Perhaps this is not a paired-end file?\n" >> {log} 2>&1; fi
if ! compgen -G "{output.tmpdir}/*_2*" > /dev/null ; then printf "ERROR: Couldn't find read 2.fastq after dumping! Perhaps this is not a paired-end file?\n" >> {log} 2>&1; fi
# rename file and move to output dir
mv {output.tmpdir}/*_1* {output.fastq[0]}
mv {output.tmpdir}/*_2* {output.fastq[1]}
mv {output.tmpdir}/*_1* {output.fastq[0]} >> {log} 2>&1
mv {output.tmpdir}/*_2* {output.fastq[1]} >> {log} 2>&1
"""


Expand Down

0 comments on commit 696d8bf

Please sign in to comment.