jbrowse-plugin-protein3d 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LaunchProteinView/components/AlphaFoldDBSearch.js +44 -27
- package/dist/LaunchProteinView/components/AlphaFoldDBSearch.js.map +1 -1
- package/dist/LaunchProteinView/components/AlphaFoldDBSearchStatus.d.ts +7 -4
- package/dist/LaunchProteinView/components/AlphaFoldDBSearchStatus.js +30 -11
- package/dist/LaunchProteinView/components/AlphaFoldDBSearchStatus.js.map +1 -1
- package/dist/LaunchProteinView/components/HelpDialog.js +10 -3
- package/dist/LaunchProteinView/components/HelpDialog.js.map +1 -1
- package/dist/LaunchProteinView/components/LaunchProteinViewDialog.js +3 -7
- package/dist/LaunchProteinView/components/LaunchProteinViewDialog.js.map +1 -1
- package/dist/LaunchProteinView/components/MSATable.d.ts +10 -0
- package/dist/LaunchProteinView/components/MSATable.js +53 -0
- package/dist/LaunchProteinView/components/MSATable.js.map +1 -0
- package/dist/LaunchProteinView/components/TranscriptSelector.d.ts +7 -3
- package/dist/LaunchProteinView/components/TranscriptSelector.js +22 -7
- package/dist/LaunchProteinView/components/TranscriptSelector.js.map +1 -1
- package/dist/LaunchProteinView/components/UserProvidedStructure.js +56 -43
- package/dist/LaunchProteinView/components/UserProvidedStructure.js.map +1 -1
- package/dist/LaunchProteinView/components/calculateProteinSequence.js.map +1 -0
- package/dist/LaunchProteinView/components/useIsoformProteinSequences.d.ts +14 -0
- package/dist/LaunchProteinView/{useProteinSequences.js → components/useIsoformProteinSequences.js} +11 -6
- package/dist/LaunchProteinView/components/useIsoformProteinSequences.js.map +1 -0
- package/dist/LaunchProteinView/components/useLocalStructureFileSequence.d.ts +7 -0
- package/dist/LaunchProteinView/components/useLocalStructureFileSequence.js +44 -0
- package/dist/LaunchProteinView/components/useLocalStructureFileSequence.js.map +1 -0
- package/dist/LaunchProteinView/{useMyGeneInfo.d.ts → components/useMyGeneInfoUniprotIdLookup.d.ts} +2 -2
- package/dist/LaunchProteinView/{useMyGeneInfo.js → components/useMyGeneInfoUniprotIdLookup.js} +15 -10
- package/dist/LaunchProteinView/components/useMyGeneInfoUniprotIdLookup.js.map +1 -0
- package/dist/LaunchProteinView/components/useRemoteStructureFileSequence.d.ts +7 -0
- package/dist/LaunchProteinView/components/useRemoteStructureFileSequence.js +42 -0
- package/dist/LaunchProteinView/components/useRemoteStructureFileSequence.js.map +1 -0
- package/dist/LaunchProteinView/{util.d.ts → components/util.d.ts} +0 -10
- package/dist/LaunchProteinView/{util.js → components/util.js} +3 -24
- package/dist/LaunchProteinView/components/util.js.map +1 -0
- package/dist/LaunchProteinView/index.js +1 -1
- package/dist/LaunchProteinView/index.js.map +1 -1
- package/dist/ProteinView/components/Header.js +1 -1
- package/dist/ProteinView/components/Header.js.map +1 -1
- package/dist/ProteinView/components/SplitString.js +1 -1
- package/dist/ProteinView/components/SplitString.js.map +1 -1
- package/dist/ProteinView/model.d.ts +8 -4
- package/dist/ProteinView/model.js +39 -13
- package/dist/ProteinView/model.js.map +1 -1
- package/dist/index.js +0 -9
- package/dist/index.js.map +1 -1
- package/dist/jbrowse-plugin-protein3d.umd.production.min.js +147 -148
- package/dist/jbrowse-plugin-protein3d.umd.production.min.js.map +4 -4
- package/package.json +2 -2
- package/src/LaunchProteinView/components/AlphaFoldDBSearch.tsx +98 -47
- package/src/LaunchProteinView/components/AlphaFoldDBSearchStatus.tsx +65 -25
- package/src/LaunchProteinView/components/HelpDialog.tsx +35 -7
- package/src/LaunchProteinView/components/LaunchProteinViewDialog.tsx +1 -10
- package/src/LaunchProteinView/components/MSATable.tsx +96 -0
- package/src/LaunchProteinView/components/TranscriptSelector.tsx +36 -10
- package/src/LaunchProteinView/components/UserProvidedStructure.tsx +110 -64
- package/src/LaunchProteinView/{useProteinSequences.ts → components/useIsoformProteinSequences.ts} +12 -7
- package/src/LaunchProteinView/components/useLocalStructureFileSequence.ts +53 -0
- package/src/LaunchProteinView/{useMyGeneInfo.ts → components/useMyGeneInfoUniprotIdLookup.ts} +16 -11
- package/src/LaunchProteinView/components/useRemoteStructureFileSequence.ts +44 -0
- package/src/LaunchProteinView/{util.ts → components/util.ts} +3 -35
- package/src/LaunchProteinView/index.ts +1 -1
- package/src/ProteinView/components/Header.tsx +7 -5
- package/src/ProteinView/components/SplitString.tsx +1 -1
- package/src/ProteinView/model.ts +40 -12
- package/src/index.ts +1 -12
- package/dist/LaunchProteinView/calculateProteinSequence.js.map +0 -1
- package/dist/LaunchProteinView/components/PreLoadedStructureMapping.d.ts +0 -8
- package/dist/LaunchProteinView/components/PreLoadedStructureMapping.js +0 -72
- package/dist/LaunchProteinView/components/PreLoadedStructureMapping.js.map +0 -1
- package/dist/LaunchProteinView/components/useCheckAlphaFoldDBExistence.d.ts +0 -7
- package/dist/LaunchProteinView/components/useCheckAlphaFoldDBExistence.js +0 -26
- package/dist/LaunchProteinView/components/useCheckAlphaFoldDBExistence.js.map +0 -1
- package/dist/LaunchProteinView/useMyGeneInfo.js.map +0 -1
- package/dist/LaunchProteinView/useProteinSequences.d.ts +0 -10
- package/dist/LaunchProteinView/useProteinSequences.js.map +0 -1
- package/dist/LaunchProteinView/util.js.map +0 -1
- package/dist/ProteinModelSessionExtension.d.ts +0 -11
- package/dist/ProteinModelSessionExtension.js +0 -53
- package/dist/ProteinModelSessionExtension.js.map +0 -1
- package/src/LaunchProteinView/components/PreLoadedStructureMapping.tsx +0 -153
- package/src/LaunchProteinView/components/useCheckAlphaFoldDBExistence.ts +0 -31
- package/src/ProteinModelSessionExtension.ts +0 -71
- /package/dist/LaunchProteinView/{calculateProteinSequence.d.ts → components/calculateProteinSequence.d.ts} +0 -0
- /package/dist/LaunchProteinView/{calculateProteinSequence.js → components/calculateProteinSequence.js} +0 -0
- /package/src/LaunchProteinView/{calculateProteinSequence.ts → components/calculateProteinSequence.ts} +0 -0
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useMemo, useState } from 'react';
|
|
2
|
-
import { observer } from 'mobx-react';
|
|
3
|
-
import { Button, DialogActions, DialogContent, Link, MenuItem, TextField, Typography, } from '@mui/material';
|
|
4
|
-
import { makeStyles } from 'tss-react/mui';
|
|
5
|
-
import { ErrorMessage, LoadingEllipses } from '@jbrowse/core/ui';
|
|
6
|
-
import { getSession } from '@jbrowse/core/util';
|
|
7
|
-
// locals
|
|
8
|
-
import { createMapFromData, getDisplayName, getTranscriptFeatures, stripTrailingVersion, } from '../util';
|
|
9
|
-
import { genomeToTranscriptMapping } from '../../genomeToTranscriptMapping';
|
|
10
|
-
const useStyles = makeStyles()(theme => ({
|
|
11
|
-
section: {
|
|
12
|
-
marginTop: theme.spacing(6),
|
|
13
|
-
},
|
|
14
|
-
dialogContent: {
|
|
15
|
-
width: '80em',
|
|
16
|
-
},
|
|
17
|
-
}));
|
|
18
|
-
function foundF(f, map) {
|
|
19
|
-
return (map.get(stripTrailingVersion(f?.get('name')) ?? '') ??
|
|
20
|
-
map.get(stripTrailingVersion(f?.get('id')) ?? ''));
|
|
21
|
-
}
|
|
22
|
-
const AutoForm = observer(function AutoForm({ model, feature, handleClose, }) {
|
|
23
|
-
const { classes } = useStyles();
|
|
24
|
-
const session = getSession(model);
|
|
25
|
-
// @ts-expect-error
|
|
26
|
-
const { proteinModel } = session;
|
|
27
|
-
const { data, error } = proteinModel;
|
|
28
|
-
// check if we are looking at a 'two-level' or 'three-level' feature by
|
|
29
|
-
// finding exon/CDS subfeatures. we want to select from transcript names
|
|
30
|
-
const options = getTranscriptFeatures(feature);
|
|
31
|
-
const transcriptIdToStructureMap = useMemo(() => createMapFromData(data), [data]);
|
|
32
|
-
const hasDataForFeatures = useMemo(() => options.filter(f => foundF(f, transcriptIdToStructureMap)), [transcriptIdToStructureMap, options]);
|
|
33
|
-
const [userSelection, setUserSelection] = useState('');
|
|
34
|
-
const userSelectionFeat = options.find(f => f.id() === userSelection);
|
|
35
|
-
const foundStructureId = foundF(userSelectionFeat, transcriptIdToStructureMap);
|
|
36
|
-
useEffect(() => {
|
|
37
|
-
setUserSelection(hasDataForFeatures[0]?.id());
|
|
38
|
-
}, [hasDataForFeatures]);
|
|
39
|
-
const mapping = foundStructureId && userSelectionFeat
|
|
40
|
-
? genomeToTranscriptMapping(userSelectionFeat)
|
|
41
|
-
: [];
|
|
42
|
-
const url = foundStructureId
|
|
43
|
-
? `https://files.rcsb.org/view/${foundStructureId}.cif`
|
|
44
|
-
: undefined;
|
|
45
|
-
return (React.createElement(React.Fragment, null,
|
|
46
|
-
React.createElement(DialogContent, { className: classes.dialogContent },
|
|
47
|
-
React.createElement("div", { className: classes.section }, error ? (React.createElement(ErrorMessage, { error: error })) : data ? (React.createElement("div", null,
|
|
48
|
-
React.createElement(Intro, null),
|
|
49
|
-
hasDataForFeatures.length === 0 ? (React.createElement(Typography, { color: "error" }, "No data for feature")) : (React.createElement(React.Fragment, null,
|
|
50
|
-
React.createElement("div", { className: classes.section },
|
|
51
|
-
React.createElement(TextField, { value: userSelection, onChange: event => setUserSelection(event.target.value), label: "Choose isoform", select: true }, hasDataForFeatures.map(val => (React.createElement(MenuItem, { value: val.id(), key: val.id() },
|
|
52
|
-
getDisplayName(val),
|
|
53
|
-
" (has data)"))))))))) : (React.createElement(LoadingEllipses, null)))),
|
|
54
|
-
React.createElement(DialogActions, null,
|
|
55
|
-
React.createElement(Button, { variant: "contained", color: "secondary", onClick: handleClose }, "Cancel"),
|
|
56
|
-
React.createElement(Button, { variant: "contained", color: "primary", onClick: () => {
|
|
57
|
-
session.addView('ProteinView', {
|
|
58
|
-
type: 'ProteinView',
|
|
59
|
-
url,
|
|
60
|
-
mapping,
|
|
61
|
-
});
|
|
62
|
-
handleClose();
|
|
63
|
-
} }, "Submit"))));
|
|
64
|
-
});
|
|
65
|
-
function Intro() {
|
|
66
|
-
return (React.createElement("div", null,
|
|
67
|
-
"Find structure associated with gene ID:",
|
|
68
|
-
' ',
|
|
69
|
-
React.createElement(Link, { href: "http://useast.ensembl.org/biomart/martview/4b20effd49654183333b81e98757976f?VIRTUALSCHEMANAME=default&ATTRIBUTES=hsapiens_gene_ensembl.default.feature_page.ensembl_gene_id|hsapiens_gene_ensembl.default.feature_page.ensembl_gene_id_version|hsapiens_gene_ensembl.default.feature_page.ensembl_transcript_id|hsapiens_gene_ensembl.default.feature_page.ensembl_transcript_id_version|hsapiens_gene_ensembl.default.feature_page.pdb|hsapiens_gene_ensembl.default.feature_page.refseq_mrna|hsapiens_gene_ensembl.default.feature_page.refseq_mrna_predicted&FILTERS=&VISIBLEPANEL=attributepanel" }, "Human mappings generated from BioMart (April 13, 2023)")));
|
|
70
|
-
}
|
|
71
|
-
export default AutoForm;
|
|
72
|
-
//# sourceMappingURL=PreLoadedStructureMapping.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PreLoadedStructureMapping.js","sourceRoot":"","sources":["../../../src/LaunchProteinView/components/PreLoadedStructureMapping.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EACL,MAAM,EACN,aAAa,EACb,aAAa,EACb,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,UAAU,GACX,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAChE,OAAO,EAA+B,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAE5E,SAAS;AACT,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAA;AAE3E,MAAM,SAAS,GAAG,UAAU,EAAE,CAAC,KAAK,CAAC,EAAE,CAA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B,MAAM,UAEL,kBAAkB,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAC7B,oBAAC,QAAQ,IAAC,KAAK,EAAE,GAAG,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE;4BACrC,cAAc,CAAC,GAAG,CAAC;0CACX,CACZ,CAAC,CACQ,CACR,CACL,CACJ,CACG,CACP,CAAC,CAAC,CAAC,CACF,oBAAC,eAAe,OAAG,CACpB,CACG,CACQ;QAChB,oBAAC,aAAa;YACZ,oBAAC,MAAM,IAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,WAAW,EAAC,OAAO,EAAE,WAAW,aAEzD;YACT,oBAAC,MAAM,IACL,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,SAAS,EACf,OAAO,EAAE,GAAG,EAAE;oBACZ,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE;wBAC7B,IAAI,EAAE,aAAa;wBACnB,GAAG;wBACH,OAAO;qBACR,CAAC,CAAA;oBACF,WAAW,EAAE,CAAA;gBACf,CAAC,aAGM,CACK,CACf,CACJ,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,SAAS,KAAK;IACZ,OAAO,CACL;;QAC0C,GAAG;QAC3C,oBAAC,IAAI,IAAC,IAAI,EAAC,skBAAskB,6DAE1kB,CACH,CACP,CAAA;AACH,CAAC;AAED,eAAe,QAAQ,CAAA"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from 'react';
|
|
2
|
-
export function useCheckAlphaFoldDBExistence({ foundStructureId, }) {
|
|
3
|
-
const [error, setError] = useState();
|
|
4
|
-
const [loading, setLoading] = useState(false);
|
|
5
|
-
const [success, setSuccess] = useState(false);
|
|
6
|
-
useEffect(() => {
|
|
7
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
8
|
-
;
|
|
9
|
-
(async () => {
|
|
10
|
-
try {
|
|
11
|
-
if (foundStructureId) {
|
|
12
|
-
setLoading(true);
|
|
13
|
-
await fetch(`https://alphafold.ebi.ac.uk/files/AF-${foundStructureId}-F1-model_v4.cif`, { method: 'HEAD' });
|
|
14
|
-
setLoading(false);
|
|
15
|
-
setSuccess(true);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
catch (e) {
|
|
19
|
-
console.error(e);
|
|
20
|
-
setError(e);
|
|
21
|
-
}
|
|
22
|
-
})();
|
|
23
|
-
}, [foundStructureId]);
|
|
24
|
-
return { error, loading, success };
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=useCheckAlphaFoldDBExistence.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useCheckAlphaFoldDBExistence.js","sourceRoot":"","sources":["../../../src/LaunchProteinView/components/useCheckAlphaFoldDBExistence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAE3C,MAAM,UAAU,4BAA4B,CAAC,EAC3C,gBAAgB,GAGjB;IACC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,EAAW,CAAA;IAC7C,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC7C,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC7C,SAAS,CAAC,GAAG,EAAE;QACb,mEAAmE;QACnE,CAAC;QAAA,CAAC,KAAK,IAAI,EAAE;YACX,IAAI,CAAC;gBACH,IAAI,gBAAgB,EAAE,CAAC;oBACrB,UAAU,CAAC,IAAI,CAAC,CAAA;oBAChB,MAAM,KAAK,CACT,wCAAwC,gBAAgB,kBAAkB,EAC1E,EAAE,MAAM,EAAE,MAAM,EAAE,CACnB,CAAA;oBACD,UAAU,CAAC,KAAK,CAAC,CAAA;oBACjB,UAAU,CAAC,IAAI,CAAC,CAAA;gBAClB,CAAC;YACH,C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,SAAS;QACtB,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;aACrD,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;aAChB,IAAI,CAAC,GAAG,CAAC,CAAA;AAClB,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Row } from './LaunchProteinView/util';
|
|
2
|
-
declare const ProteinModelSessionExtension: import("mobx-state-tree").IModelType<{}, {
|
|
3
|
-
data: Row[] | undefined;
|
|
4
|
-
error: unknown;
|
|
5
|
-
} & {
|
|
6
|
-
setData(a?: Row[]): void;
|
|
7
|
-
setError(e: unknown): void;
|
|
8
|
-
} & {
|
|
9
|
-
afterCreate(): void;
|
|
10
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
11
|
-
export default ProteinModelSessionExtension;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { addDisposer, types } from 'mobx-state-tree';
|
|
2
|
-
import { autorun } from 'mobx';
|
|
3
|
-
import { ungzip } from 'pako';
|
|
4
|
-
import { abfetch } from './fetchUtils';
|
|
5
|
-
const ProteinModelSessionExtension = types
|
|
6
|
-
.model({})
|
|
7
|
-
.volatile(() => ({
|
|
8
|
-
data: undefined,
|
|
9
|
-
error: undefined,
|
|
10
|
-
}))
|
|
11
|
-
.actions(self => ({
|
|
12
|
-
setData(a) {
|
|
13
|
-
self.data = a;
|
|
14
|
-
},
|
|
15
|
-
setError(e) {
|
|
16
|
-
self.error = e;
|
|
17
|
-
},
|
|
18
|
-
}))
|
|
19
|
-
.actions(self => {
|
|
20
|
-
return {
|
|
21
|
-
afterCreate() {
|
|
22
|
-
const url = 'https://jbrowse.org/demos/protein3d/mart_export.txt.gz';
|
|
23
|
-
addDisposer(self, autorun(async () => {
|
|
24
|
-
try {
|
|
25
|
-
const ret = new TextDecoder('utf8').decode(ungzip(await abfetch(url)));
|
|
26
|
-
const d = ret
|
|
27
|
-
.split('\n')
|
|
28
|
-
.slice(1)
|
|
29
|
-
.filter(line => !!line)
|
|
30
|
-
.map(line => {
|
|
31
|
-
const res = line.split('\t');
|
|
32
|
-
const [gene_id, gene_id_version, transcript_id, transcript_id_version, pdb_id, refseq_mrna_id, refseq_mrna_predicted_id,] = res;
|
|
33
|
-
return {
|
|
34
|
-
gene_id,
|
|
35
|
-
gene_id_version,
|
|
36
|
-
transcript_id_version,
|
|
37
|
-
transcript_id,
|
|
38
|
-
pdb_id,
|
|
39
|
-
refseq_mrna_predicted_id,
|
|
40
|
-
refseq_mrna_id,
|
|
41
|
-
};
|
|
42
|
-
});
|
|
43
|
-
self.setData(d);
|
|
44
|
-
}
|
|
45
|
-
catch (error) {
|
|
46
|
-
self.setError(error);
|
|
47
|
-
}
|
|
48
|
-
}));
|
|
49
|
-
},
|
|
50
|
-
};
|
|
51
|
-
});
|
|
52
|
-
export default ProteinModelSessionExtension;
|
|
53
|
-
//# sourceMappingURL=ProteinModelSessionExtension.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProteinModelSessionExtension.js","sourceRoot":"","sources":["../src/ProteinModelSessionExtension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAI7B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,MAAM,4BAA4B,GAAG,KAAK;KACvC,KAAK,CAAC,EAAE,CAAC;KACT,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC;IACf,IAAI,EAAE,SAA8B;IACpC,KAAK,EAAE,SAAoB;CAC5B,C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ACH,CAAA;QACH,CAAC;KACF,CAAA;AACH,CAAC,CAAC,CAAA;AAEJ,eAAe,4BAA4B,CAAA"}
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useMemo, useState } from 'react'
|
|
2
|
-
import { observer } from 'mobx-react'
|
|
3
|
-
import {
|
|
4
|
-
Button,
|
|
5
|
-
DialogActions,
|
|
6
|
-
DialogContent,
|
|
7
|
-
Link,
|
|
8
|
-
MenuItem,
|
|
9
|
-
TextField,
|
|
10
|
-
Typography,
|
|
11
|
-
} from '@mui/material'
|
|
12
|
-
import { makeStyles } from 'tss-react/mui'
|
|
13
|
-
import { ErrorMessage, LoadingEllipses } from '@jbrowse/core/ui'
|
|
14
|
-
import { AbstractTrackModel, Feature, getSession } from '@jbrowse/core/util'
|
|
15
|
-
|
|
16
|
-
// locals
|
|
17
|
-
import {
|
|
18
|
-
createMapFromData,
|
|
19
|
-
getDisplayName,
|
|
20
|
-
getTranscriptFeatures,
|
|
21
|
-
stripTrailingVersion,
|
|
22
|
-
} from '../util'
|
|
23
|
-
import { genomeToTranscriptMapping } from '../../genomeToTranscriptMapping'
|
|
24
|
-
|
|
25
|
-
const useStyles = makeStyles()(theme => ({
|
|
26
|
-
section: {
|
|
27
|
-
marginTop: theme.spacing(6),
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
dialogContent: {
|
|
31
|
-
width: '80em',
|
|
32
|
-
},
|
|
33
|
-
}))
|
|
34
|
-
|
|
35
|
-
function foundF(f: Feature | undefined, map: Map<string, string>) {
|
|
36
|
-
return (
|
|
37
|
-
map.get(stripTrailingVersion(f?.get('name')) ?? '') ??
|
|
38
|
-
map.get(stripTrailingVersion(f?.get('id')) ?? '')
|
|
39
|
-
)
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const AutoForm = observer(function AutoForm({
|
|
43
|
-
model,
|
|
44
|
-
feature,
|
|
45
|
-
handleClose,
|
|
46
|
-
}: {
|
|
47
|
-
model: AbstractTrackModel
|
|
48
|
-
feature: Feature
|
|
49
|
-
handleClose: () => void
|
|
50
|
-
}) {
|
|
51
|
-
const { classes } = useStyles()
|
|
52
|
-
const session = getSession(model)
|
|
53
|
-
// @ts-expect-error
|
|
54
|
-
const { proteinModel } = session
|
|
55
|
-
const { data, error } = proteinModel
|
|
56
|
-
// check if we are looking at a 'two-level' or 'three-level' feature by
|
|
57
|
-
// finding exon/CDS subfeatures. we want to select from transcript names
|
|
58
|
-
const options = getTranscriptFeatures(feature)
|
|
59
|
-
const transcriptIdToStructureMap = useMemo(
|
|
60
|
-
() => createMapFromData(data),
|
|
61
|
-
[data],
|
|
62
|
-
)
|
|
63
|
-
|
|
64
|
-
const hasDataForFeatures = useMemo(
|
|
65
|
-
() => options.filter(f => foundF(f, transcriptIdToStructureMap)),
|
|
66
|
-
[transcriptIdToStructureMap, options],
|
|
67
|
-
)
|
|
68
|
-
const [userSelection, setUserSelection] = useState('')
|
|
69
|
-
const userSelectionFeat = options.find(f => f.id() === userSelection)
|
|
70
|
-
const foundStructureId = foundF(userSelectionFeat, transcriptIdToStructureMap)
|
|
71
|
-
|
|
72
|
-
useEffect(() => {
|
|
73
|
-
setUserSelection(hasDataForFeatures[0]?.id())
|
|
74
|
-
}, [hasDataForFeatures])
|
|
75
|
-
|
|
76
|
-
const mapping =
|
|
77
|
-
foundStructureId && userSelectionFeat
|
|
78
|
-
? genomeToTranscriptMapping(userSelectionFeat)
|
|
79
|
-
: []
|
|
80
|
-
const url = foundStructureId
|
|
81
|
-
? `https://files.rcsb.org/view/${foundStructureId}.cif`
|
|
82
|
-
: undefined
|
|
83
|
-
|
|
84
|
-
return (
|
|
85
|
-
<>
|
|
86
|
-
<DialogContent className={classes.dialogContent}>
|
|
87
|
-
<div className={classes.section}>
|
|
88
|
-
{error ? (
|
|
89
|
-
<ErrorMessage error={error} />
|
|
90
|
-
) : data ? (
|
|
91
|
-
<div>
|
|
92
|
-
<Intro />
|
|
93
|
-
{hasDataForFeatures.length === 0 ? (
|
|
94
|
-
<Typography color="error">No data for feature</Typography>
|
|
95
|
-
) : (
|
|
96
|
-
<>
|
|
97
|
-
<div className={classes.section}>
|
|
98
|
-
<TextField
|
|
99
|
-
value={userSelection}
|
|
100
|
-
onChange={event => setUserSelection(event.target.value)}
|
|
101
|
-
label="Choose isoform"
|
|
102
|
-
select
|
|
103
|
-
>
|
|
104
|
-
{hasDataForFeatures.map(val => (
|
|
105
|
-
<MenuItem value={val.id()} key={val.id()}>
|
|
106
|
-
{getDisplayName(val)} (has data)
|
|
107
|
-
</MenuItem>
|
|
108
|
-
))}
|
|
109
|
-
</TextField>
|
|
110
|
-
</div>
|
|
111
|
-
</>
|
|
112
|
-
)}
|
|
113
|
-
</div>
|
|
114
|
-
) : (
|
|
115
|
-
<LoadingEllipses />
|
|
116
|
-
)}
|
|
117
|
-
</div>
|
|
118
|
-
</DialogContent>
|
|
119
|
-
<DialogActions>
|
|
120
|
-
<Button variant="contained" color="secondary" onClick={handleClose}>
|
|
121
|
-
Cancel
|
|
122
|
-
</Button>
|
|
123
|
-
<Button
|
|
124
|
-
variant="contained"
|
|
125
|
-
color="primary"
|
|
126
|
-
onClick={() => {
|
|
127
|
-
session.addView('ProteinView', {
|
|
128
|
-
type: 'ProteinView',
|
|
129
|
-
url,
|
|
130
|
-
mapping,
|
|
131
|
-
})
|
|
132
|
-
handleClose()
|
|
133
|
-
}}
|
|
134
|
-
>
|
|
135
|
-
Submit
|
|
136
|
-
</Button>
|
|
137
|
-
</DialogActions>
|
|
138
|
-
</>
|
|
139
|
-
)
|
|
140
|
-
})
|
|
141
|
-
|
|
142
|
-
function Intro() {
|
|
143
|
-
return (
|
|
144
|
-
<div>
|
|
145
|
-
Find structure associated with gene ID:{' '}
|
|
146
|
-
<Link href="http://useast.ensembl.org/biomart/martview/4b20effd49654183333b81e98757976f?VIRTUALSCHEMANAME=default&ATTRIBUTES=hsapiens_gene_ensembl.default.feature_page.ensembl_gene_id|hsapiens_gene_ensembl.default.feature_page.ensembl_gene_id_version|hsapiens_gene_ensembl.default.feature_page.ensembl_transcript_id|hsapiens_gene_ensembl.default.feature_page.ensembl_transcript_id_version|hsapiens_gene_ensembl.default.feature_page.pdb|hsapiens_gene_ensembl.default.feature_page.refseq_mrna|hsapiens_gene_ensembl.default.feature_page.refseq_mrna_predicted&FILTERS=&VISIBLEPANEL=attributepanel">
|
|
147
|
-
Human mappings generated from BioMart (April 13, 2023)
|
|
148
|
-
</Link>
|
|
149
|
-
</div>
|
|
150
|
-
)
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
export default AutoForm
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from 'react'
|
|
2
|
-
|
|
3
|
-
export function useCheckAlphaFoldDBExistence({
|
|
4
|
-
foundStructureId,
|
|
5
|
-
}: {
|
|
6
|
-
foundStructureId?: string
|
|
7
|
-
}) {
|
|
8
|
-
const [error, setError] = useState<unknown>()
|
|
9
|
-
const [loading, setLoading] = useState(false)
|
|
10
|
-
const [success, setSuccess] = useState(false)
|
|
11
|
-
useEffect(() => {
|
|
12
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
13
|
-
;(async () => {
|
|
14
|
-
try {
|
|
15
|
-
if (foundStructureId) {
|
|
16
|
-
setLoading(true)
|
|
17
|
-
await fetch(
|
|
18
|
-
`https://alphafold.ebi.ac.uk/files/AF-${foundStructureId}-F1-model_v4.cif`,
|
|
19
|
-
{ method: 'HEAD' },
|
|
20
|
-
)
|
|
21
|
-
setLoading(false)
|
|
22
|
-
setSuccess(true)
|
|
23
|
-
}
|
|
24
|
-
} catch (e) {
|
|
25
|
-
console.error(e)
|
|
26
|
-
setError(e)
|
|
27
|
-
}
|
|
28
|
-
})()
|
|
29
|
-
}, [foundStructureId])
|
|
30
|
-
return { error, loading, success }
|
|
31
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { addDisposer, types } from 'mobx-state-tree'
|
|
2
|
-
import { autorun } from 'mobx'
|
|
3
|
-
import { ungzip } from 'pako'
|
|
4
|
-
|
|
5
|
-
// locals
|
|
6
|
-
import { Row } from './LaunchProteinView/util'
|
|
7
|
-
import { abfetch } from './fetchUtils'
|
|
8
|
-
|
|
9
|
-
const ProteinModelSessionExtension = types
|
|
10
|
-
.model({})
|
|
11
|
-
.volatile(() => ({
|
|
12
|
-
data: undefined as Row[] | undefined,
|
|
13
|
-
error: undefined as unknown,
|
|
14
|
-
}))
|
|
15
|
-
.actions(self => ({
|
|
16
|
-
setData(a?: Row[]) {
|
|
17
|
-
self.data = a
|
|
18
|
-
},
|
|
19
|
-
setError(e: unknown) {
|
|
20
|
-
self.error = e
|
|
21
|
-
},
|
|
22
|
-
}))
|
|
23
|
-
.actions(self => {
|
|
24
|
-
return {
|
|
25
|
-
afterCreate() {
|
|
26
|
-
const url = 'https://jbrowse.org/demos/protein3d/mart_export.txt.gz'
|
|
27
|
-
addDisposer(
|
|
28
|
-
self,
|
|
29
|
-
autorun(async () => {
|
|
30
|
-
try {
|
|
31
|
-
const ret = new TextDecoder('utf8').decode(
|
|
32
|
-
ungzip(await abfetch(url)),
|
|
33
|
-
)
|
|
34
|
-
const d = ret
|
|
35
|
-
.split('\n')
|
|
36
|
-
.slice(1)
|
|
37
|
-
.filter(line => !!line)
|
|
38
|
-
.map(line => {
|
|
39
|
-
const res = line.split('\t')
|
|
40
|
-
const [
|
|
41
|
-
gene_id,
|
|
42
|
-
gene_id_version,
|
|
43
|
-
transcript_id,
|
|
44
|
-
transcript_id_version,
|
|
45
|
-
pdb_id,
|
|
46
|
-
refseq_mrna_id,
|
|
47
|
-
refseq_mrna_predicted_id,
|
|
48
|
-
] = res
|
|
49
|
-
|
|
50
|
-
return {
|
|
51
|
-
gene_id,
|
|
52
|
-
gene_id_version,
|
|
53
|
-
transcript_id_version,
|
|
54
|
-
transcript_id,
|
|
55
|
-
pdb_id,
|
|
56
|
-
refseq_mrna_predicted_id,
|
|
57
|
-
refseq_mrna_id,
|
|
58
|
-
}
|
|
59
|
-
})
|
|
60
|
-
|
|
61
|
-
self.setData(d)
|
|
62
|
-
} catch (error) {
|
|
63
|
-
self.setError(error)
|
|
64
|
-
}
|
|
65
|
-
}),
|
|
66
|
-
)
|
|
67
|
-
},
|
|
68
|
-
}
|
|
69
|
-
})
|
|
70
|
-
|
|
71
|
-
export default ProteinModelSessionExtension
|
|
File without changes
|
|
File without changes
|
|
File without changes
|