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

Fixed a bug with END positions for deletions in MAF output. #5876

Merged
merged 1 commit into from
Apr 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -480,12 +480,17 @@ else if ( refAlleleLength > altAlleleLength ) {
// Remove the first N bases from the Tumor_Seq_Allele1
// Replace the alt_allele with "-"
// Increment the Start_Position by 1 (start position should be inclusive of the first base deleted)
// Increment the End_Position by M-1 where M = length(ref_allele) (end position should be inclusive of the last base deleted)
// Set the End_Position to Start_Position + M - 2, where M = length(ref_allele) (end position should be inclusive of the last base deleted, explanation below)
outputMap.put(MafOutputRendererConstants.FieldName_Reference_Allele, outputMap.get(MafOutputRendererConstants.FieldName_Reference_Allele).substring(altAlleleLength));
outputMap.put(MafOutputRendererConstants.FieldName_Tumor_Seq_Allele1, outputMap.get(MafOutputRendererConstants.FieldName_Tumor_Seq_Allele1).substring(altAlleleLength));
outputMap.put(MafOutputRendererConstants.FieldName_Tumor_Seq_Allele2, MafOutputRendererConstants.EmptyAllele);
outputMap.put(MafOutputRendererConstants.FieldName_Start_Position, String.valueOf(Integer.valueOf(outputMap.get(MafOutputRendererConstants.FieldName_Start_Position)) + 1));
outputMap.put(MafOutputRendererConstants.FieldName_End_Position, String.valueOf(Integer.valueOf(outputMap.get(MafOutputRendererConstants.FieldName_End_Position)) + refAlleleLength - 1));

// Use the new start position we just calculated for this end position.
// Then subtract 2 from ref allele length:
// -1 for the removed first base
// -1 for the inclusive nature of positions
outputMap.put(MafOutputRendererConstants.FieldName_End_Position, String.valueOf(Integer.valueOf(outputMap.get(MafOutputRendererConstants.FieldName_Start_Position)) + refAlleleLength - 2));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,29 @@ private Object[][] provideForAdjustIndelAlleleInformationForMafOutput() {
}
)
},
// Map contains a DELETION of size 3 with associated fields:
{
MapUtils.putAll(new LinkedHashMap<String, String>(),
new Object[][] {
{ MafOutputRendererConstants.FieldName_Variant_Type, GencodeFuncotation.VariantType.DEL.toString() },
{ MafOutputRendererConstants.FieldName_Reference_Allele, "CAGG" },
{ MafOutputRendererConstants.FieldName_Tumor_Seq_Allele1, "CAGG" },
{ MafOutputRendererConstants.FieldName_Tumor_Seq_Allele2, "C" },
{ MafOutputRendererConstants.FieldName_Start_Position, "2222103" },
{ MafOutputRendererConstants.FieldName_End_Position, "2222103" },
}
),
MapUtils.putAll(new LinkedHashMap<String, String>(),
new Object[][] {
{ MafOutputRendererConstants.FieldName_Variant_Type, GencodeFuncotation.VariantType.DEL.toString() },
{ MafOutputRendererConstants.FieldName_Reference_Allele, "AGG" },
{ MafOutputRendererConstants.FieldName_Tumor_Seq_Allele1, "AGG" },
{ MafOutputRendererConstants.FieldName_Tumor_Seq_Allele2, "-" },
{ MafOutputRendererConstants.FieldName_Start_Position, "2222104" },
{ MafOutputRendererConstants.FieldName_End_Position, "2222106" },
}
)
},
};
}

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
##FORMAT=<ID=Y,Number=1,Type=Integer,Description="Raw Y intensity">
##Funcotator Version=0.0.4 | Gencode 19 CANONICAL | Achilles 110303 | CGC full_2012_03-15 | ClinVar 12.03.20 | Cosmic v84 | CosmicFusion v84 | CosmicTissue v83 | DNARepairGenes 20180524T145835 | Familial_Cancer_Genes 20110905 | Gencode_XHGNC 75_37 | Gencode_XRefSeq 75_37 | HGNC Nov302017 | Oreganno 20160119 | Simple_Uniprot 2014_12 | dbSNP 9606_b150
##Funcotator Version=Unavailable | Gencode 19 CANONICAL | Achilles 110303 | CGC full_2012_03-15 | ClinVar 12.03.20 | Cosmic 83 | CosmicFusion v83 | CosmicTissue v83 | DNARepairGenes 20171217T214737 | Familial_Cancer_Genes 20110905 | Gencode_XHGNC 75_37 | Gencode_XRefSeq 75_37 | HGNC Nov302017 | Simple_Uniprot 2014_12 | dbSNP 9606_b150
##GATKCommandLine=<ID=Funcotator,CommandLine="Funcotator --output /var/folders/4p/2b7bzvcx0x7bxvbztmwk__6rkr9cxg/T/regressionTestHg19Large.vcf.funcotator7518371726207473318.vcf --ref-version hg19 --data-sources-path /Users/jonn/Development/gatk/src/test/resources/large/funcotator/funcotator_dataSources/ --output-file-format VCF --variant /Users/jonn/Development/gatk/src/test/resources/org/broadinstitute/hellbender/tools/funcotator/validationTestData/regressionTestHg19Large.vcf --reference /Users/jonn/Development/gatk/src/test/resources/large/Homo_sapiens_assembly19.fasta.gz --verbosity INFO --remove-filtered-variants false --transcript-selection-mode CANONICAL --five-prime-flank-size 5000 --three-prime-flank-size 0 --lookahead-cache-bp 100000 --force-b37-to-hg19-reference-contig-conversion false --interval-set-rule UNION --interval-padding 0 --interval-exclusion-padding 0 --interval-merging-rule ALL --read-validation-stringency SILENT --seconds-between-progress-updates 10.0 --disable-sequence-dictionary-validation false --create-output-bam-index true --create-output-bam-md5 false --create-output-variant-index true --create-output-variant-md5 false --lenient false --add-output-sam-program-record true --add-output-vcf-command-line true --cloud-prefetch-buffer 40 --cloud-index-prefetch-buffer -1 --disable-bam-index-caching false --sites-only-vcf-output false --help false --version false --showHidden false --QUIET false --use-jdk-deflater false --use-jdk-inflater false --gcs-max-retries 20 --gcs-project-for-requester-pays --disable-tool-default-read-filters false",Version=Unavailable,Date="March 25, 2019 12:39:04 PM EDT">
##GATKCommandLine=<ID=Funcotator,CommandLine="Funcotator --output /var/folders/4p/2b7bzvcx0x7bxvbztmwk__6rkr9cxg/T/regressionTestHg19Large.vcf.funcotator5488422217831794739.vcf --ref-version hg19 --data-sources-path /Users/jonn/Development/gatk/src/test/resources/large/funcotator/funcotator_dataSources/ --output-file-format VCF --variant /Users/jonn/Development/gatk/src/test/resources/org/broadinstitute/hellbender/tools/funcotator/validationTestData/regressionTestHg19Large.vcf --reference /Users/jonn/Development/gatk/src/test/resources/large/Homo_sapiens_assembly19.fasta.gz --verbosity INFO --remove-filtered-variants false --transcript-selection-mode CANONICAL --five-prime-flank-size 5000 --three-prime-flank-size 0 --lookahead-cache-bp 100000 --force-b37-to-hg19-reference-contig-conversion false --interval-set-rule UNION --interval-padding 0 --interval-exclusion-padding 0 --interval-merging-rule ALL --read-validation-stringency SILENT --seconds-between-progress-updates 10.0 --disable-sequence-dictionary-validation false --create-output-bam-index true --create-output-bam-md5 false --create-output-variant-index true --create-output-variant-md5 false --lenient false --add-output-sam-program-record true --add-output-vcf-command-line true --cloud-prefetch-buffer 40 --cloud-index-prefetch-buffer -1 --disable-bam-index-caching false --sites-only-vcf-output false --help false --version false --showHidden false --QUIET false --use-jdk-deflater false --use-jdk-inflater false --gcs-max-retries 20 --gcs-project-for-requester-pays --disable-tool-default-read-filters false",Version="Unavailable",Date="April 11, 2019 10:49:42 AM EDT">
##GATKCommandLine=<ID=Funcotator,CommandLine="Funcotator --output FUNCOTATOR_OUT.vcf --ref-version hg19 --data-sources-path /Users/jonn/Development/funcotator_dataSources_latest --output-file-format VCF --variant /Users/jonn/Development/NON_PUBLIC/0816201804HC0_R01C01.vcf --reference /Users/jonn/Development/references/Homo_sapiens_assembly19.fasta --verbosity DEBUG --remove-filtered-variants false --transcript-selection-mode CANONICAL --lookahead-cache-bp 100000 --force-b37-to-hg19-reference-contig-conversion false --interval-set-rule UNION --interval-padding 0 --interval-exclusion-padding 0 --interval-merging-rule ALL --read-validation-stringency SILENT --seconds-between-progress-updates 10.0 --disable-sequence-dictionary-validation false --create-output-bam-index true --create-output-bam-md5 false --create-output-variant-index true --create-output-variant-md5 false --lenient false --add-output-sam-program-record true --add-output-vcf-command-line true --cloud-prefetch-buffer 40 --cloud-index-prefetch-buffer -1 --disable-bam-index-caching false --sites-only-vcf-output false --help false --version false --showHidden false --QUIET false --use-jdk-deflater false --use-jdk-inflater false --gcs-max-retries 20 --gcs-project-for-requester-pays --disable-tool-default-read-filters false",Version=4.0.10.1-17-g2de000f-SNAPSHOT-0.0.4,Date="October 19, 2018 2:12:35 PM EDT">
##Hyb(High)=Hyb(High)|Hybridization|3310|11184
##Hyb(Low)=Hyb(Low)|Hybridization|3436|1823
Expand Down
Loading