Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-web
ensembl-client
Commits
1e17e365
Unverified
Commit
1e17e365
authored
Jul 07, 2021
by
Jyothish
Committed by
GitHub
Jul 07, 2021
Browse files
add similar_proteins stat from pdb (#518)
parent
836c141f
Pipeline
#173084
passed with stages
in 4 minutes and 50 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
7 deletions
+25
-7
src/ensembl/src/content/app/entity-viewer/gene-view/components/protein-features-count/ProteinFeaturesCount.tsx
...omponents/protein-features-count/ProteinFeaturesCount.tsx
+8
-1
src/ensembl/src/content/app/entity-viewer/shared/rest/rest-adaptors/rest-protein-adaptor.ts
...-viewer/shared/rest/rest-adaptors/rest-protein-adaptor.ts
+2
-1
src/ensembl/src/content/app/entity-viewer/shared/rest/rest-data-fetchers/proteinData.ts
...tity-viewer/shared/rest/rest-data-fetchers/proteinData.ts
+6
-5
src/ensembl/static/img/entity-viewer/icon_protein_similar.svg
...ensembl/static/img/entity-viewer/icon_protein_similar.svg
+9
-0
No files found.
src/ensembl/src/content/app/entity-viewer/gene-view/components/protein-features-count/ProteinFeaturesCount.tsx
View file @
1e17e365
...
...
@@ -22,6 +22,7 @@ import structuresIcon from 'static/img/entity-viewer/icon_protein_structures.svg
import
ligandsIcon
from
'
static/img/entity-viewer/icon_protein_ligands.svg
'
;
import
interactionsIcon
from
'
static/img/entity-viewer/icon_protein_interactions.svg
'
;
import
annotationsIcon
from
'
static/img/entity-viewer/icon_protein_annotations.svg
'
;
import
similarProteinsIcon
from
'
static/img/entity-viewer/icon_protein_similar.svg
'
;
import
styles
from
'
./ProteinFeaturesCount.scss
'
;
...
...
@@ -33,7 +34,8 @@ enum FeatureCountLabel {
ANNOTATIONS
=
'
Functional annotations
'
,
INTERACTIONS
=
'
Interactions
'
,
LIGANDS
=
'
Ligands
'
,
STRUCTURES
=
'
Structures
'
STRUCTURES
=
'
Structures
'
,
SIMILAR_PROTEINS
=
'
Similar proteins
'
}
const
ProteinFeaturesCount
=
(
props
:
ProteinFeaturesCountProps
)
=>
{
...
...
@@ -61,6 +63,11 @@ const ProteinFeaturesCount = (props: ProteinFeaturesCountProps) => {
count
=
{
proteinStats
.
annotationsCount
}
icon
=
{
annotationsIcon
}
/>
<
FeatureCount
label
=
{
FeatureCountLabel
.
SIMILAR_PROTEINS
}
count
=
{
proteinStats
.
similarProteinsCount
}
icon
=
{
similarProteinsIcon
}
/>
</
div
>
);
};
...
...
src/ensembl/src/content/app/entity-viewer/shared/rest/rest-adaptors/rest-protein-adaptor.ts
View file @
1e17e365
...
...
@@ -25,5 +25,6 @@ export const restProteinSummaryAdaptor = (
structuresCount
:
proteinStats
.
pdbs
,
ligandsCount
:
proteinStats
.
ligands
,
interactionsCount
:
proteinStats
.
interaction_partners
,
annotationsCount
:
proteinStats
.
annotations
annotationsCount
:
proteinStats
.
annotations
,
similarProteinsCount
:
proteinStats
.
similar_proteins
});
src/ensembl/src/content/app/entity-viewer/shared/rest/rest-data-fetchers/proteinData.ts
View file @
1e17e365
...
...
@@ -23,6 +23,7 @@ export type ProteinStatsInResponse = {
ligands
:
number
;
interaction_partners
:
number
;
annotations
:
number
;
similar_proteins
:
number
;
};
export
type
ProteinAcessionInResponse
=
{
...
...
@@ -42,6 +43,7 @@ export type ProteinStats = {
ligandsCount
:
number
;
interactionsCount
:
number
;
annotationsCount
:
number
;
similarProteinsCount
:
number
;
};
export
const
fetchProteinSummaryStats
=
async
(
...
...
@@ -50,11 +52,10 @@ export const fetchProteinSummaryStats = async (
):
Promise
<
ProteinStats
|
null
>
=>
{
const
proteinStatsUrl
=
`https://www.ebi.ac.uk/pdbe/graph-api/uniprot/summary_stats/
${
xrefId
}
`
;
const
proteinStatsData
:
|
UniProtSummaryStats
|
undefined
=
await
apiService
.
fetch
(
proteinStatsUrl
,
{
signal
});
const
proteinStatsData
:
UniProtSummaryStats
|
undefined
=
await
apiService
.
fetch
(
proteinStatsUrl
,
{
signal
});
if
(
!
proteinStatsData
)
{
return
null
;
}
...
...
src/ensembl/static/img/entity-viewer/icon_protein_similar.svg
0 → 100644
View file @
1e17e365
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 25.2.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
version=
"1.1"
id=
"elipsis"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
x=
"0px"
y=
"0px"
viewBox=
"0 0 32 32"
style=
"enable-background:new 0 0 32 32;"
xml:space=
"preserve"
>
<path
d=
"M31,25.5c0,0.5-0.4,0.9-0.9,0.9H20c-0.5,0-0.9-0.4-0.9-0.9l0,0v-4.9c0-0.5,0.4-0.9,0.9-0.9c0,0,0,0,0,0h4.4l-7.5-7.5h-1.5
l-7.5,7.5H12c0.5,0,0.9,0.4,0.9,0.9c0,0,0,0,0,0v4.9c0,0.5-0.4,0.9-0.9,0.9h0H1.9C1.4,26.4,1,26,1,25.5l0,0v-4.9
c0-0.5,0.4-0.9,0.9-0.9c0,0,0,0,0,0h4l7.5-7.5h-2.3c-0.5,0-0.9-0.4-0.9-0.9V6.5c0-0.5,0.4-0.9,0.9-0.9h10.1c0.5,0,0.9,0.4,0.9,0.9
v4.9c0,0.5-0.4,0.9-0.9,0.9h-2.3l7.5,7.5h3.8c0.5,0,0.9,0.4,0.9,0.9C31,20.7,31,25.5,31,25.5z"
/>
</svg>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment