diff --git a/src/components/SVGloaders.js b/src/components/SVGloaders.js index cd92e1e8..04dda1c0 100644 --- a/src/components/SVGloaders.js +++ b/src/components/SVGloaders.js @@ -25,7 +25,7 @@ export default function SVGloader({ apiReply }) { ) } -export function SubsetHistogram({ id, filter, datasetIds, plotRegionLabels, plotGeneSymbols, plotCytoregionLabels, title, description, size: givenSize }) { +export function SubsetHistogram({ id, datasetIds, plotRegionLabels, plotGeneSymbols, plotCytoregionLabels, title, description, size: givenSize }) { const componentRef = useRef() const { width } = useContainerDimensions(componentRef) const size = givenSize || width @@ -35,7 +35,6 @@ export function SubsetHistogram({ id, filter, datasetIds, plotRegionLabels, plot apiReply={useSubsethistogram({ datasetIds, id, - filter, plotRegionLabels, plotGeneSymbols, plotCytoregionLabels, @@ -74,7 +73,7 @@ export function SubsetHistogram({ id, filter, datasetIds, plotRegionLabels, plot export function BiosamplePlot({ biosid, datasetIds, plotRegionLabels, plotChros}) { const componentRef = useRef() const { width } = useContainerDimensions(componentRef) - const url = `${SITE_DEFAULTS.API_PATH}beacon/biosamples/${biosid}/?datasetIds=${datasetIds}&output=samplesplot&plot_width=${width}&plotRegionLabels=${plotRegionLabels}&plotChros=${plotChros}&forceEmptyPlot=true` + const url = `${SITE_DEFAULTS.API_PATH}services/sampleplots/${biosid}?plotType=samplesplot&datasetIds=${datasetIds}&plot_width=${width}&plotRegionLabels=${plotRegionLabels}&plotChros=${plotChros}&forceEmptyPlot=true` // width > 0 to make sure the component is mounted and avoid double fetch const dataEffect = useExtendedSWR(width > 0 && url, svgFetcher) return ( @@ -87,7 +86,7 @@ export function BiosamplePlot({ biosid, datasetIds, plotRegionLabels, plotChros} export function CallsetHistogram({ csid, datasetIds }) { const componentRef = useRef() const { width } = useContainerDimensions(componentRef) - const url = `${SITE_DEFAULTS.API_PATH}beacon/biosamples/?analysisIds=${csid}&datasetIds=${datasetIds}&output=samplesplot&plot_width=${width}` + const url = `${SITE_DEFAULTS.API_PATH}services/sampleplots/?analysisIds=${csid}&datasetIds=${datasetIds}&plot_width=${width}` // width > 0 to make sure the component is mounted and avoid double fetch const dataEffect = useExtendedSWR(width > 0 && url, svgFetcher) return ( @@ -99,6 +98,5 @@ export function CallsetHistogram({ csid, datasetIds }) { SubsetHistogram.propTypes = { id: PropTypes.string.isRequired, - filter: PropTypes.string, background: PropTypes.bool } diff --git a/src/hooks/api.js b/src/hooks/api.js index 007e2314..9f98565a 100644 --- a/src/hooks/api.js +++ b/src/hooks/api.js @@ -273,20 +273,6 @@ export function useProgenetixRefPublicationList({ geoCity, geodistanceKm }) { return useProgenetixApi(url) } -export const ontologymapsBaseUrl = `${SITE_DEFAULTS.API_PATH}services/ontologymaps?` - -export function ontologymapsUrl({ filters, filterPrecision }) { - let params = new URLSearchParams({ filters: filters }) - if (filterPrecision) { - params.append("filterPrecision", filterPrecision) - } - return `${ontologymapsBaseUrl}${params.toString()}` -} - -export function ontologymapsPrefUrl({ prefixes, filters }) { - return `${ontologymapsBaseUrl}filters=${prefixes},${filters}&filterPrecision=start` -} - export function useDataItemDelivery(id, entity, datasetIds) { return useProgenetixApi(getDataItemUrl(id, entity, datasetIds)) } @@ -303,17 +289,11 @@ export function getServiceItemUrl(id, collection, datasetIds) { return `${SITE_DEFAULTS.API_PATH}services/${collection}?id=${id}&datasetIds=${datasetIds}` } -export function getDataItemPageUrl(id, entity, datasetIds) { - return `${SITE_DEFAULTS.API_PATH}${entity}/?datasetIds=${datasetIds}&id=${id}` -} - export function NoResultsHelp(id, entity) { - const url = getDataItemPageUrl(id, entity, SITE_DEFAULTS.DATASETID) return (
- This page will only show content if called with a specific biosample ID - which already exists in Progenetix {" "} - {entity} database, e.g. {url}. + This page will only show content if called with an existing {entity} ID;{" "} + is not valid.
) } @@ -326,15 +306,14 @@ export function useCytomapper(querytext) { return useProgenetixApi(url) } -export function useSubsethistogram({ datasetIds, id, filter, plotRegionLabels, plotGeneSymbols, plotCytoregionLabels, size, chr2plot }) { +export function useSubsethistogram({ datasetIds, id, plotRegionLabels, plotGeneSymbols, plotCytoregionLabels, size, plotChros }) { const svgbaseurl = subsetHistoBaseLink(id, datasetIds) const params = [] - filter && params.push(["filter", filter]) plotRegionLabels && params.push(["plotRegionLabels", plotRegionLabels]) plotGeneSymbols && params.push(["plotGeneSymbols", plotGeneSymbols]) plotCytoregionLabels && params.push(["plotCytoregionLabels", plotCytoregionLabels]) size && params.push(["plotWidth", size]) - chr2plot && params.push(["chr2plot", chr2plot]) + plotChros && params.push(["plotChros", plotChros]) const searchQuery = new URLSearchParams(params).toString() return useExtendedSWR(size > 0 && `${svgbaseurl}&${searchQuery}`, svgFetcher) } @@ -390,7 +369,7 @@ export function useGeneSymbol({ geneId }) { } export function subsetHistoBaseLink(id, datasetIds) { - return `${SITE_DEFAULTS.API_PATH}services/intervalFrequencies/?datasetIds=${datasetIds}&id=${id}&output=histoplot` + return `${SITE_DEFAULTS.API_PATH}services/collationplots/?datasetIds=${datasetIds}&id=${id}` } // the targets are resolved by `bycon` (bycon/services/ids.py) diff --git a/src/modules/details-pages/variantPage.js b/src/modules/details-pages/variantPage.js index 82e7add0..b9efe1ac 100644 --- a/src/modules/details-pages/variantPage.js +++ b/src/modules/details-pages/variantPage.js @@ -14,78 +14,6 @@ import React from "react" const entity = "variants" const exampleId = "5bab576a727983b2e00b8d32" -// import '@fontsource/roboto' -// import { -// createViewState, -// JBrowseLinearGenomeView, -// } from '@jbrowse/react-linear-genome-view' -// -// const defaultSession = { -// name: 'My session', -// view: { -// id: 'linearGenomeView', -// type: 'LinearGenomeView', -// tracks: [ -// { -// type: 'ReferenceSequenceTrack', -// configuration: 'GRCh38-ReferenceSequenceTrack', -// displays: [ -// { -// type: 'LinearReferenceSequenceDisplay', -// configuration: -// 'GRCh38-ReferenceSequenceTrack-LinearReferenceSequenceDisplay', -// }, -// ], -// }, -// ], -// }, -// } -// -// const assembly = { -// name: 'GRCh38', -// sequence: { -// type: 'ReferenceSequenceTrack', -// trackId: 'GRCh38-ReferenceSequenceTrack', -// adapter: { -// type: 'BgzipFastaAdapter', -// fastaLocation: { -// uri: 'https://s3.amazonaws.com/jbrowse.org/genomes/GRCh38/fasta/GRCh38.fa.gz', -// locationType: 'UriLocation', -// }, -// faiLocation: { -// uri: 'https://s3.amazonaws.com/jbrowse.org/genomes/GRCh38/fasta/GRCh38.fa.gz.fai', -// locationType: 'UriLocation', -// }, -// gziLocation: { -// uri: 'https://s3.amazonaws.com/jbrowse.org/genomes/GRCh38/fasta/GRCh38.fa.gz.gzi', -// locationType: 'UriLocation', -// }, -// }, -// }, -// aliases: ['hg38'], -// refNameAliases: { -// adapter: { -// type: 'RefNameAliasAdapter', -// location: { -// uri: 'https://s3.amazonaws.com/jbrowse.org/genomes/GRCh38/hg38_aliases.txt', -// locationType: 'UriLocation', -// }, -// }, -// }, -// } -// function View() { -// const state = createViewState({ -// assembly, -// // tracks, -// location: '10:29,838,737..29,838,819', -// // location: '1:11,127,738-11,127,739', -// defaultSession, -// }) -// -// return ; -// } - - const VariantDetailsPage = withUrlQuery(({ urlQuery }) => { var { id } = urlQuery var datasetIds = SITE_DEFAULTS.DATASETID diff --git a/src/modules/service-pages/dataVisualizationPage.js b/src/modules/service-pages/dataVisualizationPage.js index bd7dc3cb..ad28cade 100644 --- a/src/modules/service-pages/dataVisualizationPage.js +++ b/src/modules/service-pages/dataVisualizationPage.js @@ -135,7 +135,7 @@ function DataVisualizationForm({ isQuerying, sampleCount, onSubmit }) {