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

Rename FASTQ files and check sample ids #145

Merged
merged 4 commits into from
Dec 17, 2020
Merged

Conversation

skrakau
Copy link
Member

@skrakau skrakau commented Dec 16, 2020

  • rename all short read FASTQ files to ensure consistent names in reports from FastQC and allow non-unique read file base names
  • added check for unique sample IDs, return error otherwise

PR checklist

  • This comment contains a description of changes (with reason)
  • CHANGELOG.md is updated
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated
  • If necessary, also make a PR on the nf-core/mag branch on the nf-core/test-datasets repo

main.nf Outdated
Comment on lines 466 to 467
[ -f "${name}_R1.fastq.gz" ] || ln -s "${reads[0]}" "${name}_R1.fastq.gz"
[ -f "${name}_R2.fastq.gz" ] || ln -s "${reads[1]}" "${name}_R2.fastq.gz"
Copy link
Collaborator

Choose a reason for hiding this comment

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

To me this is not readable. What does this do?

Guessing: If file "${name}_R1.fastq.gz" doesnt exist than link reads[0} to "${name}_R1.fastq.gz"
If yes, could you write that in an easier understandable way? With an in if such? Like this its short but hard to read, in my opinion.
How does this interact with includeInputs: true, havent seen that one before, I guess it is important if the above link isnt created. But what happens is the link is actually created? Isnt than reads[0] also added to the output channel, provided it follows *.fastq.gz as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh true, I forgot to add the corresponding glob pattern, thanks for reviewing!

includeInputs is important, because by default input files will not be used for the output (https://www.nextflow.io/docs/latest/process.html#output-path), even if the name matches.
I didn't want to rename the input files, that's why I did it this way.

Copy link
Collaborator

@d4straub d4straub left a comment

Choose a reason for hiding this comment

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

LGTM!

@skrakau skrakau merged commit cfc7493 into nf-core:dev Dec 17, 2020
@skrakau skrakau deleted the rename_fastqs branch May 31, 2021 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants