Skip to content

Commit

Permalink
Rename functional impact fields
Browse files Browse the repository at this point in the history
  • Loading branch information
leexgh committed Aug 26, 2024
1 parent 25bcdb9 commit 7ad7f4e
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.cbioportal.genome_nexus.model;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

@Document(collection = "mutation_assessor.annotation")
public class MutationAssessor
Expand Down Expand Up @@ -34,24 +35,26 @@ public void setHgvspShort(String hgvspShort) {
this.hgvspShort = hgvspShort;
}

private Double f_score;
@Field("f_score")
private Double functionalImpactScore;

public Double getF_score() {
return f_score;
public Double getFunctionalImpactScore() {
return functionalImpactScore;
}

public void setF_score(Double f_score) {
this.f_score = f_score;
public void setFunctionalImpactScore(Double functionalImpactScore) {
this.functionalImpactScore = functionalImpactScore;
}

@Field("f_impact")
private String functionalImpactPrediction;

private String f_impact;

public String getF_impact() {
return f_impact;
public String getFunctionalImpactPrediction() {
return functionalImpactPrediction;
}

public void setF_impact(String f_impact) {
this.f_impact = f_impact;
public void setFunctionalImpactPrediction(String functionalImpactPrediction) {
this.functionalImpactPrediction = functionalImpactPrediction;
}

private String msa;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ public void getMutationAssessorByMutationAssessorVariant()
VariantAnnotation variantAnnotation1 = new VariantAnnotation();
variantAnnotation1.setVariant("7:g.140453136A>T");
MutationAssessor mutationAssessor1 = service.getMutationAssessorByMutationAssessorVariant("P15056,p.V600E", variantAnnotation1);
assertEquals(mutationAssessor1.getF_impact(), mockData.get("P15056,p.V600E").getF_impact());
assertEquals(mutationAssessor1.getFunctionalImpactPrediction(), mockData.get("P15056,p.V600E").getFunctionalImpactPrediction());

VariantAnnotation variantAnnotation2 = new VariantAnnotation();
variantAnnotation2.setVariant("12:g.25398285C>A");
MutationAssessor mutationAssessor2 = service.getMutationAssessorByMutationAssessorVariant("P01116,p.G12C", variantAnnotation2);
assertEquals(mutationAssessor2.getF_impact(), mockData.get("P01116,p.G12C").getF_impact());
assertEquals(mutationAssessor2.getFunctionalImpactPrediction(), mockData.get("P01116,p.G12C").getFunctionalImpactPrediction());

VariantAnnotation invalidVariantAnnotation = new VariantAnnotation();
invalidVariantAnnotation.setVariant("INVALID");
Expand All @@ -82,12 +82,12 @@ public void getMutationAssessorByVariantAnnotation()
Mockito.when(ensemblService.getUniprotId("ENST00000288602")).thenReturn("P15056");
Mockito.when(mutationAssessorRepository.findById("P15056,p.V600E")).thenReturn(Optional.of(maMockData.get("P15056,p.V600E")));
MutationAssessor mutationAssessor1 = service.getMutationAssessor(variantMockData.get("7:g.140453136A>T"));
assertEquals(mutationAssessor1.getF_score(), maMockData.get("P15056,p.V600E").getF_score());
assertEquals(mutationAssessor1.getFunctionalImpactScore(), maMockData.get("P15056,p.V600E").getFunctionalImpactScore());

Mockito.when(proteinChangeResolver.resolveHgvspShort(variantMockData.get("12:g.25398285C>A"))).thenReturn("p.G12C");
Mockito.when(ensemblService.getUniprotId("ENST00000256078")).thenReturn("P01116");
Mockito.when(mutationAssessorRepository.findById("P01116,p.G12C")).thenReturn(Optional.of(maMockData.get("P01116,p.G12C")));
MutationAssessor mutationAssessor2 = service.getMutationAssessor(variantMockData.get("12:g.25398285C>A"));
assertEquals(mutationAssessor2.getF_score(), maMockData.get("P01116,p.G12C").getF_score());
assertEquals(mutationAssessor2.getFunctionalImpactScore(), maMockData.get("P01116,p.G12C").getFunctionalImpactScore());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public Map<String, MutationAssessor> generateData()
mutationAssessor = new MutationAssessor();
mutationAssessor.setHgvspShort("p.V600E");
mutationAssessor.setUniprotId("P15056");
mutationAssessor.setF_score(7.110925419276407);
mutationAssessor.setF_impact("high");
mutationAssessor.setFunctionalImpactScore(7.110925419276407);
mutationAssessor.setFunctionalImpactPrediction("high");
mutationAssessor.setMsa("P15056.4_full_b0.6_rg0.3");
mutationAssessor.setMav(4);
mutationAssessor.setSv(4);
Expand All @@ -30,8 +30,8 @@ public Map<String, MutationAssessor> generateData()
mutationAssessor = new MutationAssessor();
mutationAssessor.setHgvspShort("p.G12C");
mutationAssessor.setUniprotId("P01116");
mutationAssessor.setF_score(5.8627536904542215);
mutationAssessor.setF_impact("medium");
mutationAssessor.setFunctionalImpactScore(5.8627536904542215);
mutationAssessor.setFunctionalImpactPrediction("medium");
mutationAssessor.setMsa("P01116.1_full_b1.0_rg0.3");
mutationAssessor.setMav(4);
mutationAssessor.setSv(1);
Expand All @@ -41,8 +41,8 @@ public Map<String, MutationAssessor> generateData()
mutationAssessor = new MutationAssessor();
mutationAssessor.setHgvspShort("p.L25V");
mutationAssessor.setUniprotId("P00519");
mutationAssessor.setF_score(2.554887124363546);
mutationAssessor.setF_impact("neutral");
mutationAssessor.setFunctionalImpactScore(2.554887124363546);
mutationAssessor.setFunctionalImpactPrediction("neutral");
mutationAssessor.setMsa("P00519.4_full_b0.6_rg0.3");
mutationAssessor.setMav(4);
mutationAssessor.setSv(4);
Expand All @@ -52,8 +52,8 @@ public Map<String, MutationAssessor> generateData()
mutationAssessor = new MutationAssessor();
mutationAssessor.setHgvspShort(null);
mutationAssessor.setUniprotId(null);
mutationAssessor.setF_score(null);
mutationAssessor.setF_impact(null);
mutationAssessor.setFunctionalImpactScore(null);
mutationAssessor.setFunctionalImpactPrediction(null);
mutationAssessor.setMsa(null);
mutationAssessor.setMav(null);
mutationAssessor.setSv(null);
Expand Down
8 changes: 1 addition & 7 deletions web/src/main/resources/application.properties.EXAMPLE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# VEP web API URL with additional parameters. Note that "VARIANT" field will be replaced with
# the actual variant value before each VEP request.
vep.url=http://grch37.rest.ensembl.org/vep/human/hgvs/VARIANT?content-type=application/json&xref_refseq=1&ccds=1&canonical=1&domains=1&hgvs=1&numbers=1&protein=1
vep.url=http://grch37.rest.ensembl.org/vep/human/hgvs/VARIANT?content-type=application/json&xref_refseq=1&ccds=1&canonical=1&domains=1&hgvs=1&numbers=1&protein=1&AlphaMissense=1

# 200 is the max page size allowed by the public VEP service, it might be possible to increase this for a private instance
vep.max_page_size=200
Expand All @@ -24,12 +24,6 @@ vep.max_page_size=200
# the gene external references URL
genexrefs.url=http://grch37.rest.ensembl.org/xrefs/id/ACCESSION?content-type=application/json

# Mutation Assessor web API URL
#"VARIANT" will be replaced with actual variant upon each request.
mutationAssessor.url=http://mutationassessor.org/r3/?cm=var&var=VARIANT&frm=json&fts=input,rgaa,rgvt,msa,pdb,F_impact,F_score,vc_score,vs_score,info,var,gene,uprot,rsprot,gaps,msa_height,chr,rs_pos,rs_res,up_pos,up_res,cnt_cosmic,cnt_snps
# mutationAssessor url for GRCh38
# mutationAssessor.url=http://mutationassessor.org/r3/?cm=var&var=hg38,VARIANT&frm=json&fts=input,rgaa,rgvt,msa,pdb,F_impact,F_score,vc_score,vs_score,info,var,gene,uprot,rsprot,gaps,msa_height,chr,rs_pos,rs_res,up_pos,up_res,cnt_cosmic,cnt_snps

# my variant info web API URL
#"VARIANT" will be replaced with actual variant upon each request.
myvariantinfo.url=https://myvariant.info/v1/variant/VARIANT
Expand Down

0 comments on commit 7ad7f4e

Please sign in to comment.