Skip to content

Commit

Permalink
Merge pull request genome-nexus#695 from jeffquinn-msk/jq_specify_ref…
Browse files Browse the repository at this point in the history
…erence_genome_oncokb

Specify Reference Assembly When Calling OncoKB API
  • Loading branch information
leexgh committed Jul 27, 2023
2 parents b8238cd + fa60634 commit 52902a4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ public Alteration resolve(VariantAnnotationSummary annotationSummary)
transcriptConsequenceSummary.getProteinPosition() != null ? transcriptConsequenceSummary.getProteinPosition().getStart() : null,
transcriptConsequenceSummary.getProteinPosition() != null ? transcriptConsequenceSummary.getProteinPosition().getEnd() : null,
// TODO tumorType is optional for the query, currently genome nexus doesn't have tumorType data
null);
null,
annotationSummary.getAssemblyName());
}
}

Expand All @@ -37,4 +38,4 @@ private String normalizeProteinChange(String proteinChange) {
}
return proteinChange;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@ public class Alteration
@Field(value = "tumorType")
private String tumorType;

@Field(value = "referenceAssembly")
private String referenceAssembly;

public Alteration(String hugoSymbol, Integer entrezGeneId, String alteration,
String consequence, Integer proteinStart, Integer proteinEnd, String tumorType)
String consequence, Integer proteinStart, Integer proteinEnd, String tumorType,
String referenceAssembly)
{
this.hugoSymbol = hugoSymbol;
this.entrezGeneId = entrezGeneId;
Expand All @@ -35,6 +39,7 @@ public Alteration(String hugoSymbol, Integer entrezGeneId, String alteration,
this.proteinStart = proteinStart;
this.proteinEnd = proteinEnd;
this.tumorType = tumorType;
this.referenceAssembly = referenceAssembly;
}

public String getHugoSymbol() {
Expand Down Expand Up @@ -92,4 +97,12 @@ public String getTumorType() {
public void setTumorType(String tumorType) {
this.tumorType = tumorType;
}

public String getReferenceAssembly() {
return referenceAssembly;
}

public void setReferenceAssembly(String referenceAssembly) {
this.referenceAssembly = referenceAssembly;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public OncokbServiceImpl(OncokbDataFetcher oncokbDataFetcher, OncokbCancerGenesL

public IndicatorQueryResp getOncokbByProteinChange(Alteration alteration, String token) throws OncokbNotFoundException, OncokbWebServiceException {
Optional<IndicatorQueryResp> oncokb = null;

oncokbDataFetcher.setOncokbToken(token);
try {
// get the annotation from the web service
Expand Down Expand Up @@ -96,6 +96,8 @@ private String generateQueryString(Alteration alteration) {
if (alteration.getTumorType() != null) {
query = query + "&tumorType=" + alteration.getTumorType();
}
query = query + "&referenceGenome=" + alteration.getReferenceAssembly();

// TODO tumorType is optional for the query, currently genome nexus doesn't have tumorType data

return query;
Expand All @@ -104,4 +106,4 @@ private String generateQueryString(Alteration alteration) {
public List<CancerGene> getOncokbCancerGenesList() {
return this.oncokbCancerGenesListRepository.getOncokbCancerGenesList();
}
}
}

0 comments on commit 52902a4

Please sign in to comment.