Skip to content

Commit 1a5ffd3

Browse files
authored
Argo improvements (#557)
* ref allele mistmatch fix * multiple tables open at once * close tables * draggable tables * isolate rows
1 parent 8cf5e32 commit 1a5ffd3

File tree

10 files changed

+328
-110
lines changed

10 files changed

+328
-110
lines changed

screen2.0/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"@emotion/cache": "^11.13.1",
2121
"@emotion/react": "^11.13.3",
2222
"@emotion/styled": "^11.13.0",
23+
"@hello-pangea/dnd": "^18.0.1",
2324
"@mui/icons-material": "^6.1.5",
2425
"@mui/lab": "6.0.0-beta.13",
2526
"@mui/material": "^6.1.5",

screen2.0/public/ArgoExample.bed

-9
This file was deleted.

screen2.0/public/ArgoExample.tsv

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#Chromosome Start End Ref
2-
chr12 53380319 53380320 AG
3-
chr12 53380531 53380540 CGCCCCCTGC
4-
chr12 53387214 53387220 GTGCTGG
5-
chr12 53893108 53893120 AAGGCATGCATGT
6-
chr12 53338940 53338943 CAGT
7-
chr12 53409374 53409376 TCC
8-
chr12 53386621 53386625 AGCTG
9-
chr12 54212227 54212234 CTTTCATC
2+
chr12 53380319 53380320 G
3+
chr12 53380531 53380540 GCCCCCTGC
4+
chr12 53387214 53387220 TGCTGG
5+
chr12 53893108 53893120 AGGCATGCATGT
6+
chr12 53338940 53338943 AGT
7+
chr12 53409374 53409376 CC
8+
chr12 53386621 53386625 GCTG
9+
chr12 54212227 54212234 TTTCATC

screen2.0/src/app/applets/argo/argoUpload.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const ArgoUpload: React.FC<UploadProps> = ({
9696
url: "https://downloads.wenglab.org/hg38.2bit",
9797
regions: [{
9898
chr1: region.chr,
99-
start: region.start,
99+
start: region.start + 1, // Start is not included when gathering the allele positions
100100
end: region.end,
101101
}],
102102
},

screen2.0/src/app/applets/argo/elements/elementTable.tsx

+5-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import { DataTable, DataTableColumn } from "@weng-lab/psychscreen-ui-components"
55
const ElementTable: React.FC<ElementTableProps> = ({
66
elementFilterVariables,
77
SubTableTitle,
8-
elementRows
8+
elementRows,
9+
isolatedRows
910
}) => {
1011
//handle column changes for the Element rank table
1112
const elementColumns: DataTableColumn<ElementTableRow>[] = useMemo(() => {
@@ -38,11 +39,11 @@ const ElementTable: React.FC<ElementTableProps> = ({
3839
<DataTable
3940
key={Math.random()}
4041
columns={elementColumns}
41-
rows={elementRows === null ? [] : elementRows}
42+
rows={elementRows === null ? [] : isolatedRows ? isolatedRows.element : elementRows}
4243
sortDescending
43-
itemsPerPage={10}
44+
itemsPerPage={5}
4445
searchable
45-
tableTitle={<SubTableTitle title="Element Details (Overlapping cCREs)" />}
46+
tableTitle={<SubTableTitle title="Element Details (Overlapping cCREs)" table="elements" />}
4647
onRowClick={handlecCREClick}
4748
/>
4849
)

screen2.0/src/app/applets/argo/genes/geneTable.tsx

+5-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import { DataTable, DataTableColumn } from "@weng-lab/psychscreen-ui-components"
55
const GeneTable: React.FC<GeneTableProps> = ({
66
geneFilterVariables,
77
SubTableTitle,
8-
geneRows
8+
geneRows,
9+
isolatedRows
910
}) => {
1011
//handle column changes for the Gene rank table
1112
const geneColumns: DataTableColumn<GeneTableRow>[] = useMemo(() => {
@@ -32,11 +33,11 @@ const GeneTable: React.FC<GeneTableProps> = ({
3233
<DataTable
3334
key={Math.random()}
3435
columns={geneColumns}
35-
rows={geneRows === null ? [] : geneRows}
36+
rows={geneRows === null ? [] : isolatedRows ? isolatedRows.gene : geneRows}
3637
sortDescending
37-
itemsPerPage={10}
38+
itemsPerPage={5}
3839
searchable
39-
tableTitle={<SubTableTitle title="Gene Details" />}
40+
tableTitle={<SubTableTitle title="Gene Details" table="genes" />}
4041
onRowClick={handleRowClick}
4142
/>
4243
)

0 commit comments

Comments
 (0)