Skip to content

Issue with merging MNVs within the same codon #8

Description

@looxon93

Hi all,

I've used this merge_mnp.py script previously with great success, but now, I encountered an issue on certain positions, I found this:

grep "chr19:54574902"  codons.chr19.hg38.txt
chr19:54574902  NM_001290271-Codon639
chr19:54574902  NM_006866-Codon639
chr19:54574902  NM_001130917-Codon371
chr19:54574902  NM_001290270-Codon358

grep "chr19:54574903"  codons.chr19.hg38.txt
chr19:54574903  NM_001290271-Codon639
chr19:54574903  NM_006866-Codon639
chr19:54574903  NM_001130917-Codon372
chr19:54574903  NM_001290270-Codon358

In this part of code:

with open(codon_file, 'rt') as fp:
    for line in fp:
        line_contents = line.rstrip().split('\t')
        self.codon_dict[line_contents[0]] = line_contents[1]

This key will be overwritten, since one position contains multiple codons, and for transcript: NM_001130917 they shouldn't be merged, for all other they should be merged.
This is a subset of my VCF:

#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT Sample1
chr19 54574871 . C T 101.64 PASS AC=1;AF=0.5;AN=2;BaseQRankSum=0.671;DP=25;ExcessHet=0;FS=5.566;MLEAC=1;MLEAF=0.5;MQ=55.81;MQRankSum=-3.886;QD=4.84;ReadPosRankSum=0.289;SOR=2.303 GT:AD:DP:GQ:PL:PS 0|1:16,5:21:99:109,0,483:54240560
chr19 54574902 . G C 331.64 PASS AC=1;AF=0.5;AN=2;BaseQRankSum=0;DP=22;ExcessHet=0;FS=4.2;MLEAC=1;MLEAF=0.5;MQ=55.33;MQRankSum=-3.277;QD=15.07;ReadPosRankSum=0.434;SOR=1.863 GT:AD:DP:GQ:PGT:PID:PL:PS 0|1:13,9:22:99:0|1:54574902_G_C:339,0,519:54240560
chr19 54574903 . G A 331.64 PASS AC=1;AF=0.5;AN=2;BaseQRankSum=0;DP=22;ExcessHet=0;FS=4.2;MLEAC=1;MLEAF=0.5;MQ=55.33;MQRankSum=-3.277;QD=15.07;ReadPosRankSum=0.535;SOR=1.863 GT:AD:DP:GQ:PGT:PID:PL:PS 0|1:13,9:22:99:0|1:54574902_G_C:339,0,519:54240560
chr19 54574907 . T C 331.64 PASS AC=1;AF=0.5;AN=2;BaseQRankSum=0;DP=22;ExcessHet=0;FS=4.2;MLEAC=1;MLEAF=0.5;MQ=55.33;MQRankSum=-3.277;QD=15.07;ReadPosRankSum=0.568;SOR=1.863 GT:AD:DP:GQ:PGT:PID:PL:PS 0|1:13,9:22:99:0|1:54574902_G_C:339,0,519:54240560

Thanks a lot for your help!
Luka

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions