Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OrthoMCL - Custom tree-table for OrthoGroup page #904

Open
wants to merge 86 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
7ac2d3e
made a start - WIP
bobular Mar 1, 2024
2f4bc1f
re-render sequence table with Mesa
bobular Mar 4, 2024
4340f10
Merge remote-tracking branch 'origin/main' into orthogroup-tree-table
bobular Mar 4, 2024
3498348
tweak comments
bobular Mar 4, 2024
dc1731f
WIP
bobular Mar 4, 2024
785a9ed
loosely wire in TreeTable and get shimmimg working
bobular Mar 5, 2024
8c3d330
add patristic and basic type support
bobular Mar 5, 2024
adb464a
made a start with controlling table row height but should investigate…
bobular Mar 8, 2024
f215762
added Mesa table tooltips for td contents when in 'inline' mode (basi…
bobular Mar 8, 2024
1abea4b
use Mesa's inline option and tidy up
bobular Mar 8, 2024
ded7a66
Revert "added Mesa table tooltips for td contents when in 'inline' mo…
bobular Mar 8, 2024
a7c0e1b
remove placeholder td title
bobular Mar 8, 2024
a19369e
restore whitespace in DataCell.tsx
bobular Mar 8, 2024
5c04215
Merge remote-tracking branch 'origin/main' into orthogroup-tree-table
bobular Mar 8, 2024
5f908bd
upgrade tidytree and use new interactive option
bobular Mar 15, 2024
89d17a7
Merge remote-tracking branch 'origin/main' into orthogroup-tree-table
bobular Mar 15, 2024
ea9283d
table and tree order are the same
bobular Mar 15, 2024
76bfe05
added basic checkboxes
bobular Mar 15, 2024
cdc9d49
WIP clustal form
bobular Mar 19, 2024
1495c07
that's hopefully clustal sorted - but can't test with local ortho-site
bobular Mar 19, 2024
57f6a10
Merge remote-tracking branch 'origin/main' into orthogroup-tree-table
bobular Mar 20, 2024
8831695
improve 'must select two proteins' verbiage
bobular Mar 20, 2024
5c896a0
de-complicate .DataTable margin-bottom override
bobular Mar 20, 2024
fd446f8
rename TreeResponse to GroupTreeResponse
bobular Mar 20, 2024
a36c6ad
add PFam domain architecture column
bobular Mar 20, 2024
f489066
ugly search working as a demo on description column
bobular Mar 20, 2024
c06178d
add warning banner for data issue and tweak pfam column heading
bobular Mar 25, 2024
2599155
used RealTimeSearchBox and made regexps safer and reorganised so we c…
bobular Mar 25, 2024
7668085
more memo and remove some commented code
bobular Mar 25, 2024
95ac689
add tree filtering
bobular Mar 25, 2024
0a15ccb
tree highlighting works with filtering now, dependency issues fixed
bobular Mar 25, 2024
0c8639b
add core/peripheral filtering
bobular Mar 25, 2024
f137fa2
added pfam legend - needs wiring still
bobular Mar 25, 2024
b4e30ed
wired up pfam checkboxes to table search
bobular Mar 25, 2024
c97bcc1
Merge remote-tracking branch 'origin/main' into orthogroup-tree-table
bobular Mar 26, 2024
0599d1b
added the row count
bobular Mar 26, 2024
6bef0de
conditionally render pfam legend and add heading
bobular Mar 26, 2024
4f1e80e
Remove vert scrollbar from tidytree table
dmfalke Mar 27, 2024
8a27952
Merge branch 'main' into orthogroup-tree-table
bobular May 29, 2024
c0cb043
remove code that collapsed the main section of the orthogroup page
bobular May 29, 2024
3e47e2c
no longer request trees for 1 or 2 sequences; fix RowCounter props ch…
bobular May 29, 2024
40eacc1
fudge to sort table based on dodgy colon-containing full_ids
bobular Jun 4, 2024
8ff24e2
make tree darker and make tree/table check more robust
bobular Jun 6, 2024
fcdddbd
provide PFam descriptions in domain cartoon tooltips
bobular Jun 6, 2024
032c479
sort out row counts
bobular Jun 6, 2024
9f3d563
Merge remote-tracking branch 'origin/main' into orthogroup-tree-table
bobular Jun 6, 2024
7bf58f4
add better console logging for tree/table mismatches
bobular Jun 11, 2024
e6904a1
made tree-table comparison for console more robust
bobular Jun 11, 2024
06f4959
add inlineUseTooltips options prop but not working fully yet
bobular Jun 19, 2024
9ecec3d
attempted better handling of very large groups
bobular Jun 19, 2024
30da70a
looks good now
bobular Jun 21, 2024
443528c
removed full_id column (from display only) and added Accession aka se…
bobular Jun 24, 2024
e7abcb9
Merge pull request #1115 from VEuPathDB/mesa-inline-changes
bobular Jun 24, 2024
9567b62
Merge remote-tracking branch 'origin/main' into orthogroup-tree-table
dmfalke Jun 28, 2024
5de59a6
Use flex for label to allow for block children
dmfalke Jun 28, 2024
2e33989
Use SelectList for Pfam filter
dmfalke Jun 28, 2024
f33f711
Merge remote-tracking branch 'origin/main' into orthogroup-tree-table
bobular Jul 2, 2024
5e04d5f
Explicit empty PFam legend
bobular Jul 2, 2024
5a49184
Merge branch 'main' into orthogroup-tree-table
bobular Jul 2, 2024
5cf07bf
Use similar style for core/peripheral filter
dmfalke Jul 12, 2024
0cbb71d
Merge remote-tracking branch 'origin/main' into orthogroup-tree-table
dmfalke Jul 12, 2024
592ef2d
Merge branch 'orthogroup-tree-table' into orthogroup-tree-table__pfam…
dmfalke Jul 12, 2024
b316022
Add species filter to protein table
dmfalke Jul 16, 2024
a422072
prevent overflow in SelectTree button with many items selected; also …
bobular Jul 17, 2024
c50a85e
add shouldOnlyUpdateOnClose option to SelectTree
bobular Jul 17, 2024
96056a2
remove some unused imports
bobular Jul 17, 2024
8c05b0c
add MAX_SEQUENCES_FOR_TREE logic
bobular Jul 17, 2024
0620543
selected row highlighting
bobular Jul 17, 2024
871583e
tone down the row background color
bobular Jul 17, 2024
f00a872
Merge pull request #1140 from VEuPathDB/orthogroup-tree-table__pfam-f…
bobular Jul 18, 2024
6d50fca
Merge remote-tracking branch 'origin/main' into orthogroup-tree-table
bobular Jul 18, 2024
11deb34
don't indent search bar and filters
bobular Jul 19, 2024
a718914
add instantUpdate option to SelectList
bobular Jul 19, 2024
d168e75
Merge remote-tracking branch 'origin/orthogroup-tree-table' into orth…
bobular Jul 19, 2024
9c5ff46
revert taxon filter to instant-update
bobular Jul 19, 2024
de9d761
instantUpdate for core/peripheral filter
bobular Jul 19, 2024
9281471
Pfam architectures are now scaled by protein length
bobular Jul 19, 2024
789629b
removed core-only filter for larger groups
bobular Jul 19, 2024
209fd02
improved table sort and filter performance - added comments about fur…
bobular Aug 1, 2024
3874c5a
rename shouldOnlyUpdateOnClose to instantUpdate
bobular Aug 2, 2024
d45f975
remove an effect
bobular Aug 2, 2024
f9a19b7
Merge remote-tracking branch 'origin/orthogroup-tree-table' into orth…
bobular Aug 2, 2024
eb238e5
missed a setSelected and dependency
bobular Aug 2, 2024
66e13f2
final tweaks to button label behaviour
bobular Aug 2, 2024
969db0d
Merge pull request #1144 from VEuPathDB/ortho-instant-filters
bobular Aug 2, 2024
febb312
add reset button, revisit filter button layout
bobular Aug 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
MesaColumn,
MesaStateProps,
} from '@veupathdb/coreui/lib/components/Mesa/types';
import { groupBy } from 'lodash';
import { groupBy, difference } from 'lodash';
import { PfamDomainArchitecture } from 'ortho-client/components/pfam-domains/PfamDomainArchitecture';
import { extractPfamDomain } from 'ortho-client/records/utils';
import Banner from '@veupathdb/coreui/lib/components/banners/Banner';
Expand Down Expand Up @@ -241,7 +241,14 @@ export function RecordTable_Sequences(
if (numSequences >= MIN_SEQUENCES_FOR_TREE && treeResponse == null)
return <Loading />;

if (mesaRows?.length !== sortedRows?.length)
if (mesaRows?.length !== sortedRows?.length) {
console.log(
'Tree and protein list mismatch. A=Tree, B=Table. Summary below:'
);
summarizeIDMismatch(
(leaves ?? []).map((leaf) => leaf.id),
mesaRows.map((row) => row.full_id as string)
);
return (
<Banner
banner={{
Expand All @@ -251,6 +258,7 @@ export function RecordTable_Sequences(
}}
/>
);
}

const mesaState: MesaStateProps<RowType> = {
options: {
Expand Down Expand Up @@ -448,3 +456,21 @@ function createSafeSearchRegExp(input: string): RegExp {
return new RegExp(escapedInput, 'i');
}
}

function summarizeIDMismatch(A: string[], B: string[]) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe name this something like logIdMismatchSummary

const inAButNotB = difference(A, B);
const inBButNotA = difference(B, A);

console.log(`Total unique IDs in A: ${new Set(A).size}`);
console.log(`Total unique IDs in B: ${new Set(B).size}`);

console.log(`Number of IDs in A but not in B: ${inAButNotB.length}`);
console.log(
`First few IDs in A but not in B: ${inAButNotB.slice(0, 5).join(', ')}`
);

console.log(`Number of IDs in B but not in A: ${inBButNotA.length}`);
console.log(
`First few IDs in B but not in A: ${inBButNotA.slice(0, 5).join(', ')}`
);
}
Loading