Skip to content

Commit

Permalink
examples files, directory cleanup ...
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaudis committed Oct 14, 2023
1 parent c85c6c0 commit 7d8145f
Show file tree
Hide file tree
Showing 39 changed files with 650 additions and 654 deletions.
8 changes: 5 additions & 3 deletions src/components/searchForm/AggregatorSearchPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ import PropTypes from "prop-types"
// import cn from "classnames"

AggregatorSearchPanel.propTypes = {
requestTypesConfig: PropTypes.object.isRequired,
requestTypeConfig: PropTypes.object.isRequired,
parametersConfig: PropTypes.object.isRequired,
collapsed: false
}

export default function AggregatorSearchPanel({
requestTypesConfig,
parametersConfig,
requestTypeConfig,
requestTypeExamples,
cytoBands,
collapsed
}) {
Expand Down Expand Up @@ -70,7 +71,8 @@ export default function AggregatorSearchPanel({
>
<BiosamplesSearchForm
cytoBands={cytoBands}
requestTypesConfig={requestTypesConfig}
requestTypeConfig={requestTypeConfig}
requestTypeExamples={requestTypeExamples}
parametersConfig={parametersConfig}
isQuerying={isLoading}
setSearchQuery={onValidFormQuery}
Expand Down
33 changes: 7 additions & 26 deletions src/components/searchForm/BiosamplesSearchForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ BiosamplesSearchForm.propTypes = {
cytoBands: PropTypes.object.isRequired,
isQuerying: PropTypes.bool.isRequired,
setSearchQuery: PropTypes.func.isRequired,
requestTypesConfig: PropTypes.object.isRequired,
requestTypeConfig: PropTypes.object.isRequired,
requestTypeExamples: PropTypes.object.isRequired,
parametersConfig: PropTypes.object.isRequired
}

Expand Down Expand Up @@ -73,15 +74,14 @@ export function Form({
cytoBands,
isQuerying,
setSearchQuery,
requestTypesConfig,
requestTypeConfig,
requestTypeExamples,
parametersConfig,
urlQuery,
setUrlQuery
}) {
// const autoExecuteSearch = urlQuery.executeSearch === "true"

const requestTypeId = Object.entries(requestTypesConfig)[0][0]
const requestTypeConfig = requestTypesConfig[requestTypeId]
const [example, setExample] = useState(null)
let parameters = useMemo(
() =>
Expand Down Expand Up @@ -192,6 +192,7 @@ parameters = merge({}, parameters, {
setUrlQuery
)}
requestTypeConfig={requestTypeConfig}
requestTypeExamples={requestTypeExamples}
/>
<FormUtilitiesButtons
onCytoBandClick={onCytoBandClick}
Expand Down Expand Up @@ -451,10 +452,10 @@ parameters = merge({}, parameters, {
)
}

function ExamplesButtons({ requestTypeConfig, onExampleClicked }) {
function ExamplesButtons({ requestTypeExamples, onExampleClicked }) {
return (
<div>
{Object.entries(requestTypeConfig?.examples || []).map(([id, value]) => (
{Object.entries(requestTypeExamples || []).map(([id, value]) => (
<button
key={id}
className="button is-light"
Expand Down Expand Up @@ -604,23 +605,3 @@ function FilterLogicWarning({ isVisible }) {
)
}

// function ShowMoreParameters() {

// const [isOpened, setIsOpened] = useState(false);

// function toggle() {
// setIsOpened(wasOpened => !wasOpened);
// }

// return (
// <>
// <h5><span onClick={toggle}>More Parameters (click to show/hide)</span></h5>
// {isOpened && (
// <div>
// <pre className="prettyprint">{ JSON.stringify(data, null, 2) }</pre>
// </div>
// )}
// </>
// )
// }

11 changes: 5 additions & 6 deletions src/components/searchForm/BiosamplesSearchPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ import PropTypes from "prop-types"
// import cn from "classnames"

BiosamplesSearchPanel.propTypes = {
requestTypesConfig: PropTypes.object.isRequired,
requestTypeConfig: PropTypes.object.isRequired,
parametersConfig: PropTypes.object.isRequired,
collapsed: false
}

export default function BiosamplesSearchPanel({
requestTypesConfig,
requestTypeConfig,
parametersConfig,
requestTypeExamples,
cytoBands,
collapsed
}) {
Expand All @@ -40,9 +41,6 @@ export default function BiosamplesSearchPanel({
setQuery(formValues)
}

// button className="button ml-3"
// className="icon has-text-info"

return (
<>
<Panel
Expand Down Expand Up @@ -70,7 +68,8 @@ export default function BiosamplesSearchPanel({
>
<BiosamplesSearchForm
cytoBands={cytoBands}
requestTypesConfig={requestTypesConfig}
requestTypeConfig={requestTypeConfig}
requestTypeExamples={requestTypeExamples}
parametersConfig={parametersConfig}
isQuerying={isLoading}
setSearchQuery={onValidFormQuery}
Expand Down
63 changes: 63 additions & 0 deletions src/config/DIPG_searchExamples.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
- label: "SNV Example"
note: "Example for specific EIF4A1 mutation"
description: |
This example shows a core Beacon query, against a specific
mutation in the EIF4A1 gene, in the DIPG childhood brain tumor dataset.
parameters:
referenceName:
defaultValue: "refseq:NC_000017.11"
start:
defaultValue: 7577121
alternateBases:
defaultValue: "A"
referenceBases:
defaultValue: "G"
- label: "SNV Range Example"
note: "Example for EIF4A1 transcript region matches (precise variants)"
description: >
As in the standard SNV query, this example shows a Beacon query against mutations in the EIF4A1 gene in the DIPG childhood brain tumor dataset. However, this range + wildcard query will return any variant with alternate bases (indicated through "N").
Since parameters will be interpreted using an "AND" paradigm, either <i>Alternate Bases</i> OR <i>Variant Type</i> should be specified. The exact variants which were being found can be retrieved through the variant handover [H—>O] link.
parameters:
referenceName:
defaultValue: "refseq:NC_000017.11"
start:
defaultValue: 7572826
end:
defaultValue: 7579005
variantType:
defaultValue: ""
alternateBases:
defaultValue: ""
referenceBases:
defaultValue: ""
- label: "CDKN2A Deletion Example"
note: "Example for focal CDKN2A deletion matches."
description: |
This example shows the query for CNV deletion variants overlapping the CDKN2A gene's coding region with at least a single base, but limited to "highly focal" hits (here i.e. <= ~1Mbp in size) in Glioblastoma samples. The query can be modified e.g. through changing the position parameters or diagnosis.
parameters:
referenceName:
defaultValue: "refseq:NC_000009.12"
start:
defaultValue: "21500001-21975098"
end:
defaultValue: "21967753-22500000"
variantType:
defaultValue: "EFO:0030067"
bioontology:
defaultValue: ["NCIT:C3058"]
- label: "MYC Duplication"
note: "Example for focal MYC Duplications."
description: |
The example parameters will select samples with a continuous, focal duplication of the complete MYC coding region. The serarch will be limited to neoplastic samples (EFO:0009656).
parameters:
referenceName:
defaultValue: "refseq:NC_000008.11"
start:
defaultValue: "124000000-127736593"
end:
defaultValue: "127740957-130000000"
variantType:
defaultValue: "EFO:0030070"
materialtype:
defaultValue: "EFO:0009656"
18 changes: 18 additions & 0 deletions src/config/DIPG_searchParameters.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
note: ""
label: ""
description: ""
parameters:
datasetIds:
defaultValue: ["progenetix"]
isHidden: true
cohorts:
defaultValue: ["pgx:cohort-DIPG"]
isHidden: true
assemblyId:
defaultValue: "GRCh38"
isHidden: true
end:
isHidden: true
variantType:
isHidden: true
33 changes: 33 additions & 0 deletions src/config/TCGA_searchExamples.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
- label: "CDKN2A Deletion Example"
note: "Example for focal CDKN2A deletion matches."
description: |
This example shows the query for CNV deletion variants overlapping the
CDKN2A gene's coding region with at least a single base, but limited
to "highly focal" hits (here i.e. <= ~1Mbp in size) in Glioblastoma samples. The query can be modified e.g. through changing the position parameters or diagnosis.
parameters:
referenceName:
defaultValue: "refseq:NC_000009.12"
start:
defaultValue: "21500001-21975098"
end:
defaultValue: "21967753-22500000"
variantType:
defaultValue: "EFO:0030067"
bioontology:
defaultValue: ["NCIT:C3058"]
- label: "MYC Duplication"
note: "Example for focal MYC Duplications."
description: |
The example parameters will select samples with a continuous, focal duplication of the complete MYC coding region. The serarch will be limited to neoplastic samples (EFO:0009656).
parameters:
referenceName:
defaultValue: "refseq:NC_000008.11"
start:
defaultValue: "124000000-127736593"
end:
defaultValue: "127740957-130000000"
variantType:
defaultValue: "EFO:0030070"
materialtype:
defaultValue: "EFO:0009656"
33 changes: 33 additions & 0 deletions src/config/TCGA_searchParameters.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
note: ""
label: ""
description: ""
parameters:
datasetIds:
defaultValue: ["progenetix"]
isHidden: true
cohorts:
defaultValue: ["pgx:cohort-TCGA"]
# isHidden: true
assemblyId:
isHidden: true
referenceName:
placeholder: "9"
start:
placeholder: "19000001-21975098"
end:
placeholder: "21967753-24000000"
variantType:
placeholder: "EFO:0030067"
alternateBases:
placeholder: ""
isHidden: true
referenceBases:
placeholder: ""
isHidden: true
accessid:
isHidden: true
sex:
placeholder: ""
materialtype:
placeholder: "EFO:0009656" #"EFO:0009656"
69 changes: 69 additions & 0 deletions src/config/arraymap_searchExamples.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
- label: "CDKN2A Deletion Example"
note: "Example for focal CDKN2A deletion matches."
description: |
This example shows the query for CNV deletion variants overlapping the
CDKN2A gene's coding region with at least a single base, but limited
to "highly focal" hits (here i.e. <= ~1Mbp in size). The query can be modified e.g. through changing the position parameters or diagnosis.
parameters:
referenceName:
defaultValue: "refseq:NC_000009.12"
start:
defaultValue: "21500001-21975098"
end:
defaultValue: "21967753-22500000"
variantType:
defaultValue: "EFO:0030067"
bioontology:
defaultValue: ["NCIT:C3058"]
- label: "MYC Duplication"
note: "Example for focal MYC Duplications."
description: |
The example parameters will select samples with a continuous, focal duplication
of the complete MYC coding region. The serarch will be limited to "pgx:icdom-80463"
(i.e. ICD-O 3 8046/3, Non-small cell carcinoma).
parameters:
referenceName:
defaultValue: "refseq:NC_000008.11"
start:
defaultValue: "124000000-127736593"
end:
defaultValue: "127740957-130000000"
variantType:
defaultValue: "EFO:0030070"
bioontology:
defaultValue: ["pgx:icdom-80463"]
- label: "TP53 Del. in Cell Lines"
note: "Example for TP53 deletion"
description: >-
Query example for an "any overlap", focal deletion in TP53 where the
search will be limited to cell lines, searched with limit to the "EFO:0030035"
material code.
parameters:
referenceName:
defaultValue: "refseq:NC_000017.11"
start:
defaultValue: "5000000-7676592"
end:
defaultValue: "7669608-10000000"
variantType:
defaultValue: "EFO:0030067"
freeFilters:
defaultValue: "EFO:0030035"
- label: "K-562 Cell Line"
note: "Instances of K-562 and daughter cell lines, searched by Cellosaurus id"
description: |
The query retrieves all instances of K-562 and derived cell lines
using the "cellosaurus:CVCL_0004" identifier. This is an example for a
pure "non-variant" query.
parameters:
referenceName:
defaultValue: ""
start:
defaultValue: ""
end:
defaultValue: ""
variantType:
defaultValue: ""
referenceid:
defaultValue: ["cellosaurus:CVCL_0004"]
33 changes: 33 additions & 0 deletions src/config/arraymap_searchParameters.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
note: ""
label: ""
description: ""
parameters:
datasetIds:
defaultValue: ["progenetix"]
isHidden: true
cohorts:
defaultValue: ["pgx:cohort-arraymap"]
isHidden: true
assemblyId:
isHidden: true
referenceName:
placeholder: "9"
start:
placeholder: "19000001-21975098"
end:
placeholder: "21967753-24000000"
variantType:
placeholder: "EFO:0030067"
alternateBases:
placeholder: "N"
isHidden: true
referenceBases:
placeholder: ""
isHidden: true
accessid:
isHidden: true
sex:
placeholder: ""
materialtype:
placeholder: "" #"EFO:0009656"
Loading

0 comments on commit 7d8145f

Please sign in to comment.