Mercurial > repos > iuc > seurat_plot
diff plot.xml @ 2:c520f64ffd57 draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/seurat commit 0c7884b059c6a12ecf22a025317f04c160962be7
| author | iuc |
|---|---|
| date | Thu, 26 Mar 2026 11:15:58 +0000 |
| parents | fee4b4eb0ef5 |
| children |
line wrap: on
line diff
--- a/plot.xml Tue Nov 05 11:55:07 2024 +0000 +++ b/plot.xml Thu Mar 26 11:15:58 2026 +0000 @@ -6,6 +6,7 @@ <expand macro="bio_tools"/> <expand macro="requirements"/> <expand macro="version_command"/> + <expand macro="creators"/> <command detect_errors="exit_code"><![CDATA[ @CMD@ ]]></command> @@ -246,6 +247,115 @@ combine = TRUE ) +#else if $method.method == 'ImageDimPlot' + +#if $method.adv.cells + cells_list<-paste(readLines('$method.adv.cells'), collapse=",") + #end if + +plot<-ImageDimPlot( + seurat_obj, + #if $method.plot.fov != '' + fov = c(unlist(strsplit(gsub(" ", "", '$method.plot.fov'), ","))), + #end if + #if $method.plot.boundaries != '' + boundaries = c(unlist(strsplit(gsub(" ", "", '$method.plot.boundaries'), ","))), + #end if + #if $method.adv.group_by != '' + group.by = '$method.adv.group_by', + #end if + #if $method.adv.split_by != '' + split.by = '$method.adv.split_by', + #end if + #if $method.plot.cols != '' + cols = c(unlist(strsplit(gsub(" ", "", '$method.plot.cols'), ","))), + shuffle.cols = $method.plot.shuffle_cols, + #end if + size = $method.plot.size, + #if $method.plot.molecules != '' + molecules = c(unlist(strsplit(gsub(" ", "", '$method.plot.molecules'), ","))), + mols.size = $method.plot.mols_size, + mols.cols = c(unlist(strsplit(gsub(" ", "", '$method.plot.mols_cols'), ","))), + mols.alpha = $method.plot.mols_alpha, + nmols = $method.plot.nmols, + #end if + alpha = $method.plot.alpha, + #if $method.adv.border_color != '' + border.color = '$method.adv.border_color', + #end if + #if $method.adv.border_size != '' + border.size = $method.adv.border_size, + #end if + na.value = '$method.plot.na_value', + dark.background = $method.adv.dark_background, + crop = $method.adv.crop, + #if $method.adv.cells + cells = c(unlist(strsplit(cells_list, ","))), + #end if + overlap = $method.adv.overlap, + axes = $method.adv.axes, + combine = TRUE, + coord.fixed = $method.adv.coord_fixed, + flip_xy = $method.adv.flip_xy +) + +#else if $method.method == 'ImageFeaturePlot' + +#if $method.adv.cells + cells_list<-paste(readLines('$method.adv.cells'), collapse=",") + #end if + +plot<-ImageFeaturePlot( + seurat_obj, + features = '$method.features', + #if $method.plot.fov != '' + fov = c(unlist(strsplit(gsub(" ", "", '$method.plot.fov'), ","))), + #end if + #if $method.plot.boundaries != '' + boundaries = c(unlist(strsplit(gsub(" ", "", '$method.plot.boundaries'), ","))), + #end if + size = $method.plot.size, + #if $method.adv.min_cutoff != '' + min.cutoff = '$method.adv.min_cutoff', + #end if + #if $method.adv.max_cutoff != '' + max.cutoff = '$method.adv.max_cutoff', + #end if + #if $method.adv.split_by != '' + split.by = '$method.adv.split_by', + #end if + #if $method.plot.molecules != '' + molecules = c(unlist(strsplit(gsub(" ", "", '$method.plot.molecules'), ","))), + mols.size = $method.plot.mols_size, + mols.cols = c(unlist(strsplit(gsub(" ", "", '$method.plot.mols_cols'), ","))), + nmols = $method.plot.nmols, + #end if + alpha = $method.plot.alpha, + #if $method.adv.border_color != '' + border.color = '$method.adv.border_color', + #end if + #if $method.adv.border_size != '' + border.size = $method.adv.border_size, + #end if + dark.background = $method.adv.dark_background, + blend = $method.plot.blend, + #if $method.plot.blend == 'TRUE' + cols = c("#ff0000", "#00ff00"), + blend.threshold = $method.plot.blend_threshold, + #else + cols = c("lightgrey", "firebrick1"), + scale = '$method.plot.scale', + #end if + crop = $method.adv.crop, + #if $method.adv.cells + cells = c(unlist(strsplit(cells_list, ","))), + #end if + overlap = $method.adv.overlap, + axes = $method.adv.axes, + combine = TRUE, + coord.fixed = $method.adv.coord_fixed +) + #else if $method.method == 'DimHeatmap' plot<-DimHeatmap( seurat_obj, @@ -310,8 +420,12 @@ #end if alpha = $method.plot.alpha, order = $method.plot.order, + #if $method.adv.min_cutoff != '' min.cutoff = 'q$method.adv.min_cutoff', + #end if + #if $method.adv.max_cutoff != '' max.cutoff = 'q$method.adv.max_cutoff', + #end if #if $method.adv.split_by != '' split.by = '$method.adv.split_by', by.col = $method.plot.blend.by_col, @@ -501,6 +615,8 @@ <option value="VariableFeaturePlot">Plot Variable Genes with 'VariableFeaturePlot'</option> <option value="VizDimLoadings">Visualize Reduction Results with 'VizDimLoadings'</option> <option value="DimPlot">Visualize Dimensional Reduction with 'DimPlot'</option> + <option value="ImageDimPlot">Visualize spatial clusters or other categorical groupings with 'ImageDimPlot'</option> + <option value="ImageFeaturePlot">Visualize expression in a spatial context with 'ImageFeaturePlot'</option> <option value="DimHeatmap">Visualize Reduction Results with 'DimHeatmap'</option> <option value="ElbowPlot">Determine dimensionality with 'ElbowPlot'</option> <option value="FeaturePlot">Visualize expression with 'FeaturePlot'</option> @@ -687,19 +803,75 @@ <when value="false"> </when> </conditional> - <param name="na_value" type="select" label="Colour for NA points when using custom scale" help="(na.value)"> - <option value="lightgrey" selected="true">lightgrey</option> - <option value="grey">grey</option> - <option value="black">black</option> - </param> + <expand macro="plot_na_value"/> </section> <section name="adv" title="Advanced Options"> - <param argument="cells" type="data" format="txt,tabular" optional="true" label="List of cells to include on plot" help="text file with one cell on each line"/> + <expand macro="plot_cells"/> <expand macro="plot_group_by"/> <expand macro="plot_split_by"/> <param name="shape_by" type="text" optional="true" value="" label="Shape points by a group or identity" help="only when not saving as raster (shape.by)"/> </section> </when> + <when value="ImageDimPlot"> + <section name="plot" title="Plot Formatting Options"> + <expand macro="plot_fov"/> + <expand macro="plot_boundaries"/> + <expand macro="plot_cols"/> + <expand macro="plot_shuffle_cols"/> + <param name="size" type="float" value="1.0" label="Point size for cells" help="(size)"/> + <expand macro="plot_alpha"/> + <expand macro="plot_molecules"/> + <expand macro="plot_mol_alpha"/> + <expand macro="plot_nmols"/> + <expand macro="plot_na_value"/> + </section> + <section name="adv" title="Advanced Options"> + <expand macro="plot_group_by"/> + <expand macro="plot_split_by"/> + <expand macro="plot_border"/> + <expand macro="plot_dark_background"/> + <expand macro="plot_crop"/> + <expand macro="plot_cells"/> + <expand macro="plot_overlap"/> + <expand macro="plot_axes"/> + <expand macro="plot_combine"/> + <expand macro="plot_coord_fixed"/> + <expand macro="plot_flip_xy"/> + </section> + </when> + <when value="ImageFeaturePlot"> + <param argument="features" type="text" value="nFeature_RNA" label="Features to plot" help="comma-separated list e.g. MS4A1, percent.mito, PC_1"/> + <section name="plot" title="Plot Formatting Options"> + <expand macro="plot_fov"/> + <expand macro="plot_boundaries"/> + <param name="size" type="float" value="1.0" label="Point size for cells" help="(size)"/> + <expand macro="plot_alpha"/> + <expand macro="plot_molecules"/> + <expand macro="plot_nmols"/> + <param argument="blend" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" label="Scale and blend expression values to visualize coexpression"/> + <param name="blend_threshold" type="float" value="0.5" min="0" max="1" label="Colour cutoff from weak signal to strong signal" help="(blend.threshold)"/> + <param name="scale" type="select" label="How to handle colour scale across multiple plots" help="(scale)"> + <option value="feature" selected="true">Scale each feature separately</option> + <option value="all">Scale all to same maximum</option> + <option value="none">Plots are not scaled</option> + </param> + <expand macro="raster_select"/> + </section> + <section name="adv" title="Advanced Options"> + <expand macro="plot_group_by"/> + <expand macro="plot_split_by"/> + <expand macro="plot_border"/> + <expand macro="plot_dark_background"/> + <expand macro="plot_crop"/> + <expand macro="plot_cells"/> + <expand macro="plot_coord_fixed"/> + <expand macro="plot_overlap"/> + <expand macro="plot_axes"/> + <expand macro="plot_combine"/> + <param name="min_cutoff" type="text" optional="true" value="" label="Minimum cutoff for features - as quantile" help="Minimum values for each feature eg, 'q1'or 'q10')"/> + <param name="max_cutoff" type="text" optional="true" value="" label="Maximum cutoff for features - as quantile" help="Maximum values for each feature (eg, 'q1'or 'q10')"/> + </section> + </when> <when value="DimHeatmap"> <param argument="dims" type="text" value="1:10" label="Dimensions from reduction to plot" help="enter one or a range of dimensions e.g. 3 to plot dim 3, 1:10 to plot dims 1 to 10"> <validator type="regex" message="Please only use numbers or colon">^[\d:]+$</validator> @@ -927,11 +1099,11 @@ <has_text_matching expression="VlnPlot"/> </assert_contents> </output> - <output name="plot_out_png" location="https://zenodo.org/records/13732784/files/VlnPlot.png" ftype="png" compare="image_diff"/> + <output name="plot_out_png" location="https://zenodo.org/records/17817806/files/VlnPlot.png" ftype="png" compare="image_diff"/> </test> <test expect_num_outputs="2"> <!-- test2: FeatureScatter PDF --> - <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/filtered.rds"/> + <param name="seurat_rds" location="https://zenodo.org/records/17817806/files/filtered.rds"/> <param name="plot_format" value="png"/> <conditional name="method"> <param name="method" value="FeatureScatter"/> @@ -946,11 +1118,11 @@ <has_text_matching expression="FeatureScatter"/> </assert_contents> </output> - <output name="plot_out_png" location="https://zenodo.org/records/13732784/files/FeatureScatter.png" ftype="png" compare="image_diff"/> + <output name="plot_out_png" location="https://zenodo.org/records/17817806/files/FeatureScatter.png" ftype="png" compare="image_diff"/> </test> <test expect_num_outputs="2"> <!-- test3: CellScatter PDF --> - <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/variablefeatures.rds"/> + <param name="seurat_rds" location="https://zenodo.org/records/17817806/files/variablefeatures.rds"/> <param name="plot_format" value="pdf"/> <conditional name="method"> <param name="method" value="CellScatter"/> @@ -967,7 +1139,7 @@ <has_text_matching expression="CellScatter"/> </assert_contents> </output> - <output name="plot_out_pdf" location="https://zenodo.org/records/13732784/files/CellScatter.pdf" ftype="pdf" compare="diff" lines_diff="50"/> + <output name="plot_out_pdf" location="https://zenodo.org/records/17817806/files/CellScatter.pdf" ftype="pdf" compare="diff" lines_diff="50"/> </test> <test expect_num_outputs="2"> <!-- test4: VariableFeaturePlot SVG --> @@ -988,7 +1160,7 @@ <has_text_matching expression="VariableFeaturePlot"/> </assert_contents> </output> - <output name="plot_out_svg" location="https://zenodo.org/records/13732784/files/VariableFeaturePlot.svg" ftype="svg" compare="diff" lines_diff="50"/> + <output name="plot_out_svg" location="https://zenodo.org/records/17817806/files/VariableFeaturePlot.svg" ftype="svg" compare="diff" lines_diff="50"/> </test> <test expect_num_outputs="2"> <!-- test5: VizDimLoadings JPEG --> @@ -1013,7 +1185,7 @@ <has_text_matching expression="VizDimLoadings"/> </assert_contents> </output> - <output name="plot_out_jpeg" location="https://zenodo.org/records/13732784/files/VizDimLoadings.jpeg" ftype="jpeg" compare="image_diff"/> + <output name="plot_out_jpeg" location="https://zenodo.org/records/17817806/files/VizDimLoadings.jpeg" ftype="jpeg" compare="image_diff"/> </test> <test expect_num_outputs="2"> <!-- test6: DimPlot TEX --> @@ -1032,7 +1204,7 @@ <has_text_matching expression="DimPlot"/> </assert_contents> </output> - <output name="plot_out_tex" location="https://zenodo.org/records/13732784/files/DimPlot.tex" ftype="tex"> + <output name="plot_out_tex" location="https://zenodo.org/records/17817806/files/DimPlot.tex" ftype="tex"> <assert_contents> <has_text_matching expression="beginpicture"/> </assert_contents> @@ -1065,7 +1237,7 @@ <has_text_matching expression="DimHeatmap"/> </assert_contents> </output> - <output name="plot_out_tiff" location="https://zenodo.org/records/13732784/files/DimHeatmap.tiff" ftype="tiff" compare="image_diff"/> + <output name="plot_out_tiff" location="https://zenodo.org/records/17817806/files/DimHeatmap.tiff" ftype="tiff" compare="image_diff"/> </test> <test expect_num_outputs="2"> <!-- test8: ElbowPlot EPS --> @@ -1084,7 +1256,7 @@ <has_text_matching expression="ElbowPlot"/> </assert_contents> </output> - <output name="plot_out_eps" location="https://zenodo.org/records/13732784/files/ElbowPlot.eps" ftype="eps"/> + <output name="plot_out_eps" location="https://zenodo.org/records/17817806/files/ElbowPlot.eps" ftype="eps"/> </test> <test expect_num_outputs="2"> <!-- test9: FeaturePlot PNG --> @@ -1108,7 +1280,7 @@ <has_text_matching expression="FeaturePlot"/> </assert_contents> </output> - <output name="plot_out_png" location="https://zenodo.org/records/13732784/files/FeaturePlot.png" ftype="png" compare="image_diff"/> + <output name="plot_out_png" location="https://zenodo.org/records/17817806/files/FeaturePlot.png" ftype="png" compare="image_diff"/> </test> <test expect_num_outputs="2"> <!-- test10: DoHeatmap PNG --> @@ -1136,7 +1308,7 @@ <has_text_matching expression="DoHeatmap"/> </assert_contents> </output> - <output name="plot_out_png" location="https://zenodo.org/records/13732784/files/DoHeatmap.png" ftype="png" compare="image_diff"/> + <output name="plot_out_png" location="https://zenodo.org/records/17817806/files/DoHeatmap.png" ftype="png" compare="image_diff"/> </test> <test expect_num_outputs="2"> <!-- test11: DotPlot PNG --> @@ -1154,7 +1326,44 @@ <has_text_matching expression="DotPlot"/> </assert_contents> </output> - <output name="plot_out_png" location="https://zenodo.org/records/13732784/files/DotPlot.png" ftype="png" compare="image_diff"/> + <output name="plot_out_png" location="https://zenodo.org/records/17817806/files/DotPlot.png" ftype="png" compare="image_diff"/> + </test> + <test expect_num_outputs="2"> + <!-- test12: ImageDimPlot PNG --> + <param name="seurat_rds" location="https://zenodo.org/records/17807529/files/test_seurat_spatial.rds"/> + <param name="plot_format" value="png"/> + <conditional name="method"> + <param name="fov" value="anterior1"/> + <param name="method" value="ImageDimPlot"/> + </conditional> + <section name="advanced_common"> + <param name="show_log" value="true"/> + </section> + <output name="hidden_output"> + <assert_contents> + <has_text_matching expression="ImageDimPlot"/> + </assert_contents> + </output> + <output name="plot_out_png" location="https://zenodo.org/records/17817806/files/ImageDimPlot.png" ftype="png" compare="image_diff"/> + </test> + <test expect_num_outputs="2"> + <!-- test13: ImageFeaturePlot PNG --> + <param name="seurat_rds" location="https://zenodo.org/records/17807529/files/test_seurat_spatial.rds"/> + <param name="plot_format" value="png"/> + <conditional name="method"> + <param name="method" value="ImageFeaturePlot"/> + <param name="fov" value="anterior1"/> + <param name="features" value="Xkr4"/> + </conditional> + <section name="advanced_common"> + <param name="show_log" value="true"/> + </section> + <output name="hidden_output"> + <assert_contents> + <has_text_matching expression="ImageFeaturePlot"/> + </assert_contents> + </output> + <output name="plot_out_png" location="https://zenodo.org/records/17817806/files/ImageFeaturePlot.png" ftype="png" compare="image_diff"/> </test> </tests> <help><