Mercurial > repos > fubar > microsatbed
changeset 30:53c4f91c6031 draft default tip
planemo upload for repository https://github.com/fubar2/microsatbed commit 80a8c0db54b6e2cab9dfe7178b1e5b3b39592f2c
author | fubar |
---|---|
date | Sat, 20 Jul 2024 01:44:09 +0000 |
parents | efc775ab30fe |
children | |
files | find_str.py microsatbed.xml |
diffstat | 2 files changed, 24 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/find_str.py Fri Jul 19 23:32:59 2024 +0000 +++ b/find_str.py Sat Jul 20 01:44:09 2024 +0000 @@ -88,13 +88,13 @@ bed += cbed if args.bigwig: wig.sort() - bedg = ['%s %d %d %.3f' % x for x in wig] + bedg = ["%s %d %d %.3f" % x for x in wig] with open("temp.bedg", "w") as bw: - bw.write('\n'.join(bedg)) + bw.write("\n".join(bedg)) chroms = ["%s\t%s" % (x, chrlens[x]) for x in chrlens.keys()] with open("temp.chromlen", "w") as cl: - cl.write('\n'.join(chroms)) - cmd = ["bedGraphToBigWig", "temp.bedg", "temp.chromlen", "temp.bw" ] + cl.write("\n".join(chroms)) + cmd = ["bedGraphToBigWig", "temp.bedg", "temp.chromlen", "temp.bw"] subprocess.run(cmd) shutil.move("temp.bw", args.bed) else:
--- a/microsatbed.xml Fri Jul 19 23:32:59 2024 +0000 +++ b/microsatbed.xml Sat Jul 20 01:44:09 2024 +0000 @@ -1,10 +1,17 @@ -<tool name="STR to bed" id="microsatbed" version="1.3.2" profile="22.05"> +<tool name="STR to bed" id="microsatbed" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="22.05"> <description>Short Tandem Repeats to bed features from fasta</description> + <macros> + <token name="@TOOL_VERSION@">1.3.2</token> + <token name="@VERSION_SUFFIX@">0</token> + <token name="@PYFASTX_VERSION@">2.1.0</token> + <token name="@PYTHON_VERSION@">3.12.3</token> + <token name="@UCSC_VERSION@">455</token> + </macros> <requirements> - <requirement version="3.12.3" type="package">python</requirement> - <requirement version="2.1.0" type="package">pyfastx</requirement> - <requirement version="1.3.2" type="package">pytrf</requirement> - <requirement version="455" type="package">ucsc-bedgraphtobigwig</requirement> + <requirement version="@PYTHON_VERSION@" type="package">python</requirement> + <requirement version="@PYFASTX_VERSION@" type="package">pyfastx</requirement> + <requirement version="@TOOL_VERSION@" type="package">pytrf</requirement> + <requirement version="@UCSC_VERSION@" type="package">ucsc-bedgraphtobigwig</requirement> </requirements> <required_files> @@ -14,9 +21,9 @@ <command><![CDATA[ #if $mode_cond.mode == "NATIVE": #if $reference_genome.genome_type_select == "history": - pytrf findstr -f '$mode_cond.outformat' -o $bed -r $monomin $dimin $trimin $tetramin $pentamin $hexamin '${reference_genome.fasta}' + pytrf findstr -f '$mode_cond.outformat' -o '$bed' -r '$monomin' '$dimin' '$trimin' '$tetramin' '$pentamin' '$hexamin' '${reference_genome.fasta}' #else: - pytrf findstr -f '$mode_cond.outformat' -o $bed -r $monomin $dimin $trimin $tetramin $pentamin $hexamin '${reference_genome.fasta.fields.path}' + pytrf findstr -f '$mode_cond.outformat' -o '$bed' -r '$monomin' '$dimin' '$trimin' '$tetramin' '$pentamin' '$hexamin' '${reference_genome.fasta.fields.path}' #end if #else: python '${__tool_directory__}/find_str.py' @@ -129,12 +136,12 @@ </param> </when> </conditional> - <param type="integer" min="2" name="monomin" value="10"/> - <param type="integer" min="1" name="dimin" value="3"/> - <param type="integer" min="2" name="trimin" value="2"/> - <param type="integer" min="2" name="tetramin" value="2"/> - <param type="integer" min="2" name="pentamin" value="2"/> - <param type="integer" min="2" name="hexamin" value="2"/> + <param type="integer" label="Minimum repeats required for monomers" min="2" name="monomin" value="10"/> + <param type="integer" label="Minimum repeats required for dimers" min="1" name="dimin" value="3"/> + <param type="integer" label="Minimum repeats required for trimers" min="2" name="trimin" value="2"/> + <param type="integer" label="Minimum repeats required for tetramers" min="2" name="tetramin" value="2"/> + <param type="integer" label="Minimum repeats required for pentamers" min="2" name="pentamin" value="2"/> + <param type="integer" label="Minimum repeats required for hexamers" min="2" name="hexamin" value="2"/> </inputs> <outputs> <data name="bed" format="bed" label="STR from $fasta.element_identifier" hidden="false">