-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
multiple updates, esp. to cohorts & subsets pages
... also fix for variant identifier referencing
- Loading branch information
Showing
33 changed files
with
281 additions
and
322 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
import { | ||
SITE_DEFAULTS, | ||
useServiceItemDelivery, | ||
sampleSearchPageFiltersLink, | ||
NoResultsHelp | ||
} from "../hooks/api" | ||
import { Loader } from "./Loader" | ||
import { SubsetHistogram } from "./SVGloaders" | ||
// import { ShowJSON } from "./RawData" | ||
import { ExternalLink, InternalLink } from "./helpersShared/linkHelpers" | ||
|
||
const service = "collations" | ||
|
||
export function SubsetLoader({ id, datasetIds }) { | ||
const { data, error, isLoading } = useServiceItemDelivery( | ||
id, | ||
service, | ||
datasetIds | ||
) | ||
return ( | ||
<Loader isLoading={isLoading} hasError={error} background> | ||
{data && ( | ||
<SubsetResponse response={data} id={id} datasetIds={datasetIds} /> | ||
)} | ||
</Loader> | ||
) | ||
} | ||
|
||
function SubsetResponse({ response, datasetIds }) { | ||
if (!response.response.results[0]) { | ||
return NoResultsHelp("subsetdetails") | ||
} | ||
return <Subset subset={response.response.results[0]} datasetIds={datasetIds} /> | ||
} | ||
|
||
function Subset({ subset, datasetIds }) { | ||
|
||
const filters = subset.id | ||
const sampleFilterScope = "allTermsFilters" | ||
|
||
return ( | ||
<section className="content"> | ||
<h2> | ||
{subset.label} ({subset.id}) | ||
</h2> | ||
|
||
{subset.type && ( | ||
<> | ||
<h5>Subset Type</h5> | ||
<ul> | ||
<li> | ||
{subset.type}{" "} | ||
<ExternalLink | ||
href={subset.reference} | ||
label={subset.id} | ||
/> | ||
</li> | ||
</ul> | ||
</> | ||
)} | ||
|
||
<h5>Sample Counts</h5> | ||
<ul> | ||
<li>{subset.count} samples</li> | ||
<li>{subset.codeMatches} direct <i>{subset.id}</i> code matches</li> | ||
{subset.cnvAnalyses && ( | ||
<li>{subset.cnvAnalyses} CNV analyses</li> | ||
)} | ||
{subset.frequencymapCnvAnalyses && ( | ||
<li> | ||
{subset.frequencymapCnvAnalyses} {" CNV analyses used in frequency calculations"} | ||
</li> | ||
)} | ||
</ul> | ||
<h5>CNV Histogram</h5> | ||
<div className="mb-3"> | ||
<SubsetHistogram | ||
id={subset.id} | ||
datasetIds={datasetIds} | ||
loaderProps={{background: true, colored: true}} | ||
/> | ||
</div> | ||
|
||
<h5> | ||
<InternalLink | ||
href={`${SITE_DEFAULTS.API_PATH}services/intervalFrequencies/${subset.id}/?output=pgxfreq`} | ||
label="Download CNV frequencies" | ||
/> | ||
</h5> | ||
<p> | ||
Download CNV frequency data for genomic 1Mb bins. | ||
</p> | ||
|
||
<h5> | ||
<InternalLink | ||
href={ sampleSearchPageFiltersLink({datasetIds, sampleFilterScope, filters}) } | ||
label={`Search for ${subset.id} Samples`} | ||
rel="noreferrer" | ||
target="_blank" | ||
/> | ||
</h5> | ||
<p> | ||
Select samples through the search form, e.g. by querying for specific | ||
genomic variants or phenotypes. | ||
</p> | ||
|
||
{/*<ShowJSON data={subset} />*/} | ||
|
||
</section> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import React from "react" | ||
import { Layout } from "../../components/Layout" | ||
import { SubsetLoader } from "../../components/SubsetLoader" | ||
import Panel from "../../components/Panel" | ||
import SubsetsHierarchyLoader from "../../components/SubsetsHierarchyLoader" | ||
|
||
const datasetIds = "progenetix" | ||
const subsetId = "pgx:cohort-TCGAcancers" | ||
|
||
export default function arraymap_dataPage() { | ||
return ( | ||
<Layout title="TCGA Cancer Subsets" headline=""> | ||
<Panel> | ||
<SubsetLoader | ||
id={subsetId} | ||
datasetIds={datasetIds} | ||
/> | ||
</Panel> | ||
<Panel> | ||
<ThisSubset /> | ||
</Panel> | ||
<Panel heading="TCGA Cancer Studies"> | ||
<SubsetsHierarchyLoader collationTypes="TCGAproject" datasetIds="progenetix" /> | ||
</Panel> | ||
</Layout> | ||
) | ||
} | ||
|
||
function ThisSubset() { | ||
return ( | ||
<> | ||
<div style={{ display: "flex" }}> | ||
This page represents the TCGA subset of the Progenetix | ||
collection, based on 22142 samples (tumor and reeferences) from The | ||
Cancer Genome Atlas project. The results are based upon data generated | ||
by the TCGA Research Network. Disease-specific subsets of TCGA data (aka. projects) can be | ||
accessed below. | ||
<img | ||
src={"/img/tcga.png"} | ||
style={{ | ||
float: "right", | ||
width: "200px", | ||
border: "0px", | ||
margin: "-20px -20px 0px 0px" | ||
}} | ||
/> | ||
</div> | ||
</> | ||
) | ||
} |
Oops, something went wrong.