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

Fixed metabat input channel #55

Merged
merged 2 commits into from
Jun 29, 2020
Merged

Conversation

skrakau
Copy link
Member

@skrakau skrakau commented Jun 28, 2020

Fixed problem described in #32. There is a problem with the input channel for metabat, where assembly mappings and the assembly from wrong samples are joined.

The input channel is created by joining the following two channels:

  • assembly_mapping_for_metabat.groupTuple(by:[0,1]):
    [MEGAHIT, SAMPLE_ID1, [MEGAHIT-SAMPLE_ID1-SAMPLE_ID1.bam, MEGAHIT-SAMPLE_ID1-SAMPL_ID2.bam], [MEGAHIT-SAMPLE_ID1-SAMPLE_ID1.bam.bai, MEGAHIT-SAMPLE_ID1-SAMPLE_ID2.bam.bai, MEGAHIT-SAMPLE_ID1-SAMPLE_ID1.bam.bai]]
    ...
  • assembly_all_to_metabat_copy:
    [MEGAHIT, SAMPLE_ID1, SAMPLE_ID1.contigs.fa]
    ...

Those two channels are currently joined with default parameters, thus by index 0 which is the assembler name and not the sample name. This did not cause a problem for single-sample analyses or when, by chance, the order of the emitted assemblies and assembly mappings was not changed during the run. However, this resulted in cases where assembly mappings and assembly from different samples are joined and caused the in PR #53 observed error, due to wrong contigs.

Fixed this by using joinwith parameter by:[0,1] to join by assembler name and sample name.

PR checklist

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

Learn more about contributing: https://github.com/nf-core/mag/tree/master/.github/CONTRIBUTING.md

Copy link
Member

@HadrienG HadrienG left a comment

Choose a reason for hiding this comment

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

Great find!

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.

Thanks for your efforts!

@skrakau skrakau merged commit 379ecd6 into nf-core:dev Jun 29, 2020
@skrakau skrakau deleted the fix_matabat_channel branch November 4, 2020 10:30
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.

3 participants