Skip to content

Fixed metabat input channel#55

Merged
skrakau merged 2 commits intonf-core:devfrom
skrakau:fix_matabat_channel
Jun 29, 2020
Merged

Fixed metabat input channel#55
skrakau merged 2 commits intonf-core:devfrom
skrakau:fix_matabat_channel

Conversation

@skrakau
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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