Skip to content

Commit

Permalink
model changes for scores
Browse files Browse the repository at this point in the history
  • Loading branch information
prabh-t committed May 12, 2024
1 parent 46f9014 commit 957c354
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/utills/Convertor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
INPUT_CDNA,
UserInput,
GenomicInput,
Message, MappingResponse
Message, MappingResponse, EVEScore, ConservScore, ESMScore, AMScore
} from "../types/MappingResponse";

export interface MappingRecord {
Expand All @@ -23,7 +23,7 @@ export interface MappingRecord {
geneName?: string
codon?: string
strand?: boolean
CADD?: string
cadd?: string
// PROTEIN column properties
canonical?: boolean // display as can (true) or iso (false)
isoform?: string
Expand All @@ -35,8 +35,10 @@ export interface MappingRecord {
variantAA?: string
cdsPosition?: number // not displayed or used anywhere
consequences?: string
eveScore?: string
eveClass?: number
conservScore?: ConservScore
amScore?: AMScore
eveScore?: EVEScore
esmScore?: ESMScore
// ANNOTATIONS column
referenceFunctionUri?: string
populationObservationsUri?: string
Expand Down Expand Up @@ -169,8 +171,8 @@ function convertGenInputMappings(originalInput: UserInput, genInput: GenomicInpu
record.geneName = gene.geneName;
record.codon = isoform.refCodon + '/' + isoform.variantCodon;
record.strand = gene.reverseStrand;
if (gene.caddScore === null) record.CADD = '-';
else record.CADD = gene.caddScore.toString();
if (gene.caddScore === null) record.cadd = '-';
else record.cadd = gene.caddScore.toString();
}
// PROTEIN
record.canonical = isoform.canonical;
Expand All @@ -183,12 +185,10 @@ function convertGenInputMappings(originalInput: UserInput, genInput: GenomicInpu
record.variantAA = isoform.variantAA;
record.cdsPosition = isoform.cdsPosition;
record.consequences = isoform.consequences;
if (isoform.eveScore !== undefined && isoform.eveScore !== null) {
record.eveScore = isoform.eveScore.toString();
record.eveClass = isoform.eveClass;
} else {
record.eveScore = '-';
}
record.conservScore = isoform.conservScore;
record.amScore = isoform.amScore;
record.eveScore = isoform.eveScore;
record.esmScore = isoform.esmScore;
// ANNOTATIONS
record.referenceFunctionUri = isoform.referenceFunctionUri;
record.populationObservationsUri = isoform.populationObservationsUri;
Expand Down

0 comments on commit 957c354

Please sign in to comment.