Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@tanyasarkjain
Copy link
Collaborator

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 you've added a new tool - have you followed the pipeline conventions in the contribution docs
  • If necessary, also make a PR on the nf-core/pacvar branch on the nf-core/test-datasets repository.
  • Make sure your code lints (nf-core pipelines lint).
  • Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
  • Check for unexpected warnings in debug mode (nextflow run . -profile debug,test,docker --outdir <OUTDIR>).
  • Usage Documentation in docs/usage.md is updated.
  • Output Documentation in docs/output.md is updated.
  • CHANGELOG.md is updated.
  • README.md is updated (including new tool citations and authors/contributors).

This PR should just ensure that for Hiphase, the VCF and BAM and BAI channels are correctly ordered such that the orders correspond to the same file prefix

Copy link
Contributor

@fellen31 fellen31 left a comment

Choose a reason for hiding this comment

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

I don't think this solution will ensure that the bam and vcf files for a sample are input to hiphase together, however you can use the multiMap operator to achieve this.

Copy link
Member

@maxulysse maxulysse left a comment

Choose a reason for hiding this comment

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

No change log?

@tanyasarkjain
Copy link
Collaborator Author

@fellen31 my solution should preserve the same order as join joins on meta. @maxulysse I will add the add to the change log!

@fellen31
Copy link
Contributor

@fellen31 my solution should preserve the same order as join joins on meta. @maxulysse I will add the add to the change log!

Yes, but after the join, what keeps ordered_bam_bai_ch and ordered_vcf_ch from not being mixed between samples?

@tanyasarkjain
Copy link
Collaborator Author

tanyasarkjain commented Feb 25, 2025

Okay - I switched to using multiMap and updated the CHANGELOG (including changes from a previous PR where I did not update the changelog - #19 . Thanks!!

Comment on lines 148 to 157
//join the bam and bai and vcf based off the meta id (ensure correct order)
bam_bai_vcf_ch = bam_bai_ch.join(BAM_SV_VARIANT_CALLING.out.vcf_ch)

bam_bai_vcf_ch
.multiMap { meta, bam, bai, vcf, tbi ->
bam_bai: [meta, bam, bai]
vcf_tbi: [meta, vcf, tbi]
}
.set { orderd_bam_bai_vcf_tbi }

Copy link
Contributor

Choose a reason for hiding this comment

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

I would be a bit careful naming the channels containing SNPs and SVs the same.

Perhaps you could for example have bam_bai_vcf_snp_ch and bam_bai_vcf_sv_ch etc. so that someone not as familiar with the code can more easily distinguish them?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Have modified according to your suggestion!

tanyasarkjain and others added 2 commits February 26, 2025 09:15
Copy link
Contributor

@fellen31 fellen31 left a comment

Choose a reason for hiding this comment

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

Nice!

@tanyasarkjain tanyasarkjain merged commit 7c63b9d into nf-core:dev Feb 26, 2025
6 checks passed
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