Skip to content

Commit b59d76d

Browse files
authored
Misc improvements (#201)
* Fix hover thing in AppBar menus * Tooltips, Labels in Gene exp * grid for v4 specs, move ATAC cols * Tooltips w/o content * Slight table changes * Formatting, Quick fix for Gene Exp scaling on applet * Bold in Table Header, cap width of gene exp * Gene Exp labels, Icons in home table * Move biosample tables around * Rm exp ID from gene exp
1 parent e8f3086 commit b59d76d

File tree

16 files changed

+8839
-6061
lines changed

16 files changed

+8839
-6061
lines changed

screen2.0/public/humanDark.png

16.4 KB
Loading

screen2.0/public/mouseDark.png

13.7 KB
Loading

screen2.0/src/app/about/page.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export default function About() {
5353
across all profiles and select the DHS with the highest signal (read depth normalized signal) as the rDHS for each cluster. This
5454
iterative clustering and selection process continues until it results in a list of non-overlapping rDHSs—2.2 million rDHSs in
5555
human and 1.2 rDHSs in mouse—representing all DHSs (Figure 3). We then further selected rDHSs with high DNase signal in at least
56-
one biosample (defined as a Z-score `{">"}` 1.64, see details on defining high signal below). Finally, from this subset of high
56+
one biosample (defined as a Z-score {">"} 1.64, see details on defining high signal below). Finally, from this subset of high
5757
signal rDHSs, we selected all elements that were also supported by high H3K4me3, H3K27ac, and/or CTCF ChIP-seq signals in
5858
concerted biosamples (i.e., samples with complementary assay coverage). This resulted in a total of 926,535 human cCREs and
5959
339,815 mouse cCREs (Figure 2).
@@ -72,7 +72,7 @@ export default function About() {
7272
rDHS. The signals of H3K4me3 and H3K27ac were averaged across an extended region— the rDHS plus a 500-bp flanking region on each
7373
side—to account for these histone marks at the flanking nucleosomes. We then took the log10 of these signals and computed a
7474
Z-score for each rDHS compared with all other rDHSs within a biosample. rDHSs with a raw signal of 0 were assigned a Z-score of
75-
-10. For all analysis we defined `"`high signal`"` as a Z-score greater than 1.64, a threshold corresponding to the
75+
-10. For all analysis we defined " high signal " as a Z-score greater than 1.64, a threshold corresponding to the
7676
95th percentile of a one-tailed test. We define a max-Z of a rDHS as the maximum z-score for a signal across all surveyed
7777
biosamples.
7878
</Typography>
@@ -92,8 +92,8 @@ export default function About() {
9292
<Typography variant="h4">Classification of cCREs</Typography>
9393
<Typography>
9494
Many uses of cCREs are based on the regulatory role associated with their biochemical signatures. Thus, we putatively defined
95-
cCREs in one of the following annotation groups based on each element`&apos;`s dominant biochemical signals across all available
96-
biosamples. Analogous to GENCODE`&apos;`s catalog of genes, which are defined irrespective of their varying expression levels
95+
cCREs in one of the following annotation groups based on each element&apos;s dominant biochemical signals across all available
96+
biosamples. Analogous to GENCODE&apos;s catalog of genes, which are defined irrespective of their varying expression levels
9797
and alternative transcripts across different cell types, we provide a general, cell type-agnostic classification of cCREs based
9898
on the max-Zs as well as its proximity to the nearest annotated TSS:
9999
</Typography>
@@ -184,22 +184,22 @@ export default function About() {
184184
<Typography>
185185
We downloaded associations reported in the NHGRI-EBI genome-wide association studies (GWAS) catalog as of January 1, 2019.
186186
Because mixed populations complicate linkage disequilibrium (LD) structures, we only selected studies that were performed on a
187-
single population. For each study, we downloaded all reported SNPs (p `{">"}` 10-6), even those that were just under genome wide
188-
significance. We then intersected all reported SNPs and SNPs in high LD (r2 `{">"}` 0.7), with GRCh38 cCREs. These results are
187+
single population. For each study, we downloaded all reported SNPs (p {">"} 10-6), even those that were just under genome wide
188+
significance. We then intersected all reported SNPs and SNPs in high LD (r2 {">"} 0.7), with GRCh38 cCREs. These results are
189189
available through the SCREEN GWAS app.
190190
</Typography>
191191
<Typography variant="h5">Determining Cell Types with cCREs Enriched in GWAS SNPs</Typography>
192192
<Typography>
193193
For studies with more than 25 lead SNPs, we performed biosample enrichment analysis. For each study, we generated a matching set
194-
of control SNPs as follows: for each SNP in the study (p-value `{">"}` 10-6) we selected a SNP on Illumina and Affymetrix SNP
194+
of control SNPs as follows: for each SNP in the study (p-value {">"} 10-6) we selected a SNP on Illumina and Affymetrix SNP
195195
chips that fell within the same population-specific minor allele frequency (MAF) quartile and the same distance to TSS quartile.
196196
We repeated this process 500 times, generating 500 random control SNPs for each GWAS SNP. Then, for both GWAS and control SNPs,
197-
we retrieved all SNPs in high linkage disequilibrium (LD r2 `{">"}` 0.7), creating LD groups. This method was adapted and
197+
we retrieved all SNPs in high linkage disequilibrium (LD r2 {">"} 0.7), creating LD groups. This method was adapted and
198198
modified from the Uncovering Enrichment through Simulation (UES) method developed by the Klein Lab (Hayes et al. 2015).
199199
</Typography>
200200
<Typography>
201201
To assess whether the cCREs in a biosample were enriched in the GWAS SNPs, we intersected GWAS and control LD groups with cCREs
202-
with an H3K27ac Z-score `{">"}` 1.64 in the biosample. To avoid overcounting, we pruned the overlaps, counting each LD group
202+
with an H3K27ac Z-score {">"} 1.64 in the biosample. To avoid overcounting, we pruned the overlaps, counting each LD group
203203
once per biosample. We modified the UES method by calculating p-values from Z-scores for performing statistical testing. We
204204
calculated enrichment for overlapping cCREs by comparing the GWAS LD groups with the 500 matched controls. Finally, we applied a
205205
false discovery rate threshold of 5% to each study.

screen2.0/src/app/applets/gene-expression/PlotGeneExpression.tsx

Lines changed: 33 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ type QuantificationData = {
1414
color: string,
1515
file_accession: string,
1616
tpm: number,
17-
value: number
17+
value: number,
18+
// replicate_num: number,
1819
}[]
1920

2021
/**
@@ -40,11 +41,7 @@ export function PlotGeneExpression(props: {
4041
}) {
4142
const router = useRouter()
4243

43-
let byTissue: {
44-
[id: string]: {
45-
values: QuantificationData
46-
}
47-
} = {}
44+
let byTissue: { [id: string]: { values: QuantificationData } } = {}
4845
let byTissueMean: { [id: string]: { values: QuantificationData } } = {}
4946
let byValueTissues: { [id: string]: { values: QuantificationData } } = {}
5047
let byTissueMaxTissues: { [id: string]: { values: QuantificationData } } = {}
@@ -55,14 +52,13 @@ export function PlotGeneExpression(props: {
5552
//Filter Data to [...]
5653
props.data.filter(s => s["tissue"]).map((biosample) => {
5754

58-
//
5955
if (!byTissue[biosample["tissue"]]) {
6056
byTissue[biosample["tissue"]] = { values: [] }
6157
}
6258

63-
biosample["gene_quantification_files"].forEach(d => {
64-
if (d.quantifications.length > 0) {
65-
d.quantifications.forEach(q => {
59+
biosample["gene_quantification_files"].forEach((file, i) => {
60+
if (file.quantifications.length > 0) {
61+
file.quantifications.forEach(q => {
6662
let val = props.scale === "logTPM" ? Math.log10(q.tpm + 1) : q.tpm
6763
if (val > max) {
6864
max = val
@@ -75,7 +71,8 @@ export function PlotGeneExpression(props: {
7571
accession: biosample.accession,
7672
value: val, tpm: q.tpm, file_accession: q.file_accession,
7773
color: tissueColors[biosample["tissue"]] ? tissueColors[biosample["tissue"]] :
78-
stringToColour(biosample["tissue"])
74+
stringToColour(biosample["tissue"]),
75+
// replicate_num: i + 1
7976
})
8077
}
8178
})
@@ -103,7 +100,8 @@ export function PlotGeneExpression(props: {
103100
tpm: r[0].tpm,
104101
file_accession: r[0].file_accession,
105102
color: tissueColors[k] ? tissueColors[k] :
106-
stringToColour(k)
103+
stringToColour(k),
104+
// replicate_num: 0
107105
}
108106
)
109107
})
@@ -124,9 +122,7 @@ export function PlotGeneExpression(props: {
124122

125123
let info = entry[1]
126124

127-
//Value here will be p1.x
128-
//So entry[1].values[x].value = width?
129-
return info.values.map((item: { color: string, biosample: string, file_accession: string, accession: string, value: number }, i: number) => {
125+
return info.values.map((item: { color: string, biosample: string, file_accession: string, accession: string, value: number, replicate_num: number }, i: number) => {
130126
//Shouldn't this just be LinearTransform? Why 2D?
131127
p1 = linearTransform2D(props.range, props.dimensions)({ x: item.value, y: 0 })
132128
return (
@@ -143,11 +139,13 @@ export function PlotGeneExpression(props: {
143139
<title>{item.biosample + "\n" + item.accession + "-" + item.file_accession}</title>
144140
</rect>
145141
</a>
146-
{/* The ccore and exp/biosample ID */}
142+
{/* The score and exp/biosample ID */}
147143
<text x={p1.x + 0 + 170} y={y + i * 20 + 12.5} style={{ fontSize: 12 }}>
148-
{Number(item.value.toFixed(3)) + " "}
144+
{Number(item.value.toFixed(1)) + ", "}
145+
{item.biosample + " ("}
149146
<a href={"https://www.encodeproject.org/experiments/" + item.accession}>{item.accession}</a>
150-
{" " + item.file_accession + " " + item.biosample}
147+
{/* {item.replicate_num ? ", rep. " + item.replicate_num + ")" : ")"} */}
148+
{")"}
151149
</text>
152150
{/* The biosample category */}
153151
{(props.group === 'byTissueMaxTPM' || props.group === 'byExperimentTPM') &&
@@ -199,29 +197,22 @@ export function PlotGeneExpression(props: {
199197
let tissues: { [id: string]: { values: QuantificationData } } = props.group === "byExperimentTPM" ? byValueTissues : props.group === "byTissueMaxTPM" ? byTissueMaxTissues : byTissue // dict of ftissues
200198

201199
return (
202-
<>
203-
<Grid2 xs={12} md={12} lg={12} mt={1} ml={2} mr={2}>
204-
{Object.keys(tissues).length === 0 ? <span>{'No Data Available'}</span> : <Stack>
205-
206-
{Object.entries(tissues).map((entry, index: number) => {
207-
208-
let info = entry[1]
209-
210-
211-
let view: string = "0 0 1200 " + (info.values.length * (props.group === 'byTissueTPM' ? 20 : 3) + 20)
212-
213-
return (
214-
<svg className="graph" aria-labelledby="title desc" role="img" viewBox={view} key={index}>
215-
<g className="data" data-setname="gene expression plot">
216-
{/* Why 5? */}
217-
{plotGeneExp(entry, index, 5)}
218-
</g>
219-
</svg>
220-
)
221-
})}
222-
223-
</Stack>}
224-
</Grid2>
225-
</>
200+
Object.keys(tissues).length === 0 ?
201+
<span>{'No Data Available'}</span>
202+
:
203+
<Stack>
204+
{Object.entries(tissues).map((entry, index: number) => {
205+
let info = entry[1]
206+
let view: string = "0 0 1200 " + (info.values.length * (props.group === 'byTissueTPM' ? 20 : 3) + 20)
207+
return (
208+
<svg className="graph" aria-labelledby="title desc" role="img" viewBox={view} key={index}>
209+
<g className="data" data-setname="gene expression plot">
210+
{/* Why 5? */}
211+
{plotGeneExp(entry, index, 5)}
212+
</g>
213+
</svg>
214+
)
215+
})}
216+
</Stack>
226217
)
227218
}

screen2.0/src/app/applets/gene-expression/gene-autocomplete.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export default function GeneAutoComplete(props: {
140140
}
141141
}
142142
}}
143-
renderInput={(tprops) => <TextField {...tprops} label={"Select a Gene"} />}
143+
renderInput={(tprops) => <TextField {...tprops} placeholder={"Select a Gene"} />}
144144
renderOption={(props, opt) => {
145145
return (
146146
<li {...props} key={props.id}>

screen2.0/src/app/applets/gene-expression/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use client"
22
import { Box } from "@mui/material"
3-
import { GeneExpression } from "../../search/ccredetails/gene-expression"
3+
import { GeneExpression } from "../../search/ccredetails/geneexpression"
44

55
export default function GeneExpressionApplet() {
66
return (

screen2.0/src/app/page.tsx

Lines changed: 45 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
"use client"
22

3-
import { Typography } from "@mui/material"
3+
import { Box, Divider, Stack, Typography } from "@mui/material"
44
import MainSearch from "../common/components/mainsearch/MainSearch"
55
import Grid2 from "@mui/material/Unstable_Grid2/Grid2"
66
import homeImage from "../../public/homeImage.png"
77
import Image from "next/image"
8+
import humanIcon from "../../public/humanDark.png"
9+
import mouseIcon from "../../public/mouseDark.png"
810

911
export default function Home() {
1012
return (
@@ -16,7 +18,7 @@ export default function Home() {
1618
</Grid2>
1719
<Grid2 xs={12} lg={6}>
1820
<MainSearch />
19-
<Typography variant="h5" mt="3rem">
21+
<Typography variant="h5" mt={4}>
2022
What is SCREEN?
2123
</Typography>
2224
<Typography paragraph>
@@ -25,23 +27,50 @@ export default function Home() {
2527
cross-referenced across species. SCREEN presents the data that support biochemical activities of the cCREs and the expression of
2628
nearby genes in specific cell and tissue types.
2729
</Typography>
28-
<Typography variant="h5" mt="2rem">
30+
<Typography variant="h5" mt={3} mb={1}>
2931
Version 4 Annotations:
3032
</Typography>
31-
<Typography>
32-
Human Genome assembly: hg38
33-
<br />
34-
Human cCRE count: 1,063,878
35-
<br />
36-
Human cell and tissue types covered: 1,518
37-
<br />
38-
Mouse Genome assembly: mm10
39-
<br />
40-
Mouse cCRE count: 313,838
41-
<br />
42-
Mouse cell and tissue types covered: 169
43-
</Typography>
33+
<Grid2 container justifyContent={"flex-start"}>
34+
<Grid2 direction="column" flexGrow={0} border={"1px solid LightGray"} borderRight={"none"}>
35+
<Typography p={1} align="left">Genome Assembly</Typography>
36+
<Divider />
37+
<Stack direction="row" pl={1} >
38+
<Box position={"relative"} minWidth={"30px"}>
39+
<Image objectFit="contain" src={humanIcon} alt={""} fill />
40+
</Box>
41+
<Typography p={1} align="left">Human (hg38)</Typography>
42+
</Stack>
43+
<Divider />
44+
<Stack direction="row" pl={1} >
45+
<Box position={"relative"} minWidth={"30px"}>
46+
<Image objectFit="contain" src={mouseIcon} alt={""} fill />
47+
</Box>
48+
<Typography p={1} align="left">Mouse (mm10)</Typography>
49+
</Stack>
50+
</Grid2>
51+
<Grid2>
52+
<Divider orientation="vertical" />
53+
</Grid2>
54+
<Grid2 direction="column" flexGrow={0} border={"1px solid LightGray"} borderLeft={"none"} borderRight={"none"}>
55+
<Typography p={1} align="right">cCRE Count</Typography>
56+
<Divider />
57+
<Typography p={1} align="right">1,063,878</Typography>
58+
<Divider />
59+
<Typography p={1} align="right">313,838</Typography>
60+
</Grid2>
61+
<Grid2>
62+
<Divider orientation="vertical" />
63+
</Grid2>
64+
<Grid2 direction="column" flexGrow={0} border={"1px solid LightGray"} borderLeft={"none"}>
65+
<Typography p={1} align="right">Cell/Tissue Types Covered</Typography>
66+
<Divider />
67+
<Typography p={1} align="right">1,518</Typography>
68+
<Divider />
69+
<Typography p={1} align="right">169</Typography>
70+
</Grid2>
71+
</Grid2>
4472
</Grid2>
73+
4574
<Grid2 xs={12} lg={6}>
4675
<Image src={homeImage} alt={"SCREEN home image"} />
4776
</Grid2>

screen2.0/src/app/search/ccredetails/ccredetails.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Ortholog } from "./linkedccres"
99
import { TfIntersection } from "./tfintersection"
1010
import { FunctionData } from "./functionaldata"
1111
import Rampage from "./rampage"
12-
import { GeneExpression } from "./gene-expression"
12+
import { GeneExpression } from "./geneexpression"
1313
import { TfSequenceFeatures} from "../gbview/tfsequencefeatures"
1414

1515
//Passing these props through this file could be done with context to reduce prop drilling
@@ -28,7 +28,7 @@ export const CcreDetails: React.FC<CcreDetailsProps> = ({ accession, region, glo
2828
<>
2929
<Stack direction="row" justifyContent={"space-between"} alignItems={"baseline"}>
3030
<Typography variant="h4">{accession}</Typography>
31-
<Typography variant="h5">{`${region.chrom}:${region.start}-${region.end}`}</Typography>
31+
<Typography variant="h6">{`${region.chrom}:${region.start}-${region.end}`}</Typography>
3232
</Stack>
3333
<Divider sx={{mb: 2}}/>
3434
{page === 0 && <InSpecificBiosamples accession={accession} globals={globals} assembly={assembly} />}

0 commit comments

Comments
 (0)