Mercurial > repos > iuc > scanpy_inspect
comparison inspect.xml @ 17:6551272ddc04 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/scanpy/ commit 55ba4cd74d5d8f7baff164b1864c36759d1c7fd9
| author | iuc |
|---|---|
| date | Fri, 18 Oct 2024 10:35:15 +0000 |
| parents | b6035c5e7e12 |
| children | 8f8b607d7408 |
comparison
equal
deleted
inserted
replaced
| 16:e5a00f205a9e | 17:6551272ddc04 |
|---|---|
| 219 #if str($method.key_added) != '': | 219 #if str($method.key_added) != '': |
| 220 key_added='$method.key_added', | 220 key_added='$method.key_added', |
| 221 #end if | 221 #end if |
| 222 copy=False) | 222 copy=False) |
| 223 | 223 |
| 224 #if str($method.get_df.get_df_select) == 'True': | |
| 225 cluster_DEG = sc.get.rank_genes_groups_df(adata, | |
| 226 group=None, # return all groups | |
| 227 #if str($method.get_df.key) != '': | |
| 228 key='$method.get_df.key', | |
| 229 #end if | |
| 230 #if str($method.get_df.pval_cutoff) != '': | |
| 231 pval_cutoff=$method.get_df.pval_cutoff, | |
| 232 #end if | |
| 233 #if str($method.get_df.log2fc_min) != '': | |
| 234 log2fc_min=$method.get_df.log2fc_min, | |
| 235 #end if | |
| 236 #if str($method.get_df.log2fc_max) != '': | |
| 237 log2fc_max=$method.get_df.log2fc_max, | |
| 238 #end if | |
| 239 @CMD_PARAM_GENE_SYMBOLS@ | |
| 240 ) | |
| 241 | |
| 242 cluster_DEG.to_csv('DEG.tsv', sep="\t", index=False) | |
| 243 #end if | |
| 244 | |
| 224 #else if str($method.method) == "tl.marker_gene_overlap": | 245 #else if str($method.method) == "tl.marker_gene_overlap": |
| 225 reference_markers = {} | 246 reference_markers = {} |
| 226 #for $i, $s in enumerate($method.reference_markers) | 247 #for $i, $s in enumerate($method.reference_markers) |
| 227 #set $list=[x.strip() for x in str($s.values).split(',')] | 248 #set $list=[x.strip() for x in str($s.values).split(',')] |
| 228 reference_markers['$s.key'] = $list | 249 reference_markers['$s.key'] = $list |
| 290 print("stats before sqrt:", "min=", adata.X.min(), "max=", adata.X.max(), "mean=", adata.X.mean()) | 311 print("stats before sqrt:", "min=", adata.X.min(), "max=", adata.X.max(), "mean=", adata.X.mean()) |
| 291 | 312 |
| 292 sc.pp.sqrt( | 313 sc.pp.sqrt( |
| 293 adata, | 314 adata, |
| 294 copy=False) | 315 copy=False) |
| 316 | |
| 317 print("stats after sqrt:", "min=", adata.X.min(), "max=", adata.X.max(), "mean=", adata.X.mean()) | |
| 295 #end if | 318 #end if |
| 296 | |
| 297 print("stats after sqrt:", "min=", adata.X.min(), "max=", adata.X.max(), "mean=", adata.X.mean()) | |
| 298 | 319 |
| 299 @CMD_ANNDATA_WRITE_OUTPUTS@ | 320 @CMD_ANNDATA_WRITE_OUTPUTS@ |
| 300 ]]> | 321 ]]> |
| 301 </configfile> | 322 </configfile> |
| 302 </configfiles> | 323 </configfiles> |
| 390 </when> | 411 </when> |
| 391 </conditional> | 412 </conditional> |
| 392 <expand macro="params_score_genes"/> | 413 <expand macro="params_score_genes"/> |
| 393 </when> | 414 </when> |
| 394 <when value="tl.rank_genes_groups"> | 415 <when value="tl.rank_genes_groups"> |
| 416 <conditional name="get_df"> | |
| 417 <param name="get_df_select" type="select" label="Get ranked genes as a Tabular file?"> | |
| 418 <option value="False" selected="true">False</option> | |
| 419 <option value="True">True</option> | |
| 420 </param> | |
| 421 <when value="False"/> | |
| 422 <when value="True"> | |
| 423 <param argument="key" type="text" value="" optional="true" label="Key differential expression groups were stored under"/> | |
| 424 <param argument="pval_cutoff" type="float" min="0.0" value="" optional="true" label="Return only adjusted p-values below the cutoff."/> | |
| 425 <param argument="log2fc_min" type="float" value="" optional="true" label="Minimum logfc to return."/> | |
| 426 <param argument="log2fc_max" type="float" value="" optional="true" label="Maximum logfc to return."/> | |
| 427 <expand macro="param_gene_symbols" label="Column name in [.var] DataFrame that stores gene symbols."/> | |
| 428 </when> | |
| 429 </conditional> | |
| 395 <param argument="groupby" type="text" value="" label="The key of the observations grouping to consider"> | 430 <param argument="groupby" type="text" value="" label="The key of the observations grouping to consider"> |
| 396 <expand macro="sanitize_query"/> | 431 <expand macro="sanitize_query"/> |
| 397 </param> | 432 </param> |
| 398 <expand macro="param_use_raw"/> | 433 <expand macro="param_use_raw"/> |
| 399 <param argument="groups" type="text" value="" label="Subset of groups to which comparison shall be restricted" help="e.g. ['g1', 'g2', 'g3']. If not passed, a ranking will be generated for all groups."> | 434 <param argument="groups" type="text" value="" label="Subset of groups to which comparison shall be restricted" help="e.g. ['g1', 'g2', 'g3']. If not passed, a ranking will be generated for all groups."> |
| 556 </conditional> | 591 </conditional> |
| 557 <expand macro="inputs_common_advanced"/> | 592 <expand macro="inputs_common_advanced"/> |
| 558 </inputs> | 593 </inputs> |
| 559 <outputs> | 594 <outputs> |
| 560 <expand macro="anndata_outputs"/> | 595 <expand macro="anndata_outputs"/> |
| 596 <data name="ranked_gene" format="tabular" from_work_dir="DEG.tsv" label="${tool.name} (${method.method}) on ${on_string}: Ranked genes"> | |
| 597 <filter> method['method'] == 'tl.rank_genes_groups' and method['get_df']['get_df_select'] == 'True'</filter> | |
| 598 </data> | |
| 561 </outputs> | 599 </outputs> |
| 562 <tests> | 600 <tests> |
| 563 <!-- test 1 --> | 601 <!-- test 1 --> |
| 564 <test expect_num_outputs="2"> | 602 <test expect_num_outputs="2"> |
| 565 <param name="adata" value="sparce_csr_matrix.h5ad"/> | 603 <param name="adata" value="sparce_csr_matrix.h5ad"/> |
| 1026 <assert_contents> | 1064 <assert_contents> |
| 1027 <has_h5_keys keys="obs/index"/> | 1065 <has_h5_keys keys="obs/index"/> |
| 1028 </assert_contents> | 1066 </assert_contents> |
| 1029 </output> | 1067 </output> |
| 1030 </test> | 1068 </test> |
| 1069 | |
| 1070 <!-- test 16 --> | |
| 1071 <test expect_num_outputs="3"> | |
| 1072 <param name="adata" value="krumsiek11.h5ad"/> | |
| 1073 <conditional name="method"> | |
| 1074 <param name="method" value="tl.rank_genes_groups"/> | |
| 1075 <conditional name="get_df"> | |
| 1076 <param name="get_df_select" value="True"/> | |
| 1077 </conditional> | |
| 1078 <param name="groupby" value="cell_type"/> | |
| 1079 <param name="n_genes" value="100"/> | |
| 1080 <conditional name="tl_rank_genes_groups_method"> | |
| 1081 <param name="method" value="t-test_overestim_var"/> | |
| 1082 </conditional> | |
| 1083 </conditional> | |
| 1084 <section name="advanced_common"> | |
| 1085 <param name="show_log" value="true"/> | |
| 1086 </section> | |
| 1087 <output name="hidden_output"> | |
| 1088 <assert_contents> | |
| 1089 <has_text_matching expression="sc.tl.rank_genes_groups"/> | |
| 1090 <has_text_matching expression="groupby='cell_type'"/> | |
| 1091 <has_text_matching expression="use_raw=False"/> | |
| 1092 <has_text_matching expression="reference='rest'"/> | |
| 1093 <has_text_matching expression="n_genes=100"/> | |
| 1094 <has_text_matching expression="method='t-test_overestim_var'"/> | |
| 1095 <has_text_matching expression="corr_method='benjamini-hochberg'"/> | |
| 1096 <has_text_matching expression="sc.get.rank_genes_groups_df"/> | |
| 1097 </assert_contents> | |
| 1098 </output> | |
| 1099 <output name="anndata_out" ftype="h5ad"> | |
| 1100 <assert_contents> | |
| 1101 <has_h5_keys keys="uns/rank_genes_groups"/> | |
| 1102 </assert_contents> | |
| 1103 </output> | |
| 1104 <output name="ranked_gene" ftype="tabular"> | |
| 1105 <assert_contents> | |
| 1106 <has_line_matching expression="group\tnames\tscores\tlogfoldchanges\tpvals\tpvals_adj"/> | |
| 1107 <has_line_matching expression="Ery\tEKLF\t39.086777\t4.8413053\t1.7995717323073084e-66\t1.979528905538039e-65"/> | |
| 1108 </assert_contents> | |
| 1109 </output> | |
| 1110 </test> | |
| 1111 | |
| 1112 <!-- test 17 --> | |
| 1113 <test expect_num_outputs="3"> | |
| 1114 <param name="adata" value="krumsiek11.h5ad"/> | |
| 1115 <conditional name="method"> | |
| 1116 <param name="method" value="tl.rank_genes_groups"/> | |
| 1117 <conditional name="get_df"> | |
| 1118 <param name="get_df_select" value="True"/> | |
| 1119 </conditional> | |
| 1120 <param name="groupby" value="cell_type"/> | |
| 1121 <param name="groups" value="Ery"/> | |
| 1122 <conditional name="ref"> | |
| 1123 <param name="rest" value="group_id"/> | |
| 1124 <param name="reference" value="Mk"/> | |
| 1125 </conditional> | |
| 1126 <param name="n_genes" value="100"/> | |
| 1127 <conditional name="tl_rank_genes_groups_method"> | |
| 1128 <param name="method" value="logreg"/> | |
| 1129 <conditional name="solver"> | |
| 1130 <param name="solver" value="liblinear"/> | |
| 1131 <conditional name="penalty"> | |
| 1132 <param name="penalty" value="l2"/> | |
| 1133 <param name="random_state" value="1"/> | |
| 1134 </conditional> | |
| 1135 </conditional> | |
| 1136 </conditional> | |
| 1137 </conditional> | |
| 1138 <section name="advanced_common"> | |
| 1139 <param name="show_log" value="true"/> | |
| 1140 </section> | |
| 1141 <output name="hidden_output"> | |
| 1142 <assert_contents> | |
| 1143 <has_text_matching expression="sc.tl.rank_genes_groups"/> | |
| 1144 <has_text_matching expression="groupby='cell_type'"/> | |
| 1145 <has_text_matching expression="use_raw=False"/> | |
| 1146 <has_text_matching expression="n_genes=100"/> | |
| 1147 <has_text_matching expression="method='logreg'"/> | |
| 1148 <has_text_matching expression="solver='liblinear'"/> | |
| 1149 <has_text_matching expression="penalty='l2'"/> | |
| 1150 <has_text_matching expression="dual=False"/> | |
| 1151 <has_text_matching expression="fit_intercept=True"/> | |
| 1152 <has_text_matching expression="intercept_scaling=1.0"/> | |
| 1153 <has_text_matching expression="tol=0.0001"/> | |
| 1154 <has_text_matching expression="C=1.0"/> | |
| 1155 <has_text_matching expression="groups=\['Ery'\]"/> | |
| 1156 <has_text_matching expression="reference='Mk'"/> | |
| 1157 <has_text_matching expression="sc.get.rank_genes_groups_df"/> | |
| 1158 </assert_contents> | |
| 1159 </output> | |
| 1160 <output name="anndata_out" ftype="h5ad"> | |
| 1161 <assert_contents> | |
| 1162 <has_h5_keys keys="uns/rank_genes_groups"/> | |
| 1163 </assert_contents> | |
| 1164 </output> | |
| 1165 <output name="ranked_gene" ftype="tabular"> | |
| 1166 <assert_contents> | |
| 1167 <has_text_matching expression="names\tscores"/> | |
| 1168 <has_text_matching expression="Fli1\t3.5328505"/> | |
| 1169 </assert_contents> | |
| 1170 </output> | |
| 1171 </test> | |
| 1172 | |
| 1173 <!-- test 18 --> | |
| 1174 <test expect_num_outputs="3"> | |
| 1175 <param name="adata" value="krumsiek11.h5ad"/> | |
| 1176 <conditional name="method"> | |
| 1177 <param name="method" value="tl.rank_genes_groups"/> | |
| 1178 <conditional name="get_df"> | |
| 1179 <param name="get_df_select" value="True"/> | |
| 1180 <param name="pval_cutoff" value="0.05"/> | |
| 1181 <param name="log2fc_min" value="1"/> | |
| 1182 <param name="log2fc_max" value="3"/> | |
| 1183 </conditional> | |
| 1184 <param name="groupby" value="cell_type"/> | |
| 1185 <param name="n_genes" value="100"/> | |
| 1186 <conditional name="tl_rank_genes_groups_method"> | |
| 1187 <param name="method" value="t-test_overestim_var"/> | |
| 1188 </conditional> | |
| 1189 </conditional> | |
| 1190 <section name="advanced_common"> | |
| 1191 <param name="show_log" value="true"/> | |
| 1192 </section> | |
| 1193 <output name="hidden_output"> | |
| 1194 <assert_contents> | |
| 1195 <has_text_matching expression="sc.tl.rank_genes_groups"/> | |
| 1196 <has_text_matching expression="groupby='cell_type'"/> | |
| 1197 <has_text_matching expression="use_raw=False"/> | |
| 1198 <has_text_matching expression="reference='rest'"/> | |
| 1199 <has_text_matching expression="n_genes=100"/> | |
| 1200 <has_text_matching expression="method='t-test_overestim_var'"/> | |
| 1201 <has_text_matching expression="corr_method='benjamini-hochberg'"/> | |
| 1202 <has_text_matching expression="sc.get.rank_genes_groups_df"/> | |
| 1203 <has_text_matching expression="pval_cutoff=0.05"/> | |
| 1204 <has_text_matching expression="log2fc_min=1"/> | |
| 1205 <has_text_matching expression="log2fc_max=3"/> | |
| 1206 </assert_contents> | |
| 1207 </output> | |
| 1208 <output name="anndata_out" ftype="h5ad"> | |
| 1209 <assert_contents> | |
| 1210 <has_h5_keys keys="uns/rank_genes_groups"/> | |
| 1211 </assert_contents> | |
| 1212 </output> | |
| 1213 <output name="ranked_gene" ftype="tabular"> | |
| 1214 <assert_contents> | |
| 1215 <has_line_matching expression="group\tnames\tscores\tlogfoldchanges\tpvals\tpvals_adj"/> | |
| 1216 <has_line_matching expression="Ery\tFog1\t21.071571\t2.8023682\t5.701001345880348e-35\t3.135550740234191e-34"/> | |
| 1217 </assert_contents> | |
| 1218 </output> | |
| 1219 </test> | |
| 1031 </tests> | 1220 </tests> |
| 1032 <help><