Skip to content

Commit

Permalink
feat: adding GeneOverviewCard (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe authored Jan 29, 2024
1 parent ad041aa commit 9007269
Show file tree
Hide file tree
Showing 9 changed files with 745 additions and 57 deletions.
1 change: 0 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ module.exports = {
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'vue/multi-word-component-names': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'warn', // or "error"
Expand Down
112 changes: 56 additions & 56 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

93 changes: 93 additions & 0 deletions src/components/GeneOverviewCard/AlternativeIdentifiers.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<script setup lang="ts">
import { HgncRecord } from '../../pbs/annonars/genes/base'
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const props = withDefaults(
defineProps<{
/** HGNC information to display for. */
hgnc?: HgncRecord
}>(),
{
hgnc: undefined
}
)
</script>

<template>
<div>
<div class="text-subtitle-1">Alternative Identifiers</div>

<div>
<strong> ENSEMBL: </strong>
<a
:href="`https://www.ensembl.org/Homo_sapiens/Gene/Summary?g=${hgnc?.ensemblGeneId}`"
target="_blank"
>
<v-icon>mdi-launch</v-icon>
{{ hgnc?.ensemblGeneId }}
</a>
</div>

<div>
<strong> HGNC: </strong>
<a
:href="`https://www.genenames.org/data/gene-symbol-report/#!/hgnc_id/${hgnc?.hgncId}`"
target="_blank"
>
<v-icon>mdi-launch</v-icon>
{{ hgnc?.hgncId }}
</a>
</div>

<div v-if="hgnc?.mgdId?.length">
<strong>MGI: </strong>
<template v-for="(mgd_id, index) in hgnc.mgdId" :key="mgd_id">
<template v-if="index > 0"> , </template>
<a :href="`https://www.informatics.jax.org/marker/${mgd_id}`" target="_blank">
<v-icon>mdi-launch</v-icon>
{{ mgd_id }}
</a>
</template>
</div>
<span v-else> No MGI </span>

<div v-if="hgnc?.pubmedId?.length">
<strong>Primary PMID: </strong>
<template v-for="(pmid, index) in hgnc.pubmedId" :key="pmid">
<template v-if="index > 0"> , </template>
<a :href="`https://pubmed.ncbi.nlm.nih.gov/${pmid}/`" target="_blank">
<v-icon>mdi-launch</v-icon>
{{ pmid }}
</a>
</template>
</div>
<div v-else>No primary PMID</div>

<div v-if="hgnc?.refseqAccession?.length">
<strong> RefSeq: </strong>
<template v-for="(accession, index) in hgnc.refseqAccession" :key="index">
<template v-if="index > 0"> , </template>
<a
:href="`https://www.ncbi.nlm.nih.gov/nuccore/?term=${accession}+AND+srcdb_refseq[PROP]`"
target="_blank"
>
<v-icon>mdi-launch</v-icon>
{{ accession }}
</a>
</template>
</div>
<div v-else>No RefSeq</div>

<div v-if="hgnc?.uniprotIds?.length">
<strong> UniProt: </strong>
<template v-for="(uniprotid, index) in hgnc.uniprotIds" :key="index">
<template v-if="index > 0"> , </template>
<a :href="`https://www.uniprot.org/uniprotkb/${uniprotid}/entry`" target="_blank">
<v-icon>mdi-launch</v-icon>
{{ uniprotid }}
</a>
</template>
</div>
<div v-else>No UniProt</div>
</div>
</template>
Loading

0 comments on commit 9007269

Please sign in to comment.