From bfd1c2049d4bc7542dd4e6c9823fa9c63ebd4233 Mon Sep 17 00:00:00 2001 From: Jonathan Fisher <49597360+jpfisher72@users.noreply.github.com> Date: Mon, 1 Apr 2024 13:56:54 -0400 Subject: [PATCH] LDSC (#4) * Initial Work on LDSC * Lots o small changes * Small improvements * Add std err, cleanup * Add loading wheel * Font size changes * Cleanup * Rename LDSC.tsx to ldsc.tsx * Update page.tsx * Update Chart info text * Hopefully fix build --- immuscreen/src/app/icres/atacbarplot.tsx | 20 +- immuscreen/src/app/icres/consts.ts | 379 ++++++++++++++++-- immuscreen/src/app/icres/page.tsx | 10 +- immuscreen/src/app/phenotype/ldsc.tsx | 188 +++++++++ immuscreen/src/app/phenotype/page.tsx | 185 +++++++++ .../src/common/components/HomeAppBar.tsx | 3 +- immuscreen/src/common/utils.ts | 4 +- 7 files changed, 742 insertions(+), 47 deletions(-) create mode 100644 immuscreen/src/app/phenotype/ldsc.tsx create mode 100644 immuscreen/src/app/phenotype/page.tsx diff --git a/immuscreen/src/app/icres/atacbarplot.tsx b/immuscreen/src/app/icres/atacbarplot.tsx index 9162a79..4dcea73 100644 --- a/immuscreen/src/app/icres/atacbarplot.tsx +++ b/immuscreen/src/app/icres/atacbarplot.tsx @@ -9,7 +9,8 @@ import { LegendOrdinal, LegendItem, LegendLabel } from '@visx/legend'; import { scaleOrdinal } from '@visx/scale'; import { useTooltip, useTooltipInPortal, defaultStyles } from '@visx/tooltip'; import { localPoint } from '@visx/event'; -import { COLOR_MAP } from "./consts"; +import { Text } from "@visx/text"; +import { experimentInfo, cellColors } from "./consts" type TooltipData = { bardata: { class: string, subclass: string, description: string , ct_description?: string, value: number } @@ -88,7 +89,7 @@ export const AtacBarPlot: React.FC<{plottitle?: string, byct?: boolean, study: const yMinActive = Math.min(...props.barplotdata?.map((d) => d.value).filter(x => x !== -10)) //Transform all -10 values to yMinActive - 1 rounded down to nearest whole number - const transformedData = props.barplotdata?.map(x => x.value === -10 ? {...x, value: floorToHalf(yMinActive - 0.5)} : x) + let transformedData = props.barplotdata?.map(x => x.value === -10 ? {...x, value: floorToHalf(yMinActive - 0.5)} : x) const maxVal = Math.max(...transformedData.map((d) => d.value )) @@ -124,12 +125,12 @@ export const AtacBarPlot: React.FC<{plottitle?: string, byct?: boolean, study: let uniqcelltypes: string[] = [...new Set(transformedData.map(c=>c.celltype))] as string[] if(props.byct) { - uniqcelltypes = [...new Set(transformedData.map(c=>COLOR_MAP.get(c.celltype) ? c.celltype : c.description))] as string[] + uniqcelltypes = [...new Set(transformedData.map(c=> cellColors[c.celltype] ? c.celltype : c.description))] as string[] } let ordinalColorScale = uniqcelltypes && scaleOrdinal({ domain: uniqcelltypes, - range: uniqcelltypes.map((c: string)=>COLOR_MAP.get(c) || stringToColour(c) ) + range: uniqcelltypes.map((c: string)=> cellColors[c] || stringToColour(c) ) }) const minTemp = Math.min(...(yScale.domain() as number[])); @@ -139,7 +140,6 @@ export const AtacBarPlot: React.FC<{plottitle?: string, byct?: boolean, study: range: ["#ff0000"] }); - console.log(transformedData) return(
@@ -162,7 +162,6 @@ export const AtacBarPlot: React.FC<{plottitle?: string, byct?: boolean, study: left={barGroup.x0} > {barGroup.bars.map((bar, i) => ( - <> - - ))} )}) @@ -266,11 +263,10 @@ export const AtacBarPlot: React.FC<{plottitle?: string, byct?: boolean, study:
- `${label}`}> + `${label}`}> {(labels) => (
{labels.map((label, i) => { - console.log(label) return ( - +

{transformedData.find(b => b.celltype === label.text)?.ct_description || (transformedData.find(b => b.celltype === label.text) ? transformedData.find(b => b.celltype === label.text).description : label.text)} - +

diff --git a/immuscreen/src/app/icres/consts.ts b/immuscreen/src/app/icres/consts.ts index 84596dc..499c029 100644 --- a/immuscreen/src/app/icres/consts.ts +++ b/immuscreen/src/app/icres/consts.ts @@ -1,28 +1,353 @@ +export const cellColors = { + Bulk_B: "#078fff", + Bcell: "#078fff", + CD8pos_T: "#ff9900", + Central_memory_CD8pos_T: "#e69138", + Effector_CD4pos_T: "#990000", + Effector_memory_CD8pos_T: "#f1c232", + Follicular_T_Helper: "#6c4141", + Gamma_delta_T: "#dc5e5e", + Immature_NK: "#5e957b", + Mature_NK: "#008000", + Mem_B: "#1155cc", + Memory_NK: "#93c47d", + Memory_Teffs: "#cc4125", + Memory_Tregs: "#770000", + Monocytes: "#d043ff", + Myeloid_DCs: "#a64d79", + Naive_B: "#073763", + Naive_CD8_T: "#f6b26b", + Naive_Teffs: "#ea9999", + Naive_Tregs: "#e06666", + Plasmablasts: "#1606f7", + Regulatory_T: "#cc0000", + Th17_precursors: "#ba1818", + Th1_precursors: "#ff3535", + Th2_precursors: "#c93232", + pDCs: "#741b47", + CMP: "#d3b2ce", + LMPP: "#c1d3ba", + GMP: "#865695", + CLP: "#d5c8ac", + HSC: "#595959", + MEP: "#b8a0cb", + MPP: "#9e9e9e", + Ery: "#684fda", + NKcell: "#2f4a15", + CD4Tcell: "#5b1606", + CD8Tcell: "#ff9900", + Mono: "#d043ff", + CD34_Cord_Blood: "#595959", + CD34_Bone_Marrow: "#595959", + pHSC: "#25e6c9", + LSC: "#1ab19a", + Blast: "#107263" +} -export const COLOR_MAP: Map = new Map([ - ["Bulk_B", "#ff0000"], - ["CD8pos_T", "#ff9900"], - ["Central_memory_CD8pos_T", "#e69138"], - ["Effector_CD4pos_T", "#990000"], - ["Effector_memory_CD8pos_T", "#f1c232"], - ["Follicular_T_Helper", "#6c4141"], - ["Gamma_delta_T", "#dc5e5e"], - ["Immature_NK", "#5e957b"], - ["Mature_NK", "#008000"], - ["Mem_B", "#1155cc"], - ["Memory_NK", "#93c47d"], - ["Memory_Teffs", "#cc4125"], - ["Memory_Tregs", "#770000"], - ["Monocytes", " #684fda"], - ["Myeloid_DCs", "#a64d79"], - ["Naive_B", " #073763"], - ["Naive_CD8_T", "#f6b26b"], - ["Naive_Teffs", "#ea9999"], - ["Naive_Tregs", " #e06666"], - ["Plasmablasts", "#b7b7b7"], - ["Regulatory_T", "#cc0000"], - ["Th17_precursors", "#ba1818"], - ["Th1_precursors", "#ff3535"], - ["Th2_precursors", "#c93232"], - ["pDCs", "#741b47"] - ]); \ No newline at end of file +export const experimentInfo = { + '1020-CD34_Cord_Blood-SRX1427814': { order: 1, description: 'CD34+ Cord Blood in donor 1020', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '7291-CD34_Bone_Marrow-SRX1427812': { order: 2, description: 'CD34+ Bone Marrow in donor 7291', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '7292-CD34_Bone_Marrow-SRX1427813': { order: 3, description: 'CD34+ Bone Marrow in donor 7292', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '2596-HSC-SRX1427829': { order: 4, description: 'Hematopoetic Stem Cells in donor 2596', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '2596-HSC-SRX1427830': { order: 5, description: 'Hematopoetic Stem Cells in donor 2596', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '4983-HSC-SRX1427789': { order: 6, description: 'Hematopoetic Stem Cells in donor 4983', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '6792-HSC-SRX1427800': { order: 7, description: 'Hematopoetic Stem Cells in donor 6792', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '6792-HSC-SRX1427801': { order: 8, description: 'Hematopoetic Stem Cells in donor 6792', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '7256-HSC-SRX1427854': { order: 9, description: 'Hematopoetic Stem Cells in donor 7256', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '7256-HSC-SRX1427855': { order: 10, description: 'Hematopoetic Stem Cells in donor 7256', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '2596-MPP-SRX1427832': { order: 11, description: 'Mulipotent Progenitors in donor 2596', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '2596-MPP-SRX1427833': { order: 12, description: 'Mulipotent Progenitors in donor 2596', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '4983-MPP-SRX1427790': { order: 13, description: 'Mulipotent Progenitors in donor 4983', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '6792-MPP-SRX1427802': { order: 14, description: 'Mulipotent Progenitors in donor 6792', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '7256-MPP-SRX1427856': { order: 15, description: 'Mulipotent Progenitors in donor 7256', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '7256-MPP-SRX1427857': { order: 16, description: 'Mulipotent Progenitors in donor 7256', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '2596-CMP-SRX1427823': { order: 17, description: 'Common Myeloid Progenitors in donor 2596', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '2596-CMP-SRX1427824': { order: 18, description: 'Common Myeloid Progenitors in donor 2596', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '4983-CMP-SRX1427792': { order: 19, description: 'Common Myeloid Progenitors in donor 4983', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '4983-CMP-SRX1427793': { order: 20, description: 'Common Myeloid Progenitors in donor 4983', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '6792-CMP-SRX1427804': { order: 21, description: 'Common Myeloid Progenitors in donor 6792', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '6792-CMP-SRX1427805': { order: 22, description: 'Common Myeloid Progenitors in donor 6792', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '7256-CMP-SRX1427859': { order: 23, description: 'Common Myeloid Progenitors in donor 7256', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '7256-CMP-SRX1427860': { order: 24, description: 'Common Myeloid Progenitors in donor 7256', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '2596-MEP-SRX1427831': { order: 25, description: 'Megakaryocyte Erythroid Progenitor in donor 2596', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '4983-MEP-SRX1427796': { order: 26, description: 'Megakaryocyte Erythroid Progenitor in donor 4983', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '4983-MEP-SRX1427797': { order: 27, description: 'Megakaryocyte Erythroid Progenitor in donor 4983', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '6792-MEP-SRX1427808': { order: 28, description: 'Megakaryocyte Erythroid Progenitor in donor 6792', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '6792-MEP-SRX1427809': { order: 29, description: 'Megakaryocyte Erythroid Progenitor in donor 6792', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '7256-MEP-SRX1427863': { order: 30, description: 'Megakaryocyte Erythroid Progenitor in donor 7256', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '7256-MEP-SRX1427864': { order: 31, description: 'Megakaryocyte Erythroid Progenitor in donor 7256', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '2596-Ery-SRX1427825': { order: 32, description: 'Erythrocyte in donor 2596', group: 'Myeloid', study: 'Corces et al', pmid: '27526324' }, + '2596-Ery-SRX1427826': { order: 33, description: 'Erythrocyte in donor 2596', group: 'Myeloid', study: 'Corces et al', pmid: '27526324' }, + '2596-Ery-SRX1427827': { order: 34, description: 'Erythrocyte in donor 2596', group: 'Myeloid', study: 'Corces et al', pmid: '27526324' }, + '5483-Ery-SRX1427846': { order: 35, description: 'Erythrocyte in donor 5483', group: 'Myeloid', study: 'Corces et al', pmid: '27526324' }, + '5483-Ery-SRX1427847': { order: 36, description: 'Erythrocyte in donor 5483', group: 'Myeloid', study: 'Corces et al', pmid: '27526324' }, + '5483-Ery-SRX1427848': { order: 37, description: 'Erythrocyte in donor 5483', group: 'Myeloid', study: 'Corces et al', pmid: '27526324' }, + '6926-Ery-SRX1427852': { order: 38, description: 'Erythrocyte in donor 6926', group: 'Myeloid', study: 'Corces et al', pmid: '27526324' }, + '6926-Ery-SRX1427853': { order: 39, description: 'Erythrocyte in donor 6926', group: 'Myeloid', study: 'Corces et al', pmid: '27526324' }, + '2596-GMP-SRX1427828': { order: 40, description: 'Granulocyte-Monocyte Progenitors in donor 2596', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '4983-GMP-SRX1427794': { order: 41, description: 'Granulocyte-Monocyte Progenitors in donor 4983', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '4983-GMP-SRX1427795': { order: 42, description: 'Granulocyte-Monocyte Progenitors in donor 4983', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '6792-GMP-SRX1427806': { order: 43, description: 'Granulocyte-Monocyte Progenitors in donor 6792', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '6792-GMP-SRX1427807': { order: 44, description: 'Granulocyte-Monocyte Progenitors in donor 6792', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '7256-GMP-SRX1427861': { order: 45, description: 'Granulocyte-Monocyte Progenitors in donor 7256', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '7256-GMP-SRX1427862': { order: 46, description: 'Granulocyte-Monocyte Progenitors in donor 7256', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '4983-Mono-SRX1427798': { order: 47, description: 'Monocytes in donor 4983', group: 'Myeloid', study: 'Corces et al', pmid: '27526324' }, + '4983-Mono-SRX1427799': { order: 48, description: 'Monocytes in donor 4983', group: 'Myeloid', study: 'Corces et al', pmid: '27526324' }, + '6792-Mono-SRX1427810': { order: 49, description: 'Monocytes in donor 6792', group: 'Myeloid', study: 'Corces et al', pmid: '27526324' }, + '6792-Mono-SRX1427811': { order: 50, description: 'Monocytes in donor 6792', group: 'Myeloid', study: 'Corces et al', pmid: '27526324' }, + '7256-Mono-SRX1427865': { order: 51, description: 'Monocytes in donor 7256', group: 'Myeloid', study: 'Corces et al', pmid: '27526324' }, + '7256-Mono-SRX1427866': { order: 52, description: 'Monocytes in donor 7256', group: 'Myeloid', study: 'Corces et al', pmid: '27526324' }, + '1001-Monocytes-U': { order: 53, description: 'Monocytes in donor 1001', group: 'Myeloid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Monocytes-U': { order: 54, description: 'Monocytes in donor 1002', group: 'Myeloid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Monocytes-U': { order: 55, description: 'Monocytes in donor 1003', group: 'Myeloid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Monocytes-S': { order: 56, description: 'Monocytes, stimulated with 100 ng/ml LPS for 6 hours, in donor 1001', group: 'Myeloid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Monocytes-S': { order: 57, description: 'Monocytes, stimulated with 100 ng/ml LPS for 6 hours, in donor 1002', group: 'Myeloid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Monocytes-S': { order: 58, description: 'Monocytes, stimulated with 100 ng/ml LPS for 6 hours, in donor 1003', group: 'Myeloid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Monocytes-S': { order: 59, description: 'Monocytes, stimulated with 100 ng/ml LPS for 6 hours, in donor 1004', group: 'Myeloid', study: 'Calderon et al', pmid: '31570894' }, + '1008-Monocytes-S': { order: 60, description: 'Monocytes, stimulated with 1 µg/ml LPS for 24 hours, in donor 1008', group: 'Myeloid', study: 'Calderon et al', pmid: '31570894' }, + '1010-Monocytes-S': { order: 61, description: 'Monocytes, stimulated with 1 µg/ml LPS for 24 hours, in donor 1010', group: 'Myeloid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Myeloid_DCs-U': { order: 62, description: 'Myeloid Dendritic cells in donor 1001', group: 'Myeloid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Myeloid_DCs-U': { order: 63, description: 'Myeloid Dendritic cells in donor 1002', group: 'Myeloid', study: 'Calderon et al', pmid: '31570894' }, + '1008-Myeloid_DCs-U': { order: 64, description: 'Myeloid Dendritic cells in donor 1008', group: 'Myeloid', study: 'Calderon et al', pmid: '31570894' }, + '1001-pDCs-U': { order: 65, description: 'Plasmacytoid dendritic cells in donor 1001', group: 'Myeloid', study: 'Calderon et al', pmid: '31570894' }, + '1002-pDCs-U': { order: 66, description: 'Plasmacytoid dendritic cells in donor 1002', group: 'Myeloid', study: 'Calderon et al', pmid: '31570894' }, + '1008-pDCs-U': { order: 67, description: 'Plasmacytoid dendritic cells in donor 1008', group: 'Myeloid', study: 'Calderon et al', pmid: '31570894' }, + '4983-LMPP-SRX1427791': { order: 68, description: 'Lymphocyte-Primed Multipotent Progenitor in donor 4983', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '6792-LMPP-SRX1427803': { order: 69, description: 'Lymphocyte-Primed Multipotent Progenitor in donor 6792', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '7256-LMPP-SRX1427858': { order: 70, description: 'Lymphocyte-Primed Multipotent Progenitor in donor 7256', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '2596-CLP-SRX1427821': { order: 71, description: 'Common Lymphoid Progenitor in donor 2596', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '2596-CLP-SRX1427822': { order: 72, description: 'Common Lymphoid Progenitor in donor 2596', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '5483-CLP-SRX1427845': { order: 73, description: 'Common Lymphoid Progenitor in donor 5483', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '6926-CLP-SRX1427851': { order: 74, description: 'Common Lymphoid Progenitor in donor 6926', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '6926-CLP-SRX1427868': { order: 75, description: 'Common Lymphoid Progenitor in donor 6926', group: 'Progenitors', study: 'Corces et al', pmid: '27526324' }, + '1022-Bcell-SRX1427815': { order: 76, description: 'B cell in donor 1022', group: 'Lymphoid', study: 'Corces et al', pmid: '27526324' }, + '4983-Bcell-SRX1427836': { order: 77, description: 'B cell in donor 4983', group: 'Lymphoid', study: 'Corces et al', pmid: '27526324' }, + '5483-Bcell-SRX1427840': { order: 78, description: 'B cell in donor 5483', group: 'Lymphoid', study: 'Corces et al', pmid: '27526324' }, + '5483-Bcell-SRX1427867': { order: 79, description: 'B cell in donor 5483', group: 'Lymphoid', study: 'Corces et al', pmid: '27526324' }, + '1001-Bulk_B-U': { order: 80, description: 'Bulk B cells in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Bulk_B-U': { order: 81, description: 'Bulk B cells in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Bulk_B-U': { order: 82, description: 'Bulk B cells in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Bulk_B-U': { order: 83, description: 'Bulk B cells in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Bulk_B-S': { order: 84, description: 'Bulk B cells, stimulated with 10µg/ml anti-IgG/IgM antibodies and 20 ng/ml IL-4 for 24 hours, in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Bulk_B-S': { order: 85, description: 'Bulk B cells, stimulated with 10µg/ml anti-IgG/IgM antibodies and 20 ng/ml IL-4 for 24 hours, in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Bulk_B-S': { order: 86, description: 'Bulk B cells, stimulated with 10µg/ml anti-IgG/IgM antibodies and 20 ng/ml IL-4 for 24 hours, in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Naive_B-U': { order: 87, description: 'Naïve B cells in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Naive_B-U': { order: 88, description: 'Naïve B cells in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Naive_B-U': { order: 89, description: 'Naïve B cells in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Naive_B-U': { order: 90, description: 'Naïve B cells in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Naive_B-S': { order: 91, description: 'Naïve B cells, stimulated with 10µg/ml anti-IgG/IgM antibodies and 20 ng/ml IL-4 for 24 hours, in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Naive_B-S': { order: 92, description: 'Naïve B cells, stimulated with 10µg/ml anti-IgG/IgM antibodies and 20 ng/ml IL-4 for 24 hours, in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Naive_B-S': { order: 93, description: 'Naïve B cells, stimulated with 10µg/ml anti-IgG/IgM antibodies and 20 ng/ml IL-4 for 24 hours, in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Mem_B-U': { order: 94, description: 'Memory B cells in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Mem_B-U': { order: 95, description: 'Memory B cells in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Mem_B-U': { order: 96, description: 'Memory B cells in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Mem_B-U': { order: 97, description: 'Memory B cells in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Mem_B-S': { order: 98, description: 'Memory B cells, stimulated with 10µg/ml anti-IgG/IgM antibodies and 20 ng/ml IL-4 for 24 hours, in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Mem_B-S': { order: 99, description: 'Memory B cells, stimulated with 10µg/ml anti-IgG/IgM antibodies and 20 ng/ml IL-4 for 24 hours, in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Mem_B-S': { order: 100, description: 'Memory B cells, stimulated with 10µg/ml anti-IgG/IgM antibodies and 20 ng/ml IL-4 for 24 hours, in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1010-Mem_B-S': { order: 101, description: 'Memory B cells, stimulated with 10µg/ml anti-IgG/IgM antibodies and 20 ng/ml IL-4 for 24 hours, in donor 1010', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Plasmablasts-U': { order: 102, description: 'Plasmablasts in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Plasmablasts-U': { order: 103, description: 'Plasmablasts in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1010-Plasmablasts-U': { order: 104, description: 'Plasmablasts in donor 1010', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1022-CD4Tcell-SRX1427816': { order: 105, description: 'CD4+ T cells in donor 1022', group: 'Lymphoid', study: 'Corces et al', pmid: '27526324' }, + '2596-CD4Tcell-SRX1427819': { order: 106, description: 'CD4+ T cells in donor 2596', group: 'Lymphoid', study: 'Corces et al', pmid: '27526324' }, + '4983-CD4Tcell-SRX1427837': { order: 107, description: 'CD4+ T cells in donor 4983', group: 'Lymphoid', study: 'Corces et al', pmid: '27526324' }, + '5483-CD4Tcell-SRX1427841': { order: 108, description: 'CD4+ T cells in donor 5483', group: 'Lymphoid', study: 'Corces et al', pmid: '27526324' }, + '5483-CD4Tcell-SRX1427842': { order: 109, description: 'CD4+ T cells in donor 5483', group: 'Lymphoid', study: 'Corces et al', pmid: '27526324' }, + '1001-Regulatory_T-U': { order: 110, description: 'Regulatory CD4+ T cells in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Regulatory_T-U': { order: 111, description: 'Regulatory CD4+ T cells in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Regulatory_T-U': { order: 112, description: 'Regulatory CD4+ T cells in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Regulatory_T-U': { order: 113, description: 'Regulatory CD4+ T cells in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Regulatory_T-S': { order: 114, description: 'Regulatory CD4+ T cells, stimulated with 1:1 CD3/CD28 coated beads and 300 U/ml IL-2 for 24 hours, in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Regulatory_T-S': { order: 115, description: 'Regulatory CD4+ T cells, stimulated with 1:1 CD3/CD28 coated beads and 300 U/ml IL-2 for 24 hours, in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Regulatory_T-S': { order: 116, description: 'Regulatory CD4+ T cells, stimulated with 1:1 CD3/CD28 coated beads and 300 U/ml IL-2 for 24 hours, in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Regulatory_T-S': { order: 117, description: 'Regulatory CD4+ T cells, stimulated with 1:1 CD3/CD28 coated beads and 300 U/ml IL-2 for 24 hours, in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Naive_Tregs-U': { order: 118, description: 'Naïve T regulatory cells in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1008-Naive_Tregs-U': { order: 119, description: 'Naïve T regulatory cells in donor 1008', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Naive_Tregs-S': { order: 120, description: 'Naïve T regulatory cells, stimulated with 1:1 CD3/CD28 coated beads and 300 U/ml IL-2 for 24 hours, in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1010-Naive_Tregs-S': { order: 121, description: 'Naïve T regulatory cells, stimulated with 1:1 CD3/CD28 coated beads and 300 U/ml IL-2 for 24 hours, in donor 1010', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Memory_Tregs-U': { order: 122, description: 'Memory T regulatory cell in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Memory_Tregs-U': { order: 123, description: 'Memory T regulatory cell in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Memory_Tregs-U': { order: 124, description: 'Memory T regulatory cell in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Memory_Tregs-U': { order: 125, description: 'Memory T regulatory cell in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Memory_Tregs-S': { order: 126, description: 'Memory T regulatory cell, stimulated with 1:1 CD3/CD28 coated beads and 300 U/ml IL-2 for 24 hours, in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Memory_Tregs-S': { order: 127, description: 'Memory T regulatory cell, stimulated with 1:1 CD3/CD28 coated beads and 300 U/ml IL-2 for 24 hours, in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Memory_Tregs-S': { order: 128, description: 'Memory T regulatory cell, stimulated with 1:1 CD3/CD28 coated beads and 300 U/ml IL-2 for 24 hours, in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Memory_Tregs-S': { order: 129, description: 'Memory T regulatory cell, stimulated with 1:1 CD3/CD28 coated beads and 300 U/ml IL-2 for 24 hours, in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Effector_CD4pos_T-U': { order: 130, description: 'Effector CD4 T cell in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Effector_CD4pos_T-U': { order: 131, description: 'Effector CD4 T cell in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Effector_CD4pos_T-U': { order: 132, description: 'Effector CD4 T cell in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Effector_CD4pos_T-U': { order: 133, description: 'Effector CD4 T cell in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Effector_CD4pos_T-S': { order: 134, description: 'Effector CD4 T cell, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Effector_CD4pos_T-S': { order: 135, description: 'Effector CD4 T cell, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Effector_CD4pos_T-S': { order: 136, description: 'Effector CD4 T cell, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Naive_Teffs-U': { order: 137, description: 'Naïve T effector cells in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Naive_Teffs-U': { order: 138, description: 'Naïve T effector cells in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Naive_Teffs-U': { order: 139, description: 'Naïve T effector cells in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Naive_Teffs-U': { order: 140, description: 'Naïve T effector cells in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Naive_Teffs-S': { order: 141, description: 'Effector CD4 T cell, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Naive_Teffs-S': { order: 142, description: 'Effector CD4 T cell, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Naive_Teffs-S': { order: 143, description: 'Effector CD4 T cell, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Naive_Teffs-S': { order: 144, description: 'Effector CD4 T cell, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1011-Naive_Teffs-S': { order: 145, description: 'Effector CD4 T cell, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1011', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Memory_Teffs-U': { order: 146, description: 'Memory T effector cells in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Memory_Teffs-U': { order: 147, description: 'Memory T effector cells in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Memory_Teffs-U': { order: 148, description: 'Memory T effector cells in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Memory_Teffs-U': { order: 149, description: 'Memory T effector cells in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Memory_Teffs-S': { order: 150, description: 'Memory T effector cells, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Memory_Teffs-S': { order: 151, description: 'Memory T effector cells, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Memory_Teffs-S': { order: 152, description: 'Memory T effector cells, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Memory_Teffs-S': { order: 153, description: 'Memory T effector cells, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Th1_precursors-U': { order: 154, description: 'T helper 1 cell precursors in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Th1_precursors-U': { order: 155, description: 'T helper 1 cell precursors in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Th1_precursors-U': { order: 156, description: 'T helper 1 cell precursors in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Th1_precursors-U': { order: 157, description: 'T helper 1 cell precursors in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Th1_precursors-S': { order: 158, description: 'T helper 1 cell precursors, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Th1_precursors-S': { order: 159, description: 'T helper 1 cell precursors, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Th1_precursors-S': { order: 160, description: 'T helper 1 cell precursors, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Th1_precursors-S': { order: 161, description: 'T helper 1 cell precursors, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Th2_precursors-U': { order: 162, description: 'T helper 2 cell precursors in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Th2_precursors-U': { order: 163, description: 'T helper 2 cell precursors in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Th2_precursors-U': { order: 164, description: 'T helper 2 cell precursors in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Th2_precursors-U': { order: 165, description: 'T helper 2 cell precursors in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Th2_precursors-S': { order: 166, description: 'T helper 2 cell precursors, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Th2_precursors-S': { order: 167, description: 'T helper 2 cell precursors, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Th2_precursors-S': { order: 168, description: 'T helper 2 cell precursors, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Th2_precursors-S': { order: 169, description: 'T helper 2 cell precursors, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Th17_precursors-U': { order: 170, description: 'T helper 17 cell precursors in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Th17_precursors-U': { order: 171, description: 'T helper 17 cell precursors in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Th17_precursors-U': { order: 172, description: 'T helper 17 cell precursors in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Th17_precursors-S': { order: 173, description: 'T helper 17 cell precursors, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Th17_precursors-S': { order: 174, description: 'T helper 17 cell precursors, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Th17_precursors-S': { order: 175, description: 'T helper 17 cell precursors, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Th17_precursors-S': { order: 176, description: 'T helper 17 cell precursors, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Follicular_T_Helper-U': { order: 177, description: 'T follicular helper cells in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Follicular_T_Helper-U': { order: 178, description: 'T follicular helper cells in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Follicular_T_Helper-U': { order: 179, description: 'T follicular helper cells in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Follicular_T_Helper-U': { order: 180, description: 'T follicular helper cells in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1010-Follicular_T_Helper-U': { order: 181, description: 'T follicular helper cells in donor 1010', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Follicular_T_Helper-S': { order: 182, description: 'T follicular helper cells, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Follicular_T_Helper-S': { order: 183, description: 'T follicular helper cells, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Follicular_T_Helper-S': { order: 184, description: 'T follicular helper cells, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Follicular_T_Helper-S': { order: 185, description: 'T follicular helper cells, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1022-CD8Tcell-SRX1427817': { order: 186, description: 'CD8+ T cells in donor 1022', group: 'Lymphoid', study: 'Corces et al', pmid: '27526324' }, + '2596-CD8Tcell-SRX1427820': { order: 187, description: 'CD8+ T cells in donor 2596', group: 'Lymphoid', study: 'Corces et al', pmid: '27526324' }, + '4983-CD8Tcell-SRX1427838': { order: 188, description: 'CD8+ T cells in donor 4983', group: 'Lymphoid', study: 'Corces et al', pmid: '27526324' }, + '5483-CD8Tcell-SRX1427843': { order: 189, description: 'CD8+ T cells in donor 5483', group: 'Lymphoid', study: 'Corces et al', pmid: '27526324' }, + '5483-CD8Tcell-SRX1427844': { order: 190, description: 'CD8+ T cells in donor 5483', group: 'Lymphoid', study: 'Corces et al', pmid: '27526324' }, + '1001-CD8pos_T-U': { order: 191, description: 'CD8+ T cells in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-CD8pos_T-U': { order: 192, description: 'CD8+ T cells in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-CD8pos_T-U': { order: 193, description: 'CD8+ T cells in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-CD8pos_T-U': { order: 194, description: 'CD8+ T cells in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-CD8pos_T-S': { order: 195, description: 'CD8+ T cells, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-CD8pos_T-S': { order: 196, description: 'CD8+ T cells, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-CD8pos_T-S': { order: 197, description: 'CD8+ T cells, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Naive_CD8_T-U': { order: 198, description: 'Naïve CD8+ T cells in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Naive_CD8_T-U': { order: 199, description: 'Naïve CD8+ T cells in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Naive_CD8_T-U': { order: 200, description: 'Naïve CD8+ T cells in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Naive_CD8_T-U': { order: 201, description: 'Naïve CD8+ T cells in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Naive_CD8_T-S': { order: 202, description: 'Naïve CD8+ T cells, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Naive_CD8_T-S': { order: 203, description: 'Naïve CD8+ T cells, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Naive_CD8_T-S': { order: 204, description: 'Naïve CD8+ T cells, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Naive_CD8_T-S': { order: 205, description: 'Naïve CD8+ T cells, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Central_memory_CD8pos_T-U': { order: 206, description: 'Central memory CD8+ T cells in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Central_memory_CD8pos_T-U': { order: 207, description: 'Central memory CD8+ T cells in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Central_memory_CD8pos_T-U': { order: 208, description: 'Central memory CD8+ T cells in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Central_memory_CD8pos_T-U': { order: 209, description: 'Central memory CD8+ T cells in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Central_memory_CD8pos_T-S': { order: 210, description: 'Central memory CD8+ T cells, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Central_memory_CD8pos_T-S': { order: 211, description: 'Central memory CD8+ T cells, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Central_memory_CD8pos_T-S': { order: 212, description: 'Central memory CD8+ T cells, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Central_memory_CD8pos_T-S': { order: 213, description: 'Central memory CD8+ T cells, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Effector_memory_CD8pos_T-U': { order: 214, description: 'Effector memory CD8+ T cells in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Effector_memory_CD8pos_T-U': { order: 215, description: 'Effector memory CD8+ T cells in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Effector_memory_CD8pos_T-U': { order: 216, description: 'Effector memory CD8+ T cells in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Effector_memory_CD8pos_T-U': { order: 217, description: 'Effector memory CD8+ T cells in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Effector_memory_CD8pos_T-S': { order: 218, description: 'Effector memory CD8+ T cells, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Effector_memory_CD8pos_T-S': { order: 219, description: 'Effector memory CD8+ T cells, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Effector_memory_CD8pos_T-S': { order: 220, description: 'Effector memory CD8+ T cells, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Effector_memory_CD8pos_T-S': { order: 221, description: 'Effector memory CD8+ T cells, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Gamma_delta_T-U': { order: 222, description: 'Gamma delta T cells in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Gamma_delta_T-U': { order: 223, description: 'Gamma delta T cells in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Gamma_delta_T-U': { order: 224, description: 'Gamma delta T cells in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Gamma_delta_T-U': { order: 225, description: 'Gamma delta T cells in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Gamma_delta_T-S': { order: 226, description: 'Gamma delta T cells, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Gamma_delta_T-S': { order: 227, description: 'Gamma delta T cells, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Gamma_delta_T-S': { order: 228, description: 'Gamma delta T cells, stimulated with 1:1 CD3/CD28 coated beads and 50 U/ml IL-2 for 24 hours, in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1022-NKcell-SRX1427818': { order: 229, description: 'Natural Killer cells in donor 1022', group: 'Lymphoid', study: 'Corces et al', pmid: '27526324' }, + '2596-NKcell-SRX1427834': { order: 230, description: 'Natural Killer cells in donor 2596', group: 'Lymphoid', study: 'Corces et al', pmid: '27526324' }, + '2596-NKcell-SRX1427835': { order: 231, description: 'Natural Killer cells in donor 2596', group: 'Lymphoid', study: 'Corces et al', pmid: '27526324' }, + '4983-NKcell-SRX1427839': { order: 232, description: 'Natural Killer cells in donor 4983', group: 'Lymphoid', study: 'Corces et al', pmid: '27526324' }, + '5483-NKcell-SRX1427849': { order: 233, description: 'Natural Killer cells in donor 5483', group: 'Lymphoid', study: 'Corces et al', pmid: '27526324' }, + '5483-NKcell-SRX1427850': { order: 234, description: 'Natural Killer cells in donor 5483', group: 'Lymphoid', study: 'Corces et al', pmid: '27526324' }, + '1001-Immature_NK-U': { order: 235, description: 'Immature Natural Killer cells in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Immature_NK-U': { order: 236, description: 'Immature Natural Killer cells in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Immature_NK-U': { order: 237, description: 'Immature Natural Killer cells in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Immature_NK-U': { order: 238, description: 'Immature Natural Killer cells in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1008-Immature_NK-U': { order: 239, description: 'Immature Natural Killer cells in donor 1008', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Mature_NK-U': { order: 240, description: 'Mature Natural Killer cells in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Mature_NK-U': { order: 241, description: 'Mature Natural Killer cells in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Mature_NK-U': { order: 242, description: 'Mature Natural Killer cells in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1008-Mature_NK-U': { order: 243, description: 'Mature Natural Killer cells in donor 1008', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Mature_NK-S': { order: 244, description: 'Mature Natural Killer cells, stimulated with 1:2 CD2/CD355 coated beads and 500 U/ml IL-2 for 48 hours, in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Mature_NK-S': { order: 245, description: 'Mature Natural Killer cells, stimulated with 1:2 CD2/CD355 coated beads and 500 U/ml IL-2 for 48 hours, in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Mature_NK-S': { order: 246, description: 'Mature Natural Killer cells, stimulated with 1:2 CD2/CD355 coated beads and 500 U/ml IL-2 for 48 hours, in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Mature_NK-S': { order: 247, description: 'Mature Natural Killer cells, stimulated with 1:2 CD2/CD355 coated beads and 500 U/ml IL-2 for 48 hours, in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1008-Mature_NK-S': { order: 248, description: 'Mature Natural Killer cells, stimulated with 200 U/ml IL-2 for 24 hours, in donor 1008', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1010-Mature_NK-S': { order: 249, description: 'Mature Natural Killer cells, stimulated with 200 U/ml IL-2 for 24 hours, in donor 1010', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1001-Memory_NK-U': { order: 250, description: 'Memory Natural Killer cells in donor 1001', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1002-Memory_NK-U': { order: 251, description: 'Memory Natural Killer cells in donor 1002', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1003-Memory_NK-U': { order: 252, description: 'Memory Natural Killer cells in donor 1003', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1004-Memory_NK-U': { order: 253, description: 'Memory Natural Killer cells in donor 1004', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1008-Memory_NK-U': { order: 254, description: 'Memory Natural Killer cells in donor 1008', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + '1010-Memory_NK-U': { order: 255, description: 'Memory Natural Killer cells in donor 1010', group: 'Lymphoid', study: 'Calderon et al', pmid: '31570894' }, + 'SU048-pHSC-SRX1427875': { order: 256, description: 'Preleukemic Hematopoetic Stem Cells in donor SU04', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU070-pHSC-SRX1427879': { order: 257, description: 'Preleukemic Hematopoetic Stem Cells in donor SU07', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU070-pHSC-SRX1427880': { order: 258, description: 'Preleukemic Hematopoetic Stem Cells in donor SU07', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU209-pHSC-SRX1427883': { order: 259, description: 'Preleukemic Hematopoetic Stem Cells in donor SU20', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU209-pHSC-SRX1427884': { order: 260, description: 'Preleukemic Hematopoetic Stem Cells in donor SU20', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU209-pHSC-SRX1427885': { order: 261, description: 'Preleukemic Hematopoetic Stem Cells in donor SU20', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU306-pHSC-SRX1427887': { order: 262, description: 'Preleukemic Hematopoetic Stem Cells in donor SU30', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU336-pHSC-SRX1427889': { order: 263, description: 'Preleukemic Hematopoetic Stem Cells in donor SU33', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU351-pHSC-SRX1427891': { order: 264, description: 'Preleukemic Hematopoetic Stem Cells in donor SU35', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU353-pHSC-SRX1427894': { order: 265, description: 'Preleukemic Hematopoetic Stem Cells in donor SU35', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU444-pHSC-SRX1427897': { order: 266, description: 'Preleukemic Hematopoetic Stem Cells in donor SU44', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU484-pHSC-SRX1427899': { order: 267, description: 'Preleukemic Hematopoetic Stem Cells in donor SU48', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU496-pHSC-SRX1427902': { order: 268, description: 'Preleukemic Hematopoetic Stem Cells in donor SU49', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU501-pHSC-SRX1427904': { order: 269, description: 'Preleukemic Hematopoetic Stem Cells in donor SU50', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU575-pHSC-SRX1427907': { order: 270, description: 'Preleukemic Hematopoetic Stem Cells in donor SU57', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU583-pHSC-SRX1427910': { order: 271, description: 'Preleukemic Hematopoetic Stem Cells in donor SU58', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU583-pHSC-SRX1427911': { order: 272, description: 'Preleukemic Hematopoetic Stem Cells in donor SU58', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU623-pHSC-SRX1427915': { order: 273, description: 'Preleukemic Hematopoetic Stem Cells in donor SU62', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU654-pHSC-SRX1427918': { order: 274, description: 'Preleukemic Hematopoetic Stem Cells in donor SU65', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU070-LSC-SRX1427878': { order: 275, description: 'Leukemia Stem Cells in donor SU07', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU209-LSC-SRX1427882': { order: 276, description: 'Leukemia Stem Cells in donor SU20', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU353-LSC-SRX1427893': { order: 277, description: 'Leukemia Stem Cells in donor SU35', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU444-LSC-SRX1427896': { order: 278, description: 'Leukemia Stem Cells in donor SU44', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU496-LSC-SRX1427901': { order: 279, description: 'Leukemia Stem Cells in donor SU49', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU575-LSC-SRX1427906': { order: 280, description: 'Leukemia Stem Cells in donor SU57', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU583-LSC-SRX1427909': { order: 281, description: 'Leukemia Stem Cells in donor SU58', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU654-LSC-SRX1427917': { order: 282, description: 'Leukemia Stem Cells in donor SU65', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU048-Blast-SRX1427869': { order: 283, description: 'Leukemic Blast Cells in donor SU04', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU048-Blast-SRX1427870': { order: 284, description: 'Leukemic Blast Cells in donor SU04', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU048-Blast-SRX1427871': { order: 285, description: 'Leukemic Blast Cells in donor SU04', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU048-Blast-SRX1427872': { order: 286, description: 'Leukemic Blast Cells in donor SU04', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU048-Blast-SRX1427873': { order: 287, description: 'Leukemic Blast Cells in donor SU04', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU048-Blast-SRX1427874': { order: 288, description: 'Leukemic Blast Cells in donor SU04', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU070-Blast-SRX1427876': { order: 289, description: 'Leukemic Blast Cells in donor SU07', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU070-Blast-SRX1427877': { order: 290, description: 'Leukemic Blast Cells in donor SU07', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU209-Blast-SRX1427881': { order: 291, description: 'Leukemic Blast Cells in donor SU20', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU306-Blast-SRX1427886': { order: 292, description: 'Leukemic Blast Cells in donor SU30', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU336-Blast-SRX1427888': { order: 293, description: 'Leukemic Blast Cells in donor SU33', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU351-Blast-SRX1427890': { order: 294, description: 'Leukemic Blast Cells in donor SU35', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU353-Blast-SRX1427892': { order: 295, description: 'Leukemic Blast Cells in donor SU35', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU444-Blast-SRX1427895': { order: 296, description: 'Leukemic Blast Cells in donor SU44', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU484-Blast-SRX1427898': { order: 297, description: 'Leukemic Blast Cells in donor SU48', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU496-Blast-SRX1427900': { order: 298, description: 'Leukemic Blast Cells in donor SU49', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU501-Blast-SRX1427903': { order: 299, description: 'Leukemic Blast Cells in donor SU50', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU575-Blast-SRX1427905': { order: 300, description: 'Leukemic Blast Cells in donor SU57', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU583-Blast-SRX1427908': { order: 301, description: 'Leukemic Blast Cells in donor SU58', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU623-Blast-SRX1427912': { order: 302, description: 'Leukemic Blast Cells in donor SU62', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU623-Blast-SRX1427913': { order: 303, description: 'Leukemic Blast Cells in donor SU62', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU623-Blast-SRX1427914': { order: 304, description: 'Leukemic Blast Cells in donor SU62', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, + 'SU654-Blast-SRX1427916': { order: 305, description: 'Leukemic Blast Cells in donor SU65', group: 'Leukemic', study: 'Corces et al', pmid: '27526324' }, +} \ No newline at end of file diff --git a/immuscreen/src/app/icres/page.tsx b/immuscreen/src/app/icres/page.tsx index d25e629..35699b3 100644 --- a/immuscreen/src/app/icres/page.tsx +++ b/immuscreen/src/app/icres/page.tsx @@ -20,7 +20,7 @@ import InputLabel from "@mui/material/InputLabel"; import Select, { SelectChangeEvent } from "@mui/material/Select"; import { stringToColour } from "./utils"; import { ICRES_CT_ZSCORES_QUERY, ICRES_BYCT_ZSCORES_QUERY, ICRES_QUERY, EBI_ASSO_QUERY } from "./queries"; -import { COLOR_MAP } from "./consts"; +import { cellColors } from "./consts"; import {IcresByRegion} from "./icresbyregion" @@ -72,13 +72,13 @@ export default function Icres() { nextFetchPolicy: "cache-first", client, }) - console.log(aloading,adata) + // console.log(aloading,adata) let barplotdata = icrezscoredata && icrezscoredata.calderoncorcesAtacQuery.map(ic=>{ return { ...ic, - color: COLOR_MAP.get(ic.celltype) || stringToColour(ic.celltype), + color: cellColors[ic.celltype] || stringToColour(ic.celltype), value: ic.value } @@ -86,7 +86,7 @@ let barplotdata = icrezscoredata && icrezscoredata.calderoncorcesAtacQuery.map(i let barplotbyctdata = icrebyctzscoredata && icrebyctzscoredata.calderoncorcesByCtAtacQuery.map(ic=>{ return { ...ic, - color: COLOR_MAP.get(ic.celltype) ||stringToColour(ic.celltype), + color: cellColors[ic.celltype] ||stringToColour(ic.celltype), value: ic.value } @@ -128,7 +128,7 @@ function handleSubmit() { router.push(`/icres?chromosome=${chromosome}&start=${start}&end=${end}`) } -console.log("coordinates", adata && adata.iCREQuery[0].coordinates) +// console.log("coordinates", adata && adata.iCREQuery[0].coordinates) return !searchParams.get('accession') && !searchParams.get('chromosome') ? (
diff --git a/immuscreen/src/app/phenotype/ldsc.tsx b/immuscreen/src/app/phenotype/ldsc.tsx new file mode 100644 index 0000000..6abfdad --- /dev/null +++ b/immuscreen/src/app/phenotype/ldsc.tsx @@ -0,0 +1,188 @@ +import { Circle, Line, Polygon } from "@visx/shape"; +import { LDSCDataPoint } from "./page"; +import { AxisLeft } from "@visx/axis"; +import { useMemo } from "react"; +import { scaleLinear } from "@visx/scale"; +import { Group } from "@visx/group"; +import { experimentInfo, cellColors } from "../icres/consts" +import { defaultStyles as defaultTooltipStyles, useTooltip, TooltipWithBounds } from '@visx/tooltip'; +import { Text } from '@visx/text'; +import { MouseEvent } from "react"; + +type Props = { + width: number; + height: number; + data: LDSCDataPoint[]; + pValCutoff: number; + stimView: "S" | "U" | "B" +}; + +interface TooltipData { + cell: string, + enrichment: number, + enrichmentP: number, + enrichmentStdErr: number, + percentageSNPs: number, +} + +export default function LDSCplot({ width, height, data, pValCutoff, stimView }: Props) { + const { tooltipOpen, tooltipLeft, tooltipTop, tooltipData, hideTooltip, showTooltip, updateTooltip } = useTooltip(); + + const handleHover = (event: MouseEvent, point: LDSCDataPoint) => { + showTooltip({ + tooltipTop: event.pageY, + tooltipLeft: event.pageX, + tooltipData: { + cell: experimentInfo[point.celltype].description, + enrichment: point.enrichment, + enrichmentP: point.enrichment_p, + enrichmentStdErr: point.enrichment_std_error, + percentageSNPs: point.snps + } + }) + event.currentTarget.setAttribute("stroke", "black") //Outline point + event.currentTarget.setAttribute("transform", "scale(1.5)") //Grow point + document.getElementById(`stdErr-${point.celltype}`).setAttribute("stroke", "black") //Show std error bars + } + + const handleLeaveHover = (event: MouseEvent, point: LDSCDataPoint) => { + hideTooltip() + event.currentTarget.setAttribute("stroke", "none") + event.currentTarget.setAttribute("transform", "scale(1)") + document.getElementById(`stdErr-${point.celltype}`).setAttribute("stroke", "none") + } + + const orderedData = [...data] + .sort((a, b) => { + if (experimentInfo[a.celltype] && experimentInfo[b.celltype]) { + return (experimentInfo[a.celltype].order - experimentInfo[b.celltype].order) + } else { + console.log("Couldn't find" + a.celltype + "or" + b.celltype) + return 0 + } + }) + + const spaceForAxis = 70 + const paddingRight = 20 + const paddingTop = 20 + const paddingBottom = 20 + const plotWidth = width - spaceForAxis - paddingRight + const plotHeight = height - paddingTop - paddingBottom + const dataPaddingLeft = 20 + const dataPaddingTopBottom = 15 + + //Input to this will be the order of the celltype according to known order. Output is its position on the x axis + const xScale = useMemo( + () => + scaleLinear({ + domain: [0, data.length], + range: [dataPaddingLeft, plotWidth], //Start at 20 to provide left side padding to data points + }), + [plotWidth, data], + ); + + const dataMin: number = Math.min(...data.map(x => x.enrichment)) + const dataMax: number = Math.max(...data.map(x => x.enrichment)) + + //Input to this is the enrichment value of a point. Output is its vertical position on the scale + const yScale = useMemo( + () => + scaleLinear({ + domain: [dataMin - dataPaddingTopBottom, dataMax + dataPaddingTopBottom], + range: [plotHeight, 0] + }), + [dataMin, dataMax, plotHeight], + ); + + return ( +
+ + + + + + {orderedData.map((point, i) => { + const stimulated = point.celltype.split("-")[point.celltype.split("-").length - 1] === "S" + // Passes p-val cutoff and is correct stimulation + const toBeShown = point.enrichment_p <= pValCutoff && (stimView === "S" && stimulated || stimView === "U" && !stimulated || stimView === "B") + + const commonProps = { + opacity: toBeShown ? 1 : 0.1, //Sharply decrease opacity if not to be shown + fill: cellColors[point.celltype.split('-')[1]] || "black", + style: { transformOrigin: `${xScale(i)}px ${yScale(point.enrichment)}px` }, //Needed so that scale transforms are applied correctly + onMouseMove: (event) => handleHover(event, point), + onMouseLeave: (event) => handleLeaveHover(event, point) + } + + return ( + + {/* Standard error */} + + + + + + {/* Datapoint */} + {stimulated ? + + : + + } + + ) + })} + + * Colors represent cell type, hovering shows standard error + + {tooltipOpen && tooltipData && ( + +
+

Cell: {tooltipData.cell}

+
+
+
+

Enrichment: {tooltipData.enrichment.toFixed(2)}

+
+
+

Enrichment p-value: {tooltipData.enrichmentP.toPrecision(2)}

+
+
+

Enrichment Std Error: {tooltipData.enrichmentStdErr.toFixed(2)}

+
+
+

Percentage of SNPs: {tooltipData.percentageSNPs.toPrecision(2)}

+
+
+ )} +
+ ) +} diff --git a/immuscreen/src/app/phenotype/page.tsx b/immuscreen/src/app/phenotype/page.tsx new file mode 100644 index 0000000..4412a60 --- /dev/null +++ b/immuscreen/src/app/phenotype/page.tsx @@ -0,0 +1,185 @@ +"use client" +import { gql, useQuery } from "@apollo/client"; +import { Autocomplete, Box, CircularProgress, FormControl, FormControlLabel, FormLabel, Radio, RadioGroup, Slider, Stack, TextField, Typography } from "@mui/material"; +import Grid2 from "@mui/material/Unstable_Grid2/Grid2"; +import { useState } from "react"; +import { client } from "../../common/utils"; +import ChangeHistoryTwoToneIcon from '@mui/icons-material/ChangeHistoryTwoTone'; +import CircleTwoToneIcon from '@mui/icons-material/CircleTwoTone'; +import LDSCplot from "./ldsc"; + +export type LDSCDataPoint = { + snps: number, + study: string, + h2: number, + enrichment: number, + enrichment_p: number, + enrichment_std_error: number, + coefficient: number, + coefficient_zscore: number, + coefficient_std_error: number, + celltype: string +} + +export default function Phenotype() { + const [selectedStudy, setSelectedStudy] = useState("EBI_MultipleSclerosis_Sawcer2011") + const [pValCutoff, setPValCutoff] = useState(0.05) + const [stimView, setStimView] = useState<"S" | "U" | "B">("B") + + /** + * @todo type gql queries and return data https://www.apollographql.com/docs/react/development-testing/static-typing/ + */ + const ICRE_STUDIES = gql` + { + iCRELdrStudiesQuery + } + ` + + const { data: dataStudies, loading: loadingStudies, error: errorStudies } = useQuery(ICRE_STUDIES, { client }) + + + const LDSC_QUERY = gql` + query LDSC( + $study: [String] + ){ + iCRELdrQuery(study: $study) { + snps + study + h2 + enrichment + enrichment_p + enrichment_std_error + coefficient + coefficient_zscore + coefficient_std_error + celltype + } + } + ` + + const { data: dataLDSC, loading: loadingLDSC, error: errorLDSC } = useQuery( + LDSC_QUERY, + { + client, + variables: { study: selectedStudy }, + skip: !selectedStudy + } + ) + + const studies: string[] = dataStudies && dataStudies.iCRELdrStudiesQuery + + const rawData: LDSCDataPoint[] = dataLDSC && dataLDSC.iCRELdrQuery + + // In the slider, the "value" is used to place marks equally on track. The scale function below is used to pull out the true value that we want + const pValMarks = [ + { + value: 0, + scaledValue: 0.0001, + label: 0.0001 + }, + { + value: 1, + scaledValue: 0.001, + label: 0.001 + }, + { + value: 2, + scaledValue: 0.01, + label: 0.01 + }, + { + value: 3, + scaledValue: 0.05, + label: 0.05 + }, + { + value: 4, + scaledValue: 1, + label: 1 + }, + ] + + const scale = (value: number) => { + return pValMarks.find(x => x.value === value).scaledValue + }; + + return ( + + + + } + value={selectedStudy} + onChange={(_, value) => setSelectedStudy(value)} + /> + + P-value Cutoff + setPValCutoff(scale(value))} //Sets p value cutoff to scaled value + getAriaValueText={(value: number, index: number) => value.toString()} + step={null} + valueLabelDisplay="auto" + marks={pValMarks} + /> + + + Showing experiments in cells that are: + setStimView(value)} + > + } + label={ + + Unstimulated & Stimulated + + + + } + /> + } + label={ + + Unstimulated + + + } + /> + } + label={ + + Stimulated + + + } + /> + + + + + + {loadingLDSC ? + + : + rawData && + } + + + ) +} diff --git a/immuscreen/src/common/components/HomeAppBar.tsx b/immuscreen/src/common/components/HomeAppBar.tsx index f02c792..20307ae 100644 --- a/immuscreen/src/common/components/HomeAppBar.tsx +++ b/immuscreen/src/common/components/HomeAppBar.tsx @@ -21,7 +21,8 @@ const pageLinks = [ { pageName: "Gene", link: "/gene" }, { pageName: "SNP", link: "/snp" }, { pageName: "iCREs", link: "/icres" }, - { pageName: "Cell Lineage", link: "/celllineage"} + { pageName: "Cell Lineage", link: "/celllineage"}, + { pageName: "Phenotype", link: "/phenotype"} ], } ] diff --git a/immuscreen/src/common/utils.ts b/immuscreen/src/common/utils.ts index defea04..546c70e 100644 --- a/immuscreen/src/common/utils.ts +++ b/immuscreen/src/common/utils.ts @@ -6,6 +6,6 @@ export const client = new ApolloClient({ cache: new InMemoryCache(), }) -export const StyledTab = styled(Tab)(() => ({ +export const StyledTab = styled(Tab)({ textTransform: "none", -})) \ No newline at end of file +}) \ No newline at end of file