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

Enhancement/bam2fastq #960

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Enhancement/bam2fastq #960

wants to merge 3 commits into from

Conversation

gongyixiao
Copy link
Collaborator

@gongyixiao gongyixiao commented Mar 30, 2022

This might also be useful since we added #1008 and planning to just store BAMs instead of FASTQs.

@gongyixiao gongyixiao added the enhancement New feature or request label Mar 30, 2022
@gongyixiao gongyixiao self-assigned this Mar 30, 2022
Copy link
Collaborator

@anoronh4 anoronh4 left a comment

Choose a reason for hiding this comment

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

As discussed earlier today, we should consider accommodating cases in which the bam has the OQ tag, so that we can get something as close to the original fastq as possible. This can be done with gatk's RevertSam tool. We might have to first parse the input bam file to see if the OQ tag is present, before running the tool. We should consider adding OQ to our aligned bam outputs as well, which was brought up in #947

@gongyixiao gongyixiao marked this pull request as draft October 10, 2022 18:07
@gongyixiao
Copy link
Collaborator Author

As discussed earlier today, we should consider accommodating cases in which the bam has the OQ tag, so that we can get something as close to the original fastq as possible. This can be done with gatk's RevertSam tool. We might have to first parse the input bam file to see if the OQ tag is present, before running the tool. We should consider adding OQ to our aligned bam outputs as well, which was brought up in #947

Yes. I think this can be done by first check if OQ is present, and and then pipe RevertSam output into SamToFastq as input like this https://www.biostars.org/p/56566/ to save disk space.

@gongyixiao gongyixiao marked this pull request as ready for review April 18, 2024 18:02
@gongyixiao
Copy link
Collaborator Author

We need to bring this back to our radar.

bam2fastq(inputBam)
fastqs = bam2fastq.out.fastqOutput
.map { idSample, targets, files_pe1, files_pe2
-> tuple(groupKey(idSample, files_pe1.size()), targets, files_pe1, files_pe2)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This fails with large bams that exceed the max int value. The type of files_pe1.size() would then be 'long' which is not able to be used by groupKey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants