Skip to content

Commit

Permalink
Merge pull request #159 from leexgh/vue-reference
Browse files Browse the repository at this point in the history
Update packages
  • Loading branch information
leexgh authored Jul 8, 2024
2 parents 5665125 + 8afd229 commit 562cc0d
Show file tree
Hide file tree
Showing 10 changed files with 473 additions and 237 deletions.
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
"@types/superagent": "^4.1.1",
"autobind-decorator": "^2.4.0",
"bootstrap": "^4.3.1",
"cbioportal-frontend-commons": "^0.5.51",
"cbioportal-utils": "^0.3.34",
"cbioportal-frontend-commons": "^0.5.67",
"cbioportal-utils": "^0.3.41",
"classnames": "^2.2.6",
"file-loader": "^4.3.0",
"font-awesome": "^4.7.0",
"genome-nexus-ts-api-client": "^1.1.28",
"genome-nexus-ts-api-client": "1.1.32",
"lodash": "^4.17.21",
"mobx": "^6.0.0",
"mobx-react": "^6.0.0",
Expand All @@ -42,7 +42,7 @@
"react-bootstrap": "^1.0.0-beta.6",
"react-dom": "^16.14.0",
"react-markdown": "^7.0.1",
"react-mutation-mapper": "^0.8.93",
"react-mutation-mapper": "^0.8.110",
"react-router-bootstrap": "^0.24.4",
"react-router-dom": "^4.3.1",
"react-scripts": "^3.4.4",
Expand Down Expand Up @@ -85,5 +85,9 @@
},
"devDependencies": {
"@types/react-scroll": "^1.5.4"
},
"resolutions": {
"cheerio": "1.0.0-rc.10",
"parse5-htmlparser2-tree-adapter": "^6.0.0"
}
}
2 changes: 1 addition & 1 deletion src/component/variantPage/BasicInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ export default class BasicInfo extends React.Component<IBasicInfoProps> {
>
{
annotationSummary.vues
.revisedVariantClassification
.revisedVariantClassificationStandard
}
</span>
</a>
Expand Down
32 changes: 16 additions & 16 deletions src/component/variantPage/ClinicalImplication.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
import _ from 'lodash';
// import _ from 'lodash';
import * as React from 'react';
import { observer } from 'mobx-react';

import { IndicatorQueryResp } from 'oncokb-ts-api-client';
import { ICivicVariantIndex, ICivicVariantSummary } from 'cbioportal-utils';
// import { ICivicVariantIndex, ICivicVariantSummary } from 'cbioportal-utils';

import OncoKb from './clinicalImplication/OncoKb';
import Civic from './clinicalImplication/Civic';
import Separator from '../Separator';
// import Civic from './clinicalImplication/Civic';
// import Separator from '../Separator';

interface IClinicalImplicationProps {
oncokb: IndicatorQueryResp | undefined;
civic?: ICivicVariantIndex;
// civic?: ICivicVariantIndex;
isCanonicalTranscriptSelected: boolean;
}

@observer
class ClinicalImplication extends React.Component<IClinicalImplicationProps> {
get civicVariant(): ICivicVariantSummary | undefined {
if (this.props.civic) {
// assuming the index only contains one variant
return _.values(_.values(this.props.civic)[0])[0];
} else {
return undefined;
}
}
// get civicVariant(): ICivicVariantSummary | undefined {
// if (this.props.civic) {
// // assuming the index only contains one variant
// return _.values(_.values(this.props.civic)[0])[0];
// } else {
// return undefined;
// }
// }

public render() {
return (
Expand All @@ -35,13 +35,13 @@ class ClinicalImplication extends React.Component<IClinicalImplicationProps> {
this.props.isCanonicalTranscriptSelected
}
/>
<Separator />
<Civic
{/* <Separator /> */}
{/* <Civic
civic={this.civicVariant}
isCanonicalTranscriptSelected={
this.props.isCanonicalTranscriptSelected
}
/>
/> */}
</>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/component/variantPage/FunctionalGroups.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class FunctionalGroups extends React.Component<IFunctionalGroupsProps> {
<td>
<ClinicalImplication
oncokb={this.props.oncokb}
civic={this.props.civic}
// civic={this.props.civic}
isCanonicalTranscriptSelected={
this.props.isCanonicalTranscriptSelected
}
Expand Down
65 changes: 33 additions & 32 deletions src/component/variantPage/biologicalFunction/ReVUE.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,42 @@ export const ReVUEContent: React.FunctionComponent<IReVUEProps> = (props) => {
return props.vue ? (
<div>
<div>
Predicted Effect by{` `}
{
<a
href="https://useast.ensembl.org/info/docs/tools/vep/index.html"
target="_blank"
rel="noopener noreferrer"
>
VEP
</a>
}
Predicted Effect by{' '}
<a
href="https://useast.ensembl.org/info/docs/tools/vep/index.html"
target="_blank"
rel="noopener noreferrer"
>
VEP
</a>
: <strong>{props.vue.defaultEffect}</strong>
</div>
<div>
Revised Protein Effect by{` `}
{
<a
href="https://cancerrevue.org"
target="_blank"
rel="noopener noreferrer"
>
reVUE
</a>
}
{` (`}
{
<a
href={`https://pubmed.ncbi.nlm.nih.gov/${props.vue.pubmedId}/`}
rel="noopener noreferrer"
target="_blank"
>
{props.vue.referenceText}
</a>
}
{`): `}
<strong>{props.vue.revisedProteinEffect}</strong>
Revised Protein Effect by{' '}
<a
href="https://cancerrevue.org"
target="_blank"
rel="noopener noreferrer"
>
reVUE
</a>{' '}
(
{props.vue.references.map((reference, index) => (
<React.Fragment key={reference.pubmedId}>
{index > 0 && ', '}
<a
href={`https://pubmed.ncbi.nlm.nih.gov/${reference.pubmedId}/`}
rel="noopener noreferrer"
target="_blank"
>
{reference.referenceText}
</a>
</React.Fragment>
))}
):{' '}
<strong>
{props.vue.revisedVariantClassificationStandard}
</strong>
</div>
</div>
) : (
Expand Down
Loading

0 comments on commit 562cc0d

Please sign in to comment.