Mercurial > repos > iuc > scanpy_normalize
comparison normalize.xml @ 1:05e99dc40db1 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/scanpy/ commit 8ef5f7c6f8728608a3f05bb51e11b642b84a05f5"
| author | iuc |
|---|---|
| date | Wed, 16 Oct 2019 06:24:12 -0400 |
| parents | 61f924b5e618 |
| children | 7ab288f29f14 |
comparison
equal
deleted
inserted
replaced
| 0:61f924b5e618 | 1:05e99dc40db1 |
|---|---|
| 1 <tool id="scanpy_normalize" name="Normalize with scanpy" version="@galaxy_version@"> | 1 <tool id="scanpy_normalize" name="Normalize" version="@galaxy_version@"> |
| 2 <description></description> | 2 <description>with scanpy</description> |
| 3 <macros> | 3 <macros> |
| 4 <import>macros.xml</import> | 4 <import>macros.xml</import> |
| 5 </macros> | 5 </macros> |
| 6 <expand macro="requirements"/> | 6 <expand macro="requirements"/> |
| 7 <expand macro="version_command"/> | 7 <expand macro="version_command"/> |
| 11 <configfiles> | 11 <configfiles> |
| 12 <configfile name="script_file"><![CDATA[ | 12 <configfile name="script_file"><![CDATA[ |
| 13 @CMD_imports@ | 13 @CMD_imports@ |
| 14 @CMD_read_inputs@ | 14 @CMD_read_inputs@ |
| 15 | 15 |
| 16 #if $method.method == "pp.normalize_per_cell" | 16 #if $method.method == "pp.normalize_total" |
| 17 sc.pp.normalize_per_cell( | 17 sc.pp.normalize_total( |
| 18 data=adata, | 18 adata, |
| 19 #if $method.counts_per_cell_after | 19 #if str($method.target_sum)!= '' |
| 20 counts_per_cell_after=$method.counts_per_cell_after, | 20 target_sum=$method.target_sum, |
| 21 #end if | 21 #end if |
| 22 #if $method.counts_per_cell | 22 exclude_highly_expressed=$method.exclude_highly_expressed.exclude_highly_expressed, |
| 23 counts_per_cell=np.loadtxt('$method.counts_per_cell'), | 23 #if $method.exclude_highly_expressed.exclude_highly_expressed == "True" |
| 24 #end if | 24 max_fraction=$method.exclude_highly_expressed.max_fraction, |
| 25 key_n_counts='$method.key_n_counts', | 25 #end if |
| 26 copy=False) | 26 key_added='$method.key_added', |
| 27 adata.obs.to_csv('$anndata_obs', sep='\t') | 27 #if str($method.layers) != 'all' |
| 28 #elif $method.method == "pp.recipe_zheng17" | 28 layers[str(x.strip()) for x in str($method.layers).split(',')], |
| 29 #else | |
| 30 layers='$method.layers', | |
| 31 #end if | |
| 32 #if str($method.layer_norm) != "None" | |
| 33 layer_norm='$method.layer_norm', | |
| 34 #end if | |
| 35 inplace=True) | |
| 36 | |
| 37 #else if $method.method == "pp.recipe_zheng17" | |
| 29 sc.pp.recipe_zheng17( | 38 sc.pp.recipe_zheng17( |
| 30 adata=adata, | 39 adata=adata, |
| 31 n_top_genes=$method.n_top_genes, | 40 n_top_genes=$method.n_top_genes, |
| 32 log=$method.log, | 41 log=$method.log, |
| 33 plot=False, | 42 plot=False, |
| 34 copy=False) | 43 copy=False) |
| 35 #elif $method.method == "pp.recipe_weinreb17" | 44 |
| 45 #else if $method.method == "pp.recipe_weinreb17" | |
| 36 sc.pp.recipe_weinreb17( | 46 sc.pp.recipe_weinreb17( |
| 37 adata=adata, | 47 adata=adata, |
| 38 log=$method.log, | 48 log=$method.log, |
| 39 mean_threshold=$method.mean_threshold, | 49 mean_threshold=$method.mean_threshold, |
| 40 cv_threshold=$method.cv_threshold, | 50 cv_threshold=$method.cv_threshold, |
| 41 n_pcs=$method.n_pcs, | 51 n_pcs=$method.n_pcs, |
| 42 svd_solver='$method.svd_solver', | 52 svd_solver='$method.svd_solver', |
| 43 random_state=$method.random_state, | 53 random_state=$method.random_state, |
| 44 copy=False) | 54 copy=False) |
| 45 #elif $method.method == "pp.recipe_seurat" | 55 |
| 56 #else if $method.method == "pp.recipe_seurat" | |
| 46 sc.pp.recipe_seurat( | 57 sc.pp.recipe_seurat( |
| 47 adata=adata, | 58 adata=adata, |
| 48 log=$method.log, | 59 log=$method.log, |
| 49 plot=False, | 60 plot=False, |
| 50 copy=False) | 61 copy=False) |
| 51 #elif $method.method == "pp.log1p" | 62 |
| 52 sc.pp.log1p( | |
| 53 data=adata, | |
| 54 copy=False) | |
| 55 #elif $method.method == "pp.scale" | |
| 56 sc.pp.scale( | |
| 57 data=adata, | |
| 58 zero_center=$method.zero_center, | |
| 59 #if $method.max_value | |
| 60 max_value=$method.max_value, | |
| 61 #end if | |
| 62 copy=False) | |
| 63 #elif $method.method == "pp.sqrt" | |
| 64 sc.pp.sqrt( | |
| 65 data=adata, | |
| 66 copy=False) | |
| 67 #elif $method.method == "pp.downsample_counts" | |
| 68 sc.pp.downsample_counts( | |
| 69 adata=adata, | |
| 70 target_counts=$method.target_counts, | |
| 71 random_state=$method.random_state, | |
| 72 copy=False) | |
| 73 #end if | 63 #end if |
| 74 | 64 |
| 75 @CMD_anndata_write_outputs@ | 65 @CMD_anndata_write_outputs@ |
| 76 | 66 |
| 77 ]]></configfile> | 67 ]]></configfile> |
| 78 </configfiles> | 68 </configfiles> |
| 79 <inputs> | 69 <inputs> |
| 80 <expand macro="inputs_anndata"/> | 70 <expand macro="inputs_anndata"/> |
| 81 <conditional name="method"> | 71 <conditional name="method"> |
| 82 <param argument="method" type="select" label="Method used for plotting"> | 72 <param argument="method" type="select" label="Method used for normalization"> |
| 83 <option value="pp.normalize_per_cell">Normalize total counts per cell, using `pp.normalize_per_cell`</option> | 73 <option value="pp.normalize_total">Normalize counts per cell, using `pp.normalize_total`</option> |
| 84 <option value="pp.recipe_zheng17">Normalization and filtering as of Zheng et al. (2017), using `pp.recipe_zheng17`</option> | 74 <option value="pp.recipe_zheng17">Normalization and filtering as of Zheng et al. (2017), using `pp.recipe_zheng17`</option> |
| 85 <option value="pp.recipe_weinreb17">Normalization and filtering as of Weinreb et al (2017), using `pp.recipe_weinreb17`</option> | 75 <option value="pp.recipe_weinreb17">Normalization and filtering as of Weinreb et al (2017), using `pp.recipe_weinreb17`</option> |
| 86 <option value="pp.recipe_seurat">Normalization and filtering as of Seurat et al (2015), using `pp.recipe_seurat`</option> | 76 <option value="pp.recipe_seurat">Normalization and filtering as of Seurat et al (2015), using `pp.recipe_seurat`</option> |
| 87 <option value="pp.log1p">Logarithmize the data matrix, using `pp.log1p`</option> | |
| 88 <option value="pp.scale">Scale data to unit variance and zero mean, using `pp.scale`</option> | |
| 89 <option value="pp.sqrt">Square root the data matrix, using `pp.sqrt`</option> | |
| 90 <option value="pp.downsample_counts">Downsample counts, using `pp.downsample_counts`</option> | |
| 91 </param> | 77 </param> |
| 92 <when value="pp.normalize_per_cell"> | 78 <when value="pp.normalize_total"> |
| 93 <param argument="counts_per_cell_after" type="float" value="" optional="true" label="Counts per cell after" help="If not provided, after normalization, each cell has a total count equal to the median of the *counts_per_cell* before normalization."/> | 79 <param argument="target_sum" type="float" value="" optional="true" label="Target sum" help="If not provided, after normalization, each observation (cell) has a total count equal to the median of the total counts (cells) before normalization."/> |
| 94 <param argument="counts_per_cell" type="data" format="tabular,txt" optional="true" label="Precomputed counts per cell" help=""/> | 80 <conditional name="exclude_highly_expressed"> |
| 95 <param argument="key_n_counts" type="text" value="n_counts" label="Name of the field in `adata.obs` where the total counts per cell will be stored" help=""/> | 81 <param argument="exclude_highly_expressed" type="select" label="Exclude (very) highly expressed genes for the computation of the normalization factor (size factor) for each cell" help=" A gene is considered highly expressed, if it has more than max_fraction of the total counts in at least one cell. The not-excluded genes will sum up to target_sum"> |
| 82 <option value="True">Yes</option> | |
| 83 <option value="False" selected="true">No</option> | |
| 84 </param> | |
| 85 <when value="True"> | |
| 86 <param argument="max_fraction" type="float" value="0.05" label="Target sum" help="If not provided, after normalization, each observation (cell) has a total count equal to the median of the total counts (cells) before normalization."/> | |
| 87 </when> | |
| 88 <when value="False"/> | |
| 89 </conditional> | |
| 90 <param argument="key_added" type="text" value="n_counts" label="Name of the field in `adata.obs` where the normalization factor is stored" help=""/> | |
| 91 <param argument="layers" type="text" value="all" label="List of layers to normalize" help="'All' will normalize all layers. The list should be comma-separated."/> | |
| 92 <param argument="layer_norm" type="select" label="How to normalize layers?"> | |
| 93 <option value="None">None: after normalization, for each layer in layers each cell has a total count equal to the median of the median of the total counts (cells) before normalization of the layer.</option> | |
| 94 <option value="after">After: for each layer in layers each cell has a total count equal to target_sum.</option> | |
| 95 <option value="X">X: for each layer in layers each cell has a total count equal to the median of total counts for observations (cells) of adata.X before normalization.</option> | |
| 96 </param> | |
| 96 </when> | 97 </when> |
| 97 <when value="pp.recipe_zheng17"> | 98 <when value="pp.recipe_zheng17"> |
| 98 <param argument="n_top_genes" type="integer" min="0" value="1000" label="Number of genes to keep" help=""/> | 99 <param argument="n_top_genes" type="integer" min="0" value="1000" label="Number of genes to keep" help=""/> |
| 99 <expand macro="param_log"/> | 100 <expand macro="param_log"/> |
| 100 </when> | 101 </when> |
| 107 <expand macro="pca_random_state"/> | 108 <expand macro="pca_random_state"/> |
| 108 </when> | 109 </when> |
| 109 <when value="pp.recipe_seurat"> | 110 <when value="pp.recipe_seurat"> |
| 110 <expand macro="param_log"/> | 111 <expand macro="param_log"/> |
| 111 </when> | 112 </when> |
| 112 <when value="pp.log1p"/> | |
| 113 <when value="pp.scale"> | |
| 114 <param argument="zero_center" type="boolean" truevalue="True" falsevalue="False" checked="true" | |
| 115 label="Zero center?" help="If not, it omits zero-centering variables, which allows to handle sparse input efficiently."/> | |
| 116 <param argument="max_value" type="float" value="" optional="true" label="Maximum value" | |
| 117 help="Clip (truncate) to this value after scaling. If not set, it does not clip."/> | |
| 118 </when> | |
| 119 <when value="pp.sqrt"/> | |
| 120 <when value="pp.downsample_counts"> | |
| 121 <param argument="target_counts" type="integer" min="0" value="20000" | |
| 122 label="Target number of counts for downsampling" help="Cells with more counts than 'target_counts' will be downsampled to have 'target_counts' counts."/> | |
| 123 <param argument="random_state" type="integer" value="0" label="Random seed to change subsampling" help=""/> | |
| 124 </when> | |
| 125 </conditional> | 113 </conditional> |
| 126 <expand macro="anndata_output_format"/> | |
| 127 </inputs> | 114 </inputs> |
| 128 <outputs> | 115 <outputs> |
| 129 <expand macro="anndata_outputs"/> | 116 <expand macro="anndata_outputs"/> |
| 130 <data name="anndata_obs" format="tabular" label="${tool.name} on ${on_string}: Annotation of observations"> | |
| 131 <filter>method['method'] == 'pp.normalize_per_cell'</filter> | |
| 132 </data> | |
| 133 </outputs> | 117 </outputs> |
| 134 <tests> | 118 <tests> |
| 135 <test> | 119 <test> |
| 136 <conditional name="input"> | 120 <!-- test 1 --> |
| 137 <param name="format" value="h5ad" /> | 121 <param name="adata" value="krumsiek11.h5ad" /> |
| 138 <param name="adata" value="krumsiek11.h5ad" /> | 122 <conditional name="method"> |
| 139 </conditional> | 123 <param name="method" value="pp.normalize_total"/> |
| 140 <conditional name="method"> | 124 <conditional name="exclude_highly_expressed"> |
| 141 <param name="method" value="pp.normalize_per_cell"/> | 125 <param name="exclude_highly_expressed" value="False"/> |
| 142 <param name="counts_per_cell_after" value="2"/> | 126 </conditional> |
| 143 <param name="counts_per_cell" value="krumsiek11_counts_per_cell"/> | 127 <param name="key_added" value="n_counts"/> |
| 144 <param name="key_n_counts" value="n_counts"/> | 128 <param name="layers" value="all"/> |
| 145 </conditional> | 129 <param name="layer_norm" value="None"/> |
| 146 <param name="anndata_output_format" value="h5ad"/> | 130 </conditional> |
| 147 <assert_stdout> | 131 <assert_stdout> |
| 148 <has_text_matching expression="sc.pp.normalize_per_cell"/> | 132 <has_text_matching expression="sc.pp.normalize_total"/> |
| 149 <has_text_matching expression="counts_per_cell_after=2.0"/> | 133 <has_text_matching expression="exclude_highly_expressed=False"/> |
| 150 <has_text_matching expression="counts_per_cell=np.loadtxt"/> | 134 <has_text_matching expression="key_added='n_counts'"/> |
| 151 <has_text_matching expression="key_n_counts='n_counts'"/> | 135 <has_text_matching expression="layers='all'"/> |
| 152 </assert_stdout> | 136 </assert_stdout> |
| 153 <output name="anndata_out_h5ad" file="pp.normalize_per_cell.krumsiek11.h5ad" ftype="h5" compare="sim_size"/> | 137 <output name="anndata_out" file="pp.normalize_total.krumsiek11.h5ad" ftype="h5ad" compare="sim_size"/> |
| 154 <output name="anndata_obs" file="pp.normalize_per_cell.obs.krumsiek11.tabular"/> | 138 </test> |
| 155 </test> | 139 <test> |
| 156 <test> | 140 <!-- test 2 --> |
| 157 <conditional name="input"> | 141 <param name="adata" value="random-randint.h5ad"/> |
| 158 <param name="format" value="h5ad" /> | |
| 159 <param name="adata" value="random-randint.h5ad"/> | |
| 160 </conditional> | |
| 161 <conditional name="method"> | 142 <conditional name="method"> |
| 162 <param name="method" value="pp.recipe_zheng17"/> | 143 <param name="method" value="pp.recipe_zheng17"/> |
| 163 <param name="n_top_genes" value="1000"/> | 144 <param name="n_top_genes" value="1000"/> |
| 164 <param name="log" value="True"/> | 145 <param name="log" value="True"/> |
| 165 </conditional> | 146 </conditional> |
| 166 <param name="anndata_output_format" value="h5ad"/> | |
| 167 <assert_stdout> | 147 <assert_stdout> |
| 168 <has_text_matching expression="sc.pp.recipe_zheng17"/> | 148 <has_text_matching expression="sc.pp.recipe_zheng17"/> |
| 169 <has_text_matching expression="n_top_genes=1000"/> | 149 <has_text_matching expression="n_top_genes=1000"/> |
| 170 <has_text_matching expression="log=True"/> | 150 <has_text_matching expression="log=True"/> |
| 171 </assert_stdout> | 151 </assert_stdout> |
| 172 <output name="anndata_out_h5ad" file="pp.recipe_zheng17.random-randint.h5ad" ftype="h5" compare="sim_size"/> | 152 <output name="anndata_out" file="pp.recipe_zheng17.random-randint.h5ad" ftype="h5ad" compare="sim_size"/> |
| 173 </test> | 153 </test> |
| 174 <test> | 154 <test> |
| 175 <conditional name="input"> | 155 <!-- test 3 --> |
| 176 <param name="format" value="h5ad" /> | 156 <param name="adata" value="paul15_subsample.h5ad" /> |
| 177 <param name="adata" value="paul15_subsample.h5ad" /> | |
| 178 </conditional> | |
| 179 <conditional name="method"> | 157 <conditional name="method"> |
| 180 <param name="method" value="pp.recipe_weinreb17"/> | 158 <param name="method" value="pp.recipe_weinreb17"/> |
| 181 <param name="log" value="True"/> | 159 <param name="log" value="True"/> |
| 182 <param name="mean_threshold" value="0.01"/> | 160 <param name="mean_threshold" value="0.01"/> |
| 183 <param name="cv_threshold" value="2.0"/> | 161 <param name="cv_threshold" value="2.0"/> |
| 184 <param name="n_pcs" value="50"/> | 162 <param name="n_pcs" value="50"/> |
| 185 <param name="svd_solver" value="randomized"/> | 163 <param name="svd_solver" value="randomized"/> |
| 186 <param name="random_state" value="0"/> | 164 <param name="random_state" value="0"/> |
| 187 </conditional> | 165 </conditional> |
| 188 <param name="anndata_output_format" value="h5ad" /> | |
| 189 <assert_stdout> | 166 <assert_stdout> |
| 190 <has_text_matching expression="sc.pp.recipe_weinreb17"/> | 167 <has_text_matching expression="sc.pp.recipe_weinreb17"/> |
| 191 <has_text_matching expression="log=True"/> | 168 <has_text_matching expression="log=True"/> |
| 192 <has_text_matching expression="mean_threshold=0.01"/> | 169 <has_text_matching expression="mean_threshold=0.01"/> |
| 193 <has_text_matching expression="cv_threshold=2.0"/> | 170 <has_text_matching expression="cv_threshold=2.0"/> |
| 194 <has_text_matching expression="n_pcs=50"/> | 171 <has_text_matching expression="n_pcs=50"/> |
| 195 <has_text_matching expression="svd_solver='randomized'"/> | 172 <has_text_matching expression="svd_solver='randomized'"/> |
| 196 <has_text_matching expression="random_state=0"/> | 173 <has_text_matching expression="random_state=0"/> |
| 197 </assert_stdout> | 174 </assert_stdout> |
| 198 <output name="anndata_out_h5ad" file="pp.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5" compare="sim_size"/> | 175 <output name="anndata_out" file="pp.recipe_weinreb17.paul15_subsample.updated.h5ad" ftype="h5ad" compare="sim_size"/> |
| 199 </test> | 176 </test> |
| 200 <test> | 177 <test> |
| 201 <conditional name="input"> | 178 <!-- test 4 --> |
| 202 <param name="format" value="h5ad" /> | 179 <param name="adata" value="pp.recipe_zheng17.random-randint.h5ad" /> |
| 203 <param name="adata" value="pp.recipe_zheng17.random-randint.h5ad" /> | |
| 204 </conditional> | |
| 205 <conditional name="method"> | 180 <conditional name="method"> |
| 206 <param name="method" value="pp.recipe_seurat"/> | 181 <param name="method" value="pp.recipe_seurat"/> |
| 207 <param name="log" value="True"/> | 182 <param name="log" value="True"/> |
| 208 </conditional> | 183 </conditional> |
| 209 <param name="anndata_output_format" value="h5ad"/> | |
| 210 <assert_stdout> | 184 <assert_stdout> |
| 211 <has_text_matching expression="sc.pp.recipe_seurat"/> | 185 <has_text_matching expression="sc.pp.recipe_seurat"/> |
| 212 <has_text_matching expression="log=True"/> | 186 <has_text_matching expression="log=True"/> |
| 213 </assert_stdout> | 187 </assert_stdout> |
| 214 <output name="anndata_out_h5ad" file="pp.recipe_seurat.recipe_zheng17.h5ad" ftype="h5" compare="sim_size"/> | 188 <output name="anndata_out" file="pp.recipe_seurat.recipe_zheng17.h5ad" ftype="h5ad" compare="sim_size"/> |
| 215 </test> | 189 </test> |
| 216 <test> | 190 |
| 217 <conditional name="input"> | |
| 218 <param name="format" value="h5ad" /> | |
| 219 <param name="adata" value="krumsiek11.h5ad" /> | |
| 220 </conditional> | |
| 221 <conditional name="method"> | |
| 222 <param name="method" value="pp.log1p"/> | |
| 223 </conditional> | |
| 224 <param name="anndata_output_format" value="h5ad" /> | |
| 225 <assert_stdout> | |
| 226 <has_text_matching expression="sc.pp.log1p"/> | |
| 227 </assert_stdout> | |
| 228 <output name="anndata_out_h5ad" file="pp.log1p.krumsiek11.h5ad" ftype="h5" compare="sim_size"/> | |
| 229 </test> | |
| 230 <test> | |
| 231 <conditional name="input"> | |
| 232 <param name="format" value="h5ad" /> | |
| 233 <param name="adata" value="krumsiek11.h5ad" /> | |
| 234 </conditional> | |
| 235 <conditional name="method"> | |
| 236 <param name="method" value="pp.scale"/> | |
| 237 <param name="zero_center" value="true"/> | |
| 238 </conditional> | |
| 239 <param name="anndata_output_format" value="h5ad" /> | |
| 240 <assert_stdout> | |
| 241 <has_text_matching expression="sc.pp.scale"/> | |
| 242 <has_text_matching expression="zero_center=True"/> | |
| 243 </assert_stdout> | |
| 244 <output name="anndata_out_h5ad" file="pp.scale.krumsiek11.h5ad" ftype="h5" compare="sim_size"/> | |
| 245 </test> | |
| 246 <test> | |
| 247 <conditional name="input"> | |
| 248 <param name="format" value="h5ad" /> | |
| 249 <param name="adata" value="krumsiek11.h5ad" /> | |
| 250 </conditional> | |
| 251 <conditional name="method"> | |
| 252 <param name="method" value="pp.scale"/> | |
| 253 <param name="zero_center" value="true"/> | |
| 254 <param name="max_value" value="10"/> | |
| 255 </conditional> | |
| 256 <param name="anndata_output_format" value="h5ad" /> | |
| 257 <assert_stdout> | |
| 258 <has_text_matching expression="sc.pp.scale"/> | |
| 259 <has_text_matching expression="zero_center=True"/> | |
| 260 <has_text_matching expression="max_value=10.0"/> | |
| 261 </assert_stdout> | |
| 262 <output name="anndata_out_h5ad" file="pp.scale_max_value.krumsiek11.h5ad" ftype="h5" compare="sim_size"/> | |
| 263 </test> | |
| 264 <test> | |
| 265 <conditional name="input"> | |
| 266 <param name="format" value="h5ad" /> | |
| 267 <param name="adata" value="krumsiek11.h5ad" /> | |
| 268 </conditional> | |
| 269 <conditional name="method"> | |
| 270 <param name="method" value="pp.sqrt"/> | |
| 271 </conditional> | |
| 272 <param name="anndata_output_format" value="h5ad" /> | |
| 273 <assert_stdout> | |
| 274 <has_text_matching expression="sc.pp.sqrt"/> | |
| 275 </assert_stdout> | |
| 276 <output name="anndata_out_h5ad" file="pp.sqrt.krumsiek11.h5ad" ftype="h5" compare="sim_size"/> | |
| 277 </test> | |
| 278 <test> | |
| 279 <conditional name="input"> | |
| 280 <param name="format" value="h5ad" /> | |
| 281 <param name="adata" value="random-randint.h5ad" /> | |
| 282 </conditional> | |
| 283 <conditional name="method"> | |
| 284 <param name="method" value="pp.downsample_counts"/> | |
| 285 <param name="target_counts" value="20000"/> | |
| 286 <param name="random_state" value="0"/> | |
| 287 </conditional> | |
| 288 <param name="anndata_output_format" value="h5ad" /> | |
| 289 <assert_stdout> | |
| 290 <has_text_matching expression="sc.pp.downsample_counts"/> | |
| 291 <has_text_matching expression="target_counts=20000"/> | |
| 292 <has_text_matching expression="random_state=0"/> | |
| 293 </assert_stdout> | |
| 294 <output name="anndata_out_h5ad" ftype="h5"> | |
| 295 <assert_contents> | |
| 296 <has_h5_keys keys="X, obs, var" /> | |
| 297 </assert_contents> | |
| 298 </output> | |
| 299 </test> | |
| 300 </tests> | 191 </tests> |
| 301 <help><![CDATA[ | 192 <help><![CDATA[ |
| 302 Normalize total counts per cell (`pp.normalize_per_cell`) | 193 Normalize total counts per cell (`pp.normalize_per_cell`) |
| 303 ========================================================= | 194 ========================================================= |
| 304 | 195 |
| 306 the same total count after normalization. | 197 the same total count after normalization. |
| 307 | 198 |
| 308 Similar functions are used, for example, by Seurat, Cell Ranger or SPRING. | 199 Similar functions are used, for example, by Seurat, Cell Ranger or SPRING. |
| 309 | 200 |
| 310 More details on the `scanpy documentation | 201 More details on the `scanpy documentation |
| 311 <https://scanpy.readthedocs.io/en/latest/api/scanpy.pp.normalize_per_cell.html>`__ | 202 <https://icb-scanpy.readthedocs-hosted.com/en/stable/api/scanpy.pp.normalize_per_cell.html>`__ |
| 312 | 203 |
| 313 | 204 |
| 314 Normalization and filtering as of Zheng et al. (2017), the Cell Ranger R Kit of 10x Genomics (`pp.recipe_zheng17`) | 205 Normalization and filtering as of Zheng et al. (2017), the Cell Ranger R Kit of 10x Genomics (`pp.recipe_zheng17`) |
| 315 ================================================================================================================== | 206 ================================================================================================================== |
| 316 | 207 |
| 325 - renormalize after filtering | 216 - renormalize after filtering |
| 326 - log transform (if needed) | 217 - log transform (if needed) |
| 327 - scale to unit variance and shift to zero mean | 218 - scale to unit variance and shift to zero mean |
| 328 | 219 |
| 329 More details on the `scanpy documentation | 220 More details on the `scanpy documentation |
| 330 <https://scanpy.readthedocs.io/en/latest/api/scanpy.pp.recipe_zheng17.html>`__ | 221 <https://icb-scanpy.readthedocs-hosted.com/en/stable/api/scanpy.pp.recipe_zheng17.html>`__ |
| 331 | 222 |
| 332 | 223 |
| 333 Normalization and filtering as of Weinreb et al (2017) (`pp.recipe_weinreb17`) | 224 Normalization and filtering as of Weinreb et al (2017) (`pp.recipe_weinreb17`) |
| 334 ============================================================================== | 225 ============================================================================== |
| 335 | 226 |
| 336 Expects non-logarithmized data. If using logarithmized data, pass `log=False`. | 227 Expects non-logarithmized data. If using logarithmized data, pass `log=False`. |
| 337 | 228 |
| 338 More details on the `scanpy documentation | 229 More details on the `scanpy documentation |
| 339 <https://scanpy.readthedocs.io/en/latest/api/scanpy.pp.recipe_weinreb17.html>`__ | 230 <https://icb-scanpy.readthedocs-hosted.com/en/stable/api/scanpy.pp.recipe_weinreb17.html>`__ |
| 340 | 231 |
| 341 | 232 |
| 342 Normalization and filtering as of Seurat et al (2015) (`pp.recipe_seurat`) | 233 Normalization and filtering as of Seurat et al (2015) (`pp.recipe_seurat`) |
| 343 ========================================================================== | 234 ========================================================================== |
| 344 | 235 |
| 345 This uses a particular preprocessing. | 236 This uses a particular preprocessing. |
| 346 | 237 |
| 347 Expects non-logarithmized data. If using logarithmized data, pass `log=False`. | 238 Expects non-logarithmized data. If using logarithmized data, pass `log=False`. |
| 348 | 239 |
| 349 More details on the `scanpy documentation | 240 More details on the `scanpy documentation |
| 350 <https://scanpy.readthedocs.io/en/latest/api/scanpy.pp.recipe_seurat.html>`__ | 241 <https://icb-scanpy.readthedocs-hosted.com/en/stable/api/scanpy.pp.recipe_seurat.html>`__ |
| 351 | |
| 352 Logarithmize the data matrix (`pp.log1p`) | |
| 353 ========================================= | |
| 354 | |
| 355 More details on the `scanpy documentation | |
| 356 <https://scanpy.readthedocs.io/en/latest/api/scanpy.pp.log1p.html>`__ | |
| 357 | |
| 358 Scale data to unit variance and zero mean (`pp.scale`) | |
| 359 ====================================================== | |
| 360 | |
| 361 More details on the `scanpy documentation | |
| 362 <https://scanpy.readthedocs.io/en/latest/api/scanpy.pp.scale.html>`__ | |
| 363 | |
| 364 Computes the square root the data matrix (`pp.sqrt`) | |
| 365 ==================================================== | |
| 366 | |
| 367 `X = sqrt(X)` | |
| 368 | |
| 369 Downsample counts (`pp.downsample_counts`) | |
| 370 ========================================== | |
| 371 | |
| 372 Downsample counts so that each cell has no more than `target_counts`. Cells with fewer counts than `target_counts` are unaffected by this. This | |
| 373 has been implemented by M. D. Luecken. | |
| 374 | |
| 375 More details on the `scanpy documentation | |
| 376 <https://scanpy.readthedocs.io/en/latest/api/scanpy.pp.downsample_counts.html>`__ | |
| 377 | 242 |
| 378 ]]></help> | 243 ]]></help> |
| 379 <expand macro="citations"/> | 244 <expand macro="citations"/> |
| 380 </tool> | 245 </tool> |
