Previous changeset 0:00a6721e1f81 (2024-05-16) Next changeset 2:48d9421bf176 (2024-07-05) |
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/snapatac2 commit 1e34deee1e39c0c65e1e29a9d28becc7aaf23a4f |
modified:
macros.xml preprocessing.xml |
b |
diff -r 00a6721e1f81 -r cec3e76eaf05 macros.xml --- a/macros.xml Thu May 16 13:17:14 2024 +0000 +++ b/macros.xml Thu May 23 15:20:02 2024 +0000 |
[ |
@@ -1,6 +1,6 @@ <macros> - <token name="@TOOL_VERSION@">2.5.3</token> - <token name="@VERSION_SUFFIX@">0</token> + <token name="@TOOL_VERSION@">2.5.3</token> + <token name="@VERSION_SUFFIX@">1</token> <token name="@PROFILE@">23.0</token> <xml name="requirements"> <requirement type="package" version="@TOOL_VERSION@">snapatac2</requirement> @@ -12,6 +12,9 @@ <requirement type="package" version="0.8.33">hdbscan</requirement> <requirement type="package" version="0.0.9">harmonypy</requirement> <requirement type="package" version="1.7.4">scanorama</requirement> + <requirement type="package" version="3.0.1">macs3</requirement> + <requirement type="package" version="0.70.16">multiprocess</requirement> + <requirement type="package" version="0.10.2">leidenalg</requirement> <yield /> </xml> @@ -23,8 +26,8 @@ <token name="@CMD@"><![CDATA[ cat '$script_file' > '$hidden_output' && python '$script_file' >> '$hidden_output' && - touch 'anndata_info.txt' && - cat 'anndata_info.txt' @CMD_prettify_stdout@ + touch 'anndata_info.txt' && + cat 'anndata_info.txt' @CMD_prettify_stdout@ ]]> </token> @@ -56,7 +59,7 @@ <xml name="dimentions_plot"> <param argument="width" type="integer" value="500" label="Width of the plot"/> - <param argument="height" type="integer" value="400" label="Height of the plot"/> + <param argument="height" type="integer" value="400" label="Height of the plot"/> </xml> <xml name="param_groupby"> @@ -66,11 +69,11 @@ </xml> <xml name="out_file"> - <param name="out_file" type="select" optional="true" label="Type of output file"> + <param name="out_file" type="select" optional="true" label="Type of output plot"> <option value="png" selected="true">PNG</option> <option value="svg">SVG</option> <option value="pdf">PDF</option> - </param> + </param> </xml> <token name="@CMD_anndata_write_outputs@"><![CDATA[ adata.write('anndata.h5ad') @@ -89,28 +92,28 @@ <expand macro="out_file"/> </xml> <xml name="param_shift"> - <param argument="shift_left" type="integer" value="4" label="Insertion site correction for the left end" help="Note this has no effect on single-end reads"/> - <param argument="shift_right" type="integer" value="-5" label="Insertion site correction for the right end" help="Note this has no effect on single-end reads"/> + <param argument="shift_left" type="integer" value="4" label="Insertion site correction for the left end" help="Note this has no effect on single-end reads"/> + <param argument="shift_right" type="integer" value="-5" label="Insertion site correction for the right end" help="Note this has no effect on single-end reads"/> </xml> <xml name="param_chunk_size" tokens="size"> - <param argument="chunk_size" type="integer" value="@SIZE@" label="chunk size"/> + <param argument="chunk_size" type="integer" value="@SIZE@" label="chunk size"/> + </xml> + <xml name="min_max_frag_size"> + <param argument="min_frag_size" type="integer" optional="true" value="" label="Minimum fragment size to include"/> + <param argument="max_frag_size" type="integer" optional="true" value="" label="Maximum fragment size to include"/> </xml> - <xml name="min_max_frag_size"> - <param argument="min_frag_size" type="integer" optional="true" value="" label="Minimum fragment size to include"/> - <param argument="max_frag_size" type="integer" optional="true" value="" label="Maximum fragment size to include"/> - </xml> - <xml name="params_data_integration"> - <param argument="use_rep" type="text" value="X_spectral" label="The key for the matrix"/> - <param argument="use_dims" type="text" optional="true" value="" label="The dimensions used for computation"> - <expand macro="sanitize_query"/> - </param> - <param argument="groupby" type="text" optional="true" value="" label="The key of the observation grouping to consider"> + <xml name="params_data_integration"> + <param argument="use_rep" type="text" value="X_spectral" label="The key for the matrix"/> + <param argument="use_dims" type="text" optional="true" value="" label="The dimensions used for computation"> + <expand macro="sanitize_query"/> + </param> + <param argument="groupby" type="text" optional="true" value="" label="The key of the observation grouping to consider"> <expand macro="sanitize_query" /> </param> - <param argument="key_added" type="text" optional="true" value="" label="If specified, add the result to adata.obsm with this key"/> - </xml> + <param argument="key_added" type="text" optional="true" value="" label="If specified, add the result to adata.obsm with this key"/> + </xml> <xml name="param_n_comps"> -s <param argument="n_comps" type="integer" value="30" label="Number of dimensions to keep" help="The result is insensitive to this parameter when `weighted_by_sd` is set, as long as it is large enough, e.g. 30."/> + <param argument="n_comps" type="integer" value="30" label="Number of dimensions to keep" help="The result is insensitive to this parameter when `weighted_by_sd` is set, as long as it is large enough, e.g. 30."/> </xml> <xml name="param_random_state"> <param argument="random_state" type="integer" value="0" label="Seed of the random state generator"/> @@ -126,12 +129,12 @@ </xml> <xml name="background"> <param argument="background" type="text" optional="true" value="" label="A list of regions to be used as the background"> - <expand macro="sanitize_query"/> - </param> + <expand macro="sanitize_query"/> + </param> </xml> <xml name="mat"> <param argument="peak_mat" type="data" format="h5ad" optional="true" label="AnnData or AnnDataSet object storing the cell by peak count matrix"/> - <param argument="gene_mat" type="data" format="h5ad" optional="true" label="AnnData or AnnDataSet object storing the cell by gene count matrix"/> + <param argument="gene_mat" type="data" format="h5ad" optional="true" label="AnnData or AnnDataSet object storing the cell by gene count matrix"/> </xml> <xml name="param_network"> <param argument="network" type="text" label="network"/> @@ -147,11 +150,11 @@ </citations> </xml> <xml name="render_plot_test"> - <param name="width" value="650"/> + <param name="width" value="650"/> <param name="height" value="450"/> </xml> <xml name="render_plot_matching_text"> - <has_text_matching expression="width = 650"/> + <has_text_matching expression="width = 650"/> <has_text_matching expression="height = 450"/> </xml> <xml name="param_counting_strategy"> |
b |
diff -r 00a6721e1f81 -r cec3e76eaf05 preprocessing.xml --- a/preprocessing.xml Thu May 16 13:17:14 2024 +0000 +++ b/preprocessing.xml Thu May 23 15:20:02 2024 +0000 |
[ |
b'@@ -22,30 +22,30 @@\n \n #if $method.method == \'pp.make_fragment_file\'\n sa.pp.make_fragment_file(\n-\tbam_file = \'$method.bam_file\',\n-\tis_paired = $method.is_paired,\n-\t#if $method.barcode.extract_type == \'from_tag\'\n-\t\t#if $method.barcode.barcode_tag != \'\'\n-\tbarcode_tag = \'$method.barcode.barcode_tag\',\n-\t\t#end if\n-\t#elif $method.barcode.extract_type == \'from_read_names\'\n-\t\t#if $method.barcode.barcode_regex != \'\'\n-\tbarcode_regex = \'$method.barcode.barcode_regex\',\n-\t\t#end if\n-\t#end if\n-\t#if $method.umi_tag != \'\'\n-\tumi_tag = \'$method.umi_tag\',\n-\t#end if\n-\t#if $method.umi_regex != \'\'\n-\tumi_regex = \'$method.umi_regex\',\n-\t#end if\n-\tshift_right = $method.shift_right,\n-\tshift_left = $method.shift_left,\n-\tmin_mapq = $method.min_mapq,\n-\tchunk_size = $method.chunk_size,\n-\tcompression = \'gzip\',\n-\toutput_file = \'$fragments_out\',\n-\ttempdir = "."\n+ bam_file = \'$method.bam_file\',\n+ is_paired = $method.is_paired,\n+ #if $method.barcode.extract_type == \'from_tag\'\n+ #if $method.barcode.barcode_tag != \'\'\n+ barcode_tag = \'$method.barcode.barcode_tag\',\n+ #end if\n+ #elif $method.barcode.extract_type == \'from_read_names\'\n+ #if $method.barcode.barcode_regex != \'\'\n+ barcode_regex = \'$method.barcode.barcode_regex\',\n+ #end if\n+ #end if\n+ #if $method.umi_tag != \'\'\n+ umi_tag = \'$method.umi_tag\',\n+ #end if\n+ #if $method.umi_regex != \'\'\n+ umi_regex = \'$method.umi_regex\',\n+ #end if\n+ shift_right = $method.shift_right,\n+ shift_left = $method.shift_left,\n+ min_mapq = $method.min_mapq,\n+ chunk_size = $method.chunk_size,\n+ compression = \'gzip\',\n+ output_file = \'$fragments_out\',\n+ tempdir = "."\n )\n \n #else if $method.method == \'pp.import_data\'\n@@ -54,179 +54,177 @@\n chr_sizes = {x[0]:int(x[1]) for x in csv.reader(f, delimiter=\'\\t\')}\n \n sa.pp.import_data(\n-\tfragment_file = \'$method.fragment_file\',\n-\tchrom_sizes = chr_sizes,\n-\tmin_num_fragments = $method.min_num_fragments,\n-\tsorted_by_barcode = $method.sorted_by_barcode,\n-\t#if str($method.whitelist) != \'None\'\n-\twhitelist = \'$method.whitelist\',\n-\t#end if\n-\tshift_left = $method.shift_left,\n-\tshift_right = $method.shift_right,\n-\t#set $chr_mt = ([x.strip() for x in str($method.chrM).split(\',\')])\n-\tchrM = $chr_mt,\n-\tchunk_size = $method.chunk_size,\n-\tfile = \'anndata.h5ad\',\n-\tn_jobs = os.getenv("GALAXY_SLOTS", 4)\n+ fragment_file = \'$method.fragment_file\',\n+ chrom_sizes = chr_sizes,\n+ min_num_fragments = $method.min_num_fragments,\n+ sorted_by_barcode = $method.sorted_by_barcode,\n+ #if str($method.whitelist) != \'None\'\n+ whitelist = \'$method.whitelist\',\n+ #end if\n+ shift_left = $method.shift_left,\n+ shift_right = $method.shift_right,\n+ #set $chr_mt = ([x.strip() for x in str($method.chrM).split(\',\')])\n+ chrM = $chr_mt,\n+ chunk_size = $method.chunk_size,\n+ file = \'anndata.h5ad\',\n+ n_jobs = int(os.getenv("GALAXY_SLOTS", 4))\n )\n \n #else if $method.method == \'pp.add_tile_matrix\'\n sa.pp.add_tile_matrix(\n-\tadata,\n-\tbin_size = $method.bin_size,\n-\tinplace = True,\n-\tchunk_size = $method.chunk_size,\n-\t#if $method.exclude_chroms != \'\'\n-\t#set $excl_chroms = ([x.strip() for x in str($method.exclude_chroms).split(\',\')])\n-\texclude_chroms = $excl_chroms,\n-\t#end if\n-\t#if $method.min_frag_size\n-\tmin_frag_size = $method.min_frag_size,\n-\t#end if\n-\t#if $method.max_frag_size\n-\tmax_frag_size = $method.max_frag_size,\n-\t#end if\n-\t##counting_strategy = \'$method.counting_strategy\',\n-\tcount_frag_as_reads = $method.count_frag_as_reads,\n-\tn_jobs = os.getenv("GALAXY_SLOTS", 4)\n+ adata,\n+ bin_size = $method.bin_size,\n+ chunk_size = $method.chunk_size,\n+ #if $method.exclude_chroms != \'\'\n+ #set $excl_chroms = ([x.strip() for x in str($method.exclude_chroms).split(\',\')])\n+ exclude_chroms = $excl_chroms,\n+ #end if\n+ #if $method.min_frag_size\n+ min_frag_size = $method.min_frag_size,\n+ #end if\n+ #if $method.max_frag_size\n+ max_frag_size = $method.max_frag_size,\n+ #end if\n+ ##counting_strategy ='..b'tch\'"/>\n+ <has_text_matching expression="use_rep = \'X_spectral\'"/>\n+ </assert_contents>\n+ </output>\n+ <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"/>\n+ </test>\n+ <test expect_num_outputs="2">\n+ <!-- pp.harmony -->\n+ <conditional name="method">\n+ <param name="method" value="pp.harmony"/>\n+ <param name="adata" location="https://zenodo.org/records/11260316/files/pbmc_500_chr21.batch.h5ad"/>\n+ <param name="batch" value="batch"/>\n+ <param name="use_rep" value="X_spectral"/>\n+ </conditional>\n+ <section name="advanced_common">\n+ <param name="show_log" value="true" />\n+ </section>\n+ <output name="hidden_output">\n+ <assert_contents>\n+ <has_text_matching expression="sa.pp.harmony"/>\n+ <has_text_matching expression="batch = \'batch\'"/>\n+ <has_text_matching expression="use_rep = \'X_spectral\'"/>\n+ </assert_contents>\n+ </output>\n+ <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"/>\n+ </test>\n+ <test expect_num_outputs="2">\n+ <!-- pp.scanorama_integrate -->\n+ <conditional name="method">\n+ <param name="method" value="pp.scanorama_integrate"/>\n+ <param name="adata" location="https://zenodo.org/records/11260316/files/pbmc_500_chr21.batch.h5ad"/>\n+ <param name="batch" value="batch"/>\n+ <param name="use_rep" value="X_spectral"/>\n+ </conditional>\n+ <section name="advanced_common">\n+ <param name="show_log" value="true" />\n+ </section>\n+ <output name="hidden_output">\n+ <assert_contents>\n+ <has_text_matching expression="sa.pp.scanorama_integrate"/>\n+ <has_text_matching expression="batch = \'batch\'"/>\n+ <has_text_matching expression="use_rep = \'X_spectral\'"/>\n+ </assert_contents>\n+ </output>\n+ <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"/>\n+ </test>\n+ <test expect_num_outputs="2">\n+ <!-- metrics.frag_size_distr -->\n+ <conditional name="method">\n+ <param name="method" value="metrics.frag_size_distr"/>\n+ <param name="adata" location="https://zenodo.org/records/11260316/files/pp.import_data.pbmc_500_chr21.h5ad"/>\n+ <param name="max_recorded_size" value="500"/>\n+ <param name="add_key" value="frag_size_distr"/>\n+ </conditional>\n+ <section name="advanced_common">\n+ <param name="show_log" value="true" />\n+ </section>\n+ <output name="hidden_output">\n+ <assert_contents>\n+ <has_text_matching expression="sa.metrics.frag_size_distr"/>\n+ <has_text_matching expression="add_key = \'frag_size_distr\'"/>\n+ </assert_contents>\n+ </output>\n+ <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" />\n </test>\n </tests>\n <help><![CDATA[\n-Convert a BAM file`to a fragment file, `using pp.make_fragment_file`\n+Convert a BAM file`to a fragment file, using `pp.make_fragment_file`\n ====================================================================\n \n Convert a BAM file to a fragment file.\n' |