Skip to content

Commit

Permalink
static cytobands...
Browse files Browse the repository at this point in the history
This flattens out the search page.
  • Loading branch information
mbaudis committed Aug 7, 2024
1 parent 0800f7e commit 28461f3
Show file tree
Hide file tree
Showing 11 changed files with 7,037 additions and 51 deletions.
864 changes: 864 additions & 0 deletions public/rsrc/cytoBandIdeo.json

Large diffs are not rendered by default.

4,313 changes: 4,313 additions & 0 deletions public/rsrc/cytoBandIdeo.yaml

Large diffs are not rendered by default.

911 changes: 911 additions & 0 deletions public/rsrc/cytoBandIdeoGrouped.json

Large diffs are not rendered by default.

914 changes: 914 additions & 0 deletions src/components/Cytobands.js

Large diffs are not rendered by default.

20 changes: 0 additions & 20 deletions src/components/SearchPage.js

This file was deleted.

2 changes: 0 additions & 2 deletions src/components/searchForm/AggregatorSearchPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export default function AggregatorSearchPanel({
parametersConfig,
requestTypeConfig,
requestTypeExamples,
cytoBands,
collapsed
}) {
const [query, setQuery] = useState(null) // actual valid query
Expand Down Expand Up @@ -70,7 +69,6 @@ export default function AggregatorSearchPanel({
}
>
<BiosamplesSearchForm
cytoBands={cytoBands}
requestTypeConfig={requestTypeConfig}
requestTypeExamples={requestTypeExamples}
parametersConfig={parametersConfig}
Expand Down
4 changes: 1 addition & 3 deletions src/components/searchForm/BiosamplesSearchForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export const BiosamplesSearchForm = withUrlQuery(
export default BiosamplesSearchForm

BiosamplesSearchForm.propTypes = {
cytoBands: PropTypes.object.isRequired,
isQuerying: PropTypes.bool.isRequired,
setSearchQuery: PropTypes.func.isRequired,
beaconQueryTypes: PropTypes.object.isRequired,
Expand Down Expand Up @@ -71,7 +70,6 @@ function useIsFilterlogicWarningVisible(watch) {
}

export function BeaconSearchForm({
cytoBands,
isQuerying,
setSearchQuery,
beaconQueryTypes,
Expand Down Expand Up @@ -499,7 +497,7 @@ export function BeaconSearchForm({
{...parameters.includeResultsetResponses}
/>
</div>
<ChromosomePreview watch={watch} cytoBands={cytoBands} />
<ChromosomePreview watch={watch} />
<div className="field mt-5">
<div className="control">
<button
Expand Down
2 changes: 0 additions & 2 deletions src/components/searchForm/BiosamplesSearchPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export default function BiosamplesSearchPanel({
parametersConfig,
beaconQueryTypes,
requestTypeExamples,
cytoBands,
collapsed
}) {
const [query, setQuery] = useState(null) // actual valid query
Expand Down Expand Up @@ -67,7 +66,6 @@ export default function BiosamplesSearchPanel({
}
>
<BiosamplesSearchForm
cytoBands={cytoBands}
parametersConfig={parametersConfig}
beaconQueryTypes={beaconQueryTypes}
requestTypeExamples={requestTypeExamples}
Expand Down
4 changes: 3 additions & 1 deletion src/components/searchForm/ChromosomePreview.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { Chromosome, refseq2chro } from "../Chromosome"
import { Cytobands } from "../Cytobands"
import React, { useRef } from "react"
import { useContainerDimensions } from "../../hooks/containerDimensions"

export default function ChromosomePreview({ watch, cytoBands }) {
export default function ChromosomePreview({ watch }) {
const componentRef = useRef()
const cytoBands = Cytobands()
const { width } = useContainerDimensions(componentRef)
const startRange = watch("start")
const endRange = watch("end")
Expand Down
27 changes: 18 additions & 9 deletions src/pages/search.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
import Page from "../components/SearchPage"
import { getCytoBands } from "../utils/genome"
export default Page
import React from "react"
import { Layout } from "../components/Layout"
import BiosamplesSearchPanel from "../components/searchForm/BiosamplesSearchPanel"
import parametersConfig from "../config/beaconSearchParameters.yaml"
import beaconQueryTypes from "../config/beaconQueryTypes.yaml"
import requestTypeExamples from "../config/beaconSearchExamples.yaml"

// This function gets called at build time on server-side.
export const getStaticProps = async () => ({
props: {
cytoBands: await getCytoBands()
}
})
export default function Page() {
return (
<Layout title="Search Samples" headline="">
<BiosamplesSearchPanel
parametersConfig={parametersConfig}
beaconQueryTypes={beaconQueryTypes}
requestTypeExamples={requestTypeExamples}
collapsed={false}
/>
</Layout>
)
}
27 changes: 13 additions & 14 deletions src/styles/components/Chromosome.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,27 @@
}

.stain--gpos100 {
fill: linear-gradient(to bottom, rgb(39,39,39), rgb(0,0,0) 70%, rgb(39,39,39));
/* fill: hsl(var(--hue), var(--sat), 15%);*/
fill: hsl(var(--hue), var(--sat), 15%);
}
.stain--gpos75 {
/* fill: hsl(var(--hue), var(--sat), 30%);*/
fill: linear-gradient(to bottom, rgb(255,87,87), rgb(39,39,39) 70%, rgb(87,87,87));
fill: hsl(var(--hue), var(--sat), 30%);
/* fill: linear-gradient(to bottom, rgb(255,87,87), rgb(39,39,39) 70%, rgb(87,87,87));*/
}
.stain--gpos66 {
fill: linear-gradient(to bottom, rgb(87,87,87), rgb(39,39,39) 70%, rgb(87,87,87));
/* fill: hsl(var(--hue), var(--sat), 40%);*/
/* fill: linear-gradient(to bottom, rgb(87,87,87), rgb(39,39,39) 70%, rgb(87,87,87));*/
fill: hsl(var(--hue), var(--sat), 40%);
}
.stain--gpos50 {
/* fill: hsl(var(--hue), var(--sat), 45%);*/
fill: linear-gradient(to bottom, rgb(196,196,196), rgb(111,111,111) 70%, rgb(196,196,196));
fill: hsl(var(--hue), var(--sat), 45%);
/* fill: linear-gradient(to bottom, rgb(196,196,196), rgb(111,111,111) 70%, rgb(196,196,196));*/
}
.stain--gpos33 {
/* fill: hsl(var(--hue), var(--sat), 50%);*/
fill: linear-gradient(to bottom, rgb(201,201,201), rgb(125,125,125) 70%, rgb(201,201,201));
fill: hsl(var(--hue), var(--sat), 50%);
/* fill: linear-gradient(to bottom, rgb(201,201,201), rgb(125,125,125) 70%, rgb(201,201,201));*/
}
.stain--gpos25 {
/* fill: hsl(var(--hue), var(--sat), 38%);*/
fill: linear-gradient(to bottom, rgb(223,223,223), rgb(196,196,196) 70%, rgb(223,223,223));
fill: hsl(var(--hue), var(--sat), 38%);
/* fill: linear-gradient(to bottom, rgb(223,223,223), rgb(196,196,196) 70%, rgb(223,223,223));*/
}
.stain--gvar {
fill: hsl(var(--hue), var(--sat), 90%);
Expand All @@ -42,10 +41,10 @@
}

svg .selection {
/* fill: #ff9899;
fill: #ff9899;
fill-opacity: 0.2;
stroke: #ff9899;
*/}
}
svg .selectionEnd {
fill: #3298dc;
fill-opacity: 0.2;
Expand Down

0 comments on commit 28461f3

Please sign in to comment.