Skip to content

Commit

Permalink
chr2plot -> plotChros
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaudis committed Oct 19, 2023
1 parent 4e4827c commit 40a6119
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion docs/file-formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ An excerpt of the segment file would look like below:
#meta=>biosample_count=78
#plotpars=>title="Testing Custom Plot Parameters"
#plotpars=>subtitle="Some Chromosomes, Colors etc."
#plotpars=>chr2plot="3,5,7,8,11,13,16"
#plotpars=>plotChros="3,5,7,8,11,13,16"
#plotpars=>color_var_dup_hex=#EE4500;color_var_del_hex=#09F911
#plotpars=>size_title_left_px=300
#plotpars=>size_text_title_left_px=10
Expand Down
2 changes: 1 addition & 1 deletion docs/news/2023-03-09-plotting-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ information (though you still will find examples e.g. on the [`use-cases`](/use-
!!! warn "Plot parameters lost the `-` prefix"

We have removed the `-` prefix from the plot parameter names; e.g. the previous
`-chr2plot` selector is now simply `chr2plot`.
`-plotChros` selector is now simply `plotChros`.

<!--more-->

Expand Down
18 changes: 9 additions & 9 deletions docs/plotting.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,21 @@ Please **use option 1** if accessing complete entities (i.e. only using a single
#### Examples

* customized plot for glioblastoma CNV frequencies, limited to chromosomes 7, 9 and 10
- `progenetix.org/services/collationPlots/?id=NCIT:C3058&chr2plot=7,9,10&colorschema=redgreen&size_plotimage_w_px=640`
- `progenetix.org/services/collationPlots/?id=NCIT:C3058&plotChros=7,9,10&colorschema=redgreen&size_plotimage_w_px=640`

![](http://progenetix.org/services/collationPlots/?id=NCIT:C3058&chr2plot=7,9,10&colorschema=redgreen&size_plotimage_w_px=640)
![](http://progenetix.org/services/collationPlots/?id=NCIT:C3058&plotChros=7,9,10&colorschema=redgreen&size_plotimage_w_px=640)

## Additional plot parameters

Plot parameters can be added to the request using a standard `&__parameter__=__value__`
syntax.

* `chr2plot`
* `plotChros`
- comma-concatenated list of chromosomes to plot
- default is 1 -> 22 since X & Y are not always correctly normalized for CNV
frequencies
* `chr2plot=1,2,3,44,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,X,Y`
* `chr2plot=9`
* `plotChros=1,2,3,44,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,X,Y`
* `plotChros=9`
* `size_plotimage_w_px`
- modifies the width of the plot image in px (default 800)
- <http://progenetix.org/services/collationPlots/?id=PMID:22824167&size_plotimage_w_px=1084>
Expand All @@ -70,8 +70,8 @@ syntax.
- format is `chro` `:` `start` `-` `end` `:` `some text`
- multiple labels can be concatenated by `,`
- colors are randomized from a "decent" palette
- <http://progenetix.org/services/collationPlots/?id=pgx:icdom-80123&value_plot_y_max=80&chr2plot=5,8&labels=5:0-48000000:Frequent+5p+gain,8:127735434-127742951:MYC&marker_text_px=12>
![](http://progenetix.org/services/collationPlots/?id=pgx:icdom-80123&value_plot_y_max=80&chr2plot=5,8&labels=5:0-48000000:Frequent+5p+gain,8:127735434-127742951:MYC&marker_text_px=12)
- <http://progenetix.org/services/collationPlots/?id=pgx:icdom-80123&value_plot_y_max=80&plotChros=5,8&labels=5:0-48000000:Frequent+5p+gain,8:127735434-127742951:MYC&marker_text_px=12>
![](http://progenetix.org/services/collationPlots/?id=pgx:icdom-80123&value_plot_y_max=80&plotChros=5,8&labels=5:0-48000000:Frequent+5p+gain,8:127735434-127742951:MYC&marker_text_px=12)
* `marker_text_px`
- text size for the labels (default 10)
* `marker_opacity`
Expand All @@ -86,8 +86,8 @@ syntax.
* `greenred`
* `bluered`

- <http://progenetix.org/services/collationPlots/?id=NCIT:C7376&size_plotarea_h_px=40&value_plot_y_max=50&colorschema=bluered&chr2plot=1,3,9,17,22>
![](http://progenetix.org/services/collationPlots/?id=NCIT:C7376&size_plotarea_h_px=40&value_plot_y_max=50&colorschema=bluered&chr2plot=1,3,9,17,22)
- <http://progenetix.org/services/collationPlots/?id=NCIT:C7376&size_plotarea_h_px=40&value_plot_y_max=50&colorschema=bluered&plotChros=1,3,9,17,22>
![](http://progenetix.org/services/collationPlots/?id=NCIT:C7376&size_plotarea_h_px=40&value_plot_y_max=50&colorschema=bluered&plotChros=1,3,9,17,22)



Expand Down
2 changes: 1 addition & 1 deletion docs/use-cases.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ external project such as TCGA

This data can be accessed through the Progenetix API in data and image format.

![Example CNV histogram with custom parameters](http://progenetix.org/cgi/PGX/cgi/collationPlots.cgi?id=NCIT:C7376&-size_plotarea_h_px=40&-value_plot_y_max=50&-colorschema=bluered&chr2plot=1,3,9,17,22)
![Example CNV histogram with custom parameters](http://progenetix.org/cgi/PGX/cgi/collationPlots.cgi?id=NCIT:C7376&-size_plotarea_h_px=40&-value_plot_y_max=50&-colorschema=bluered&plotChros=1,3,9,17,22)

Interval frequencies are per default stored in a 1Mb binned format. More
information about the API use can be found [in the IntervalFrequencies API documentation](services.md#pgxseg-segment-cnv-frequencies).
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,15 +338,15 @@ export function useCytomapper(querytext) {
return useProgenetixApi(url)
}

export function useSubsethistogram({ datasetIds, id, filter, plotRegionLabels, plotGeneSymbols, plotCytoregionLabels, size, chr2plot }) {
export function useSubsethistogram({ datasetIds, id, filter, 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)
}
Expand Down
2 changes: 1 addition & 1 deletion src/modules/service-pages/dataVisualizationPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ function DataVisualizationForm({ isQuerying, sampleCount, onSubmit }) {
<div className="columns">
<div className="column">
<InputField
name="chr2plot"
name="plotChros"
label="Chromosomes"
infoText="The chromosomes to be included in the plot, in the order they should appear. The values should just be the comma-separated chromosome numbers (e.g. '1,3,19,X' - unquoted, no spaces). The default is chr 1-22."
errors={errors}
Expand Down

0 comments on commit 40a6119

Please sign in to comment.