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

Add pick to empty CSQ if no CSQ is present in the input #104

Merged
merged 2 commits into from
Dec 17, 2024
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
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<groupId>org.molgenis</groupId>
<artifactId>vip-decision-tree</artifactId>
<version>5.1.2</version>
<version>5.1.3</version>

<name>vip-decision-tree</name>
<description>Decision tree module for filtering and labelling VCF files</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import static java.util.Collections.singletonList;
import static org.molgenis.vcf.decisiontree.runner.info.VepMetadataMapperImpl.ALLELE_NUM;
import static org.molgenis.vcf.decisiontree.runner.info.VepMetadataMapperImpl.PICK;

import htsjdk.variant.variantcontext.VariantContext;
import htsjdk.variant.variantcontext.VariantContextBuilder;
Expand Down Expand Up @@ -52,6 +53,10 @@ public VcfRecord createEmptyCsqRecord(VcfRecord vcfRecord,
values.add("");
}
values.set(fields.get(ALLELE_NUM).getIndex(), alleleIndex.toString());
NestedField pick = fields.get(PICK);
if(pick != null) {
values.set(pick.getIndex(), "1");
}
VariantContext variantContext = vcfRecord.getVariantContext();
VariantContextBuilder variantContextBuilder = new VariantContextBuilder(variantContext);
variantContextBuilder.attribute(nestedHeaderLine.getParentField().getId(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
public class VepMetadataMapperImpl implements VepMetadataMapper {

public static final String ALLELE_NUM = "ALLELE_NUM";
public static final String PICK = "PICK";
private static final String INFO_DESCRIPTION_PREFIX = "Consequence annotations from Ensembl VEP. Format: ";

private final FieldMetadataService fieldMetadataService;
Expand Down
8 changes: 4 additions & 4 deletions src/test/resources/example-classified.vcf
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#CHROM POS ID REF ALT QUAL FILTER INFO
1 10042538 . C T . PASS CSQ=LP|T|missense_variant|MODERATE|NMNAT1|ENSG00000173614|Transcript|ENST00000377205|protein_coding|5/5||||763|619|207|R/W|Cgg/Tgg|rs142968179&CM127756|1||1||1|HGNC|17877|1|3.58e-05|0|2.891e-05|0|0|0|6.157e-05|0.0001629|0|pathogenic||1&1|26103963&22842229&22842230||0|0|0|0|LP,|T|NMD_transcript_variant|MODERATE|NMNAT1|ENSG00000173614|Transcript|ENST00000462686|nonsense_mediated_decay|5/6||||762|619|207|R/W|Cgg/Tgg|rs142968179&CM127756|1||1|||HGNC|17877|1|0.0001|0|0.0001|0|0|0|0.0001|0.0001629|0|pathogenic||1&1|26103963&22842229&22842230||0|0.43|0|0.41|LP
1 10042539 . C A,T . PASS CSQ=LP|A|missense_variant|MODERATE|NMNAT1|ENSG00000173614|Transcript|ENST00000377205|protein_coding|5/5||||763|619|207|R/W|Cgg/Tgg|rs142968179&CM127756|1||1||1|HGNC|17877|1|3.58e-05|0|2.891e-05|0|0|0|6.157e-05|0.0001629|0|pathogenic||1&1|26103963&22842229&22842230||0|0|0|0|LP,LB|T|missense_variant&NMD_transcript_variant|MODERATE|NMNAT1|ENSG00000173614|Transcript|ENST00000462686|nonsense_mediated_decay|5/6||||762|619|207|R/W|Cgg/Tgg|rs142968179&CM127756|2||2|||HGNC|17877|2|3.58e-05|0|2.891e-05|0|0|0|6.157e-05|0.0001629|0|pathogenic||1&1|26103963&22842229&22842230||0|0|0|0|LB
1 10042540 . C G . PASS CLINVAR=LP;CSQ=|||||||||||||||||||1||||||||||||||||||||||||||LP
1 10042541 . C G . PASS CSQ=|||||||||||||||||||1||||||||||||||||||||||||||LB
1 10042542 . C G . . CSQ=|||||||||||||||||||1||||||||||||||||||||||||||LB
1 10042543 . C G . PASS CSQ=|||||||||||||||||||1||||||||||||||||||||||||||LP;FLAG1
1 10042540 . C G . PASS CLINVAR=LP;CSQ=|||||||||||||||||||1||||1||||||||||||||||||||||LP
1 10042541 . C G . PASS CSQ=|||||||||||||||||||1||||1||||||||||||||||||||||LB
1 10042542 . C G . . CSQ=|||||||||||||||||||1||||1||||||||||||||||||||||LB
1 10042543 . C G . PASS CSQ=|||||||||||||||||||1||||1||||||||||||||||||||||LP;FLAG1
8 changes: 4 additions & 4 deletions src/test/resources/example-classified_paths-labels.vcf
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
#CHROM POS ID REF ALT QUAL FILTER INFO
1 10042538 . C T . PASS CSQ=LP|T|missense_variant|MODERATE|NMNAT1|ENSG00000173614|Transcript|ENST00000377205|protein_coding|5/5||||763|619|207|R/W|Cgg/Tgg|rs142968179&CM127756|1||1||1|HGNC|17877|1|3.58e-05|0|2.891e-05|0|0|0|6.157e-05|0.0001629|0|pathogenic||1&1|26103963&22842229&22842230||0|0|0|0|LP|filter&vkgl&exit_lp|,|T|NMD_transcript_variant|MODERATE|NMNAT1|ENSG00000173614|Transcript|ENST00000462686|nonsense_mediated_decay|5/6||||762|619|207|R/W|Cgg/Tgg|rs142968179&CM127756|1||1|||HGNC|17877|1|0.0001|0|0.0001|0|0|0|0.0001|0.0001629|0|pathogenic||1&1|26103963&22842229&22842230||0|0.43|0|0.41|LP|filter&vkgl&clinVar&gnomad&effect&spliceAI&exit_lp|
1 10042539 . C A,T . PASS CSQ=LP|A|missense_variant|MODERATE|NMNAT1|ENSG00000173614|Transcript|ENST00000377205|protein_coding|5/5||||763|619|207|R/W|Cgg/Tgg|rs142968179&CM127756|1||1||1|HGNC|17877|1|3.58e-05|0|2.891e-05|0|0|0|6.157e-05|0.0001629|0|pathogenic||1&1|26103963&22842229&22842230||0|0|0|0|LP|filter&vkgl&exit_lp|,LB|T|missense_variant&NMD_transcript_variant|MODERATE|NMNAT1|ENSG00000173614|Transcript|ENST00000462686|nonsense_mediated_decay|5/6||||762|619|207|R/W|Cgg/Tgg|rs142968179&CM127756|2||2|||HGNC|17877|2|3.58e-05|0|2.891e-05|0|0|0|6.157e-05|0.0001629|0|pathogenic||1&1|26103963&22842229&22842230||0|0|0|0|LB|filter&vkgl&exit_lb|
1 10042540 . C G . PASS CLINVAR=LP;CSQ=|||||||||||||||||||1||||||||||||||||||||||||||LP|filter&vkgl&clinVar&exit_lp|
1 10042541 . C G . PASS CSQ=|||||||||||||||||||1||||||||||||||||||||||||||LB|filter&vkgl&clinVar&gnomad&effect&spliceAI&annotSV&impact&flag&exit_lb|
1 10042542 . C G . . CSQ=|||||||||||||||||||1||||||||||||||||||||||||||LB|filter&vkgl&clinVar&gnomad&effect&spliceAI&annotSV&impact&flag&exit_lb|
1 10042543 . C G . PASS CSQ=|||||||||||||||||||1||||||||||||||||||||||||||LP|filter&vkgl&clinVar&gnomad&effect&spliceAI&annotSV&impact&flag&exit_lp|;FLAG1
1 10042540 . C G . PASS CLINVAR=LP;CSQ=|||||||||||||||||||1||||1||||||||||||||||||||||LP|filter&vkgl&clinVar&exit_lp|
1 10042541 . C G . PASS CSQ=|||||||||||||||||||1||||1||||||||||||||||||||||LB|filter&vkgl&clinVar&gnomad&effect&spliceAI&annotSV&impact&flag&exit_lb|
1 10042542 . C G . . CSQ=|||||||||||||||||||1||||1||||||||||||||||||||||LB|filter&vkgl&clinVar&gnomad&effect&spliceAI&annotSV&impact&flag&exit_lb|
1 10042543 . C G . PASS CSQ=|||||||||||||||||||1||||1||||||||||||||||||||||LP|filter&vkgl&clinVar&gnomad&effect&spliceAI&annotSV&impact&flag&exit_lp|;FLAG1