Mercurial > repos > iuc > episcanpy_build_matrix
comparison build_matrix.xml @ 0:eb4f81df2159 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/episcanpy/ commit ce8ee43d7285503a24c7b0f55c09c513be8c66f5
| author | iuc |
|---|---|
| date | Tue, 18 Apr 2023 13:18:07 +0000 |
| parents | |
| children | 0004aee8b905 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:eb4f81df2159 |
|---|---|
| 1 <tool id="episcanpy_build_matrix" name="Build count matrix" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> | |
| 2 <description>with EpiScanpy</description> | |
| 3 <macros> | |
| 4 <import>macros.xml</import> | |
| 5 </macros> | |
| 6 <expand macro="bio_tools"/> | |
| 7 <expand macro="requirements"/> | |
| 8 <expand macro="version_command"/> | |
| 9 <command detect_errors="exit_code"><![CDATA[ | |
| 10 bgzip -c '$fragment_file' > fragments.gz && | |
| 11 tabix -p bed fragments.gz && | |
| 12 cat '$script_file' > '$hidden_output' && | |
| 13 python '$script_file' >> '$hidden_output' && | |
| 14 touch 'anndata_info.txt' && | |
| 15 cat 'anndata_info.txt' @CMD_prettify_stdout@ | |
| 16 ]]></command> | |
| 17 <configfiles> | |
| 18 <configfile name="script_file"><![CDATA[ | |
| 19 @CMD_imports@ | |
| 20 peaks = esc.ct.load_peaks('$peaks_file') | |
| 21 esc.ct.norm_peaks(peaks, extension=$extension) | |
| 22 esc.ct.bld_mtx_bed( | |
| 23 fragment_file='fragments.gz', | |
| 24 feature_region=peaks, | |
| 25 #if $reference_chr.chr_select == 'custom' | |
| 26 #set $chromosomes = ([x.strip() for x in str($reference_chr.chromosomes).split(',')]) | |
| 27 chromosomes=$chromosomes, | |
| 28 #else | |
| 29 chromosomes='$reference_chr.chr_select', | |
| 30 #end if | |
| 31 save='anndata.h5ad') | |
| 32 ]]></configfile> | |
| 33 </configfiles> | |
| 34 <inputs> | |
| 35 <param name="fragment_file" type="data" format="bed" label="ATAC fragments file" /> | |
| 36 <param name="peaks_file" type="data" format="tabular" label="Features file" help="Peaks BED file or MACS2 narrowPeak file"/> | |
| 37 <param name="extension" type="integer" value="0" min="0" label="Number of bases to extend both sides of peaks" /> | |
| 38 <conditional name="reference_chr"> | |
| 39 <param name="chr_select" type="select" label="Select the chromosomes of the species you are considering" > | |
| 40 <option value="human">Human chromosomes ['1', '2', '3', ... , '22', 'X', 'Y']</option> | |
| 41 <option value="mouse">Mouse chromosomes ['1', '2', '3', ... ', '19', 'X', 'Y']</option> | |
| 42 <option value="custom">Custom list of chromosomes</option> | |
| 43 </param> | |
| 44 <when value="human" /> | |
| 45 <when value="mouse" /> | |
| 46 <when value="custom"> | |
| 47 <param name="chromosomes" value="" type="text" label="Enter comma seperated list of chromosome ids (without chr prefix)" > | |
| 48 <expand macro="sanitize_query" /> | |
| 49 </param> | |
| 50 </when> | |
| 51 </conditional> | |
| 52 <expand macro="inputs_common_advanced"/> | |
| 53 </inputs> | |
| 54 <outputs> | |
| 55 <data name="anndata_out" format="h5ad" from_work_dir="anndata.h5ad" label="${tool.name} on ${on_string}: Annotated data matrix"/> | |
| 56 <data name="hidden_output" format="txt" label="Log file" hidden="true" > | |
| 57 <filter>advanced_common['show_log']</filter> | |
| 58 </data> | |
| 59 </outputs> | |
| 60 <tests> | |
| 61 <test expect_num_outputs="2"> | |
| 62 <!-- count matrix --> | |
| 63 <param name="fragment_file" value="chrY.fragments.bed" /> | |
| 64 <param name="peaks_file" value="chrY.peaks.bed" /> | |
| 65 <conditional name="reference_chr"> | |
| 66 <param name="chr_select" value="custom" /> | |
| 67 <param name="chromosomes" value="Y" /> | |
| 68 </conditional> | |
| 69 <section name="advanced_common"> | |
| 70 <param name="show_log" value="true" /> | |
| 71 </section> | |
| 72 <output name="anndata_out" file="chrY.h5ad" ftype="h5ad" compare="sim_size"/> | |
| 73 </test> | |
| 74 </tests> | |
| 75 <help> | |
| 76 .. class:: infomark | |
| 77 | |
| 78 **What it does** | |
| 79 | |
| 80 Builds single-cell ATAC-seq count matrix in Anndata format. | |
| 81 | |
| 82 ----- | |
| 83 | |
| 84 **Inputs** | |
| 85 | |
| 86 - ATAC fragments containing the positions of Tn5 integration sites, the cell barcode that the DNA fragment originated from, and the number of times the fragment was sequenced. An example:: | |
| 87 | |
| 88 chrY 2650256 2650533 GACCAATGTCCGTAGC 1 | |
| 89 chrY 2650420 2650463 TGACAACGTACTTCAG 1 | |
| 90 chrY 2650444 2650643 GTGGATTGTACAAGCG 3 | |
| 91 chrY 2650639 2650990 ATAGGCTAGGGCTCTC 2 | |
| 92 chrY 2650650 2650692 GACTAACAGCAACGGT 1 | |
| 93 chrY 2650699 2650942 TCAAAGCTCAAAGTAG 1 | |
| 94 chrY 2650768 2650809 TTGTTGTAGGGCATTG 2 | |
| 95 chrY 2650841 2650873 TTGTTGTAGGGCATTG 1 | |
| 96 chrY 2650957 2650995 GACTAACAGCAACGGT 1 | |
| 97 chrY 2651205 2651265 TCAAAGCTCAAAGTAG 1 | |
| 98 chrY 2651215 2651268 TCACAAGGTCAAGACG 1 | |
| 99 | |
| 100 - Features file. A plain BED file with peak locations or narrowPeak file from MACS2. | |
| 101 | |
| 102 **Output** | |
| 103 | |
| 104 - Count matrix in Anndata format. | |
| 105 | |
| 106 </help> | |
| 107 <expand macro="citations"/> | |
| 108 </tool> |
