Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add parameters to Scmap #318

Merged
merged 16 commits into from
Apr 23, 2024
17 changes: 14 additions & 3 deletions tools/tertiary-analysis/scmap/scmap_get_std_output.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
</macros>
<expand macro="requirements" />
<command detect_errors="exit_code"><![CDATA[
scmap_get_std_output.R --predictions-file "${input_predictions_file}" --output-table "${output_predictions_file}" --include-scores "${include_scores}" --tool '${tool}' --sim-col-name "${sim_col_name}"
scmap_get_std_output.R
--predictions-file "${input_predictions_file}"
--output-table "${output_predictions_file}"
--include-scores "${include_scores}"
--tool '${tool}'
--sim-col-name "${sim_col_name}"
#if $index
--index "${index}"
#end if
Expand All @@ -21,13 +26,19 @@
<param type="text" name="sim_col_name" value="scmap_cluster_siml" label="Column name of similarity scores" help="Name of column that contains distances between clusters/cells" />
</inputs>
<outputs>
<data name="output_predictions_file" format="txt" />
<data name="output_predictions_file" format="tabular" />
</outputs>
<tests>
<test>
<param name="input_predictions_file" value="closest_cells_clusters.tsv" />
<param name="include_scores" value="TRUE" />
<output name="output_predictions_file" value="scmap_output_tbl.txt" compare="sim_size" />
<output name="output_predictions_file">
<assert_contents>
<has_n_lines n="92"/>
<has_text text="predicted_label"/>
<has_text text="Zygote..3.RPKM."/>
</assert_contents>
</output>
</test>
</tests>
<help><![CDATA[
Expand Down
5 changes: 3 additions & 2 deletions tools/tertiary-analysis/scmap/scmap_macros.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<macros>
<token name="@TOOL_VERSION@">1.6.3</token>
<token name="@TOOL_VERSION@">1.6.4</token>
<token name="@HELP@">More information can be found at https://bioconductor.org/packages/release/bioc/html/scmap.html</token>
<token name="@PROFILE@">18.01</token>
<xml name="requirements">
<requirements>
<requirement type="package" version="0.0.11">scmap-cli</requirement>
<requirement type="package" version="0.1.0">scmap-cli</requirement>
<yield/>
</requirements>
</xml>
Expand All @@ -15,6 +15,7 @@
</xml>
<token name="@VERSION_HISTORY@"><![CDATA[
**Version history**
1.6.4+galaxy0: Update scmap-cli to 0.1.0
1.6.3+galaxy0: Update scmap-cli to 0.0.11
1.6.2+galaxy0: Update scmap-cli to 0.0.10
1.6.1+galaxy0: Update scmap-cli to 0.0.9.
Expand Down
23 changes: 22 additions & 1 deletion tools/tertiary-analysis/scmap/scmap_scmap_cell.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
-i '$index_single_cell_experiment'
-p '$project_single_cell_experiment'
--number-nearest-neighbours '$n_nearest_neighbours'
--nearest-neighbours-threshold '$nearest_neighbours_threshold'
--threshold '$threshold'
--cluster-col '${cluster_projection.cluster_col}'
--output-object-file '$output_single_cell_experiment'
--closest-cells-text-file '$closest_cells_text_file'
Expand All @@ -21,6 +23,8 @@
<param type="data" name="index_single_cell_experiment" label="Index SingleCellExperiment object" format="rdata" help="File with serialized SingleCellExperiment object as produced by 'scmap select features' and 'scmap index clusters', onto which another dataset will be projected." />
<param type="data" name="project_single_cell_experiment" label="SingleCellExperiment object to project" format="rdata" help="File with serialized SingleCellExperiment object to project onto the index'" />
<param name="n_nearest_neighbours" type="integer" label="Number of nearest neighbours" value='5' help="A positive integer specifying the number of nearest neighbours to find" />
<param name="nearest_neighbours_threshold" type="integer" label="Nearest neighbour threshold" value='3' help="A positive integer specifying the number of matching nearest neighbours required to label a cell." />
<param name="threshold" type="integer" label="Similarity threshold" value='0.7' help="Threshold on similarity (or probability for SVM and RF)." />
<conditional name="cluster_projection">
<param name="do_cluster_projection" type="boolean" checked="false" label="Annotate cells of the projection dataset using labels of the reference?" help="If cell cluster annotation is available for the reference datasets, in addition to finding top 10 nearest neighbours scmap-cell also allows to annotate cells of the projection dataset using labels of the reference."/>
<when value="true" >
Expand All @@ -43,12 +47,29 @@
<test>
<param name="index_single_cell_experiment" value="index_cell.rds" ftype="rdata"/>
<param name="project_single_cell_experiment" value="test_sce_processed.rds" ftype="rdata"/>
<param name="cluster_projection" value="true" />
<conditional name="cluster_projection">
<param name="do_cluster_projection" value="true" />
<param name="cluster_col" value="cell_type1" />
</conditional>
<output name="output_single_cell_experiment" file="closest_cells_clusters.rds" compare="sim_size"/>
<output name="closest_cells_clusters_csv" file="closest_cells_clusters.tsv" compare="sim_size" />
<output name="closest_cells_text_file" file="closest_cells.tsv" compare="sim_size"/>
<output name="closest_cells_similarities_text_file" file="closest_cells_similarities.tsv" compare="sim_size"/>
</test>
<test>
<param name="index_single_cell_experiment" value="index_cell.rds" ftype="rdata"/>
<param name="project_single_cell_experiment" value="test_sce_processed.rds" ftype="rdata"/>
<conditional name="cluster_projection">
<param name="do_cluster_projection" value="true" />
<param name="cluster_col" value="cell_type1" />
</conditional>
<param name="nearest_neighbours_threshold" value="3" />
<param name="threshold" value="0.5" />
<output name="output_single_cell_experiment" file="closest_cells_clusters_copy.rds" compare="sim_size"/>
<output name="closest_cells_clusters_csv" file="closest_cells_clusters_copy.tsv" compare="sim_size" />
<output name="closest_cells_text_file" file="closest_cells_copy.tsv" compare="sim_size"/>
<output name="closest_cells_similarities_text_file" file="closest_cells_similarities_copy.tsv" compare="sim_size"/>
</test>
</tests>
<help><![CDATA[
@HELP@
Expand Down
17 changes: 13 additions & 4 deletions tools/tertiary-analysis/scmap/scmap_scmap_cluster.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,24 @@
<param name="threshold" type="float" label="Threshold" value="0.7" help="Threshold on similarity (or probability for SVM and RF)." />
</inputs>
<outputs>
<data name="output_single_cell_experiment" format="rdata" />
<data name="output_txt" format="tabular" />
<data name="output_single_cell_experiment" format="rdata" label="${tool.name} on ${on_string}: RDS object"/>
<data name="output_txt" format="tabular" label="${tool.name} on ${on_string}: table"/>
</outputs>
<tests>
<test>
<param name="index_single_cell_experiment" value="index_cluster.rds" ftype="rdata"/>
<param name="project_single_cell_experiment" value="test_sce_processed.rds" ftype="rdata"/>
<output name="output_single_cell_experiment" file="project_cluster.rds" compare="sim_size"/>
<output name="output_txt" file="project_cluster.tsv" compare="sim_size"/>
<output name="output_single_cell_experiment">
<assert_contents>
<has_size value="6100k" delta="500k"/>
</assert_contents>
</output>
<output name="output_txt">
<assert_contents>
<has_n_lines n="91"/>
<has_text text="zygote"/>
</assert_contents>
</output>
</test>
</tests>
<help><![CDATA[
Expand Down
9 changes: 8 additions & 1 deletion tools/tertiary-analysis/scmap/scmap_select_features.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@
</macros>
<expand macro="requirements" />
<command detect_errors="exit_code"><![CDATA[
scmap-preprocess-sce.R --input-object "${input_single_cell_experiment}" --output-sce-object "${input_single_cell_experiment}.preprocessed" && scmap-select-features.R --input-object-file "${input_single_cell_experiment}.preprocessed" --n-features '$n_features' --output-object-file '$output_single_cell_experiment' --output-plot-file '$plot'
scmap-preprocess-sce.R
--input-object "${input_single_cell_experiment}"
--output-sce-object "result.preprocessed" &&
scmap-select-features.R
--input-object-file "result.preprocessed"
--n-features '$n_features'
--output-object-file '$output_single_cell_experiment'
--output-plot-file '$plot'
]]></command>
<inputs>
<param type="data" name="input_single_cell_experiment" label="SingleCellExperiment object" format="rdata" help="File with serialized SingleCellExperiment object" />
Expand Down
6 changes: 6 additions & 0 deletions tools/tertiary-analysis/scmap/test-data/closest_cells.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
,Oocyte..1.RPKM.,Oocyte..2.RPKM.,Oocyte..3.RPKM.,Zygote..1.RPKM.,Zygote..2.RPKM.,Zygote..3.RPKM.,X2.cell.embryo.1..Cell.1.RPKM.,X2.cell.embryo.1..Cell.2.RPKM.,X2.cell.embryo.2..Cell.1.RPKM.,X2.cell.embryo.2..Cell.2.RPKM.,X2.cell.embryo.3..Cell.1.RPKM.,X2.cell.embryo.3..Cell.2.RPKM.,X4.cell.embryo.1..Cell.1.RPKM.,X4.cell.embryo.1..Cell.2.RPKM.,X4.cell.embryo.1..Cell.3.RPKM.,X4.cell.embryo.1..Cell.4.RPKM.,X4.cell.embryo.2..Cell.1.RPKM.,X4.cell.embryo.2..Cell.2.RPKM.,X4.cell.embryo.2..Cell.3.RPKM.,X4.cell.embryo.2..Cell.4.RPKM.,X4.cell.embryo.3..Cell.1.RPKM.,X4.cell.embryo.3..Cell.2.RPKM.,X4.cell.embryo.3..Cell.3.RPKM.,X4.cell.embryo.3..Cell.4.RPKM.,X8.cell.embryo.1..Cell.1.RPKM.,X8.cell.embryo.1..Cell.2.RPKM.,X8.cell.embryo.1..Cell.3.RPKM.,X8.cell.embryo.1..Cell.4.RPKM.,X8.cell.embryo.2..Cell.1.RPKM.,X8.cell.embryo.2..Cell.2.RPKM.,X8.cell.embryo.2..Cell.3.RPKM.,X8.cell.embryo.2..Cell.4.RPKM.,X8.cell.embryo.2..Cell.5.RPKM.,X8.cell.embryo.2..Cell.6.RPKM.,X8.cell.embryo.2..Cell.7.RPKM.,X8.cell.embryo.2..Cell.8.RPKM.,X8.cell.embryo.3..Cell.1.RPKM.,X8.cell.embryo.3..Cell.2.RPKM.,X8.cell.embryo.3..Cell.3.RPKM.,X8.cell.embryo.3..Cell.4.RPKM.,X8.cell.embryo.3..Cell.5.RPKM.,X8.cell.embryo.3..Cell.6.RPKM.,X8.cell.embryo.3..Cell.7.RPKM.,X8.cell.embryo.3..Cell.8.RPKM.,Morulae..1..Cell.1.RPKM.,Morulae..1..Cell.2.RPKM.,Morulae..1..Cell.3.RPKM.,Morulae..1..Cell.4.RPKM.,Morulae..1..Cell.5.RPKM.,Morulae..1..Cell.6.RPKM.,Morulae..1..Cell.7.RPKM.,Morulae..1..Cell.8.RPKM.,Morulae..2..Cell.1.RPKM.,Morulae..2..Cell.2.RPKM.,Morulae..2..Cell.3.RPKM.,Morulae..2..Cell.4.RPKM.,Morulae..2..Cell.5.RPKM.,Morulae..2..Cell.6.RPKM.,Morulae..2..Cell.7.RPKM.,Morulae..2..Cell.8.RPKM.,Late.blastocyst..1..Cell.1.RPKM.,Late.blastocyst..1..Cell.2.RPKM.,Late.blastocyst..1..Cell.3.RPKM.,Late.blastocyst..1..Cell.4.RPKM.,Late.blastocyst..1..Cell.5.RPKM.,Late.blastocyst..1..Cell.6.RPKM.,Late.blastocyst..1..Cell.7.RPKM.,Late.blastocyst..1..Cell.8.RPKM.,Late.blastocyst..1..Cell.9.RPKM.,Late.blastocyst..1..Cell.10.RPKM.,Late.blastocyst..1..Cell.11.RPKM.,Late.blastocyst..1..Cell.12.RPKM.,Late.blastocyst..2..Cell.1.RPKM.,Late.blastocyst..2..Cell.2.RPKM.,Late.blastocyst..2..Cell.3.RPKM.,Late.blastocyst..2..Cell.4.RPKM.,Late.blastocyst..2..Cell.5.RPKM.,Late.blastocyst..2..Cell.6.RPKM.,Late.blastocyst..2..Cell.7.RPKM.,Late.blastocyst..2..Cell.8.RPKM.,Late.blastocyst..2..Cell.9.RPKM.,Late.blastocyst..2..Cell.10.RPKM.,Late.blastocyst..3..Cell.1.RPKM.,Late.blastocyst..3..Cell.2.RPKM.,Late.blastocyst..3..Cell.3.RPKM.,Late.blastocyst..3..Cell.4.RPKM.,Late.blastocyst..3..Cell.5.RPKM.,Late.blastocyst..3..Cell.6.RPKM.,Late.blastocyst..3..Cell.7.RPKM.,Late.blastocyst..3..Cell.8.RPKM.
1,1,1,1,6,6,6,10,10,10,10,12,10,23,19,24,22,14,13,24,13,21,24,23,24,28,27,27,25,34,35,36,32,34,34,35,30,37,42,44,38,38,37,39,39,48,49,47,49,46,49,49,27,57,54,55,55,54,51,55,54,62,67,67,63,71,67,62,66,69,69,71,78,65,87,84,78,78,81,82,82,78,81,88,84,90,75,83,78,88,88
2,2,2,2,11,12,11,7,7,7,7,7,7,13,13,13,14,24,22,14,20,22,23,21,21,27,25,25,27,36,30,30,34,30,33,34,36,38,37,39,39,42,38,43,43,45,46,52,45,51,54,51,26,49,57,56,59,57,59,56,60,70,71,62,67,62,71,69,62,72,62,63,70,76,86,86,81,79,78,76,80,82,82,87,88,89,74,74,88,85,90
3,3,3,3,12,10,12,8,8,8,8,8,11,14,24,23,21,19,16,19,23,23,18,22,22,26,26,26,26,30,36,34,36,33,36,36,35,40,40,40,41,40,40,38,44,49,54,26,51,54,51,50,28,51,50,59,60,53,58,58,53,61,61,63,64,69,66,64,82,70,70,72,81,71,75,75,76,81,76,78,76,81,78,75,80,88,86,86,90,77,81
4,6,7,6,4,11,4,9,9,9,9,9,12,24,14,16,16,23,18,23,18,24,13,13,13,40,38,40,38,29,29,29,29,29,29,29,29,42,38,38,37,37,42,37,41,51,50,28,48,50,50,53,47,54,53,54,58,60,56,54,50,71,68,82,65,65,68,67,68,67,65,65,72,73,73,80,82,82,79,79,75,76,79,86,73,85,83,87,89,89,85
5,5,5,5,5,5,5,12,12,12,12,11,5,22,23,15,24,17,21,17,22,18,22,24,23,25,28,28,28,31,31,31,35,36,35,31,31,41,41,41,40,41,41,41,38,53,51,27,50,49,46,46,52,53,51,58,56,51,55,59,51,65,62,71,72,70,72,66,78,65,72,69,65,70,74,74,79,77,82,77,84,72,76,83,75,72,87,75,85,90,89
Binary file not shown.
91 changes: 91 additions & 0 deletions tools/tertiary-analysis/scmap/test-data/closest_cells_clusters.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
cell scmap_cluster_labs scmap_cluster_siml combined_labs
Oocyte..1.RPKM. zygote 0.972457633278923 zygote
Oocyte..2.RPKM. zygote 0.972353568313767 zygote
Oocyte..3.RPKM. zygote 0.973371064673993 zygote
Zygote..1.RPKM. zygote 0.97866272698663 zygote
Zygote..2.RPKM. zygote 0.979717800854604 zygote
Zygote..3.RPKM. zygote 0.97984002400711 zygote
X2.cell.embryo.1..Cell.1.RPKM. 2cell 0.975860542596827 2cell
X2.cell.embryo.1..Cell.2.RPKM. 2cell 0.975977483944058 2cell
X2.cell.embryo.2..Cell.1.RPKM. 2cell 0.97534563242085 2cell
X2.cell.embryo.2..Cell.2.RPKM. 2cell 0.976532855604968 2cell
X2.cell.embryo.3..Cell.1.RPKM. 2cell 0.975715675528499 2cell
X2.cell.embryo.3..Cell.2.RPKM. 2cell 0.976512040050606 2cell
X4.cell.embryo.1..Cell.1.RPKM. 4cell 0.976740874886324 4cell
X4.cell.embryo.1..Cell.2.RPKM. 4cell 0.970679786566831 4cell
X4.cell.embryo.1..Cell.3.RPKM. 4cell 0.971937340916803 4cell
X4.cell.embryo.1..Cell.4.RPKM. 4cell 0.974396302382197 4cell
X4.cell.embryo.2..Cell.1.RPKM. 4cell 0.968256593061058 4cell
X4.cell.embryo.2..Cell.2.RPKM. 4cell 0.976000962530563 4cell
X4.cell.embryo.2..Cell.3.RPKM. 4cell 0.974456795916042 4cell
X4.cell.embryo.2..Cell.4.RPKM. 4cell 0.975046287156331 4cell
X4.cell.embryo.3..Cell.1.RPKM. 4cell 0.980907467386254 4cell
X4.cell.embryo.3..Cell.2.RPKM. 4cell 0.979702774175472 4cell
X4.cell.embryo.3..Cell.3.RPKM. 4cell 0.979541752074044 4cell
X4.cell.embryo.3..Cell.4.RPKM. 4cell 0.979397781619405 4cell
X8.cell.embryo.1..Cell.1.RPKM. 8cell 0.965866705260469 8cell
X8.cell.embryo.1..Cell.2.RPKM. 8cell 0.971874515954174 8cell
X8.cell.embryo.1..Cell.3.RPKM. 8cell 0.970182782492083 8cell
X8.cell.embryo.1..Cell.4.RPKM. 8cell 0.971803309754166 8cell
X8.cell.embryo.2..Cell.1.RPKM. 8cell 0.975660495961879 8cell
X8.cell.embryo.2..Cell.2.RPKM. 8cell 0.978697234565528 8cell
X8.cell.embryo.2..Cell.3.RPKM. 8cell 0.980500043303112 8cell
X8.cell.embryo.2..Cell.4.RPKM. 8cell 0.973337322820485 8cell
X8.cell.embryo.2..Cell.5.RPKM. 8cell 0.97050828475866 8cell
X8.cell.embryo.2..Cell.6.RPKM. 8cell 0.97427362884691 8cell
X8.cell.embryo.2..Cell.7.RPKM. 8cell 0.977362207861906 8cell
X8.cell.embryo.2..Cell.8.RPKM. 8cell 0.978677072589576 8cell
X8.cell.embryo.3..Cell.1.RPKM. 8cell 0.97989418833849 8cell
X8.cell.embryo.3..Cell.2.RPKM. 8cell 0.97485334405104 8cell
X8.cell.embryo.3..Cell.3.RPKM. 8cell 0.975859793936309 8cell
X8.cell.embryo.3..Cell.4.RPKM. 8cell 0.981490977097 8cell
X8.cell.embryo.3..Cell.5.RPKM. 8cell 0.981029618769028 8cell
X8.cell.embryo.3..Cell.6.RPKM. 8cell 0.969682040359692 8cell
X8.cell.embryo.3..Cell.7.RPKM. 8cell 0.978148246228053 8cell
X8.cell.embryo.3..Cell.8.RPKM. 8cell 0.970328380893092 8cell
Morulae..1..Cell.1.RPKM. 16cell 0.959918851368306 16cell
Morulae..1..Cell.2.RPKM. 16cell 0.973499865778146 16cell
Morulae..1..Cell.3.RPKM. 16cell 0.905095452914499 16cell
Morulae..1..Cell.4.RPKM. 16cell 0.975565450656408 16cell
Morulae..1..Cell.5.RPKM. 16cell 0.972676900609201 16cell
Morulae..1..Cell.6.RPKM. 16cell 0.965520701954854 16cell
Morulae..1..Cell.7.RPKM. 16cell 0.974360238512134 16cell
Morulae..1..Cell.8.RPKM. 16cell 0.89292960975856 16cell
Morulae..2..Cell.1.RPKM. 16cell 0.973068555642167 16cell
Morulae..2..Cell.2.RPKM. 16cell 0.972782844321894 16cell
Morulae..2..Cell.3.RPKM. 16cell 0.964788103357924 16cell
Morulae..2..Cell.4.RPKM. 16cell 0.966128218632723 16cell
Morulae..2..Cell.5.RPKM. 16cell 0.959906305241092 16cell
Morulae..2..Cell.6.RPKM. 16cell 0.973292643125946 16cell
Morulae..2..Cell.7.RPKM. 16cell 0.972824053645381 16cell
Morulae..2..Cell.8.RPKM. 16cell 0.966191355651732 16cell
Late.blastocyst..1..Cell.1.RPKM. blast 0.954545456827362 blast
Late.blastocyst..1..Cell.2.RPKM. blast 0.959479973403999 blast
Late.blastocyst..1..Cell.3.RPKM. blast 0.95220936077016 blast
Late.blastocyst..1..Cell.4.RPKM. blast 0.950460474784597 blast
Late.blastocyst..1..Cell.5.RPKM. blast 0.952198095399196 blast
Late.blastocyst..1..Cell.6.RPKM. blast 0.947932383616434 blast
Late.blastocyst..1..Cell.7.RPKM. blast 0.953028259974652 blast
Late.blastocyst..1..Cell.8.RPKM. blast 0.955242273190534 blast
Late.blastocyst..1..Cell.9.RPKM. blast 0.945069684662869 blast
Late.blastocyst..1..Cell.10.RPKM. blast 0.948997282545248 blast
Late.blastocyst..1..Cell.11.RPKM. blast 0.957933181323242 blast
Late.blastocyst..1..Cell.12.RPKM. blast 0.956477894281845 blast
Late.blastocyst..2..Cell.1.RPKM. blast 0.951896178479488 blast
Late.blastocyst..2..Cell.2.RPKM. blast 0.931976810185073 blast
Late.blastocyst..2..Cell.3.RPKM. blast 0.935585386310024 blast
Late.blastocyst..2..Cell.4.RPKM. blast 0.955286040867509 blast
Late.blastocyst..2..Cell.5.RPKM. blast 0.947612540470952 blast
Late.blastocyst..2..Cell.6.RPKM. blast 0.956938141272494 blast
Late.blastocyst..2..Cell.7.RPKM. blast 0.95796374641168 blast
Late.blastocyst..2..Cell.8.RPKM. blast 0.928236097734115 blast
Late.blastocyst..2..Cell.9.RPKM. blast 0.948137126389516 blast
Late.blastocyst..2..Cell.10.RPKM. blast 0.955220996266827 blast
Late.blastocyst..3..Cell.1.RPKM. blast 0.897154517212312 blast
Late.blastocyst..3..Cell.2.RPKM. blast 0.916287566525039 blast
Late.blastocyst..3..Cell.3.RPKM. blast 0.949016031543691 blast
Late.blastocyst..3..Cell.4.RPKM. blast 0.915241215759076 blast
Late.blastocyst..3..Cell.5.RPKM. blast 0.924787897158703 blast
Late.blastocyst..3..Cell.6.RPKM. blast 0.943459425658745 blast
Late.blastocyst..3..Cell.7.RPKM. blast 0.949859434636659 blast
Late.blastocyst..3..Cell.8.RPKM. blast 0.946067646237195 blast
Loading
Loading