Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clear error, fixes #962 #966

Merged
merged 2 commits into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Comment on lines +155 to +156
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not know that echo doesn't work 😅 ... I did just now realize that the newline isn't even necessary, as echo automatically makes a newline. Do we know if printf is standard in bash?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incredibly unclear to me for any command, but this post suggests to me it is


# 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