@@ -5,21 +5,13 @@ import ScatterChart from './ScatterChart';
55import { Box , Tab , Tabs } from '@mui/material' ;
66import KinshipTable from './KinshipTable' ;
77import { ErrorBoundary } from '../components/ErrorBoundary' ;
8+ import SequenceDataTable from './SequenceDataTable' ;
89
910
10- function GenomeBrowser ( props : { jbrowseId : any } ) {
11- const { jbrowseId } = props ;
12-
13- return (
14- < div >
15- < a href = { ActionURL . buildURL ( 'jbrowse' , 'jbrowse' , null , { session : jbrowseId } ) } > Click here to view Marmoset SNP data in the genome browser</ a >
16- </ div >
17- ) ;
18- }
19-
2011export function GeneticsPlot ( ) {
2112 const [ pcaData , setPcaData ] = useState ( [ ] ) ;
2213 const [ kinshipData , setKinshipData ] = useState ( [ ] ) ;
14+ const [ sequenceData , setSequenceData ] = useState ( [ ] ) ;
2315 const [ jbrowseId , setJBrowseId ] = useState ( null ) ;
2416 const [ value , setValue ] = React . useState ( 0 ) ;
2517
@@ -83,6 +75,29 @@ export function GeneticsPlot() {
8375 } ,
8476 scope : this
8577 } ) ;
78+
79+ Query . selectRows ( {
80+ containerPath : containerPath ,
81+ schemaName : 'study' ,
82+ queryName : 'genomicDatasets' ,
83+ columns : 'Id,datatype,sra_accession,total_reads,objectid' ,
84+ success : function ( results ) {
85+ setSequenceData ( results . rows . map ( ( row ) => {
86+ return ( {
87+ id : row . objectid ,
88+ Id : row . Id ,
89+ datatype : row . datatype ,
90+ sra_accession : row . sra_accession ,
91+ total_reads : row . total_reads
92+ } )
93+ } ) )
94+ } ,
95+ failure : function ( response ) {
96+ alert ( 'There was an error loading data' ) ;
97+ console . log ( response ) ;
98+ } ,
99+ scope : this
100+ } ) ;
86101 } , [ ] /* only run the effect on mount */ ) ;
87102
88103 if ( ! containerPath ) {
@@ -113,35 +128,19 @@ export function GeneticsPlot() {
113128 578 marmosets on NCBI's Sequence Read Archive (SRA), we are excited to report that the MCC portal now
114129 houses a call set with single nucleotide variants and short indels for over 800 individuals.
115130 < 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
130- (see < 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.
131+ In addition to the information in the tabs below, you can use the MCC genome browser to view know variants and search by gene.
132+ < a href = { ActionURL . buildURL ( 'jbrowse' , 'jbrowse' , null , { session : jbrowseId } ) } > Click here to view Marmoset SNP data in the genome browser</ a >
135133 < p />
136134 The genetic analyses described here were performed by Karina Ray (ONPRC), Murillo Rodrigues (ONPRC), and
137135 Ric del Rosario (Broad Institute). Please contact us at < a href = "mailto:mcc@ohsu.edu" > mcc@ohsu.edu</ a > with any
138136 questions.
139137 </ div >
138+
140139 < Box sx = { { borderBottom : 1 , borderColor : 'divider' } } >
141140 < Tabs value = { value } onChange = { handleChange } aria-label = "basic tabs example" >
142141 < Tab label = "Population Genetic Diversity" { ...a11yProps ( 0 ) } />
143142 < Tab label = "Kinship" { ...a11yProps ( 1 ) } />
144- < Tab label = "Genetic Variants " { ...a11yProps ( 2 ) } hidden = { jbrowseId == null } />
143+ < Tab label = "Sequence Datasets " { ...a11yProps ( 2 ) } />
145144 </ Tabs >
146145 </ Box >
147146 < div className = "row" >
@@ -150,7 +149,7 @@ export function GeneticsPlot() {
150149 < div className = "panel-body" >
151150 { value === 0 && < ScatterChart data = { pcaData } /> }
152151 { value === 1 && < KinshipTable data = { kinshipData } /> }
153- { value === 2 && < GenomeBrowser jbrowseId = { jbrowseId } /> }
152+ { value === 2 && < SequenceDataTable data = { sequenceData } /> }
154153 </ div >
155154 </ div >
156155 </ div >
0 commit comments