Skip to content

Commit ee64fab

Browse files
committed
Update MCC packages and add color palettes
1 parent 9267777 commit ee64fab

File tree

4 files changed

+64
-32
lines changed

4 files changed

+64
-32
lines changed

mcc/package-lock.json

Lines changed: 28 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mcc/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"react-dom": "^17.0.2",
2424
"react-tooltip": "^5.28.0",
2525
"tsv": "^0.2.0",
26-
"uuid": "^10.0.0"
26+
"uuid": "^10.0.0",
27+
"google-palette": "^1.1.1"
2728
},
2829
"devDependencies": {
2930
"@labkey/build": "^7.7.1",

mcc/src/client/GeneticsPlot/GeneticsPlot.tsx

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,34 @@ export function GeneticsPlot() {
108108
<>
109109
<ErrorBoundary>
110110
<div style={{paddingBottom: 20, maxWidth: 1000}}>
111-
Population structure analysis using PCA is a helpful way to summarize the genetic relationships among animals in the MCC. The PCA results can be thought of as a simple type of genetic clustering - animals with more similar principal component loadings are more genetically similar. A more precise description of the relationship between two animals is provided by kinship coefficients – these are quantitative measures of relatedness that can be calculated by comparing two genomes, and interpreted using genealogical language, such as ‘parent-child’, ‘uncle-nephew’, ‘first cousins’, etc.
112-
</div>
113-
<div style={{paddingBottom: 20, maxWidth: 1000}}>
114-
Whole genome sequencing was performed on each animal and genotypes were called with GATK haplotype caller. Principal components analysis was performed with GCTA (https://yanglab.westlake.edu.cn/software/gcta/#PCA) and kinship coefficients were calculated with KING (https://www.kingrelatedness.com/). Analyses were performed by Ric del Rosario (Broad Institute).
111+
Over the past few years, the MCC team has been working on extracting, sequencing and analyzing DNA from
112+
marmosets across the participating breeding centers. While we have deposited the raw sequence data for
113+
578 marmosets on NCBI's Sequence Read Archive (SRA), we are excited to report that the MCC portal now
114+
houses a call set with single nucleotide variants and short indels for over 800 individuals.
115+
<p/>
116+
The MCC genomic database is extensive, with each individual being genotype at millions of variants
117+
across the genome. One way to summarize a large dataset can be done using Principal Component Analysis
118+
(PCA). PCA is a technique used across disciplines (from astronomy to genomics) that reduces the
119+
information in a multi-dimensional dataset to (fewer) principal components (PC) that retain overall
120+
trends and patterns in the original data. Biologically, this could mean merging together two variants
121+
that are always inherited together into just one PC, making the data easier to analyze while maintaining
122+
its most important patterns. See the **Visualization with PCA** tab below.
123+
<p/>
124+
Although PCA is useful for broad-scale comparisons, it is not very useful when trying to distinguish
125+
whether two individuals are siblings or first-cousins, for instance. For that, we have better statistics
126+
that can describe the genetic relatedness between two individuals. We estimated genetic relatedness for
127+
all pairs of individuals for which we have whole-genome data, and made these available under the
128+
**Kinship** tab. There you will find the inferred relationships between pairs of individuals as well as
129+
the calculated kinship coefficient, which is a quantitative measure of genetic relatedness (see
130+
<a href="https://en.wikipedia.org/wiki/Coefficient_of_relationship#Kinship_coefficient">here</a> for more details).
131+
<p/>
132+
It is possible to explore the full MCC database of variants with a graphical interface by accessing the
133+
**Genome Browser** tab. There you can, for example, visualize all the variants present in your gene of
134+
interest by typing it's name in the search bar.
135+
<p/>
136+
The genetic analyses described here were performed by Karina Ray (ONPRC), Murillo Rodrigues (ONPRC), and
137+
Ric del Rosario (Broad Institute). Please contact us at <a href="mailto:mcc@ohsu.edu">mcc@ohsu.edu</a> with any
138+
questions.
115139
</div>
116140
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
117141
<Tabs value={value} onChange={handleChange} aria-label="basic tabs example">

mcc/src/client/GeneticsPlot/ScatterChart.tsx

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,14 @@ import {
55
LineElement,
66
Tooltip,
77
Legend
8-
} from 'chart.js';
8+
} from 'chart.js'
9+
import palette from 'google-palette'
910

1011
import { Scatter } from 'react-chartjs-2';
1112
import React, { useEffect, useRef, useState } from 'react';
1213

1314
ChartJS.register(LinearScale, PointElement, LineElement, Tooltip, Legend);
1415

15-
const CHART_COLORS = [
16-
'rgb(255, 99, 132)', //red
17-
'rgb(255, 159, 64)', //orange
18-
'rgb(255, 205, 86)', //yellow
19-
'rgb(75, 192, 192)', //green
20-
'rgb(54, 162, 235)', //blue
21-
'rgb(153, 102, 255)', //purple
22-
'rgb(201, 203, 207)' //grey
23-
]
24-
2516
export default function ScatterChart(props: {data: any}) {
2617
const { data } = props;
2718

@@ -39,11 +30,13 @@ export default function ScatterChart(props: {data: any}) {
3930
});
4031

4132
const dataByColony = []
42-
const uniqueColonies = [...new Set(collectedData.map(x => x.colony))]
33+
const uniqueColonies = [...new Set(collectedData.map(x => String(x.colony)))]
34+
const colors = palette(['Set1', 'sequential'], uniqueColonies.length);
35+
4336
uniqueColonies.forEach((colonyName : string, idx) => {
4437
dataByColony.push({
4538
label: colonyName,
46-
backgroundColor: CHART_COLORS[idx],
39+
backgroundColor: colors[idx],
4740
data: collectedData.filter(x => x.colony == colonyName)
4841
})
4942
})

0 commit comments

Comments
 (0)