Mercurial > repos > iuc > scanpy_inspect
comparison inspect.xml @ 14:1c36180febfb draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/scanpy/ commit 91121b1e72696f17478dae383badaa71e9f96dbb
| author | iuc |
|---|---|
| date | Sat, 14 Sep 2024 12:40:40 +0000 |
| parents | 03ed427eb5e7 |
| children | b6035c5e7e12 |
comparison
equal
deleted
inserted
replaced
| 13:9329ecce0019 | 14:1c36180febfb |
|---|---|
| 1 <tool id="scanpy_inspect" name="Inspect and manipulate" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@profile@"> | 1 <tool id="scanpy_inspect" name="Scanpy Inspect and manipulate" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> |
| 2 <description> with scanpy</description> | |
| 3 <macros> | 2 <macros> |
| 4 <import>macros.xml</import> | 3 <import>macros.xml</import> |
| 5 <xml name="score_genes_params"> | 4 <xml name="params_score_genes"> |
| 6 <param argument="n_bins" type="integer" value="25" label="Number of expression level bins for sampling" help=""/> | 5 <param argument="n_bins" type="integer" value="25" label="Number of expression level bins for sampling"/> |
| 7 <param argument="random_state" type="integer" value="0" label="Random seed for sampling" help=""/> | 6 <param argument="random_state" type="integer" value="0" label="Random seed for sampling"/> |
| 8 <expand macro="param_use_raw"/> | 7 <expand macro="param_use_raw"/> |
| 9 </xml> | 8 </xml> |
| 10 <token name="@CMD_score_genes_inputs@"><![CDATA[ | 9 <token name="@CMD_PARAMS_SCORE_GENES@"><![CDATA[ |
| 11 n_bins=$method.n_bins, | 10 n_bins=$method.n_bins, |
| 12 random_state=$method.random_state, | 11 random_state=$method.random_state, |
| 13 use_raw=$method.use_raw, | 12 use_raw=$method.use_raw, |
| 14 copy=False | 13 copy=False |
| 15 ]]></token> | 14 ]]> |
| 15 </token> | |
| 16 <xml name="corr_method"> | 16 <xml name="corr_method"> |
| 17 <param argument="corr_method" type="select" label="P-value correction method"> | 17 <param argument="corr_method" type="select" label="P-value correction method"> |
| 18 <option value="benjamini-hochberg">Benjamini-Hochberg</option> | 18 <option value="benjamini-hochberg" selected="true">Benjamini-Hochberg</option> |
| 19 <option value="bonferroni">Bonferroni</option> | 19 <option value="bonferroni">Bonferroni</option> |
| 20 </param> | 20 </param> |
| 21 </xml> | 21 </xml> |
| 22 <xml name="fit_intercept"> | 22 <xml name="fit_intercept"> |
| 23 <param argument="fit_intercept" type="boolean" truevalue="True" falsevalue="False" checked="true" | 23 <param argument="fit_intercept" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Should a constant (a.k.a. bias or intercept) be added to the decision function?"/> |
| 24 label="Should a constant (a.k.a. bias or intercept) be added to the decision function?" help=""/> | |
| 25 </xml> | 24 </xml> |
| 26 <xml name="max_iter"> | 25 <xml name="max_iter"> |
| 27 <param argument="max_iter" type="integer" min="0" value="100" label="Maximum number of iterations taken for the solvers to converge" help=""/> | 26 <param argument="max_iter" type="integer" min="0" value="100" label="Maximum number of iterations taken for the solvers to converge"/> |
| 28 </xml> | 27 </xml> |
| 29 <xml name="multi_class"> | 28 <xml name="multi_class"> |
| 30 <param argument="multi_class" type="select" label="Multi class" help=""> | 29 <param argument="multi_class" type="select" label="Multi class"> |
| 30 <option value="auto" selected="true">auto: selects ‘ovr’ if the data is binary and otherwise selects ‘multinomial’</option> | |
| 31 <option value="ovr">ovr: a binary problem is fit for each label</option> | 31 <option value="ovr">ovr: a binary problem is fit for each label</option> |
| 32 <option value="multinomial">multinomial: the multinomial loss fit across the entire probability distribution, even when the data is binary</option> | 32 <option value="multinomial">multinomial: the multinomial loss fit across the entire probability distribution, even when the data is binary</option> |
| 33 <option value="auto">auto: selects ‘ovr’ if the data is binary and otherwise selects ‘multinomial’</option> | |
| 34 </param> | 33 </param> |
| 35 </xml> | 34 </xml> |
| 36 <xml name="penalty"> | 35 <xml name="penalty"> |
| 37 <param argument="penalty" type="select" label="Norm used in the penalization" help=""> | 36 <param argument="penalty" type="select" label="Norm used in the penalization"> |
| 37 <option value="l2" selected="true">l2</option> | |
| 38 <option value="l1">l1</option> | 38 <option value="l1">l1</option> |
| 39 <option value="l2">l2</option> | 39 <yield/> |
| 40 <option value="customized">customized</option> | |
| 41 </param> | |
| 42 </xml> | |
| 43 <xml name="custom_penalty"> | |
| 44 <param argument="pen" type="text" value="" label="Norm used in the penalization" help=""> | |
| 45 <expand macro="sanitize_query" /> | |
| 46 </param> | 40 </param> |
| 47 </xml> | 41 </xml> |
| 48 <xml name="random_state"> | 42 <xml name="random_state"> |
| 49 <param argument="random_state" type="integer" value="" optional="true" | 43 <param argument="random_state" type="integer" value="" optional="true" label="The seed of the pseudo random number generator to use when shuffling the data"/> |
| 50 label="The seed of the pseudo random number generator to use when shuffling the data" help=""/> | |
| 51 </xml> | 44 </xml> |
| 52 </macros> | 45 </macros> |
| 53 <expand macro="bio_tools"/> | 46 <expand macro="bio_tools"/> |
| 54 <expand macro="requirements"/> | 47 <expand macro="requirements"> |
| 48 <requirement type="package" version="1.5.1">scikit-learn</requirement> | |
| 49 </expand> | |
| 55 <expand macro="version_command"/> | 50 <expand macro="version_command"/> |
| 56 <command detect_errors="exit_code"><![CDATA[ | 51 <command detect_errors="exit_code"><![CDATA[ |
| 57 @CMD@ | 52 @CMD@ |
| 58 ]]></command> | 53 ]]></command> |
| 59 <configfiles> | 54 <configfiles> |
| 60 <configfile name="script_file"><![CDATA[ | 55 <configfile name="script_file"><![CDATA[ |
| 61 @CMD_imports@ | 56 @CMD_IMPORTS@ |
| 62 @CMD_read_inputs@ | 57 @CMD_READ_INPUTS@ |
| 63 | 58 |
| 64 #if $method.method == "pp.calculate_qc_metrics" | 59 #if str($method.method) == 'pp.calculate_qc_metrics': |
| 65 sc.pp.calculate_qc_metrics( | 60 sc.pp.calculate_qc_metrics( |
| 66 adata=adata, | 61 adata=adata, |
| 67 expr_type='$method.expr_type', | 62 expr_type='$method.expr_type', |
| 68 var_type='$method.var_type', | 63 var_type='$method.var_type', |
| 69 #if $method.qc_vars | 64 #if str($method.qc_vars) != '': |
| 70 #set $qc_vars = [str(x.strip()) for x in str($method.qc_vars).split(',')] | 65 #set $qc_vars = [str(x.strip()) for x in str($method.qc_vars).split(',')] |
| 71 qc_vars=$qc_vars, | 66 qc_vars=$qc_vars, |
| 72 #end if | 67 #end if |
| 73 #if $method.percent_top | 68 #if str($method.percent_top) != '': |
| 74 #set $percent_top = [int(x.strip()) for x in str($method.percent_top).split(',')] | 69 #set $percent_top = [int(x.strip()) for x in str($method.percent_top).split(',')] |
| 75 percent_top=$percent_top, | 70 percent_top=$percent_top, |
| 76 #end if | 71 #end if |
| 72 #if str($method.layer) != '': | |
| 73 layer='$method.layer', | |
| 74 #end if | |
| 75 use_raw=$method.use_raw, | |
| 76 log1p=$method.log1p, | |
| 77 inplace=True) | 77 inplace=True) |
| 78 | 78 |
| 79 #else if $method.method == "tl.score_genes" | 79 #else if str($method.method) == 'pp.neighbors': |
| 80 sc.pp.neighbors( | |
| 81 adata=adata, | |
| 82 n_neighbors=$method.n_neighbors, | |
| 83 #if str($method.n_pcs) != '': | |
| 84 n_pcs=$method.n_pcs, | |
| 85 #end if | |
| 86 #if str($method.use_rep) != '': | |
| 87 use_rep='$method.use_rep', | |
| 88 #end if | |
| 89 knn=$method.knn, | |
| 90 method='$method.pp_neighbors_method', | |
| 91 metric='$method.metric', | |
| 92 random_state=$method.random_state, | |
| 93 #if str($method.key_added) != '': | |
| 94 key_added='$method.key_added', | |
| 95 #end if | |
| 96 copy=False) | |
| 97 | |
| 98 #else if str($method.method) == 'tl.score_genes': | |
| 80 sc.tl.score_genes( | 99 sc.tl.score_genes( |
| 81 adata=adata, | 100 adata=adata, |
| 82 #set $gene_list = [str(x.strip()) for x in str($method.gene_list).split(',')] | 101 #set $gene_list = [str(x.strip()) for x in str($method.gene_list).split(',')] |
| 83 gene_list=$gene_list, | 102 gene_list=$gene_list, |
| 84 ctrl_size=$method.ctrl_size, | 103 ctrl_size=$method.ctrl_size, |
| 104 #if str($method.gene_pool) != '': | |
| 105 #set $gene_pool = [str(x.strip()) for x in str($method.gene_pool).split(',')] | |
| 106 gene_pool=$gene_pool, | |
| 107 #end if | |
| 85 score_name='$method.score_name', | 108 score_name='$method.score_name', |
| 86 #if $method.gene_pool | 109 @CMD_PARAMS_SCORE_GENES@) |
| 87 #set $gene_pool = [str(x.strip()) for x in $method.gene_pool.split(',')] | 110 |
| 88 gene_pool=$gene_pool, | 111 #else if str($method.method) == 'tl.score_genes_cell_cycle': |
| 89 #end if | 112 #if str($method.s_genes.format) == 'file': |
| 90 @CMD_score_genes_inputs@) | |
| 91 | |
| 92 #else if $method.method == "tl.score_genes_cell_cycle" | |
| 93 #if str($method.s_genes.format) == 'file' | |
| 94 with open('$method.s_genes.file', 'r') as s_genes_f: | 113 with open('$method.s_genes.file', 'r') as s_genes_f: |
| 95 s_genes = [str(x.strip()) for x in s_genes_f.readlines()] | 114 s_genes = [str(x.strip()) for x in s_genes_f.readlines()] |
| 96 print(s_genes) | 115 print(s_genes) |
| 97 #end if | 116 #end if |
| 98 | 117 |
| 99 #if str($method.g2m_genes.format) == 'file' | 118 #if str($method.g2m_genes.format) == 'file': |
| 100 with open('$method.g2m_genes.file', 'r') as g2m_genes_f: | 119 with open('$method.g2m_genes.file', 'r') as g2m_genes_f: |
| 101 g2m_genes = [str(x.strip()) for x in g2m_genes_f.readlines()] | 120 g2m_genes = [str(x.strip()) for x in g2m_genes_f.readlines()] |
| 102 print(g2m_genes) | 121 print(g2m_genes) |
| 103 #end if | 122 #end if |
| 104 | 123 |
| 105 sc.tl.score_genes_cell_cycle( | 124 sc.tl.score_genes_cell_cycle( |
| 106 adata=adata, | 125 adata=adata, |
| 107 #if str($method.s_genes.format) == 'text' | 126 #if str($method.s_genes.format) == 'text': |
| 108 #set $s_genes = [str(x.strip()) for x in $method.s_genes.text.split(',')] | 127 #set $s_genes = [str(x.strip()) for x in str($method.s_genes.text).split(',')] |
| 109 s_genes=$s_genes, | 128 s_genes=$s_genes, |
| 110 #else if str($method.s_genes.format) == 'file' | 129 #else if str($method.s_genes.format) == 'file': |
| 111 s_genes=s_genes, | 130 s_genes=s_genes, |
| 112 #end if | 131 #end if |
| 113 #if str($method.g2m_genes.format) == 'text' | 132 #if str($method.g2m_genes.format) == 'text': |
| 114 #set $g2m_genes = [str(x.strip()) for x in $method.g2m_genes.text.split(',')] | 133 #set $g2m_genes = [str(x.strip()) for x in str($method.g2m_genes.text).split(',')] |
| 115 g2m_genes=$g2m_genes, | 134 g2m_genes=$g2m_genes, |
| 116 #else if str($method.g2m_genes.format) == 'file' | 135 #else if str($method.g2m_genes.format) == 'file': |
| 117 g2m_genes=g2m_genes, | 136 g2m_genes=g2m_genes, |
| 118 #end if | 137 #end if |
| 119 @CMD_score_genes_inputs@) | 138 @CMD_PARAMS_SCORE_GENES@) |
| 120 | 139 |
| 121 #else if $method.method == 'pp.neighbors' | 140 #else if str($method.method) == 'tl.rank_genes_groups': |
| 122 sc.pp.neighbors( | |
| 123 adata=adata, | |
| 124 n_neighbors=$method.n_neighbors, | |
| 125 #if str($method.n_pcs) != '' | |
| 126 n_pcs=$method.n_pcs, | |
| 127 #end if | |
| 128 #if $method.use_rep | |
| 129 use_rep='$method.use_rep', | |
| 130 #end if | |
| 131 knn=$method.knn, | |
| 132 random_state=$method.random_state, | |
| 133 method='$method.pp_neighbors_method', | |
| 134 metric='$method.metric', | |
| 135 copy=False) | |
| 136 | |
| 137 #else if $method.method == 'tl.rank_genes_groups' | |
| 138 sc.tl.rank_genes_groups( | 141 sc.tl.rank_genes_groups( |
| 139 adata=adata, | 142 adata=adata, |
| 143 #if str($method.groupby) != '': | |
| 140 groupby='$method.groupby', | 144 groupby='$method.groupby', |
| 141 #if $method.groups | 145 #end if |
| 146 use_raw=$method.use_raw, | |
| 147 #if str($method.groups) != '': | |
| 142 #set $group=[x.strip() for x in str($method.groups).split(',')] | 148 #set $group=[x.strip() for x in str($method.groups).split(',')] |
| 143 groups=$group, | 149 groups='$group', |
| 144 #end if | 150 #end if |
| 145 #if $method.ref.rest == 'rest' | 151 #if str($method.layer) != '': |
| 152 layer='$method.layer', | |
| 153 #end if | |
| 154 #if str($method.ref.rest) == 'rest': | |
| 146 reference='$method.ref.rest', | 155 reference='$method.ref.rest', |
| 147 #else | 156 #else |
| 148 reference='$method.ref.reference', | 157 reference='$method.ref.reference', |
| 149 #end if | 158 #end if |
| 159 #if str($method.n_genes) != '': | |
| 150 n_genes=$method.n_genes, | 160 n_genes=$method.n_genes, |
| 161 #end if | |
| 151 method='$method.tl_rank_genes_groups_method.method', | 162 method='$method.tl_rank_genes_groups_method.method', |
| 152 #if $method.tl_rank_genes_groups_method.method != 'logreg' | 163 #if str($method.tl_rank_genes_groups_method.method) != 'logreg': |
| 153 corr_method='$method.tl_rank_genes_groups_method.corr_method', | 164 corr_method='$method.tl_rank_genes_groups_method.corr_method', |
| 154 #else | 165 #end if |
| 166 #if str($method.tl_rank_genes_groups_method.method) == 'wilcoxon': | |
| 167 tie_correct=$method.tl_rank_genes_groups_method.tie_correct, | |
| 168 #end if | |
| 169 #if str($method.tl_rank_genes_groups_method.method) == 'logreg': | |
| 155 solver='$method.tl_rank_genes_groups_method.solver.solver', | 170 solver='$method.tl_rank_genes_groups_method.solver.solver', |
| 156 #if $method.tl_rank_genes_groups_method.solver.solver == 'newton-cg' | 171 #if str($method.tl_rank_genes_groups_method.solver.solver) == 'lbfgs': |
| 157 penalty='l2', | 172 penalty='$method.tl_rank_genes_groups_method.solver.penalty', |
| 158 fit_intercept=$method.tl_rank_genes_groups_method.solver.fit_intercept, | 173 fit_intercept=$method.tl_rank_genes_groups_method.solver.fit_intercept, |
| 159 max_iter=$method.tl_rank_genes_groups_method.solver.max_iter, | 174 max_iter=$method.tl_rank_genes_groups_method.solver.max_iter, |
| 160 multi_class='$method.tl_rank_genes_groups_method.solver.multi_class', | 175 multi_class='$method.tl_rank_genes_groups_method.solver.multi_class', |
| 161 #else if $method.tl_rank_genes_groups_method.solver.solver == 'lbfgs' | 176 #else if str($method.tl_rank_genes_groups_method.solver.solver) == 'newton-cg': |
| 162 penalty='l2', | 177 penalty='$method.tl_rank_genes_groups_method.solver.penalty', |
| 163 fit_intercept=$method.tl_rank_genes_groups_method.solver.fit_intercept, | 178 fit_intercept=$method.tl_rank_genes_groups_method.solver.fit_intercept, |
| 164 max_iter=$method.tl_rank_genes_groups_method.solver.max_iter, | 179 max_iter=$method.tl_rank_genes_groups_method.solver.max_iter, |
| 165 multi_class='$method.tl_rank_genes_groups_method.solver.multi_class', | 180 multi_class='$method.tl_rank_genes_groups_method.solver.multi_class', |
| 166 #else if $method.tl_rank_genes_groups_method.solver.solver == 'liblinear' | 181 #else if str($method.tl_rank_genes_groups_method.solver.solver) == 'liblinear': |
| 167 #if $method.tl_rank_genes_groups_method.solver.penalty.penalty == 'l1' | 182 #if str($method.tl_rank_genes_groups_method.solver.penalty.penalty) == 'l1': |
| 168 penalty='l1', | 183 penalty='l1', |
| 169 #else if $method.tl_rank_genes_groups_method.solver.penalty.penalty == 'l2' | 184 #else: |
| 170 penalty='l2', | 185 penalty='l2', |
| 171 dual=$method.tl_rank_genes_groups_method.solver.penalty.dual, | 186 dual=$method.tl_rank_genes_groups_method.solver.penalty.dual, |
| 172 #else | |
| 173 penalty='$method.tl_rank_genes_groups_method.solver.penalty.pen', | |
| 174 #end if | 187 #end if |
| 175 fit_intercept=$method.tl_rank_genes_groups_method.solver.intercept_scaling.fit_intercept, | 188 fit_intercept=$method.tl_rank_genes_groups_method.solver.intercept_scaling.fit_intercept, |
| 176 #if $method.tl_rank_genes_groups_method.solver.intercept_scaling.fit_intercept == 'True' | 189 #if str($method.tl_rank_genes_groups_method.solver.intercept_scaling.fit_intercept) == 'True': |
| 177 intercept_scaling=$method.tl_rank_genes_groups_method.solver.intercept_scaling.intercept_scaling, | 190 intercept_scaling=$method.tl_rank_genes_groups_method.solver.intercept_scaling.intercept_scaling, |
| 178 #end if | 191 #end if |
| 179 #if str($method.tl_rank_genes_groups_method.solver.random_state) != '' | 192 #if str($method.tl_rank_genes_groups_method.solver.random_state) != '': |
| 180 random_state=$method.tl_rank_genes_groups_method.solver.random_state, | 193 random_state=$method.tl_rank_genes_groups_method.solver.random_state, |
| 181 #end if | 194 #end if |
| 182 #else if $method.tl_rank_genes_groups_method.solver.solver == 'sag' | 195 #else if str($method.tl_rank_genes_groups_method.solver.solver) == 'sag': |
| 183 penalty='l2', | 196 penalty='$method.tl_rank_genes_groups_method.solver.penalty.penalty', |
| 184 fit_intercept=$method.tl_rank_genes_groups_method.solver.fit_intercept, | 197 fit_intercept=$method.tl_rank_genes_groups_method.solver.fit_intercept, |
| 185 #if str($method.tl_rank_genes_groups_method.solver.random_state) != '' | 198 #if str($method.tl_rank_genes_groups_method.solver.random_state) != '': |
| 186 random_state=$method.tl_rank_genes_groups_method.solver.random_state, | 199 random_state=$method.tl_rank_genes_groups_method.solver.random_state, |
| 187 #end if | 200 #end if |
| 188 max_iter=$method.tl_rank_genes_groups_method.solver.max_iter, | 201 max_iter=$method.tl_rank_genes_groups_method.solver.max_iter, |
| 189 multi_class='$method.tl_rank_genes_groups_method.solver.multi_class', | 202 multi_class=$method.tl_rank_genes_groups_method.solver.multi_class, |
| 190 #else if $method.tl_rank_genes_groups_method.solver.solver == 'saga' | 203 #else if str($method.tl_rank_genes_groups_method.solver.solver) == 'saga': |
| 191 #if $method.tl_rank_genes_groups_method.solver.penalty.penalty == 'l1' | 204 #if str($method.tl_rank_genes_groups_method.solver.penalty.penalty) == 'l1': |
| 192 penalty='l1', | 205 penalty='l1', |
| 193 #else if $method.tl_rank_genes_groups_method.solver.penalty.penalty == 'l2' | 206 #else if str($method.tl_rank_genes_groups_method.solver.penalty.penalty) == 'l2': |
| 194 penalty='l2', | 207 penalty='l2', |
| 195 #else | 208 #else if str($method.tl_rank_genes_groups_method.solver.penalty.penalty) == 'elasticnet': |
| 196 penalty='$method.tl_rank_genes_groups_method.solver.penalty.pen', | 209 penalty='elasticnet', |
| 210 #else: | |
| 211 penalty='None', | |
| 197 #end if | 212 #end if |
| 198 fit_intercept=$method.tl_rank_genes_groups_method.solver.fit_intercept, | 213 fit_intercept=$method.tl_rank_genes_groups_method.solver.fit_intercept, |
| 199 multi_class='$method.tl_rank_genes_groups_method.solver.multi_class', | 214 multi_class=$method.tl_rank_genes_groups_method.solver.multi_class, |
| 200 #end if | 215 #end if |
| 201 tol=$method.tl_rank_genes_groups_method.tol, | 216 tol=$method.tl_rank_genes_groups_method.tol, |
| 202 C=$method.tl_rank_genes_groups_method.c, | 217 C=$method.tl_rank_genes_groups_method.c, |
| 203 #end if | 218 #end if |
| 204 use_raw=$method.use_raw) | 219 #if str($method.key_added) != '': |
| 205 | 220 key_added='$method.key_added', |
| 206 #else if $method.method == "tl.marker_gene_overlap" | 221 #end if |
| 222 copy=False) | |
| 223 | |
| 224 #else if str($method.method) == "tl.marker_gene_overlap": | |
| 207 reference_markers = {} | 225 reference_markers = {} |
| 208 #for $i, $s in enumerate($method.reference_markers) | 226 #for $i, $s in enumerate($method.reference_markers) |
| 209 #set $list=[x.strip() for x in str($s.values).split(',')] | 227 #set $list=[x.strip() for x in str($s.values).split(',')] |
| 210 reference_markers['$s.key'] = $list | 228 reference_markers['$s.key'] = $list |
| 211 #end for | 229 #end for |
| 212 | 230 |
| 213 sc.tl.marker_gene_overlap( | 231 # Temporary fix for the issue with "inplace=True" for Pandas dataframes. |
| 214 adata, | 232 # see here: https://github.com/scverse/scanpy/blob/b6193502e11b84fc1b4a011ee9cf08a19da22ebf/src/scanpy/tools/_marker_gene_overlap.py#L167 |
| 215 reference_markers, | 233 marker_overlap_result = sc.tl.marker_gene_overlap( |
| 216 #if $method.key | 234 adata, |
| 217 key='$method.key', | 235 reference_markers, |
| 218 #end if | 236 #if str($method.key) != '': |
| 219 method='$method.overlap.method', | 237 key='$method.key', |
| 220 #if $method.overlap.method == 'overlap_count' and str($method.overlap.normalize) != 'None' | 238 #end if |
| 221 normalize='$method.overlap.normalize', | 239 method='$method.overlap.method', |
| 222 #end if | 240 #if str($method.overlap.method) == 'overlap_count' and str($method.overlap.normalize) != 'None': |
| 223 #if str($method.top_n_markers) != '' | 241 normalize='$method.overlap.normalize', |
| 224 top_n_markers=$method.top_n_markers, | 242 #end if |
| 225 #end if | 243 #if str($method.top_n_markers) != '': |
| 226 #if str($method.adj_pval_threshold) != '' | 244 top_n_markers=$method.top_n_markers, |
| 227 adj_pval_threshold=$method.adj_pval_threshold, | 245 #end if |
| 228 #end if | 246 #if str($method.adj_pval_threshold) != '': |
| 229 #if $method.key_added | 247 adj_pval_threshold=$method.adj_pval_threshold, |
| 230 key_added='$method.key_added', | 248 #end if |
| 231 #end if | 249 #if $method.key_added: |
| 232 inplace=True) | 250 key_added='$method.key_added', |
| 233 | 251 #end if |
| 234 #else if $method.method == "pp.log1p" | 252 inplace=False) |
| 253 | |
| 254 adata.uns['marker_gene_overlap'] = marker_overlap_result | |
| 255 | |
| 256 #else if str($method.method) == "pp.log1p": | |
| 235 sc.pp.log1p( | 257 sc.pp.log1p( |
| 236 adata, | 258 adata, |
| 259 #if str($method.base) != '': | |
| 260 base=$method.base, | |
| 261 #end if | |
| 262 #if str($method.layer) != '': | |
| 263 layer='$method.layer', | |
| 264 #end if | |
| 265 #if str($method.obsm) != '': | |
| 266 obsm='$method.obsm', | |
| 267 #end if | |
| 237 copy=False) | 268 copy=False) |
| 238 | 269 |
| 239 #else if $method.method == "pp.scale" | 270 #else if str($method.method) == "pp.scale": |
| 240 sc.pp.scale( | 271 sc.pp.scale( |
| 241 adata, | 272 adata, |
| 242 zero_center=$method.zero_center, | 273 zero_center=$method.zero_center, |
| 243 #if str($method.max_value) != '' | 274 #if str($method.max_value) != '': |
| 244 max_value=$method.max_value, | 275 max_value=$method.max_value, |
| 245 #end if | 276 #end if |
| 277 #if str($method.layer) != '': | |
| 278 layer='$method.layer', | |
| 279 #end if | |
| 280 #if str($method.obsm) != '': | |
| 281 obsm='$method.obsm', | |
| 282 #end if | |
| 283 #if str($method.mask_obs) != '': | |
| 284 mask_obs='$method.mask_obs', | |
| 285 #end if | |
| 246 copy=False) | 286 copy=False) |
| 247 | 287 |
| 248 #else if $method.method == "pp.sqrt" | 288 #else if str($method.method) == "pp.sqrt": |
| 289 | |
| 290 print("stats before sqrt:", "min=", adata.X.min(), "max=", adata.X.max(), "mean=", adata.X.mean()) | |
| 291 | |
| 249 sc.pp.sqrt( | 292 sc.pp.sqrt( |
| 250 adata, | 293 adata, |
| 251 copy=False) | 294 copy=False) |
| 252 #end if | 295 #end if |
| 253 | 296 |
| 254 @CMD_anndata_write_outputs@ | 297 print("stats after sqrt:", "min=", adata.X.min(), "max=", adata.X.max(), "mean=", adata.X.mean()) |
| 255 ]]></configfile> | 298 |
| 299 @CMD_ANNDATA_WRITE_OUTPUTS@ | |
| 300 ]]> | |
| 301 </configfile> | |
| 256 </configfiles> | 302 </configfiles> |
| 257 <inputs> | 303 <inputs> |
| 258 <expand macro="inputs_anndata"/> | 304 <expand macro="inputs_anndata"/> |
| 259 <conditional name="method"> | 305 <conditional name="method"> |
| 260 <param argument="method" type="select" label="Method used for inspecting"> | 306 <param argument="method" type="select" label="Method used for inspecting"> |
| 261 <option value="pp.calculate_qc_metrics">Calculate quality control metrics, using 'pp.calculate_qc_metrics'</option> | 307 <option value="pp.calculate_qc_metrics">Calculate quality control metrics, using 'pp.calculate_qc_metrics'</option> |
| 262 <option value="pp.neighbors">Compute a neighborhood graph of observations, using 'pp.neighbors'</option> | 308 <option value="pp.neighbors">Compute a neighborhood graph of observations, using 'pp.neighbors'</option> |
| 263 <option value="tl.score_genes">Score a set of genes, using 'tl.score_genes'</option> | 309 <option value="tl.score_genes">Score a set of genes, using 'tl.score_genes'</option> |
| 264 <option value="tl.score_genes_cell_cycle">Score cell cycle genes, using 'tl.score_genes_cell_cycle'</option> | 310 <option value="tl.score_genes_cell_cycle">Score cell cycle genes, using 'tl.score_genes_cell_cycle'</option> |
| 265 <option value="tl.rank_genes_groups">Rank genes for characterizing groups, using 'tl.rank_genes_groups'</option> | 311 <option value="tl.rank_genes_groups">Rank genes for characterizing groups, using 'tl.rank_genes_groups'</option> |
| 266 <!--<option value="tl.marker_gene_overlap">Calculate an overlap score between data-deriven marker genes and provided markers, using 'tl.marker_gene_overlap'</option>--> | 312 <option value="tl.marker_gene_overlap">Calculate an overlap score between data-deriven marker genes and provided markers, using 'tl.marker_gene_overlap'</option> |
| 267 <option value="pp.log1p">Logarithmize the data matrix, using 'pp.log1p'</option> | 313 <option value="pp.log1p">Logarithmize the data matrix, using 'pp.log1p'</option> |
| 268 <option value="pp.scale">Scale data to unit variance and zero mean, using 'pp.scale'</option> | 314 <option value="pp.scale">Scale data to unit variance and zero mean, using 'pp.scale'</option> |
| 269 <option value="pp.sqrt">Square root the data matrix, using 'pp.sqrt'</option> | 315 <option value="pp.sqrt">Square root the data matrix, using 'pp.sqrt'</option> |
| 270 </param> | 316 </param> |
| 271 <when value="pp.calculate_qc_metrics"> | 317 <when value="pp.calculate_qc_metrics"> |
| 272 <param argument="expr_type" type="text" value="counts" label="Name of kind of values in X"> | 318 <param argument="expr_type" type="text" value="counts" label="Name of kind of values in X"> |
| 273 <expand macro="sanitize_query" /> | 319 <expand macro="sanitize_query"/> |
| 274 </param> | 320 </param> |
| 275 <param argument="var_type" type="text" value="genes" label="The kind of thing the variables are"> | 321 <param argument="var_type" type="text" value="genes" label="The kind of thing the variables are"> |
| 276 <expand macro="sanitize_query" /> | 322 <expand macro="sanitize_query"/> |
| 277 </param> | 323 </param> |
| 278 <param argument="qc_vars" type="text" value="" label="Keys for boolean columns of '.var' which identify variables you could want to control for" help="Keys separated by a comma"> | 324 <param argument="qc_vars" type="text" optional="true" value="" label="Keys for boolean columns of '.var' which identify variables you could want to control for" help="Keys separated by a comma"> |
| 279 <expand macro="sanitize_query" /> | 325 <expand macro="sanitize_query"/> |
| 280 </param> | 326 </param> |
| 281 <param argument="percent_top" type="text" value="" label="Proportions of top genes to cover" | 327 <param argument="percent_top" type="text" value="" optional="true" label="Proportions of top genes to cover" |
| 282 help=" Values (integers) are considered 1-indexed, '50' finds cumulative proportion to the 50th most expressed genes. Values separated by a comma. If empty don't calculate"> | 328 help=" Values (integers) are considered 1-indexed, '50' finds cumulative proportion to the 50th most expressed genes. Values separated by a comma. If empty don't calculate"> |
| 283 <expand macro="sanitize_vectors" /> | 329 <expand macro="sanitize_vectors"/> |
| 284 </param> | 330 </param> |
| 331 <expand macro="param_layer"/> | |
| 332 <expand macro="param_use_raw"/> | |
| 333 <param argument="log1p" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Compute log1p transformed annotations"/> | |
| 285 </when> | 334 </when> |
| 286 <when value="pp.neighbors"> | 335 <when value="pp.neighbors"> |
| 287 <param argument="n_neighbors" type="integer" min="0" value="15" label="The size of local neighborhood (in terms of number of neighboring data points) used for manifold approximation" help="Larger values result in more global views of the manifold, while smaller values result in more local data being preserved. In general values should be in the range 2 to 100. If 'knn' is 'True', number of nearest neighbors to be searched. If 'knn' is 'False', a Gaussian kernel width is set to the distance of the 'n_neighbors' neighbor."/> | 336 <param argument="n_neighbors" type="integer" min="0" value="15" label="The size of local neighborhood (in terms of number of neighboring data points) used for manifold approximation" help="Larger values result in more global views of the manifold, while smaller values result in more local data being preserved. In general values should be in the range 2 to 100. If 'knn' is 'True', number of nearest neighbors to be searched. If 'knn' is 'False', a Gaussian kernel width is set to the distance of the 'n_neighbors' neighbor."/> |
| 288 <param argument="n_pcs" type="integer" min="0" value="" optional="true" label="Number of PCs to use" help=""/> | 337 <param argument="n_pcs" type="integer" min="0" value="" optional="true" label="Number of PCs to use"/> |
| 289 <param argument="use_rep" type="text" value="" optional="true" label="Indicated representation to use" help="If not set, the representation is chosen automatically: for n_vars below 50, X is used, otherwise X_pca (uns) is used. If X_pca is not present, it's computed with default parameter"> | 338 <expand macro="param_use_rep"/> |
| 290 <expand macro="sanitize_query" /> | |
| 291 </param> | |
| 292 <param argument="knn" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Use a hard threshold to restrict the number of neighbors to n_neighbors?" help="If true, it considers a knn graph. Otherwise, it uses a Gaussian Kernel to assign low weights to neighbors more distant than the 'n_neighbors' nearest neighbor."/> | 339 <param argument="knn" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Use a hard threshold to restrict the number of neighbors to n_neighbors?" help="If true, it considers a knn graph. Otherwise, it uses a Gaussian Kernel to assign low weights to neighbors more distant than the 'n_neighbors' nearest neighbor."/> |
| 293 <param argument="random_state" type="integer" value="0" label="Numpy random seed" help=""/> | 340 <param name="pp_neighbors_method" argument="method" type="select" label="Method for computing connectivities"> |
| 294 <param name="pp_neighbors_method" argument="method" type="select" label="Method for computing connectivities" help=""> | 341 <option value="umap" selected="true">umap (McInnes et al, 2018)</option> |
| 295 <option value="umap">umap (McInnes et al, 2018)</option> | |
| 296 <option value="gauss">gauss: Gauss kernel following (Coifman et al 2005) with adaptive width (Haghverdi et al 2016)</option> | 342 <option value="gauss">gauss: Gauss kernel following (Coifman et al 2005) with adaptive width (Haghverdi et al 2016)</option> |
| 297 </param> | 343 </param> |
| 298 <param argument="metric" type="select" label="Distance metric" help=""> | 344 <param argument="metric" type="select" label="Distance metric"> |
| 299 <expand macro="distance_metric_options"/> | 345 <expand macro="distance_metric_options"/> |
| 300 </param> | 346 </param> |
| 347 <param argument="random_state" type="integer" value="0" label="Numpy random seed"/> | |
| 348 <param argument="key_added" type="text" value="" optional="true" label="Key to store neighbors, distances and connectivities" help="If specified, the neighbors data is added to .uns[key_added], distances are stored in .obsp[key_added+'_distances'] and connectivities in .obsp[key_added+'_connectivities']"/> | |
| 301 </when> | 349 </when> |
| 302 <when value="tl.score_genes"> | 350 <when value="tl.score_genes"> |
| 303 <param argument="gene_list" type="text" value="" label="The list of gene names used for score calculation" help="Genes separated by a comma"> | 351 <param argument="gene_list" type="text" value="" optional="false" label="The list of gene names used for score calculation" help="Genes separated by a comma"> |
| 304 <expand macro="sanitize_query" /> | 352 <expand macro="sanitize_query"/> |
| 305 </param> | 353 </param> |
| 306 <param argument="ctrl_size" type="integer" value="50" label="Number of reference genes to be sampled" | 354 <param argument="ctrl_size" type="integer" value="50" label="Number of reference genes to be sampled" help="If 'len(gene_list)' is not too low, you can set 'ctrl_size=len(gene_list)'."/> |
| 307 help="If 'len(gene_list)' is not too low, you can set 'ctrl_size=len(gene_list)'."/> | 355 <param argument="gene_pool" type="text" value="" optional="true" label="Genes for sampling the reference set" help="Default is all genes. Genes separated by a comma"> |
| 308 <param argument="gene_pool" type="text" value="" optional="true" label="Genes for sampling the reference set" | 356 <expand macro="sanitize_query"/> |
| 309 help="Default is all genes. Genes separated by a comma"> | 357 </param> |
| 310 <expand macro="sanitize_query" /> | 358 <param argument="score_name" type="text" value="score" label="Name of the field to be added in '.obs'"> |
| 311 </param> | 359 <expand macro="sanitize_query"/> |
| 312 <expand macro="score_genes_params"/> | 360 </param> |
| 313 <param argument="score_name" type="text" value="score" label="Name of the field to be added in '.obs'" help=""> | 361 <expand macro="params_score_genes"/> |
| 314 <expand macro="sanitize_query" /> | |
| 315 </param> | |
| 316 </when> | 362 </when> |
| 317 <when value="tl.score_genes_cell_cycle"> | 363 <when value="tl.score_genes_cell_cycle"> |
| 318 <conditional name='s_genes'> | 364 <conditional name='s_genes'> |
| 319 <param name="format" type="select" label="Format for the list of genes associated with S phase"> | 365 <param name="format" type="select" label="Format for the list of genes associated with S phase"> |
| 366 <option value="text" selected="true">Text</option> | |
| 320 <option value="file">File</option> | 367 <option value="file">File</option> |
| 321 <option value="text" selected="true">Text</option> | |
| 322 </param> | 368 </param> |
| 323 <when value="text"> | 369 <when value="text"> |
| 324 <param name="text" type="text" value="" label="List of genes associated with S phase" help="Genes separated by a comma"> | 370 <param name="text" type="text" value="" label="List of genes associated with S phase" help="Genes separated by a comma"> |
| 325 <expand macro="sanitize_query" /> | 371 <expand macro="sanitize_query"/> |
| 326 </param> | 372 </param> |
| 327 </when> | 373 </when> |
| 328 <when value="file"> | 374 <when value="file"> |
| 329 <param name="file" type="data" format="txt" label="File with the list of genes associated with S phase" help="One gene per line"/> | 375 <param name="file" type="data" format="txt" label="File with the list of genes associated with S phase" help="One gene per line"/> |
| 330 </when> | 376 </when> |
| 331 </conditional> | 377 </conditional> |
| 332 <conditional name='g2m_genes'> | 378 <conditional name='g2m_genes'> |
| 333 <param name="format" type="select" label="Format for the list of genes associated with G2M phase"> | 379 <param name="format" type="select" label="Format for the list of genes associated with G2M phase"> |
| 380 <option value="text" selected="true">Text</option> | |
| 334 <option value="file">File</option> | 381 <option value="file">File</option> |
| 335 <option value="text" selected="true">Text</option> | |
| 336 </param> | 382 </param> |
| 337 <when value="text"> | 383 <when value="text"> |
| 338 <param name="text" type="text" value="" label="List of genes associated with G2M phase" help="Genes separated by a comma"> | 384 <param name="text" type="text" value="" label="List of genes associated with G2M phase" help="Genes separated by a comma"> |
| 339 <expand macro="sanitize_query" /> | 385 <expand macro="sanitize_query"/> |
| 340 </param> | 386 </param> |
| 341 </when> | 387 </when> |
| 342 <when value="file"> | 388 <when value="file"> |
| 343 <param name="file" type="data" format="txt" label="File with the list of genes associated with G2M phase" help="One gene per line"/> | 389 <param name="file" type="data" format="txt" label="File with the list of genes associated with G2M phase" help="One gene per line"/> |
| 344 </when> | 390 </when> |
| 345 </conditional> | 391 </conditional> |
| 346 <expand macro="score_genes_params"/> | 392 <expand macro="params_score_genes"/> |
| 347 </when> | 393 </when> |
| 348 <when value="tl.rank_genes_groups"> | 394 <when value="tl.rank_genes_groups"> |
| 349 <param argument="groupby" type="text" value="" label="The key of the observations grouping to consider" help=""> | 395 <param argument="groupby" type="text" value="" label="The key of the observations grouping to consider"> |
| 350 <expand macro="sanitize_query" /> | 396 <expand macro="sanitize_query"/> |
| 351 </param> | 397 </param> |
| 352 <expand macro="param_use_raw"/> | 398 <expand macro="param_use_raw"/> |
| 353 <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."> | 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."> |
| 354 <expand macro="sanitize_query" /> | 400 <expand macro="sanitize_query"/> |
| 401 </param> | |
| 402 <param argument="layer" type="text" value="" label="Key from adata.layers whose value will be used to perform tests on"> | |
| 403 <expand macro="sanitize_query"/> | |
| 355 </param> | 404 </param> |
| 356 <conditional name="ref"> | 405 <conditional name="ref"> |
| 357 <param name="rest" type="select" label="Comparison"> | 406 <param name="rest" type="select" label="Comparison"> |
| 358 <option value="rest">Compare each group to the union of the rest of the group</option> | 407 <option value="rest" selected="true">Compare each group to the union of the rest of the group</option> |
| 359 <option value="group_id">Compare with respect to a specific group</option> | 408 <option value="group_id">Compare with respect to a specific group</option> |
| 360 </param> | 409 </param> |
| 361 <when value="rest"/> | 410 <when value="rest"/> |
| 362 <when value="group_id"> | 411 <when value="group_id"> |
| 363 <param argument="reference" type="text" value="" label="Group identifier with respect to which compare"> | 412 <param argument="reference" type="text" value="" label="Group identifier with respect to which compare"> |
| 364 <expand macro="sanitize_query" /> | 413 <expand macro="sanitize_query"/> |
| 365 </param> | 414 </param> |
| 366 </when> | 415 </when> |
| 367 </conditional> | 416 </conditional> |
| 368 <param argument="n_genes" type="integer" min="0" value="100" label="The number of genes that appear in the returned tables" help=""/> | 417 <param argument="n_genes" type="integer" min="0" value="" optional="true" label="The number of genes that appear in the returned tables" help="Defaults to all genes"/> |
| 369 <conditional name="tl_rank_genes_groups_method"> | 418 <conditional name="tl_rank_genes_groups_method"> |
| 370 <param argument="method" type="select" label="Method"> | 419 <param argument="method" type="select" label="Method"> |
| 371 <option value="t-test" selected="true">t-test</option> | 420 <option value="t-test" selected="true">t-test</option> |
| 372 <option value="wilcoxon">Wilcoxon-Rank-Sum</option> | 421 <option value="wilcoxon">Wilcoxon-Rank-Sum</option> |
| 373 <option value="t-test_overestim_var">t-test with overestimate of variance of each group</option> | 422 <option value="t-test_overestim_var">t-test with overestimate of variance of each group</option> |
| 376 <when value="t-test"> | 425 <when value="t-test"> |
| 377 <expand macro="corr_method"/> | 426 <expand macro="corr_method"/> |
| 378 </when> | 427 </when> |
| 379 <when value="wilcoxon"> | 428 <when value="wilcoxon"> |
| 380 <expand macro="corr_method"/> | 429 <expand macro="corr_method"/> |
| 430 <param argument="tie_correct" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Use tie correction for 'wilcoxon' scores"/> | |
| 381 </when> | 431 </when> |
| 382 <when value="t-test_overestim_var"> | 432 <when value="t-test_overestim_var"> |
| 383 <expand macro="corr_method"/> | 433 <expand macro="corr_method"/> |
| 384 </when> | 434 </when> |
| 385 <when value="logreg"> | 435 <when value="logreg"> |
| 386 <conditional name="solver"> | 436 <conditional name="solver"> |
| 387 <param argument="solver" type="select" label="Algorithm to use in the optimization problem" help="For small datasets, ‘liblinear’ is a good choice, whereas ‘sag’ and ‘saga’ are faster for large ones. For multiclass problems, only ‘newton-cg’, ‘sag’, ‘saga’ and ‘lbfgs’ handle multinomial loss; ‘liblinear’ is limited to one-versus-rest schemes. ‘newton-cg’, ‘lbfgs’ and ‘sag’ only handle L2 penalty, whereas ‘liblinear’ and ‘saga’ handle L1 penalty."> | 437 <param argument="solver" type="select" label="Algorithm to use in the optimization problem" help="For small datasets, ‘liblinear’ is a good choice, whereas ‘sag’ and ‘saga’ are faster for large ones. For multiclass problems, only ‘newton-cg’, ‘sag’, ‘saga’ and ‘lbfgs’ handle multinomial loss; ‘liblinear’ is limited to one-versus-rest schemes. ‘newton-cg’, ‘lbfgs’ and ‘sag’ only handle L2 penalty, whereas ‘liblinear’ and ‘saga’ handle L1 penalty."> |
| 438 <option value="lbfgs" selected="true">lbfgs</option> | |
| 388 <option value="newton-cg">newton-cg</option> | 439 <option value="newton-cg">newton-cg</option> |
| 389 <option value="lbfgs">lbfgs</option> | |
| 390 <option value="liblinear">liblinear</option> | 440 <option value="liblinear">liblinear</option> |
| 391 <option value="sag">sag</option> | 441 <option value="sag">sag</option> |
| 392 <option value="saga">saga</option> | 442 <option value="saga">saga</option> |
| 393 </param> | 443 </param> |
| 394 <when value="newton-cg"> | 444 <when value="lbfgs"> |
| 445 <param name="penalty" type="boolean" truevalue="l2" falsevalue="None" checked="true" label="use l2 penalty?"/> | |
| 395 <expand macro="fit_intercept"/> | 446 <expand macro="fit_intercept"/> |
| 396 <expand macro="max_iter"/> | 447 <expand macro="max_iter"/> |
| 397 <expand macro="multi_class"/> | 448 <expand macro="multi_class"/> |
| 398 </when> | 449 </when> |
| 399 <when value="lbfgs"> | 450 <when value="newton-cg"> |
| 451 <param name="penalty" type="boolean" truevalue="l2" falsevalue="None" checked="true" label="use l2 penalty?"/> | |
| 400 <expand macro="fit_intercept"/> | 452 <expand macro="fit_intercept"/> |
| 401 <expand macro="max_iter"/> | 453 <expand macro="max_iter"/> |
| 402 <expand macro="multi_class"/> | 454 <expand macro="multi_class"/> |
| 403 </when> | 455 </when> |
| 404 <when value="liblinear"> | 456 <when value="liblinear"> |
| 407 <when value="l1"/> | 459 <when value="l1"/> |
| 408 <when value="l2"> | 460 <when value="l2"> |
| 409 <param argument="dual" type="boolean" truevalue="True" falsevalue="False" checked="false" | 461 <param argument="dual" type="boolean" truevalue="True" falsevalue="False" checked="false" |
| 410 label="Dual (not primal) formulation?" help="Prefer primal when n_samples > n_features"/> | 462 label="Dual (not primal) formulation?" help="Prefer primal when n_samples > n_features"/> |
| 411 </when> | 463 </when> |
| 412 <when value="customized"> | |
| 413 <expand macro="custom_penalty"/> | |
| 414 </when> | |
| 415 </conditional> | 464 </conditional> |
| 416 <conditional name="intercept_scaling"> | 465 <conditional name="intercept_scaling"> |
| 417 <param argument="fit_intercept" type="select" | 466 <param argument="fit_intercept" type="select" label="Should a constant (a.k.a. bias or intercept) be added to the decision function?"> |
| 418 label="Should a constant (a.k.a. bias or intercept) be added to the decision function?" help=""> | 467 <option value="True" selected="true">Yes</option> |
| 419 <option value="True">Yes</option> | |
| 420 <option value="False">No</option> | 468 <option value="False">No</option> |
| 421 </param> | 469 </param> |
| 422 <when value="True"> | 470 <when value="True"> |
| 423 <param argument="intercept_scaling" type="float" value="1.0" | 471 <param argument="intercept_scaling" type="float" value="1.0" label="Intercept scaling" help="x becomes [x, self.intercept_scaling], i.e. a 'synthetic' feature with constant value equal to intercept_scaling is appended to the instance vector. The intercept becomes intercept_scaling * synthetic_feature_weight."/> |
| 424 label="Intercept scaling" | |
| 425 help="x becomes [x, self.intercept_scaling], i.e. a 'synthetic' feature with constant value equal to intercept_scaling is appended to the instance vector. The intercept becomes intercept_scaling * synthetic_feature_weight."/> | |
| 426 </when> | 472 </when> |
| 427 <when value="False"/> | 473 <when value="False"/> |
| 428 </conditional> | 474 </conditional> |
| 429 <expand macro="random_state"/> | 475 <expand macro="random_state"/> |
| 430 </when> | 476 </when> |
| 431 <when value="sag"> | 477 <when value="sag"> |
| 478 <param name="penalty" type="boolean" truevalue="l2" falsevalue="None" checked="true" label="use l2 penalty?"/> | |
| 432 <expand macro="fit_intercept"/> | 479 <expand macro="fit_intercept"/> |
| 433 <expand macro="random_state"/> | 480 <expand macro="random_state"/> |
| 434 <expand macro="max_iter"/> | 481 <expand macro="max_iter"/> |
| 435 <expand macro="multi_class"/> | 482 <expand macro="multi_class"/> |
| 436 </when> | 483 </when> |
| 437 <when value="saga"> | 484 <when value="saga"> |
| 438 <conditional name="penalty"> | 485 <conditional name="penalty"> |
| 439 <expand macro="penalty"/> | 486 <expand macro="penalty"> |
| 487 <option value="elasticnet">elasticnet</option> | |
| 488 <option value="None">None</option> | |
| 489 </expand> | |
| 440 <when value="l1"/> | 490 <when value="l1"/> |
| 441 <when value="l2"/> | 491 <when value="l2"/> |
| 442 <when value="customized"> | 492 <when value="elasticnet"/> |
| 443 <expand macro="custom_penalty"/> | 493 <when value="None"/> |
| 444 </when> | |
| 445 </conditional> | 494 </conditional> |
| 446 <expand macro="fit_intercept"/> | 495 <expand macro="fit_intercept"/> |
| 447 <expand macro="multi_class"/> | 496 <expand macro="multi_class"/> |
| 448 </when> | 497 </when> |
| 449 </conditional> | 498 </conditional> |
| 450 <param argument="tol" type="float" value="1e-4" label="Tolerance for stopping criteria" help=""/> | 499 <param argument="tol" type="float" value="1e-4" label="Tolerance for stopping criteria"/> |
| 451 <param argument="c" type="float" value="1.0" label="Inverse of regularization strength" | 500 <param argument="c" type="float" value="1.0" label="Inverse of regularization strength" help="It must be a positive float. Like in support vector machines, smaller values specify stronger regularization."/> |
| 452 help="It must be a positive float. Like in support vector machines, smaller values specify stronger regularization."/> | |
| 453 </when> | 501 </when> |
| 454 </conditional> | 502 </conditional> |
| 503 <param argument="key_added" type="text" value="" optional="true" label="The key in adata.uns information is saved to"/> | |
| 455 </when> | 504 </when> |
| 456 <!-- With inplace=True, NotImplementedError: Writing Pandas dataframes to h5ad is currently under development. Please use `inplace=False`. --> | 505 <!-- With inplace=True, NotImplementedError: Writing Pandas dataframes to h5ad is currently under development. Please use `inplace=False`. --> |
| 457 <!-- <when value="tl.marker_gene_overlap"> | 506 <!-- Issue is fixed in the script --> |
| 507 <when value="tl.marker_gene_overlap"> | |
| 458 <repeat name="reference_markers" title="Marker genes"> | 508 <repeat name="reference_markers" title="Marker genes"> |
| 459 <param name="key" type="text" value="" label="Cell identity name" help=""/> | 509 <param name="key" type="text" value="" label="Cell identity name"/> |
| 460 <param name="values" type="text" value="" label="List of genes" help="Comma-separated names from 'var'"/> | 510 <param name="values" type="text" value="" label="List of genes" help="Comma-separated names from 'var'"/> |
| 461 </repeat> | 511 </repeat> |
| 462 <param argument="key" type="text" value="rank_genes_groups" label="Key in adata.uns where the rank_genes_groups output is stored"/> | 512 <param argument="key" type="text" value="rank_genes_groups" label="Key in adata.uns where the rank_genes_groups output is stored"/> |
| 463 <conditional name="overlap"> | 513 <conditional name="overlap"> |
| 464 <param argument="method" type="select" label="Method to calculate marker gene overlap"> | 514 <param argument="method" type="select" label="Method to calculate marker gene overlap"> |
| 465 <option value="overlap_count">overlap_count: Intersection of the gene set</option> | 515 <option value="overlap_count" selected="true">overlap_count: Intersection of the gene set</option> |
| 466 <option value="overlap_coef">overlap_coef: Overlap coefficient</option> | 516 <option value="overlap_coef">overlap_coef: Overlap coefficient</option> |
| 467 <option value="jaccard">jaccard: Jaccard index</option> | 517 <option value="jaccard">jaccard: Jaccard index</option> |
| 468 </param> | 518 </param> |
| 469 <when value="overlap_count"> | 519 <when value="overlap_count"> |
| 470 <param argument="normalize" type="select" label="Normalization option for the marker gene overlap output"> | 520 <param argument="normalize" type="select" label="Normalization option for the marker gene overlap output"> |
| 471 <option value="None">None</option> | 521 <option value="None" selected="true">None</option> |
| 472 <option value="reference">reference: Normalization of the data by the total number of marker genes given in the reference annotation per group</option> | 522 <option value="reference">reference: Normalization of the data by the total number of marker genes given in the reference annotation per group</option> |
| 473 <option value="data">data: Normalization of the data by the total number of marker genes used for each cluster</option> | 523 <option value="data">data: Normalization of the data by the total number of marker genes used for each cluster</option> |
| 474 </param> | 524 </param> |
| 475 </when> | 525 </when> |
| 476 <when value="overlap_coef"/> | 526 <when value="overlap_coef"/> |
| 477 <when value="jaccard"/> | 527 <when value="jaccard"/> |
| 478 </conditional> | 528 </conditional> |
| 479 <param argument="top_n_markers" type="integer" optional="true" label="Number of top data-derived marker genes to use" help="By default all calculated marker genes are used. If adj_pval_threshold is set along with top_n_markers, then adj_pval_threshold is ignored."/> | 529 <param argument="top_n_markers" type="integer" optional="true" value="" label="Number of top data-derived marker genes to use" help="By default all calculated marker genes are used. If adj_pval_threshold is set along with top_n_markers, then adj_pval_threshold is ignored."/> |
| 480 <param argument="adj_pval_threshold" type="float" optional="true" label="Significance threshold on the adjusted p-values to select marker genes" help=" This can only be used when adjusted p-values are calculated by 'tl.rank_genes_groups'. If adj_pval_threshold is set along with top_n_markers, then adj_pval_threshold is ignored."/> | 530 <param argument="adj_pval_threshold" type="float" optional="true" value="" label="Significance threshold on the adjusted p-values to select marker genes" help=" This can only be used when adjusted p-values are calculated by 'tl.rank_genes_groups'. If adj_pval_threshold is set along with top_n_markers, then adj_pval_threshold is ignored."/> |
| 481 <param argument="key_added" type="text" value="marker_gene_overlap" optional="true" label="Key that will contain the marker overlap scores in 'uns'"/> | 531 <param argument="key_added" type="text" optional="true" value="" label="Key that will contain the marker overlap scores in 'uns'"/> |
| 482 </when>--> | 532 </when> |
| 483 <when value="pp.log1p"/> | 533 <when value="pp.log1p"> |
| 534 <param argument="base" type="integer" value="" optional="true" label="Base of the logarithm." help="Natural logarithm is used by default."/> | |
| 535 <param argument="layer" type="text" value="" optional="true" label="Entry of layers to transform"> | |
| 536 <expand macro="sanitize_query"/> | |
| 537 </param> | |
| 538 <param argument="obsm" type="text" value="" optional="true" label="Entry of obsm to transform"> | |
| 539 <expand macro="sanitize_query"/> | |
| 540 </param> | |
| 541 </when> | |
| 484 <when value="pp.scale"> | 542 <when value="pp.scale"> |
| 485 <param argument="zero_center" type="boolean" truevalue="True" falsevalue="False" checked="true" | 543 <param argument="zero_center" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Zero center?" help="If not, it omits zero-centering variables, which allows to handle sparse input efficiently."/> |
| 486 label="Zero center?" help="If not, it omits zero-centering variables, which allows to handle sparse input efficiently."/> | 544 <param argument="max_value" type="float" value="" optional="true" label="Maximum value" help="Clip (truncate) to this value after scaling. If not set, it does not clip."/> |
| 487 <param argument="max_value" type="float" value="" optional="true" label="Maximum value" | 545 <param argument="layer" type="text" value="" label="Which element of layers to scale"> |
| 488 help="Clip (truncate) to this value after scaling. If not set, it does not clip."/> | 546 <expand macro="sanitize_query"/> |
| 547 </param> | |
| 548 <param argument="obsm" type="text" value="" label="Which element of obsm to scale"> | |
| 549 <expand macro="sanitize_query"/> | |
| 550 </param> | |
| 551 <param argument="mask_obs" type="text" value="" label="Restrict both the derivation of scaling parameters and the scaling itself to a certain set of observations."> | |
| 552 <expand macro="sanitize_query"/> | |
| 553 </param> | |
| 489 </when> | 554 </when> |
| 490 <when value="pp.sqrt"/> | 555 <when value="pp.sqrt"/> |
| 491 </conditional> | 556 </conditional> |
| 492 <expand macro="inputs_common_advanced"/> | 557 <expand macro="inputs_common_advanced"/> |
| 493 </inputs> | 558 </inputs> |
| 494 <outputs> | 559 <outputs> |
| 495 <expand macro="anndata_outputs"/> | 560 <expand macro="anndata_outputs"/> |
| 496 </outputs> | 561 </outputs> |
| 497 <tests> | 562 <tests> |
| 498 <test expect_num_outputs="2"> | 563 |
| 499 <!-- test 1 --> | 564 <!-- test 1 --> |
| 500 <param name="adata" value="sparce_csr_matrix.h5ad" /> | 565 <test expect_num_outputs="2"> |
| 566 <param name="adata" value="sparce_csr_matrix.h5ad"/> | |
| 501 <conditional name="method"> | 567 <conditional name="method"> |
| 502 <param name="method" value="pp.calculate_qc_metrics"/> | 568 <param name="method" value="pp.calculate_qc_metrics"/> |
| 503 <param name="expr_type" value="counts"/> | |
| 504 <param name="var_type" value="genes"/> | |
| 505 <param name="qc_vars" value="mito,negative"/> | 569 <param name="qc_vars" value="mito,negative"/> |
| 506 <param name="percent_top" value=""/> | 570 </conditional> |
| 571 <section name="advanced_common"> | |
| 572 <param name="show_log" value="true"/> | |
| 573 </section> | |
| 574 <output name="hidden_output"> | |
| 575 <assert_contents> | |
| 576 <has_text_matching expression="sc.pp.calculate_qc_metrics"/> | |
| 577 <has_text_matching expression="expr_type='counts'"/> | |
| 578 <has_text_matching expression="var_type='genes'"/> | |
| 579 <has_text_matching expression="qc_vars=\['mito', 'negative'\]"/> | |
| 580 </assert_contents> | |
| 581 </output> | |
| 582 <output name="anndata_out" ftype="h5ad"> | |
| 583 <assert_contents> | |
| 584 <has_h5_keys keys="obs/n_genes_by_counts,obs/log1p_n_genes_by_counts,obs/total_counts,obs/log1p_total_counts,obs/pct_counts_in_top_50_genes,obs/pct_counts_in_top_100_genes,obs/pct_counts_in_top_200_genes,obs/pct_counts_in_top_500_genes,obs/total_counts_mito,obs/log1p_total_counts_mito,obs/pct_counts_mito,obs/total_counts_negative,obs/log1p_total_counts_negative,obs/pct_counts_negative"/> | |
| 585 <has_h5_keys keys="var/n_cells_by_counts,var/mean_counts,var/log1p_mean_counts,var/pct_dropout_by_counts,var/total_counts,var/log1p_total_counts"/> | |
| 586 </assert_contents> | |
| 587 </output> | |
| 588 </test> | |
| 589 | |
| 590 <!-- test 2 --> | |
| 591 <test expect_num_outputs="2"> | |
| 592 <param name="adata" value="sparce_csr_matrix.h5ad"/> | |
| 593 <conditional name="method"> | |
| 594 <param name="method" value="pp.calculate_qc_metrics"/> | |
| 595 <param name="qc_vars" value="mito,negative"/> | |
| 596 <param name="percent_top" value="50,100,200,300"/> | |
| 507 </conditional> | 597 </conditional> |
| 508 <section name="advanced_common"> | 598 <section name="advanced_common"> |
| 509 <param name="show_log" value="true" /> | 599 <param name="show_log" value="true" /> |
| 510 </section> | 600 </section> |
| 511 <output name="hidden_output"> | 601 <output name="hidden_output"> |
| 512 <assert_contents> | 602 <assert_contents> |
| 513 <has_text_matching expression="sc.pp.calculate_qc_metrics" /> | 603 <has_text_matching expression="sc.pp.calculate_qc_metrics" /> |
| 514 <has_text_matching expression="expr_type='counts'" /> | 604 <has_text_matching expression="expr_type='counts'" /> |
| 515 <has_text_matching expression="var_type='genes'" /> | 605 <has_text_matching expression="var_type='genes'" /> |
| 516 <has_text_matching expression="qc_vars=\['mito', 'negative'\]" /> | 606 <has_text_matching expression="qc_vars=\['mito', 'negative'\]" /> |
| 517 </assert_contents> | 607 <has_text_matching expression="percent_top=\[50, 100, 200, 300\]" /> |
| 518 </output> | 608 </assert_contents> |
| 519 <output name="anndata_out" file="pp.calculate_qc_metrics.sparce_csr_matrix.h5ad" ftype="h5ad" compare="sim_size"/> | 609 </output> |
| 520 </test> | 610 <output name="anndata_out" ftype="h5ad"> |
| 521 <test expect_num_outputs="2"> | 611 <assert_contents> |
| 522 <!-- test 2 --> | 612 <has_h5_keys keys="obs/n_genes_by_counts,obs/log1p_n_genes_by_counts,obs/total_counts,obs/log1p_total_counts,obs/pct_counts_in_top_50_genes,obs/pct_counts_in_top_100_genes,obs/pct_counts_in_top_200_genes,obs/pct_counts_in_top_300_genes,obs/total_counts_mito,obs/log1p_total_counts_mito,obs/pct_counts_mito,obs/total_counts_negative,obs/log1p_total_counts_negative,obs/pct_counts_negative"/> |
| 523 <param name="adata" value="pp.recipe_weinreb17.paul15_subsample.h5ad" /> | 613 <has_h5_keys keys="var/mito,var/negative,var/n_cells_by_counts,var/mean_counts,var/log1p_mean_counts,var/pct_dropout_by_counts,var/total_counts,var/log1p_total_counts"/> |
| 614 </assert_contents> | |
| 615 </output> | |
| 616 </test> | |
| 617 | |
| 618 <!-- test 3 --> | |
| 619 <test expect_num_outputs="2"> | |
| 620 <param name="adata" value="pp.recipe_weinreb17.paul15_subsample.h5ad"/> | |
| 524 <conditional name="method"> | 621 <conditional name="method"> |
| 525 <param name="method" value="pp.neighbors"/> | 622 <param name="method" value="pp.neighbors"/> |
| 526 <param name="n_neighbors" value="15"/> | 623 </conditional> |
| 527 <param name="knn" value="True"/> | 624 <section name="advanced_common"> |
| 528 <param name="random_state" value="0"/> | 625 <param name="show_log" value="true"/> |
| 529 <param name="pp_neighbors_method" value="umap"/> | |
| 530 <param name="metric" value="euclidean"/> | |
| 531 </conditional> | |
| 532 <section name="advanced_common"> | |
| 533 <param name="show_log" value="true" /> | |
| 534 </section> | 626 </section> |
| 535 <output name="hidden_output"> | 627 <output name="hidden_output"> |
| 536 <assert_contents> | 628 <assert_contents> |
| 537 <has_text_matching expression="sc.pp.neighbors"/> | 629 <has_text_matching expression="sc.pp.neighbors"/> |
| 538 <has_text_matching expression="n_neighbors=15"/> | 630 <has_text_matching expression="n_neighbors=15"/> |
| 540 <has_text_matching expression="random_state=0"/> | 632 <has_text_matching expression="random_state=0"/> |
| 541 <has_text_matching expression="method='umap'"/> | 633 <has_text_matching expression="method='umap'"/> |
| 542 <has_text_matching expression="metric='euclidean'"/> | 634 <has_text_matching expression="metric='euclidean'"/> |
| 543 </assert_contents> | 635 </assert_contents> |
| 544 </output> | 636 </output> |
| 545 <output name="anndata_out" file="pp.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5ad" compare="sim_size"> | 637 <output name="anndata_out" ftype="h5ad"> |
| 546 <assert_contents> | 638 <assert_contents> |
| 547 <has_h5_keys keys="X, obs, obsm, uns, var" /> | 639 <has_h5_keys keys="uns/neighbors"/> |
| 548 </assert_contents> | 640 <has_h5_keys keys="obsp/connectivities,obsp/distances"/> |
| 549 </output> | 641 </assert_contents> |
| 550 </test> | 642 </output> |
| 551 <test expect_num_outputs="2"> | 643 </test> |
| 552 <!-- test 3 --> | 644 |
| 553 <param name="adata" value="pp.recipe_weinreb17.paul15_subsample.h5ad" /> | 645 <!-- test 4 --> |
| 646 <test expect_num_outputs="2"> | |
| 647 <param name="adata" value="pp.recipe_weinreb17.paul15_subsample.h5ad"/> | |
| 554 <conditional name="method"> | 648 <conditional name="method"> |
| 555 <param name="method" value="pp.neighbors"/> | 649 <param name="method" value="pp.neighbors"/> |
| 556 <param name="n_neighbors" value="15"/> | |
| 557 <param name="knn" value="True"/> | |
| 558 <param name="pp_neighbors_method" value="gauss"/> | 650 <param name="pp_neighbors_method" value="gauss"/> |
| 559 <param name="metric" value="braycurtis"/> | 651 <param name="metric" value="braycurtis"/> |
| 560 </conditional> | 652 </conditional> |
| 561 <section name="advanced_common"> | 653 <section name="advanced_common"> |
| 562 <param name="show_log" value="true" /> | 654 <param name="show_log" value="true"/> |
| 563 </section> | 655 </section> |
| 564 <output name="hidden_output"> | 656 <output name="hidden_output"> |
| 565 <assert_contents> | 657 <assert_contents> |
| 566 <has_text_matching expression="sc.pp.neighbors"/> | 658 <has_text_matching expression="sc.pp.neighbors"/> |
| 567 <has_text_matching expression="n_neighbors=15"/> | 659 <has_text_matching expression="n_neighbors=15"/> |
| 569 <has_text_matching expression="random_state=0"/> | 661 <has_text_matching expression="random_state=0"/> |
| 570 <has_text_matching expression="method='gauss'"/> | 662 <has_text_matching expression="method='gauss'"/> |
| 571 <has_text_matching expression="metric='braycurtis'"/> | 663 <has_text_matching expression="metric='braycurtis'"/> |
| 572 </assert_contents> | 664 </assert_contents> |
| 573 </output> | 665 </output> |
| 574 <output name="anndata_out" file="pp.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5ad" compare="sim_size"/> | 666 <output name="anndata_out" ftype="h5ad"> |
| 575 </test> | 667 <assert_contents> |
| 576 <test expect_num_outputs="2"> | 668 <has_h5_keys keys="obsp/connectivities,obsp/distances"/> |
| 577 <!-- test 4 --> | 669 </assert_contents> |
| 578 <param name="adata" value="krumsiek11.h5ad" /> | 670 </output> |
| 671 </test> | |
| 672 | |
| 673 <!-- test 5 --> | |
| 674 <test expect_num_outputs="2"> | |
| 675 <param name="adata" value="krumsiek11.h5ad"/> | |
| 579 <conditional name="method"> | 676 <conditional name="method"> |
| 580 <param name="method" value="tl.score_genes"/> | 677 <param name="method" value="tl.score_genes"/> |
| 581 <param name="gene_list" value="Gata2, Fog1"/> | 678 <param name="gene_list" value="Gata2, Fog1"/> |
| 582 <param name="ctrl_size" value="2"/> | 679 <param name="ctrl_size" value="2"/> |
| 583 <param name="n_bins" value="2"/> | 680 <param name="n_bins" value="2"/> |
| 584 <param name="random_state" value="2"/> | 681 <param name="random_state" value="2"/> |
| 585 <param name="use_raw" value="False"/> | 682 </conditional> |
| 586 <param name="score_name" value="score"/> | 683 <section name="advanced_common"> |
| 587 </conditional> | 684 <param name="show_log" value="true"/> |
| 588 <section name="advanced_common"> | 685 </section> |
| 589 <param name="show_log" value="true" /> | 686 <output name="hidden_output"> |
| 590 </section> | 687 <assert_contents> |
| 591 <output name="hidden_output"> | 688 <has_text_matching expression="sc.tl.score_genes"/> |
| 592 <assert_contents> | 689 <has_text_matching expression="gene_list=\['Gata2', 'Fog1'\]"/> |
| 593 <has_text_matching expression="sc.tl.score_genes" /> | 690 <has_text_matching expression="ctrl_size=2"/> |
| 594 <has_text_matching expression="gene_list=\['Gata2', 'Fog1'\]" /> | 691 <has_text_matching expression="score_name='score'"/> |
| 595 <has_text_matching expression="ctrl_size=2" /> | 692 <has_text_matching expression="n_bins=2"/> |
| 596 <has_text_matching expression="score_name='score'" /> | 693 <has_text_matching expression="random_state=2"/> |
| 597 <has_text_matching expression="n_bins=2" /> | 694 <has_text_matching expression="use_raw=False"/> |
| 598 <has_text_matching expression="random_state=2" /> | 695 <has_text_matching expression="copy=False"/> |
| 599 <has_text_matching expression="use_raw=False" /> | 696 </assert_contents> |
| 600 <has_text_matching expression="copy=False" /> | 697 </output> |
| 601 </assert_contents> | 698 <output name="anndata_out" ftype="h5ad"> |
| 602 </output> | 699 <assert_contents> |
| 603 <output name="anndata_out" file="tl.score_genes.krumsiek11.h5ad" ftype="h5ad" compare="sim_size"/> | 700 <has_h5_keys keys="obs/score"/> |
| 604 </test> | 701 </assert_contents> |
| 605 <test expect_num_outputs="2"> | 702 </output> |
| 606 <!-- test 5 --> | 703 </test> |
| 607 <param name="adata" value="krumsiek11.h5ad" /> | 704 |
| 705 <!-- test 6 --> | |
| 706 <test expect_num_outputs="2"> | |
| 707 <param name="adata" value="krumsiek11.h5ad"/> | |
| 608 <conditional name="method"> | 708 <conditional name="method"> |
| 609 <param name="method" value="tl.score_genes_cell_cycle"/> | 709 <param name="method" value="tl.score_genes_cell_cycle"/> |
| 610 <conditional name='s_genes'> | 710 <conditional name='s_genes'> |
| 611 <param name="format" value="text"/> | 711 <param name="format" value="text"/> |
| 612 <param name="text" value="Gata2, Fog1, EgrNab"/> | 712 <param name="text" value="Gata2, Fog1, EgrNab"/> |
| 615 <param name="format" value="text"/> | 715 <param name="format" value="text"/> |
| 616 <param name="text" value="Gata2, Fog1, EgrNab"/> | 716 <param name="text" value="Gata2, Fog1, EgrNab"/> |
| 617 </conditional> | 717 </conditional> |
| 618 <param name="n_bins" value="2"/> | 718 <param name="n_bins" value="2"/> |
| 619 <param name="random_state" value="1"/> | 719 <param name="random_state" value="1"/> |
| 620 <param name="use_raw" value="False"/> | 720 </conditional> |
| 621 </conditional> | 721 <section name="advanced_common"> |
| 622 <section name="advanced_common"> | 722 <param name="show_log" value="true"/> |
| 623 <param name="show_log" value="true" /> | |
| 624 </section> | 723 </section> |
| 625 <output name="hidden_output"> | 724 <output name="hidden_output"> |
| 626 <assert_contents> | 725 <assert_contents> |
| 627 <has_text_matching expression="sc.tl.score_genes_cell_cycle"/> | 726 <has_text_matching expression="sc.tl.score_genes_cell_cycle"/> |
| 628 <has_text_matching expression="s_genes=\['Gata2', 'Fog1', 'EgrNab'\]"/> | 727 <has_text_matching expression="s_genes=\['Gata2', 'Fog1', 'EgrNab'\]"/> |
| 630 <has_text_matching expression="n_bins=2"/> | 729 <has_text_matching expression="n_bins=2"/> |
| 631 <has_text_matching expression="random_state=1"/> | 730 <has_text_matching expression="random_state=1"/> |
| 632 <has_text_matching expression="use_raw=False"/> | 731 <has_text_matching expression="use_raw=False"/> |
| 633 </assert_contents> | 732 </assert_contents> |
| 634 </output> | 733 </output> |
| 635 <output name="anndata_out" file="tl.score_genes_cell_cycle.krumsiek11.h5ad" ftype="h5ad" compare="sim_size"/> | 734 <output name="anndata_out" ftype="h5ad"> |
| 636 </test> | 735 <assert_contents> |
| 637 <test expect_num_outputs="2"> | 736 <has_h5_keys keys="obs/S_score,obs/G2M_score,obs/phase"/> |
| 638 <!-- test 6 --> | 737 </assert_contents> |
| 639 <param name="adata" value="krumsiek11.h5ad" /> | 738 </output> |
| 739 </test> | |
| 740 | |
| 741 <!-- test 7 --> | |
| 742 <test expect_num_outputs="2"> | |
| 743 <param name="adata" value="krumsiek11.h5ad"/> | |
| 640 <conditional name="method"> | 744 <conditional name="method"> |
| 641 <param name="method" value="tl.rank_genes_groups"/> | 745 <param name="method" value="tl.rank_genes_groups"/> |
| 642 <param name="groupby" value="cell_type"/> | 746 <param name="groupby" value="cell_type"/> |
| 643 <param name="use_raw" value="False"/> | |
| 644 <conditional name="ref"> | |
| 645 <param name="rest" value="rest"/> | |
| 646 </conditional> | |
| 647 <param name="n_genes" value="100"/> | 747 <param name="n_genes" value="100"/> |
| 648 <conditional name="tl_rank_genes_groups_method"> | 748 <conditional name="tl_rank_genes_groups_method"> |
| 649 <param name="method" value="t-test_overestim_var"/> | 749 <param name="method" value="t-test_overestim_var"/> |
| 650 <param name="corr_method" value="benjamini-hochberg"/> | |
| 651 </conditional> | 750 </conditional> |
| 652 </conditional> | 751 </conditional> |
| 653 <section name="advanced_common"> | 752 <section name="advanced_common"> |
| 654 <param name="show_log" value="true" /> | 753 <param name="show_log" value="true"/> |
| 655 </section> | 754 </section> |
| 656 <output name="hidden_output"> | 755 <output name="hidden_output"> |
| 657 <assert_contents> | 756 <assert_contents> |
| 658 <has_text_matching expression="sc.tl.rank_genes_groups"/> | 757 <has_text_matching expression="sc.tl.rank_genes_groups"/> |
| 659 <has_text_matching expression="groupby='cell_type'"/> | 758 <has_text_matching expression="groupby='cell_type'"/> |
| 662 <has_text_matching expression="n_genes=100"/> | 761 <has_text_matching expression="n_genes=100"/> |
| 663 <has_text_matching expression="method='t-test_overestim_var'"/> | 762 <has_text_matching expression="method='t-test_overestim_var'"/> |
| 664 <has_text_matching expression="corr_method='benjamini-hochberg'"/> | 763 <has_text_matching expression="corr_method='benjamini-hochberg'"/> |
| 665 </assert_contents> | 764 </assert_contents> |
| 666 </output> | 765 </output> |
| 667 <output name="anndata_out" file="tl.rank_genes_groups.krumsiek11.h5ad" ftype="h5ad" compare="sim_size"/> | 766 <output name="anndata_out" ftype="h5ad"> |
| 668 </test> | 767 <assert_contents> |
| 669 <test expect_num_outputs="2"> | 768 <has_h5_keys keys="uns/rank_genes_groups"/> |
| 670 <!-- test 7 --> | 769 </assert_contents> |
| 671 <param name="adata" value="pbmc68k_reduced.h5ad" /> | 770 </output> |
| 771 </test> | |
| 772 | |
| 773 <!-- test 8 --> | |
| 774 <test expect_num_outputs="2"> | |
| 775 <param name="adata" value="krumsiek11.h5ad"/> | |
| 672 <conditional name="method"> | 776 <conditional name="method"> |
| 673 <param name="method" value="tl.rank_genes_groups"/> | 777 <param name="method" value="tl.rank_genes_groups"/> |
| 674 <param name="groupby" value="louvain"/> | 778 <param name="groupby" value="cell_type"/> |
| 675 <param name="use_raw" value="True"/> | |
| 676 <conditional name="ref"> | |
| 677 <param name="rest" value="rest"/> | |
| 678 </conditional> | |
| 679 <param name="n_genes" value="100"/> | 779 <param name="n_genes" value="100"/> |
| 680 <conditional name="tl_rank_genes_groups_method"> | 780 <conditional name="tl_rank_genes_groups_method"> |
| 681 <param name="method" value="logreg"/> | 781 <param name="method" value="logreg"/> |
| 682 <conditional name="solver"> | |
| 683 <param name="solver" value="newton-cg"/> | |
| 684 <param name="fit_intercept" value="True"/> | |
| 685 <param name="max_iter" value="100"/> | |
| 686 <param name="multi_class" value="auto"/> | |
| 687 </conditional> | |
| 688 <param name="tol" value="1e-4"/> | |
| 689 <param name="c" value="1.0"/> | |
| 690 </conditional> | 782 </conditional> |
| 691 </conditional> | 783 </conditional> |
| 692 <section name="advanced_common"> | 784 <section name="advanced_common"> |
| 693 <param name="show_log" value="true" /> | 785 <param name="show_log" value="true"/> |
| 694 </section> | 786 </section> |
| 695 <output name="hidden_output"> | 787 <output name="hidden_output"> |
| 696 <assert_contents> | 788 <assert_contents> |
| 697 <has_text_matching expression="sc.tl.rank_genes_groups"/> | 789 <has_text_matching expression="sc.tl.rank_genes_groups"/> |
| 698 <has_text_matching expression="groupby='louvain'"/> | 790 <has_text_matching expression="groupby='cell_type'"/> |
| 699 <has_text_matching expression="use_raw=True"/> | 791 <has_text_matching expression="use_raw=False"/> |
| 700 <has_text_matching expression="reference='rest'"/> | 792 <has_text_matching expression="reference='rest'"/> |
| 701 <has_text_matching expression="n_genes=100"/> | 793 <has_text_matching expression="n_genes=100"/> |
| 702 <has_text_matching expression="method='logreg'"/> | 794 <has_text_matching expression="method='logreg'"/> |
| 703 <has_text_matching expression="solver='newton-cg'"/> | 795 <has_text_matching expression="solver='lbfgs'"/> |
| 704 <has_text_matching expression="penalty='l2'"/> | 796 <has_text_matching expression="penalty='l2'"/> |
| 705 <has_text_matching expression="fit_intercept=True"/> | 797 <has_text_matching expression="fit_intercept=True"/> |
| 706 <has_text_matching expression="max_iter=100"/> | 798 <has_text_matching expression="max_iter=100"/> |
| 707 <has_text_matching expression="multi_class='auto'"/> | 799 <has_text_matching expression="multi_class='auto'"/> |
| 708 <has_text_matching expression="tol=0.0001"/> | 800 <has_text_matching expression="tol=0.0001"/> |
| 709 <has_text_matching expression="C=1.0"/> | 801 <has_text_matching expression="C=1.0"/> |
| 710 </assert_contents> | 802 </assert_contents> |
| 711 </output> | 803 </output> |
| 712 <output name="anndata_out" file="tl.rank_genes_groups.newton-cg.pbmc68k_reduced.h5ad" ftype="h5ad" compare="sim_size" delta="1000000" delta_frac="0.15"> | 804 <output name="anndata_out" ftype="h5ad"> |
| 713 <assert_contents> | 805 <assert_contents> |
| 714 <has_h5_keys keys="X, obs, obsm, raw/X, raw/var, uns, var" /> | 806 <has_h5_keys keys="uns/rank_genes_groups"/> |
| 715 </assert_contents> | 807 </assert_contents> |
| 716 </output> | 808 </output> |
| 717 </test> | 809 </test> |
| 718 <test expect_num_outputs="2"> | 810 |
| 719 <!-- test 8 --> | 811 <!-- test 9 --> |
| 720 <param name="adata" value="pbmc68k_reduced.h5ad" /> | 812 <test expect_num_outputs="2"> |
| 813 <param name="adata" value="krumsiek11.h5ad"/> | |
| 721 <conditional name="method"> | 814 <conditional name="method"> |
| 722 <param name="method" value="tl.rank_genes_groups"/> | 815 <param name="method" value="tl.rank_genes_groups"/> |
| 723 <param name="groupby" value="louvain"/> | 816 <param name="groupby" value="cell_type"/> |
| 724 <param name="use_raw" value="True"/> | |
| 725 <conditional name="ref"> | |
| 726 <param name="rest" value="rest"/> | |
| 727 </conditional> | |
| 728 <param name="n_genes" value="100"/> | 817 <param name="n_genes" value="100"/> |
| 729 <conditional name="tl_rank_genes_groups_method"> | 818 <conditional name="tl_rank_genes_groups_method"> |
| 730 <param name="method" value="logreg"/> | 819 <param name="method" value="logreg"/> |
| 731 <conditional name="solver"> | 820 <conditional name="solver"> |
| 732 <param name="solver" value="liblinear"/> | 821 <param name="solver" value="liblinear"/> |
| 733 <conditional name="penalty"> | 822 <conditional name="penalty"> |
| 734 <param name="penalty" value="l2"/> | 823 <param name="penalty" value="l2"/> |
| 735 <param name="dual" value="False"/> | |
| 736 <conditional name="intercept_scaling"> | |
| 737 <param name="fit_intercept" value="True"/> | |
| 738 <param name="intercept_scaling" value="1.0" /> | |
| 739 </conditional> | |
| 740 <param name="random_state" value="1"/> | 824 <param name="random_state" value="1"/> |
| 741 </conditional> | 825 </conditional> |
| 742 </conditional> | 826 </conditional> |
| 743 <param name="tol" value="1e-4"/> | |
| 744 <param name="c" value="1.0"/> | |
| 745 </conditional> | 827 </conditional> |
| 746 </conditional> | 828 </conditional> |
| 747 <section name="advanced_common"> | 829 <section name="advanced_common"> |
| 748 <param name="show_log" value="true" /> | 830 <param name="show_log" value="true"/> |
| 749 </section> | 831 </section> |
| 750 <output name="hidden_output"> | 832 <output name="hidden_output"> |
| 751 <assert_contents> | 833 <assert_contents> |
| 752 <has_text_matching expression="sc.tl.rank_genes_groups"/> | 834 <has_text_matching expression="sc.tl.rank_genes_groups"/> |
| 753 <has_text_matching expression="groupby='louvain'"/> | 835 <has_text_matching expression="groupby='cell_type'"/> |
| 754 <has_text_matching expression="use_raw=True"/> | 836 <has_text_matching expression="use_raw=False"/> |
| 755 <has_text_matching expression="reference='rest'"/> | 837 <has_text_matching expression="reference='rest'"/> |
| 756 <has_text_matching expression="n_genes=100"/> | 838 <has_text_matching expression="n_genes=100"/> |
| 757 <has_text_matching expression="method='logreg'"/> | 839 <has_text_matching expression="method='logreg'"/> |
| 758 <has_text_matching expression="solver='liblinear'"/> | 840 <has_text_matching expression="solver='liblinear'"/> |
| 759 <has_text_matching expression="penalty='l2'"/> | 841 <has_text_matching expression="penalty='l2'"/> |
| 762 <has_text_matching expression="intercept_scaling=1.0"/> | 844 <has_text_matching expression="intercept_scaling=1.0"/> |
| 763 <has_text_matching expression="tol=0.0001"/> | 845 <has_text_matching expression="tol=0.0001"/> |
| 764 <has_text_matching expression="C=1.0"/> | 846 <has_text_matching expression="C=1.0"/> |
| 765 </assert_contents> | 847 </assert_contents> |
| 766 </output> | 848 </output> |
| 767 <output name="anndata_out" file="tl.rank_genes_groups.liblinear.krumsiek11.h5ad" ftype="h5ad" compare="sim_size" delta="1000000" delta_frac="0.15"> | 849 <output name="anndata_out" ftype="h5ad"> |
| 768 <assert_contents> | 850 <assert_contents> |
| 769 <has_h5_keys keys="X, obs, obsm, raw/X, raw/var, uns, var" /> | 851 <has_h5_keys keys="uns/rank_genes_groups"/> |
| 770 </assert_contents> | 852 </assert_contents> |
| 771 </output> | 853 </output> |
| 772 </test> | 854 </test> |
| 773 <!-- test expect_num_outputs="2"> | 855 |
| 774 < test 9 tl.marker_gene_overlap function was commented because inpace=True does not work> | 856 <!-- test 10 --> |
| 775 <param name="adata" value="tl.rank_genes_groups.newton-cg.pbmc68k_reduced.h5ad" /> | 857 <test expect_num_outputs="2"> |
| 858 <param name="adata" value="tl.rank_genes_groups.newton-cg.pbmc68k_reduced.h5ad"/> | |
| 776 <conditional name="method"> | 859 <conditional name="method"> |
| 777 <param name="method" value="tl.marker_gene_overlap"/> | 860 <param name="method" value="tl.marker_gene_overlap"/> |
| 778 <repeat name="reference_markers"> | 861 <repeat name="reference_markers"> |
| 779 <param name="key" value="CD4 T cells"/> | 862 <param name="key" value="CD4 T cells"/> |
| 780 <param name="value" value="IL7R"/> | 863 <param name="values" value="IL7R"/> |
| 781 </repeat> | 864 </repeat> |
| 782 <repeat name="reference_markers"> | 865 <repeat name="reference_markers"> |
| 783 <param name="key" value="CD14+ Monocytes"/> | 866 <param name="key" value="CD14+ Monocytes"/> |
| 784 <param name="value" value="CD14,LYZ"/> | 867 <param name="values" value="CD14,LYZ"/> |
| 785 </repeat> | 868 </repeat> |
| 786 <repeat name="reference_markers"> | 869 <repeat name="reference_markers"> |
| 787 <param name="key" value="B cells"/> | 870 <param name="key" value="B cells"/> |
| 788 <param name="value" value="MS4A1"/> | 871 <param name="values" value="MS4A1"/> |
| 789 </repeat> | 872 </repeat> |
| 790 <conditional name="overlap"> | 873 </conditional> |
| 791 <param name="method" value="overlap_count"/> | 874 <section name="advanced_common"> |
| 792 <param name="normalize" value="None"/> | 875 <param name="show_log" value="true"/> |
| 793 </conditional> | 876 </section> |
| 794 </conditional> | |
| 795 <assert_stdout> | 877 <assert_stdout> |
| 796 <has_text_matching expression="tl.marker_gene_overlap"/> | 878 <has_text_matching expression="marker_gene_overlap"/> |
| 797 <has_text_matching expression="key='rank_genes_groups'"/> | |
| 798 <has_text_matching expression="method='overlap_count'"/> | |
| 799 </assert_stdout> | 879 </assert_stdout> |
| 800 <output name="anndata_out" file="tl.marker_gene_overlap.pbmc68k_reduced.h5ad" ftype="h5ad" compare="sim_size"/> | 880 <output name="hidden_output"> |
| 801 </test> --> | 881 <assert_contents> |
| 802 <test expect_num_outputs="2"> | 882 <has_text_matching expression="sc.tl.marker_gene_overlap"/> |
| 803 <!-- test 10 --> | 883 </assert_contents> |
| 804 <param name="adata" value="krumsiek11.h5ad" /> | 884 </output> |
| 885 <output name="anndata_out" ftype="h5ad"> | |
| 886 <assert_contents> | |
| 887 <has_h5_keys keys="uns/rank_genes_groups"/> | |
| 888 </assert_contents> | |
| 889 </output> | |
| 890 </test> | |
| 891 | |
| 892 <!-- test 11 --> | |
| 893 <test expect_num_outputs="2"> | |
| 894 <param name="adata" value="krumsiek11.h5ad"/> | |
| 805 <conditional name="method"> | 895 <conditional name="method"> |
| 806 <param name="method" value="pp.log1p"/> | 896 <param name="method" value="pp.log1p"/> |
| 807 </conditional> | 897 </conditional> |
| 808 <section name="advanced_common"> | 898 <section name="advanced_common"> |
| 809 <param name="show_log" value="true" /> | 899 <param name="show_log" value="true"/> |
| 810 </section> | 900 </section> |
| 811 <output name="hidden_output"> | 901 <output name="hidden_output"> |
| 812 <assert_contents> | 902 <assert_contents> |
| 813 <has_text_matching expression="sc.pp.log1p"/> | 903 <has_text_matching expression="sc.pp.log1p"/> |
| 814 </assert_contents> | 904 </assert_contents> |
| 815 </output> | 905 </output> |
| 816 <output name="anndata_out" file="pp.log1p.krumsiek11.h5ad" ftype="h5ad" compare="sim_size"/> | 906 <output name="anndata_out" ftype="h5ad"> |
| 817 </test> | 907 <assert_contents> |
| 818 <test expect_num_outputs="2"> | 908 <has_h5_keys keys="uns/log1p"/> |
| 819 <!-- test 11 --> | 909 </assert_contents> |
| 820 <param name="adata" value="krumsiek11.h5ad" /> | 910 </output> |
| 911 </test> | |
| 912 | |
| 913 <!-- test 12 --> | |
| 914 <test expect_num_outputs="2"> | |
| 915 <param name="adata" value="krumsiek11.h5ad"/> | |
| 821 <conditional name="method"> | 916 <conditional name="method"> |
| 822 <param name="method" value="pp.scale"/> | 917 <param name="method" value="pp.scale"/> |
| 823 <param name="zero_center" value="true"/> | 918 </conditional> |
| 824 </conditional> | 919 <section name="advanced_common"> |
| 825 <section name="advanced_common"> | 920 <param name="show_log" value="true"/> |
| 826 <param name="show_log" value="true" /> | |
| 827 </section> | 921 </section> |
| 828 <output name="hidden_output"> | 922 <output name="hidden_output"> |
| 829 <assert_contents> | 923 <assert_contents> |
| 830 <has_text_matching expression="sc.pp.scale"/> | 924 <has_text_matching expression="sc.pp.scale"/> |
| 831 <has_text_matching expression="zero_center=True"/> | 925 <has_text_matching expression="zero_center=True"/> |
| 832 </assert_contents> | 926 </assert_contents> |
| 833 </output> | 927 </output> |
| 834 <output name="anndata_out" file="pp.scale.krumsiek11.h5ad" ftype="h5ad" compare="sim_size"/> | 928 <output name="anndata_out" ftype="h5ad"> |
| 835 </test> | 929 <assert_contents> |
| 836 <test expect_num_outputs="2"> | 930 <has_h5_keys keys="var/mean,var/std"/> |
| 837 <!-- test 12 --> | 931 </assert_contents> |
| 838 <param name="adata" value="krumsiek11.h5ad" /> | 932 </output> </test> |
| 933 | |
| 934 <!-- test 13 --> | |
| 935 <test expect_num_outputs="2"> | |
| 936 <param name="adata" value="krumsiek11.h5ad"/> | |
| 839 <conditional name="method"> | 937 <conditional name="method"> |
| 840 <param name="method" value="pp.scale"/> | 938 <param name="method" value="pp.scale"/> |
| 841 <param name="zero_center" value="true"/> | |
| 842 <param name="max_value" value="10"/> | 939 <param name="max_value" value="10"/> |
| 843 </conditional> | 940 </conditional> |
| 844 <section name="advanced_common"> | 941 <section name="advanced_common"> |
| 845 <param name="show_log" value="true" /> | 942 <param name="show_log" value="true"/> |
| 846 </section> | 943 </section> |
| 847 <output name="hidden_output"> | 944 <output name="hidden_output"> |
| 848 <assert_contents> | 945 <assert_contents> |
| 849 <has_text_matching expression="sc.pp.scale"/> | 946 <has_text_matching expression="sc.pp.scale"/> |
| 850 <has_text_matching expression="zero_center=True"/> | 947 <has_text_matching expression="zero_center=True"/> |
| 851 <has_text_matching expression="max_value=10.0"/> | 948 <has_text_matching expression="max_value=10.0"/> |
| 852 </assert_contents> | 949 </assert_contents> |
| 853 </output> | 950 </output> |
| 854 <output name="anndata_out" file="pp.scale_max_value.krumsiek11.h5ad" ftype="h5ad" compare="sim_size"/> | 951 <output name="anndata_out" ftype="h5ad"> |
| 855 </test> | 952 <assert_contents> |
| 856 <test expect_num_outputs="2"> | 953 <has_h5_keys keys="var/mean,var/std"/> |
| 857 <!-- test 13 --> | 954 </assert_contents> |
| 858 <param name="adata" value="krumsiek11.h5ad" /> | 955 </output> |
| 956 </test> | |
| 957 | |
| 958 <!-- test 14 --> | |
| 959 <test expect_num_outputs="2"> | |
| 960 <param name="adata" value="random-randint.h5ad"/> | |
| 859 <conditional name="method"> | 961 <conditional name="method"> |
| 860 <param name="method" value="pp.sqrt"/> | 962 <param name="method" value="pp.sqrt"/> |
| 861 </conditional> | 963 </conditional> |
| 862 <section name="advanced_common"> | 964 <section name="advanced_common"> |
| 863 <param name="show_log" value="true" /> | 965 <param name="show_log" value="true"/> |
| 864 </section> | 966 </section> |
| 865 <output name="hidden_output"> | 967 <output name="hidden_output"> |
| 866 <assert_contents> | 968 <assert_contents> |
| 867 <has_text_matching expression="sc.pp.sqrt"/> | 969 <has_text_matching expression="sc.pp.sqrt"/> |
| 868 </assert_contents> | 970 <has_text_matching expression="stats before sqrt: min= 0.0 max= 999.0 mean= 499.83777"/> |
| 869 </output> | 971 <has_text_matching expression="stats after sqrt: min= 0.0 max= 31.606962 mean= 21.079018"/> |
| 870 <output name="anndata_out" file="pp.sqrt.krumsiek11.h5ad" ftype="h5ad" compare="sim_size"/> | 972 </assert_contents> |
| 871 </test> | 973 </output> |
| 872 <test expect_num_outputs="2"> | 974 <output name="anndata_out" ftype="h5ad"> |
| 873 <!-- test 13 --> | 975 <assert_contents> |
| 874 <param name="adata" value="sparce_csr_matrix.h5ad" /> | 976 <has_h5_keys keys="obs/index"/> |
| 875 <conditional name="method"> | 977 </assert_contents> |
| 876 <param name="method" value="pp.calculate_qc_metrics"/> | 978 </output> |
| 877 <param name="expr_type" value="counts"/> | |
| 878 <param name="var_type" value="genes"/> | |
| 879 <param name="qc_vars" value="mito,negative"/> | |
| 880 <param name="percent_top" value="50,100,200,300"/> | |
| 881 </conditional> | |
| 882 <section name="advanced_common"> | |
| 883 <param name="show_log" value="true" /> | |
| 884 </section> | |
| 885 <output name="hidden_output"> | |
| 886 <assert_contents> | |
| 887 <has_text_matching expression="sc.pp.calculate_qc_metrics" /> | |
| 888 <has_text_matching expression="expr_type='counts'" /> | |
| 889 <has_text_matching expression="var_type='genes'" /> | |
| 890 <has_text_matching expression="qc_vars=\['mito', 'negative'\]" /> | |
| 891 <has_text_matching expression="percent_top=\[50, 100, 200, 300\]" /> | |
| 892 </assert_contents> | |
| 893 </output> | |
| 894 <output name="anndata_out" file="pp.calculate_qc_metrics.sparce_csr_matrix.h5ad" ftype="h5ad" compare="sim_size"/> | |
| 895 </test> | 979 </test> |
| 896 </tests> | 980 </tests> |
| 897 <help><