@@ -42,12 +61,16 @@ const RemovedEntrySummary = ({ detail, accession, date, history, dbInfo }) => {
};
RemovedEntrySummary.propTypes = {
- detail: T.string,
accession: T.string,
- date: T.string,
+ source_database: T.string,
+ type: T.string,
+ name: T.string,
+ short_name: T.string,
+ deletion_date: T.string,
history: T.shape({
- signatures: T.arrayOf(T.object),
names: T.arrayOf(T.string),
+ short_names: T.arrayOf(T.string),
+ signatures: T.object,
}),
dbInfo: T.object,
};
diff --git a/src/components/Entry/Summary/MemberDBSubtitle/index.tsx b/src/components/Entry/Summary/MemberDBSubtitle/index.tsx
index 916c67538..db8e318af 100644
--- a/src/components/Entry/Summary/MemberDBSubtitle/index.tsx
+++ b/src/components/Entry/Summary/MemberDBSubtitle/index.tsx
@@ -70,7 +70,11 @@ const MemberDBSubtitle = ({
)}
{metadata?.counters?.sets ? (
- Set
+
+ {metadata.source_database.toLowerCase() === 'pfam'
+ ? 'Clan'
+ : 'Set'}
+
{metadata.set_info ? (
{
if (!event.target) return;
event.preventDefault();
const data = new FormData(event.target as HTMLFormElement);
data.append('subject', `Add annotation, ${entry}`);
+ data.append('queue', queue);
fetch(apiUrl, {
method: 'POST',
body: data,
@@ -96,80 +98,90 @@ const SidePanel = ({
{['interpro', 'pfam'].includes(
// Only receiving new annotations for pfam and interpro
metadata.source_database.toLowerCase()
- ) && (
-
- )}
+ Email address
+
+
+
+
+ Submit
+
+
+ Clear
+
+
+
+
+
+
+ )}
{metadata.integrated && }
{!['interpro', 'pfam', 'antifam'].includes(
metadata.source_database.toLowerCase()
diff --git a/src/components/Entry/Summary/index.tsx b/src/components/Entry/Summary/index.tsx
index 69383dc28..a02ecffb6 100644
--- a/src/components/Entry/Summary/index.tsx
+++ b/src/components/Entry/Summary/index.tsx
@@ -3,6 +3,7 @@ import React, { useState, useEffect } from 'react';
import GoTerms from 'components/GoTerms';
import Description from 'components/Description';
import DescriptionFromIntegrated from 'components/Description/DescriptionFromIntegrated';
+import DescriptionLLM from 'components/Description/DescriptionLLM';
import Literature, {
getLiteratureIdsFromDescription,
splitCitations,
@@ -72,12 +73,14 @@ type SummaryEntryProps = {
data: {
metadata: EntryMetadata;
};
+ headerText?: string;
loading: boolean;
dbInfo: DBInfo;
};
const SummaryEntry = ({
data: { metadata },
+ headerText,
dbInfo,
loading,
}: SummaryEntryProps) => {
@@ -99,6 +102,38 @@ const SummaryEntry = ({
(included as Array<[string, Reference]>).sort(
(a, b) => desc.indexOf(a[0]) - desc.indexOf(b[0])
);
+
+ const selectDescriptionComponent = () => {
+ if ((metadata.description || []).length) {
+ return (
+ <>
+ {headerText || 'Description'}
+ }
+ accession={metadata.accession}
+ />
+ >
+ );
+ } else if (metadata.integrated) {
+ return (
+
+ );
+ } else if (metadata.llm_description) {
+ return (
+ <>
+ {headerText || 'Description'}
+
+ >
+ );
+ }
+ return null;
+ };
+
return (
@@ -108,26 +143,7 @@ const SummaryEntry = ({
) : (
)}
-
- {
- // doesn't work for some HAMAP as they have enpty tag
- (metadata.description || []).length ? (
- <>
-
Description
- }
- accession={metadata.accession}
- />
- >
- ) : (
-
- )
- }
-
+ {selectDescriptionComponent()}
diff --git a/src/components/GoTerms/style.css b/src/components/GoTerms/style.css
index 04db9e76a..c5752dcd2 100644
--- a/src/components/GoTerms/style.css
+++ b/src/components/GoTerms/style.css
@@ -15,6 +15,7 @@ body a.go-terms:focus {
body a.go-terms:hover {
border-bottom: 1px #222 solid;
+ text-decoration: none;
}
.go-title {
diff --git a/src/components/Menu/DynamicMenu/__snapshots__/test.js.snap b/src/components/Menu/DynamicMenu/__snapshots__/test.js.snap
index e5983f840..3e7dbc0e2 100644
--- a/src/components/Menu/DynamicMenu/__snapshots__/test.js.snap
+++ b/src/components/Menu/DynamicMenu/__snapshots__/test.js.snap
@@ -117,7 +117,7 @@ exports[`
should render 1`] = `
"to": [Function],
},
{
- "name": "By Set",
+ "name": "By Clan/Set",
"to": [Function],
},
]
diff --git a/src/components/Menu/EntitiesMenu/__snapshots__/test.js.snap b/src/components/Menu/EntitiesMenu/__snapshots__/test.js.snap
index bd9b07a75..44447ef08 100644
--- a/src/components/Menu/EntitiesMenu/__snapshots__/test.js.snap
+++ b/src/components/Menu/EntitiesMenu/__snapshots__/test.js.snap
@@ -55,7 +55,7 @@ exports[`
should render 1`] = `
activeClass="active"
to={[Function]}
>
- By Set
+ By Clan/Set
diff --git a/src/components/ProteinViewer/grid.css b/src/components/ProteinViewer/grid.css
index ae012c9ab..fe41d6d90 100644
--- a/src/components/ProteinViewer/grid.css
+++ b/src/components/ProteinViewer/grid.css
@@ -82,6 +82,7 @@
.protvista-grid .track-label a:hover {
border-bottom: 1px var(--colors-dark) solid;
+ text-decoration: none;
}
.protvista-grid .track-label .track-accession-child {
diff --git a/src/components/ProteinViewer/utils.ts b/src/components/ProteinViewer/utils.ts
index de1c71d0d..2b5cb675c 100644
--- a/src/components/ProteinViewer/utils.ts
+++ b/src/components/ProteinViewer/utils.ts
@@ -3,59 +3,31 @@ import { toPlural } from 'utils/pages/toPlural';
import { NOT_MEMBER_DBS } from 'menuConfig';
import { getTrackColor, EntryColorMode } from 'utils/entry-color';
-const dbs4SingleDomain = [
- 'pfam',
- 'smart',
- 'pirsf',
- 'ncbifam',
- 'hamap',
- 'sfld',
- 'cdd',
- 'profile',
-];
-
const selectRepresentativeDomains = (domains: Record
[]) => {
const flatDomains = [];
for (const domain of domains) {
const { accession, short_name, name, source_database, integrated } = domain;
for (const location of domain.entry_protein_locations as Array) {
for (const fragment of location.fragments) {
- const { start, end } = fragment;
- flatDomains.push({
- accession,
- short_name,
- name,
- source_database,
- integrated,
- start,
- end,
- color: getTrackColor({ source_database }, EntryColorMode.MEMBER_DB),
- length: end - start + 1,
- keep: true,
- });
- }
- }
- }
- for (const dom1 of flatDomains) {
- for (const dom2 of flatDomains) {
- if (dom1 === dom2 || !dom1.keep || !dom2.keep) continue;
- const overlap =
- Math.min(dom1.end, dom2.end) - Math.max(dom1.start, dom2.start) + 1;
- if (overlap > 0) {
- if (overlap > 0.7 * dom1.length && overlap > 0.7 * dom2.length) {
- if (
- dom1.length < dom2.length ||
- (dom1.length === dom2.length && dom2.source_database === 'pfam')
- ) {
- dom1.keep = false;
- }
- } else if (overlap > 0.7 * dom1.length && overlap < 0.7 * dom2.length) {
- dom1.keep = false;
+ const { start, end, representative } = fragment;
+ if (representative) {
+ flatDomains.push({
+ accession,
+ short_name,
+ name,
+ source_database,
+ integrated,
+ start,
+ end,
+ color: getTrackColor({ source_database }, EntryColorMode.MEMBER_DB),
+ length: end - start + 1,
+ });
}
}
}
}
- return flatDomains.filter(({ keep }) => keep);
+
+ return flatDomains;
};
export const useProcessData = (
results: EndpointWithMatchesPayload[] | undefined,
@@ -87,15 +59,7 @@ const processData = (
'interpro'
);
- const representativeDomains = selectRepresentativeDomains(
- results.filter(
- (entry) =>
- dbs4SingleDomain.includes(
- (entry as unknown as Metadata).source_database.toLowerCase()
- ) &&
- (entry as unknown as EntryMetadata)?.type?.toLowerCase() !== 'family'
- )
- );
+ const representativeDomains = selectRepresentativeDomains(results);
const interproMap = new Map(
interpro.map((ipro) => [
`${ipro.accession}-${ipro.chain}-${ipro.protein}`,
diff --git a/src/components/SimpleCommonComponents/Tooltip/index.tsx b/src/components/SimpleCommonComponents/Tooltip/index.tsx
index f0e2e083f..af6308d68 100644
--- a/src/components/SimpleCommonComponents/Tooltip/index.tsx
+++ b/src/components/SimpleCommonComponents/Tooltip/index.tsx
@@ -6,6 +6,7 @@ import {
autoPlacement,
arrow,
offset,
+ size,
} from '@floating-ui/react';
import useStateRef from 'utils/hooks/useStateRef';
@@ -24,6 +25,7 @@ const Tooltip = ({
children,
distance = 0,
interactive = false,
+ classNames = [],
...rest
}: PropsWithChildren<{
html?: React.ReactElement | string | number;
@@ -31,6 +33,7 @@ const Tooltip = ({
useContext?: boolean;
distance?: number;
interactive?: boolean;
+ classNames?: string[];
}>) => {
const arrowRef = useRef(null);
const [_, setOverTooltip, overTooltipRef] = useStateRef(false);
@@ -45,6 +48,14 @@ const Tooltip = ({
arrow({
element: arrowRef,
}),
+ size({
+ apply({ availableWidth, availableHeight, elements }) {
+ Object.assign(elements.floating.style, {
+ maxWidth: `${availableWidth}px`,
+ maxHeight: `${availableHeight}px`,
+ });
+ },
+ }),
],
});
@@ -72,7 +83,7 @@ const Tooltip = ({
setOverTooltip(true)}
onMouseLeave={() => setOverTooltip(false)}
>
diff --git a/src/components/Title/TitleTag/index.tsx b/src/components/Title/TitleTag/index.tsx
index fbb48239c..b176734bd 100644
--- a/src/components/Title/TitleTag/index.tsx
+++ b/src/components/Title/TitleTag/index.tsx
@@ -27,7 +27,12 @@ type Props = {
const TitleTag = ({ db, mainType, dbLabel }: Props) => {
const isEntry = mainType === 'entry';
- const isInterPro = db && db.toLowerCase() === 'interpro';
+ let isInterPro = false;
+ let isPfam = false;
+ if (db) {
+ if (db.toLowerCase() === 'interpro') isInterPro = true;
+ else if (db.toLowerCase() === 'pfam') isPfam = true;
+ }
let rtdLink = '';
if (isEntry) {
rtdLink = rtdLinks.entry[isInterPro ? 'interpro' : 'dbs'];
@@ -43,11 +48,15 @@ const TitleTag = ({ db, mainType, dbLabel }: Props) => {
'md-p': isEntry && !isInterPro,
})}
>
- {dbLabel} {mainType}
+ {dbLabel} {mainType === 'set' && isPfam ? 'clan' : mainType}
{
// Set
mainType === 'set' && (
-
+
{' '}
*/ = [
customLocation.description?.entry?.db?.toLowerCase(),
)
? customLocation.description.entry.db
- : 'All',
+ : 'Pfam',
},
},
hash: customLocation.hash,
};
},
- name: 'By Set',
+ name: 'By Clan/Set',
},
];
diff --git a/src/pages/endpoint-page.js b/src/pages/endpoint-page.js
index 50947327f..e28bd0d3d 100644
--- a/src/pages/endpoint-page.js
+++ b/src/pages/endpoint-page.js
@@ -104,8 +104,7 @@ class Summary extends PureComponent {
render() {
const {
data: { status, loading, payload },
- // dataOrganism: { loading: loadingOrg, payload: payloadOrg },
- dataBase,
+ dataBase: { payload: payloadDB, loading: loadingDB },
customLocation,
subPagesForEndpoint,
} = this.props;
@@ -114,15 +113,33 @@ class Summary extends PureComponent {
main: { key: endpoint },
},
} = customLocation;
- const databases = dataBase?.payload?.databases;
- if (status === STATUS_GONE) {
- return ;
+
+ if (loading) {
+ return ;
+ }
+
+ if (payload && status === STATUS_GONE) {
+ const db =
+ (!loadingDB &&
+ payloadDB &&
+ payloadDB.databases &&
+ payloadDB.databases[customLocation.description.entry.db]) ||
+ {};
+
+ return ;
+ }
+
+ if (edgeCases.has(status)) {
+ const edgeCaseText = edgeCases.get(status);
+ if (edgeCaseText) {
+ return ;
+ }
}
- const edgeCaseText = edgeCases.get(status);
- if (edgeCaseText) return ;
- if (loading || (!locationhasDetailOrFilter(customLocation) && !payload)) {
+
+ if (!locationhasDetailOrFilter(customLocation) && !payload) {
return ;
}
+
return (
<>
{payload?.metadata?.accession && (