Mercurial > repos > iuc > snapatac2_preprocessing
comparison preprocessing.xml @ 1:cec3e76eaf05 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/snapatac2 commit 1e34deee1e39c0c65e1e29a9d28becc7aaf23a4f
author | iuc |
---|---|
date | Thu, 23 May 2024 15:20:02 +0000 |
parents | 00a6721e1f81 |
children | 48d9421bf176 |
comparison
equal
deleted
inserted
replaced
0:00a6721e1f81 | 1:cec3e76eaf05 |
---|---|
20 @CMD_read_inputs@ | 20 @CMD_read_inputs@ |
21 #end if | 21 #end if |
22 | 22 |
23 #if $method.method == 'pp.make_fragment_file' | 23 #if $method.method == 'pp.make_fragment_file' |
24 sa.pp.make_fragment_file( | 24 sa.pp.make_fragment_file( |
25 bam_file = '$method.bam_file', | 25 bam_file = '$method.bam_file', |
26 is_paired = $method.is_paired, | 26 is_paired = $method.is_paired, |
27 #if $method.barcode.extract_type == 'from_tag' | 27 #if $method.barcode.extract_type == 'from_tag' |
28 #if $method.barcode.barcode_tag != '' | 28 #if $method.barcode.barcode_tag != '' |
29 barcode_tag = '$method.barcode.barcode_tag', | 29 barcode_tag = '$method.barcode.barcode_tag', |
30 #end if | 30 #end if |
31 #elif $method.barcode.extract_type == 'from_read_names' | 31 #elif $method.barcode.extract_type == 'from_read_names' |
32 #if $method.barcode.barcode_regex != '' | 32 #if $method.barcode.barcode_regex != '' |
33 barcode_regex = '$method.barcode.barcode_regex', | 33 barcode_regex = '$method.barcode.barcode_regex', |
34 #end if | 34 #end if |
35 #end if | 35 #end if |
36 #if $method.umi_tag != '' | 36 #if $method.umi_tag != '' |
37 umi_tag = '$method.umi_tag', | 37 umi_tag = '$method.umi_tag', |
38 #end if | 38 #end if |
39 #if $method.umi_regex != '' | 39 #if $method.umi_regex != '' |
40 umi_regex = '$method.umi_regex', | 40 umi_regex = '$method.umi_regex', |
41 #end if | 41 #end if |
42 shift_right = $method.shift_right, | 42 shift_right = $method.shift_right, |
43 shift_left = $method.shift_left, | 43 shift_left = $method.shift_left, |
44 min_mapq = $method.min_mapq, | 44 min_mapq = $method.min_mapq, |
45 chunk_size = $method.chunk_size, | 45 chunk_size = $method.chunk_size, |
46 compression = 'gzip', | 46 compression = 'gzip', |
47 output_file = '$fragments_out', | 47 output_file = '$fragments_out', |
48 tempdir = "." | 48 tempdir = "." |
49 ) | 49 ) |
50 | 50 |
51 #else if $method.method == 'pp.import_data' | 51 #else if $method.method == 'pp.import_data' |
52 import csv | 52 import csv |
53 with open('$method.chrom_sizes') as f: | 53 with open('$method.chrom_sizes') as f: |
54 chr_sizes = {x[0]:int(x[1]) for x in csv.reader(f, delimiter='\t')} | 54 chr_sizes = {x[0]:int(x[1]) for x in csv.reader(f, delimiter='\t')} |
55 | 55 |
56 sa.pp.import_data( | 56 sa.pp.import_data( |
57 fragment_file = '$method.fragment_file', | 57 fragment_file = '$method.fragment_file', |
58 chrom_sizes = chr_sizes, | 58 chrom_sizes = chr_sizes, |
59 min_num_fragments = $method.min_num_fragments, | 59 min_num_fragments = $method.min_num_fragments, |
60 sorted_by_barcode = $method.sorted_by_barcode, | 60 sorted_by_barcode = $method.sorted_by_barcode, |
61 #if str($method.whitelist) != 'None' | 61 #if str($method.whitelist) != 'None' |
62 whitelist = '$method.whitelist', | 62 whitelist = '$method.whitelist', |
63 #end if | 63 #end if |
64 shift_left = $method.shift_left, | 64 shift_left = $method.shift_left, |
65 shift_right = $method.shift_right, | 65 shift_right = $method.shift_right, |
66 #set $chr_mt = ([x.strip() for x in str($method.chrM).split(',')]) | 66 #set $chr_mt = ([x.strip() for x in str($method.chrM).split(',')]) |
67 chrM = $chr_mt, | 67 chrM = $chr_mt, |
68 chunk_size = $method.chunk_size, | 68 chunk_size = $method.chunk_size, |
69 file = 'anndata.h5ad', | 69 file = 'anndata.h5ad', |
70 n_jobs = os.getenv("GALAXY_SLOTS", 4) | 70 n_jobs = int(os.getenv("GALAXY_SLOTS", 4)) |
71 ) | 71 ) |
72 | 72 |
73 #else if $method.method == 'pp.add_tile_matrix' | 73 #else if $method.method == 'pp.add_tile_matrix' |
74 sa.pp.add_tile_matrix( | 74 sa.pp.add_tile_matrix( |
75 adata, | 75 adata, |
76 bin_size = $method.bin_size, | 76 bin_size = $method.bin_size, |
77 inplace = True, | 77 chunk_size = $method.chunk_size, |
78 chunk_size = $method.chunk_size, | 78 #if $method.exclude_chroms != '' |
79 #if $method.exclude_chroms != '' | 79 #set $excl_chroms = ([x.strip() for x in str($method.exclude_chroms).split(',')]) |
80 #set $excl_chroms = ([x.strip() for x in str($method.exclude_chroms).split(',')]) | 80 exclude_chroms = $excl_chroms, |
81 exclude_chroms = $excl_chroms, | 81 #end if |
82 #end if | 82 #if $method.min_frag_size |
83 #if $method.min_frag_size | 83 min_frag_size = $method.min_frag_size, |
84 min_frag_size = $method.min_frag_size, | 84 #end if |
85 #end if | 85 #if $method.max_frag_size |
86 #if $method.max_frag_size | 86 max_frag_size = $method.max_frag_size, |
87 max_frag_size = $method.max_frag_size, | 87 #end if |
88 #end if | 88 ##counting_strategy = '$method.counting_strategy', |
89 ##counting_strategy = '$method.counting_strategy', | 89 count_frag_as_reads = $method.count_frag_as_reads, |
90 count_frag_as_reads = $method.count_frag_as_reads, | 90 n_jobs = int(os.getenv("GALAXY_SLOTS", 4)) |
91 n_jobs = os.getenv("GALAXY_SLOTS", 4) | |
92 ) | 91 ) |
93 | 92 |
94 #else if $method.method == 'pp.make_gene_matrix' | 93 #else if $method.method == 'pp.make_gene_matrix' |
95 sa.pp.make_gene_matrix( | 94 sa.pp.make_gene_matrix( |
96 adata, | 95 adata, |
97 gene_anno = '$method.gene_anno', | 96 gene_anno = '$method.gene_anno', |
98 inplace = True, | 97 chunk_size = $method.chunk_size, |
99 chunk_size = $method.chunk_size, | 98 use_x = $method.use_x, |
100 use_x = $method.use_x, | 99 id_type = '$method.id_type', |
101 id_type = '$method.id_type', | 100 transcript_name_key = '$method.transcript_name_key', |
102 transcript_name_key = '$method.transcript_name_key', | 101 transcript_id_key = '$method.transcript_id_key', |
103 transcript_id_key = '$method.transcript_id_key', | 102 gene_name_key = '$method.gene_name_key', |
104 gene_name_key = '$method.gene_name_key', | 103 gene_id_key = '$method.gene_id_key', |
105 gene_id_key = '$method.gene_id_key', | 104 #if $method.min_frag_size |
106 #if $method.min_frag_size | 105 min_frag_size = $method.min_frag_size, |
107 min_frag_size = $method.min_frag_size, | 106 #end if |
108 #end if | 107 #if $method.max_frag_size |
109 #if $method.max_frag_size | 108 max_frag_size = $method.max_frag_size, |
110 max_frag_size = $method.max_frag_size, | 109 #end if |
111 #end if | 110 ##counting_strategy = '$method.counting_strategy' |
112 ##counting_strategy = '$method.counting_strategy' | 111 count_frag_as_reads = $method.count_frag_as_reads |
113 count_frag_as_reads = $method.count_frag_as_reads | |
114 ) | 112 ) |
115 | 113 |
116 #else if $method.method == 'pp.filter_cells' | 114 #else if $method.method == 'pp.filter_cells' |
117 sa.pp.filter_cells( | 115 sa.pp.filter_cells( |
118 adata, | 116 adata, |
119 min_counts = $method.min_counts, | 117 min_counts = $method.min_counts, |
120 min_tsse = $method.min_tsse, | 118 min_tsse = $method.min_tsse, |
121 #if $method.max_counts | 119 #if $method.max_counts |
122 max_counts = $method.max_counts, | 120 max_counts = $method.max_counts, |
123 #end if | 121 #end if |
124 #if $method.max_tsse | 122 #if $method.max_tsse |
125 max_tsse = $method.max_tsse, | 123 max_tsse = $method.max_tsse, |
126 #end if | 124 #end if |
127 inplace = True, | 125 inplace = True, |
128 n_jobs = os.getenv("GALAXY_SLOTS", 4) | 126 n_jobs = int(os.getenv("GALAXY_SLOTS", 4)) |
129 ) | 127 ) |
130 | 128 |
131 #else if $method.method == 'pp.select_features' | 129 #else if $method.method == 'pp.select_features' |
132 sa.pp.select_features( | 130 sa.pp.select_features( |
133 adata, | 131 adata, |
134 n_features = $method.n_features, | 132 n_features = $method.n_features, |
135 filter_lower_quantile = $method.filter_lower_quantile, | 133 filter_lower_quantile = $method.filter_lower_quantile, |
136 filter_upper_quantile = $method.filter_upper_quantile, | 134 filter_upper_quantile = $method.filter_upper_quantile, |
137 #if str($method.whitelist) != 'None' | 135 #if str($method.whitelist) != 'None' |
138 whitelist = '$method.whitelist', | 136 whitelist = '$method.whitelist', |
139 #end if | 137 #end if |
140 #if str($method.blacklist) != 'None' | 138 #if str($method.blacklist) != 'None' |
141 blacklist = '$method.blacklist', | 139 blacklist = '$method.blacklist', |
142 #end if | 140 #end if |
143 max_iter = $method.max_iter, | 141 max_iter = $method.max_iter, |
144 inplace = True, | 142 inplace = True, |
145 n_jobs = os.getenv("GALAXY_SLOTS", 4) | 143 n_jobs = int(os.getenv("GALAXY_SLOTS", 4)) |
146 ) | 144 ) |
147 | 145 |
148 #else if $method.method == 'pp.scrublet' | 146 #else if $method.method == 'pp.scrublet' |
149 sa.pp.scrublet( | 147 sa.pp.scrublet( |
150 adata, | 148 adata, |
151 #if $method.features | 149 #if $method.features |
152 features = '$method.features', | 150 features = '$method.features', |
153 #end if | 151 #end if |
154 n_comps = $method.n_comps, | 152 n_comps = $method.n_comps, |
155 sim_doublet_ratio = $method.sim_doublet_ratio, | 153 sim_doublet_ratio = $method.sim_doublet_ratio, |
156 expected_doublet_rate = $method.expected_doublet_rate, | 154 expected_doublet_rate = $method.expected_doublet_rate, |
157 #if $method.n_neighbors | 155 #if $method.n_neighbors |
158 n_neighbors = $method.n_neighbors, | 156 n_neighbors = $method.n_neighbors, |
159 #end if | 157 #end if |
160 use_approx_neighbors = $method.use_approx_neighbors, | 158 use_approx_neighbors = $method.use_approx_neighbors, |
161 random_state = $method.random_state, | 159 random_state = $method.random_state, |
162 inplace = True, | 160 inplace = True, |
163 n_jobs = os.getenv("GALAXY_SLOTS", 4) | 161 n_jobs = int(os.getenv("GALAXY_SLOTS", 4)) |
164 ) | 162 ) |
165 | 163 |
166 #else if $method.method == 'pp.filter_doublets' | 164 #else if $method.method == 'pp.filter_doublets' |
167 sa.pp.filter_doublets( | 165 sa.pp.filter_doublets( |
168 adata, | 166 adata, |
169 #if $method.probability_threshold | 167 #if $method.probability_threshold |
170 probability_threshold = $method.probability_threshold, | 168 probability_threshold = $method.probability_threshold, |
171 #end if | 169 #end if |
172 #if $method.score_threshold | 170 #if $method.score_threshold |
173 score_threshold = $method.score_threshold, | 171 score_threshold = $method.score_threshold, |
174 #end if | 172 #end if |
175 inplace = True, | 173 inplace = True, |
176 n_jobs = os.getenv("GALAXY_SLOTS", 4) | 174 n_jobs = int(os.getenv("GALAXY_SLOTS", 4)) |
177 ) | 175 ) |
178 | 176 |
179 #else if $method.method == 'pp.mnc_correct' | 177 #else if $method.method == 'pp.mnc_correct' |
180 sa.pp.mnc_correct( | 178 sa.pp.mnc_correct( |
181 adata, | 179 adata, |
182 batch = '$method.batch', | 180 batch = '$method.batch', |
183 n_neighbors = $method.n_neighbors, | 181 n_neighbors = $method.n_neighbors, |
184 n_clusters = $method.n_clusters, | 182 n_clusters = $method.n_clusters, |
185 n_iter = $method.n_iter, | 183 n_iter = $method.n_iter, |
186 @CMD_params_data_integration@ | 184 @CMD_params_data_integration@ |
187 inplace = True, | 185 inplace = True, |
188 n_jobs = os.getenv("GALAXY_SLOTS", 4) | 186 n_jobs = int(os.getenv("GALAXY_SLOTS", 4)) |
189 ) | 187 ) |
190 | 188 |
191 #else if $method.method == 'pp.harmony' | 189 #else if $method.method == 'pp.harmony' |
192 sa.pp.harmony( | 190 sa.pp.harmony( |
193 adata, | 191 adata, |
194 batch = '$method.batch', | 192 batch = '$method.batch', |
195 @CMD_params_data_integration@ | 193 @CMD_params_data_integration@ |
196 inplace = True | 194 inplace = True |
197 ) | 195 ) |
198 | 196 |
199 #else if $method.method == 'pp.scanorama_integrate' | 197 #else if $method.method == 'pp.scanorama_integrate' |
200 sa.pp.scanorama_integrate( | 198 sa.pp.scanorama_integrate( |
201 adata, | 199 adata, |
202 batch = '$method.batch', | 200 batch = '$method.batch', |
203 n_neighbors = $method.n_neighbors, | 201 n_neighbors = $method.n_neighbors, |
204 @CMD_params_data_integration@ | 202 @CMD_params_data_integration@ |
205 inplace = True | 203 inplace = True |
206 ) | 204 ) |
207 | 205 |
208 #else if $method.method == 'metrics.frag_size_distr' | 206 #else if $method.method == 'metrics.frag_size_distr' |
209 sa.metrics.frag_size_distr( | 207 sa.metrics.frag_size_distr( |
210 adata, | 208 adata, |
211 max_recorded_size = $method.max_recorded_size, | 209 max_recorded_size = $method.max_recorded_size, |
212 add_key = '$method.add_key', | 210 add_key = '$method.add_key', |
213 inplace = True, | 211 inplace = True, |
214 n_jobs = os.getenv("GALAXY_SLOTS", 4) | 212 n_jobs = int(os.getenv("GALAXY_SLOTS", 4)) |
215 ) | 213 ) |
216 | 214 |
217 #else if $method.method == 'metrics.tsse' | 215 #else if $method.method == 'metrics.tsse' |
218 sa.metrics.tsse( | 216 sa.metrics.tsse( |
219 adata, | 217 adata, |
220 gene_anno = '$method.gene_anno', | 218 gene_anno = '$method.gene_anno', |
221 inplace = True, | 219 inplace = True, |
222 n_jobs = os.getenv("GALAXY_SLOTS", 4) | 220 n_jobs = int(os.getenv("GALAXY_SLOTS", 4)) |
223 ) | 221 ) |
224 #end if | 222 #end if |
225 | 223 |
226 #if $method.method != 'pp.make_fragment_file' and $method.method != 'pp.import_data' | 224 #if $method.method != 'pp.make_fragment_file' and $method.method != 'pp.import_data' |
227 @CMD_anndata_write_outputs@ | 225 @CMD_anndata_write_outputs@ |
228 #end if | 226 #end if |
229 ]]></configfile> | 227 ]]></configfile> |
230 </configfiles> | 228 </configfiles> |
231 <inputs> | 229 <inputs> |
232 <conditional name="method"> | 230 <conditional name="method"> |
233 <param name="method" type="select" label="Method used for preprocessing"> | 231 <param name="method" type="select" label="Method used for preprocessing"> |
234 <option value="pp.make_fragment_file">Convert a BAM file to a fragment file, using 'pp.make_fragment_file'</option> | 232 <option value="pp.make_fragment_file">Convert a BAM file to a fragment file, using 'pp.make_fragment_file'</option> |
255 </param> | 253 </param> |
256 <when value="from_tag"> | 254 <when value="from_tag"> |
257 <param argument="barcode_tag" type="text" value="CB" optional="true" label="Extract barcodes from TAG fields of BAM records"/> | 255 <param argument="barcode_tag" type="text" value="CB" optional="true" label="Extract barcodes from TAG fields of BAM records"/> |
258 </when> | 256 </when> |
259 <when value="from_read_names"> | 257 <when value="from_read_names"> |
260 <param argument="barcode_regex" type="text" value="" optional="true" label="Extract barcodes from read names of BAM records using regular expressions" help="`(..:..:..:..):w+$` extracts `bd:69:Y6:10` from `A01535:24:HW2MMDSX2:2:1359:8513:3458:bd:69:Y6:10:TGATAGGTT``"/> | 258 <param argument="barcode_regex" type="text" value="" optional="true" label="Extract barcodes from read names of BAM records using regular expressions" help="`(..:..:..:..):\w+$` extracts `bd:69:Y6:10` from `A01535:24:HW2MMDSX2:2:1359:8513:3458:bd:69:Y6:10:TGATAGGTT``"/> |
261 </when> | 259 </when> |
262 </conditional> | 260 </conditional> |
263 <param argument="umi_tag" type="text" value="" optional="true" label="Extract UMI from TAG fields of BAM records"/> | 261 <param argument="umi_tag" type="text" value="" optional="true" label="Extract UMI from TAG fields of BAM records"/> |
264 <param argument="umi_regex" type="text" value="" optional="true" label="Extract UMI from read names of BAM records using regular expressions"/> | 262 <param argument="umi_regex" type="text" value="" optional="true" label="Extract UMI from read names of BAM records using regular expressions"/> |
265 <expand macro="param_shift"/> | 263 <expand macro="param_shift"/> |
391 <tests> | 389 <tests> |
392 <test expect_num_outputs="1"> | 390 <test expect_num_outputs="1"> |
393 <!-- pp.make_fragment_file --> | 391 <!-- pp.make_fragment_file --> |
394 <conditional name="method"> | 392 <conditional name="method"> |
395 <param name="method" value="pp.make_fragment_file"/> | 393 <param name="method" value="pp.make_fragment_file"/> |
396 <param name="bam_file" location="https://zenodo.org/records/11199963/files/pbmc_500_chr21_subsample.bam"/> | 394 <param name="bam_file" location="https://zenodo.org/records/11260316/files/pbmc_500_chr21_subsample.bam"/> |
397 <param name="is_paired" value="true"/> | 395 <param name="is_paired" value="true"/> |
398 <conditional name="barcode"> | 396 <conditional name="barcode"> |
399 <param name="extract_type" value="from_tag"/> | 397 <param name="extract_type" value="from_tag"/> |
400 <param name="barcode_tag" value="CB"/> | 398 <param name="barcode_tag" value="CB"/> |
401 </conditional> | 399 </conditional> |
402 <param name="shift_left" value="4"/> | 400 <param name="shift_left" value="4"/> |
403 <param name="shift_right" value="-5"/> | 401 <param name="shift_right" value="-5"/> |
404 <param name="min_mapq" value="10"/> | 402 <param name="min_mapq" value="10"/> |
405 <param name="chunk_size" value="50000000"/> | 403 <param name="chunk_size" value="50000000"/> |
406 </conditional> | 404 </conditional> |
407 <output name="fragments_out" location="https://zenodo.org/records/11199963/files/pp.make_fragment_file.pbmc_500_chr21.tsv.gz" ftype="interval" compare="sim_size" delta_frac="0.1"/> | 405 <output name="fragments_out" location="https://zenodo.org/records/11260316/files/pp.make_fragment_file.pbmc_500_chr21.tsv.gz" ftype="interval" compare="sim_size" delta_frac="0.1"/> |
408 </test> | 406 </test> |
409 <test expect_num_outputs="2"> | 407 <test expect_num_outputs="2"> |
410 <!-- pp.pp.import_data --> | 408 <!-- pp.pp.import_data --> |
411 <conditional name="method"> | 409 <conditional name="method"> |
412 <param name="method" value="pp.import_data"/> | 410 <param name="method" value="pp.import_data"/> |
413 <param name="fragment_file" location="https://zenodo.org/records/11199963/files/pbmc_500_chr21.tsv.gz"/> | 411 <param name="fragment_file" location="https://zenodo.org/records/11260316/files/pbmc_500_chr21.tsv.gz"/> |
414 <param name="chrom_sizes" location="https://zenodo.org/records/11199963/files/chr21_size.tabular"/> | 412 <param name="chrom_sizes" location="https://zenodo.org/records/11260316/files/chr21_size.tabular"/> |
415 <param name="min_num_fragments" value="1"/> | 413 <param name="min_num_fragments" value="1"/> |
416 <param name="sorted_by_barcode" value="False"/> | 414 <param name="sorted_by_barcode" value="False"/> |
417 <param name="shift_left" value="0"/> | 415 <param name="shift_left" value="0"/> |
418 <param name="chrM" value="chrM, M"/> | 416 <param name="chrM" value="chrM, M"/> |
419 <param name="shift_right" value="0"/> | 417 <param name="shift_right" value="0"/> |
431 <has_text_matching expression="chrM = \['chrM', 'M'\]"/> | 429 <has_text_matching expression="chrM = \['chrM', 'M'\]"/> |
432 <has_text_matching expression="shift_right = 0"/> | 430 <has_text_matching expression="shift_right = 0"/> |
433 <has_text_matching expression="chunk_size = 1000"/> | 431 <has_text_matching expression="chunk_size = 1000"/> |
434 </assert_contents> | 432 </assert_contents> |
435 </output> | 433 </output> |
436 <output name="anndata_out" location="https://zenodo.org/records/11199963/files/pp.import_data.pbmc_500_chr21.h5ad" ftype="h5ad" compare="sim_size" delta_frac="0.1"/> | 434 <output name="anndata_out" location="https://zenodo.org/records/11260316/files/pp.import_data.pbmc_500_chr21.h5ad" ftype="h5ad" compare="sim_size" delta_frac="0.1"/> |
435 </test> | |
436 <test expect_num_outputs="2"> | |
437 <!-- pp.make_gene_matrix --> | |
438 <conditional name="method"> | |
439 <param name="method" value="pp.make_gene_matrix"/> | |
440 <param name="adata" location="https://zenodo.org/records/11260316/files/tl.leiden.modularity.pbmc_500_chr21.h5ad"/> | |
441 <param name="gene_anno" location="https://zenodo.org/records/11260316/files/chr21.gff3.gz"/> | |
442 <param name="chunk_size" value="500"/> | |
443 <param name="use_x" value="False"/> | |
444 <param name="id_type" value="gene"/> | |
445 <param name="transcript_name_key" value="transcript_name"/> | |
446 <param name="transcript_id_key" value="transcript_id"/> | |
447 <param name="gene_name_key" value="gene_name"/> | |
448 <param name="gene_id_key" value="gene_id"/> | |
449 <param name="count_frag_as_reads" value="True"/> | |
450 </conditional> | |
451 <section name="advanced_common"> | |
452 <param name="show_log" value="true" /> | |
453 </section> | |
454 <output name="hidden_output"> | |
455 <assert_contents> | |
456 <has_text_matching expression="sa.pp.make_gene_matrix"/> | |
457 <has_text_matching expression="chunk_size = 500"/> | |
458 <has_text_matching expression="use_x = False"/> | |
459 <has_text_matching expression="id_type = 'gene'"/> | |
460 <has_text_matching expression="transcript_name_key = 'transcript_name'"/> | |
461 <has_text_matching expression="transcript_id_key = 'transcript_id'"/> | |
462 <has_text_matching expression="gene_name_key = 'gene_name'"/> | |
463 <has_text_matching expression="gene_id_key = 'gene_id'"/> | |
464 <has_text_matching expression="count_frag_as_reads = True"/> | |
465 </assert_contents> | |
466 </output> | |
467 <output name="anndata_out" location="https://zenodo.org/records/11260316/files/pp.make_gene_matrix.pbmc_500_chr21.h5ad" ftype="h5ad" compare="sim_size" delta_frac="0.1" /> | |
468 </test> | |
469 <test expect_num_outputs="2"> | |
470 <!-- metrics.tsse --> | |
471 <conditional name="method"> | |
472 <param name="method" value="metrics.tsse"/> | |
473 <param name="adata" location="https://zenodo.org/records/11260316/files/pp.import_data.pbmc_500_chr21.h5ad"/> | |
474 <param name="gene_anno" location="https://zenodo.org/records/11260316/files/chr21.gff3.gz"/> | |
475 </conditional> | |
476 <section name="advanced_common"> | |
477 <param name="show_log" value="true" /> | |
478 </section> | |
479 <output name="hidden_output"> | |
480 <assert_contents> | |
481 <has_text_matching expression="sa.metrics.tsse"/> | |
482 </assert_contents> | |
483 </output> | |
484 <output name="anndata_out" location="https://zenodo.org/records/11260316/files/metrics.tsse.pbmc_500_chr21.h5ad" ftype="h5ad" compare="sim_size" delta_frac="0.1" /> | |
485 </test> | |
486 <test expect_num_outputs="2"> | |
487 <!-- pp.filter_cells --> | |
488 <conditional name="method"> | |
489 <param name="method" value="pp.filter_cells"/> | |
490 <param name="adata" location="https://zenodo.org/records/11260316/files/metrics.tsse.pbmc_500_chr21.h5ad"/> | |
491 <param name="min_counts" value="200"/> | |
492 <param name="min_tsse" value="5"/> | |
493 <param name="max_counts" value="10000"/> | |
494 </conditional> | |
495 <section name="advanced_common"> | |
496 <param name="show_log" value="true" /> | |
497 </section> | |
498 <output name="hidden_output"> | |
499 <assert_contents> | |
500 <has_text_matching expression="sa.pp.filter_cells"/> | |
501 <has_text_matching expression="min_counts = 200"/> | |
502 <has_text_matching expression="min_tsse = 5"/> | |
503 <has_text_matching expression="max_counts = 10000"/> | |
504 </assert_contents> | |
505 </output> | |
506 <output name="anndata_out" location="https://zenodo.org/records/11260316/files/pp.filter_cells.pbmc_500_chr21.h5ad" ftype="h5ad" compare="sim_size" delta_frac="0.1" /> | |
507 </test> | |
508 <test expect_num_outputs="2"> | |
509 <!-- pp.add_tile_matrix --> | |
510 <conditional name="method"> | |
511 <param name="method" value="pp.add_tile_matrix"/> | |
512 <param name="adata" location="https://zenodo.org/records/11260316/files/pp.filter_cells.pbmc_500_chr21.h5ad"/> | |
513 <param name="bin_size" value="5000"/> | |
514 <param name="chunk_size" value="500"/> | |
515 <param name="exclude_chroms" value="chr1, chr2, chr3, chr4, chr5, chr6, chr7, chr8, chr9, chr10, chr11, chr12, chr13, chr14, chr15, chr16, chr17, chr18, chr19, chr20, chr22, chrX, chrY"/> | |
516 <param name="count_frag_as_reads" value="True"/> | |
517 </conditional> | |
518 <section name="advanced_common"> | |
519 <param name="show_log" value="true" /> | |
520 </section> | |
521 <output name="hidden_output"> | |
522 <assert_contents> | |
523 <has_text_matching expression="sa.pp.add_tile_matrix"/> | |
524 <has_text_matching expression="bin_size = 5000"/> | |
525 <has_text_matching expression="chunk_size = 500"/> | |
526 <has_text_matching expression="exclude_chroms = \['chr1', 'chr2', 'chr3', 'chr4', 'chr5', 'chr6', 'chr7', 'chr8', 'chr9', 'chr10', 'chr11', 'chr12', 'chr13', 'chr14', 'chr15', 'chr16', 'chr17', 'chr18', 'chr19', 'chr20', 'chr22', 'chrX', 'chrY'\]"/> | |
527 <has_text_matching expression="count_frag_as_reads = True"/> | |
528 </assert_contents> | |
529 </output> | |
530 <output name="anndata_out" ftype="h5ad" compare="sim_size" delta_frac="0.1" location="https://zenodo.org/records/11260316/files/pp.add_tile_matrix.pbmc_500_chr21.h5ad"/> | |
531 </test> | |
532 <test expect_num_outputs="2"> | |
533 <!-- pp.select_features --> | |
534 <conditional name="method"> | |
535 <param name="method" value="pp.select_features"/> | |
536 <param name="adata" location="https://zenodo.org/records/11260316/files/pp.add_tile_matrix.pbmc_500_chr21.h5ad"/> | |
537 <param name="n_features" value="15000"/> | |
538 </conditional> | |
539 <section name="advanced_common"> | |
540 <param name="show_log" value="true" /> | |
541 </section> | |
542 <output name="hidden_output"> | |
543 <assert_contents> | |
544 <has_text_matching expression="sa.pp.select_features"/> | |
545 <has_text_matching expression="n_features = 15000"/> | |
546 </assert_contents> | |
547 </output> | |
548 <output name="anndata_out" ftype="h5ad" compare="sim_size" delta_frac="0.1" location="https://zenodo.org/records/11260316/files/pp.select_features.pbmc_500_chr21.h5ad"/> | |
549 </test> | |
550 <test expect_num_outputs="2"> | |
551 <!-- pp.scrublet --> | |
552 <conditional name="method"> | |
553 <param name="method" value="pp.scrublet"/> | |
554 <param name="adata" location="https://zenodo.org/records/11260316/files/pp.select_features.pbmc_500_chr21.h5ad"/> | |
555 <param name="n_comps" value="15"/> | |
556 <param name="sim_doublet_ratio" value="2.0"/> | |
557 <param name="expected_doublet_rate" value="0.1"/> | |
558 <param name="random_state" value="0"/> | |
559 </conditional> | |
560 <section name="advanced_common"> | |
561 <param name="show_log" value="true" /> | |
562 </section> | |
563 <output name="hidden_output"> | |
564 <assert_contents> | |
565 <has_text_matching expression="sa.pp.scrublet"/> | |
566 <has_text_matching expression="n_comps = 15"/> | |
567 <has_text_matching expression="sim_doublet_ratio = 2.0"/> | |
568 <has_text_matching expression="expected_doublet_rate = 0.1"/> | |
569 <has_text_matching expression="random_state = 0"/> | |
570 </assert_contents> | |
571 </output> | |
572 <output name="anndata_out" ftype="h5ad" compare="sim_size" delta_frac="0.1" location="https://zenodo.org/records/11260316/files/pp.scrublet.pbmc_500_chr21.h5ad"/> | |
573 </test> | |
574 <test expect_num_outputs="2"> | |
575 <!-- pp.filter_doublets --> | |
576 <conditional name="method"> | |
577 <param name="method" value="pp.filter_doublets"/> | |
578 <param name="adata" location="https://zenodo.org/records/11260316/files/pp.scrublet.pbmc_500_chr21.h5ad"/> | |
579 <param name="probability_threshold" value="0.1"/> | |
580 </conditional> | |
581 <section name="advanced_common"> | |
582 <param name="show_log" value="true" /> | |
583 </section> | |
584 <output name="hidden_output"> | |
585 <assert_contents> | |
586 <has_text_matching expression="sa.pp.filter_doublets"/> | |
587 </assert_contents> | |
588 </output> | |
589 <output name="anndata_out" ftype="h5ad" compare="sim_size" delta_frac="0.1" location="https://zenodo.org/records/11260316/files/pp.filter_doublets.pbmc_500_chr21.h5ad"/> | |
590 </test> | |
591 <test expect_num_outputs="2"> | |
592 <!-- pp.mnc_correct --> | |
593 <conditional name="method"> | |
594 <param name="method" value="pp.mnc_correct"/> | |
595 <param name="adata" location="https://zenodo.org/records/11260316/files/pbmc_500_chr21.batch.h5ad"/> | |
596 <param name="batch" value="batch"/> | |
597 <param name="n_neighbors" value="3"/> | |
598 <param name="n_clusters" value="10"/> | |
599 <param name="use_rep" value="X_spectral"/> | |
600 </conditional> | |
601 <section name="advanced_common"> | |
602 <param name="show_log" value="true" /> | |
603 </section> | |
604 <output name="hidden_output"> | |
605 <assert_contents> | |
606 <has_text_matching expression="sa.pp.mnc_correct"/> | |
607 <has_text_matching expression="batch = 'batch'"/> | |
608 <has_text_matching expression="n_neighbors = 3"/> | |
609 <has_text_matching expression="n_clusters = 10"/> | |
610 <has_text_matching expression="batch = 'batch'"/> | |
611 <has_text_matching expression="use_rep = 'X_spectral'"/> | |
612 </assert_contents> | |
613 </output> | |
614 <output name="anndata_out" ftype="h5ad" compare="sim_size" delta_frac="0.1" location="https://zenodo.org/records/11260316/files/pp.mnc_correct.pbmc_500_chr21.h5ad"/> | |
615 </test> | |
616 <test expect_num_outputs="2"> | |
617 <!-- pp.harmony --> | |
618 <conditional name="method"> | |
619 <param name="method" value="pp.harmony"/> | |
620 <param name="adata" location="https://zenodo.org/records/11260316/files/pbmc_500_chr21.batch.h5ad"/> | |
621 <param name="batch" value="batch"/> | |
622 <param name="use_rep" value="X_spectral"/> | |
623 </conditional> | |
624 <section name="advanced_common"> | |
625 <param name="show_log" value="true" /> | |
626 </section> | |
627 <output name="hidden_output"> | |
628 <assert_contents> | |
629 <has_text_matching expression="sa.pp.harmony"/> | |
630 <has_text_matching expression="batch = 'batch'"/> | |
631 <has_text_matching expression="use_rep = 'X_spectral'"/> | |
632 </assert_contents> | |
633 </output> | |
634 <output name="anndata_out" ftype="h5ad" compare="sim_size" delta_frac="0.1" location="https://zenodo.org/records/11260316/files/pp.harmony.pbmc_500_chr21.h5ad"/> | |
635 </test> | |
636 <test expect_num_outputs="2"> | |
637 <!-- pp.scanorama_integrate --> | |
638 <conditional name="method"> | |
639 <param name="method" value="pp.scanorama_integrate"/> | |
640 <param name="adata" location="https://zenodo.org/records/11260316/files/pbmc_500_chr21.batch.h5ad"/> | |
641 <param name="batch" value="batch"/> | |
642 <param name="use_rep" value="X_spectral"/> | |
643 </conditional> | |
644 <section name="advanced_common"> | |
645 <param name="show_log" value="true" /> | |
646 </section> | |
647 <output name="hidden_output"> | |
648 <assert_contents> | |
649 <has_text_matching expression="sa.pp.scanorama_integrate"/> | |
650 <has_text_matching expression="batch = 'batch'"/> | |
651 <has_text_matching expression="use_rep = 'X_spectral'"/> | |
652 </assert_contents> | |
653 </output> | |
654 <output name="anndata_out" ftype="h5ad" compare="sim_size" delta_frac="0.1" location="https://zenodo.org/records/11260316/files/pp.scanorama_integrate.pbmc_500_chr21.h5ad"/> | |
655 </test> | |
656 <test expect_num_outputs="2"> | |
657 <!-- metrics.frag_size_distr --> | |
658 <conditional name="method"> | |
659 <param name="method" value="metrics.frag_size_distr"/> | |
660 <param name="adata" location="https://zenodo.org/records/11260316/files/pp.import_data.pbmc_500_chr21.h5ad"/> | |
661 <param name="max_recorded_size" value="500"/> | |
662 <param name="add_key" value="frag_size_distr"/> | |
663 </conditional> | |
664 <section name="advanced_common"> | |
665 <param name="show_log" value="true" /> | |
666 </section> | |
667 <output name="hidden_output"> | |
668 <assert_contents> | |
669 <has_text_matching expression="sa.metrics.frag_size_distr"/> | |
670 <has_text_matching expression="add_key = 'frag_size_distr'"/> | |
671 </assert_contents> | |
672 </output> | |
673 <output name="anndata_out" location="https://zenodo.org/records/11260316/files/metrics.frag_size_distr.pbmc_500_chr21.h5ad" ftype="h5ad" compare="sim_size" delta_frac="0.1" /> | |
437 </test> | 674 </test> |
438 </tests> | 675 </tests> |
439 <help><![CDATA[ | 676 <help><![CDATA[ |
440 Convert a BAM file`to a fragment file, `using pp.make_fragment_file` | 677 Convert a BAM file`to a fragment file, using `pp.make_fragment_file` |
441 ==================================================================== | 678 ==================================================================== |
442 | 679 |
443 Convert a BAM file to a fragment file. | 680 Convert a BAM file to a fragment file. |
444 | 681 |
445 Convert a BAM file to a fragment file by performing the following steps: | 682 Convert a BAM file to a fragment file by performing the following steps: |