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

null value in mutect2 subworkflow #1274

Closed
maxulysse opened this issue Oct 6, 2023 · 7 comments
Closed

null value in mutect2 subworkflow #1274

maxulysse opened this issue Oct 6, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@maxulysse
Copy link
Member

Description of the bug

A USER ERROR has occurred: Bad input: Sample E14_null is not in BAM header: [E14_E14_1_BM_T, E14_E14_2_BM_T, E14_E14_3_LN_T, E14_E14_N]

gatk --java-options "-Xmx29491M -XX:-UsePerfData" \ Mutect2 \ --input E14_2_BM_T.converted.cram --input E14_N.converted.cram --input E14_3_LN_T.converted.cram --input E14_1_BM_T.converted.cram \ --output E14.mutect2.vcf.gz \ --reference human_g1k_v37_decoy.fasta \ --panel-of-normals pon.vcf.gz \ --germline-resource af-only-gnomad.raw.sites.vcf.gz \ --intervals 1_65565-65573.bed \ --tmp-dir . \ --f1r2-tar-gz E14.mutect2.f1r2.tar.gz --normal-sample E14_null

I am also hitting this error with version 3.3.2. The weird thing is that some MUTECT2_PAIRED jobs finish successfully while others fail due to null normal_id . I checked the contents of the input_intervals in the somatic_mutect2 subworkflow and the normal_id meta values are set as they are supposed to. Very confusing...

Command used and terminal output

No response

Relevant files

No response

System information

No response

@maxulysse maxulysse added the bug Something isn't working label Oct 6, 2023
@berguner
Copy link
Contributor

It looks like this happens when --joint_mutect2 is set to true because the normal_id is removed prematurely in these lines:

if (joint_mutect2) {
// Separate normal cram files
// Extract tumor cram files
ch_cram = input.multiMap{ meta, cram, crai ->
normal: [ meta - meta.subMap('normal_id', 'tumor_id') , cram[0], crai[0] ]
tumor: [ meta - meta.subMap('normal_id', 'tumor_id') , cram[1], crai[1] ]
}

@FriederikeHanssen do you remember why you removed the normal_id prior to running Mutect2?

@FriederikeHanssen
Copy link
Contributor

probably for grouping reasons. I tried to be as conservative as possible in the end with removing stuff, looks like it wasn't good enough. I think I know how to fix it.

@asp8200
Copy link
Contributor

asp8200 commented Oct 10, 2023

I know we already have lots of tests, but would it perhaps make sense to add an extra test "covering" the error reported in this issue?

@FriederikeHanssen
Copy link
Contributor

@asp8200 not really. We have to overwrite the normal id entry with a fixed value in the tests at the moment, so this won't bepicked up. Not overwriting it leads to other issues. Alternatively someone would need to sit down and regenerate a large chunk of the test data.

@berguner
Copy link
Contributor

IIRC, we need to override the normal id because the sample names in the cram files (@sm tags) don't match the sample sheet. I considered updating them for Mutect2 tests but I wasn't sure how it would effect the other tests, so it still remains at the back of my mind...

@FriederikeHanssen
Copy link
Contributor

right probably half of the checksums would be affected...

@FriederikeHanssen
Copy link
Contributor

fixed in #1277

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants