Mercurial > repos > iuc > pairtools_stats
diff stats.xml @ 2:4c6af50296d0 draft
planemo upload for repository https://github.com/open2c/pairtools commit abd18c860877b2100e02019b4b597d6d2569994e
| author | iuc |
|---|---|
| date | Thu, 18 Sep 2025 05:57:30 +0000 |
| parents | 8d02c649a347 |
| children |
line wrap: on
line diff
--- a/stats.xml Mon Mar 10 09:34:46 2025 +0000 +++ b/stats.xml Thu Sep 18 05:57:30 2025 +0000 @@ -1,10 +1,25 @@ -<tool id="pairtools_stats" name="Pairtools Stats" version="@TOOL_VERSION@+galaxy@SUFFIX_VERSION@" profile="23.2" license="MIT"> +<tool id="pairtools_stats" name="Pairtools Stats" version="@TOOL_VERSION@+galaxy@SUFFIX_VERSION@" profile="@PROFILE_VERSION@" license="MIT"> <description>Calculates pairs statistics for input pairs and pairsam files.</description> <macros> <import>macros.xml</import> </macros> <expand macro="requirements"/> <command detect_errors="exit_code"><![CDATA[ + #if $merge: + #set $input_file_links = str($input_file).replace(',', ' ') + #else + #set $input_file_links = "" + #for $i, $f in enumerate($input_file): + #if $f.is_of_type('4dn_pairs.gz') or $f.is_of_type('4dn_pairsam.gz'): + ln -s '$f' 'input_file_${i}.gz' && + #set $input_file_links += ' input_file_%d.gz ' % $i + #else: + ln -s '$f' 'input_file_${i}' && + #set $input_file_links += ' input_file_%d ' % $i + #end if + #end for + #end if + pairtools stats $merge $with_chromsizes @@ -12,12 +27,10 @@ -o '$pairs_output' --nproc-in \${GALAXY_SLOTS:-4} --nproc-out \${GALAXY_SLOTS:-4} - #if $input_file: - ${str($input_file).replace(',', ' ')} - #end if + $input_file_links ]]></command> <inputs> - <param type="data" name="input_file" format="4dn_pairs,4dn_pairsam" multiple="true" label="Input pairs or pairsam file" help="Input 4dn pairs or pairsam file"></param> + <param type="data" name="input_file" format="4dn_pairs,4dn_pairsam,4dn_pairs.gz,4dn_pairsam.gz" multiple="true" label="Input pairs or pairsam file" help="Input 4dn pairs or pairsam file"></param> <param type="boolean" argument="--merge" truevalue="--merge" falsevalue="" checked="False" label="Merge input stats files" help="If selected, will merge multiple input stats files instead of calculating statistics of .pairs/.pairsam file"></param> <param type="boolean" argument="--with-chromsizes" truevalue="--with-chromsizes" falsevalue="" checked="False" label="Store sizes of chromosomes from the header of the pairs file in the stats file"></param> <param type="boolean" argument="--yaml" truevalue="--yaml" falsevalue="" checked="False" label="Output stats in yaml format instead of table"></param> @@ -44,7 +57,7 @@ </test> <!--Test 03 with pair files as input with additional chromsizes in output--> <test expect_num_outputs="1"> - <param name="input_file" value="output_parsed_pairs_sam.pairs"/> + <param name="input_file" ftype="4dn_pairs" value="output_parsed_pairs_sam.pairs"/> <param name="merge" value="false"/> <param name="with_chromsizes" value="true"/> <param name="yaml" value="false"/> @@ -52,7 +65,15 @@ </test> <!--Test 04 with pair files as input and yaml output format--> <test expect_num_outputs="1"> - <param name="input_file" value="output_parsed_pairs_sam.pairs"/> + <param name="input_file" ftype="4dn_pairs" value="output_parsed_pairs_sam.pairs"/> + <param name="merge" value="false"/> + <param name="with_chromsizes" value="false"/> + <param name="yaml" value="true"/> + <output name="pairs_output" ftype="tabular" file="pairs_output_yaml.stats"/> + </test> + <!--Test 05 with compressed input pair file as input and default parameters--> + <test expect_num_outputs="1"> + <param name="input_file" ftype="4dn_pairs" value="output_parsed_pairs_sam.pairs.gz"/> <param name="merge" value="false"/> <param name="with_chromsizes" value="false"/> <param name="yaml" value="true"/> @@ -63,7 +84,8 @@ Calculate pairs statistics. - By default, uses 4dn pairs or 4dn pairsam file to calculate statistics. + By default, uses 4dn pairs or 4dn pairsam file to calculate statistics. Setting merge to true will + merge multiple input stats files instead of calculating statistics of .pairs/.pairsam file. ]]></help> <expand macro="citations"/>
