Mercurial > repos > iuc > meryl_count_kmers
diff count-kmers.xml @ 0:e377b0f8efda draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meryl commit a3a16149db71f9b72dd7e949df0db08797637312
| author | iuc |
|---|---|
| date | Tue, 08 Oct 2024 16:42:39 +0000 |
| parents | |
| children | 52cfaa8d7b1c |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/count-kmers.xml Tue Oct 08 16:42:39 2024 +0000 @@ -0,0 +1,122 @@ +<tool id="meryl_count_kmers" name="Meryl" version="@TOOL_VERSION@+@GALAXY_TOOL_VERSION@@SUFFIX_VERSION@" profile="@PROFILE@"> + <description>count k-mers</description> + <macros> + <import>macros.xml</import> + </macros> + <expand macro="edam_ontology"/> + <xrefs> + <xref type="bio.tools">meryl</xref> + </xrefs> + <expand macro="requirements"/> + <version_command>meryl --version</version_command> + <command detect_errors="exit_code"><![CDATA[ + export GALAXY_MEMORY_GB=\$((\${GALAXY_MEMORY_MB:-8192}/1024)) && + #if $options_kmer_size.kmer_size == 'estimate' + #from math import log + #set size=int(log(int($options_kmer_size.genome_size)*(1-float($options_kmer_size.collision_rate))/float($options_kmer_size.collision_rate))/log(4)) + #elif $options_kmer_size.kmer_size == 'provide' + #set size=$options_kmer_size.input_kmer_size + #end if + ln -s '$input_reads' ./input.${input_reads.ext} && + + meryl + $count_operation + k=$size + memory=\$GALAXY_MEMORY_GB + threads=\${GALAXY_SLOTS:-1} + ./input.${input_reads.ext} + output read-db.meryl && + echo 'K-mer size: ${size}' && + tar -cf read-db.meryldb --use-compress-program="pigz -p \${GALAXY_SLOTS:-1}" read-db.meryl + ]]></command> + <inputs> + <param name="count_operation" type="select" label="Count operations" help="Select an operation to be executed"> + <option value="count">Count: count the occurrences of canonical k-mers</option> + <option value="count-forward">Count-forward: count the occurreces of forward k-mers</option> + <option value="count-reverse">Count-reverse: count the occurreces of reverse k-mers</option> + </param> + <param name="input_reads" type="data" format="fastq,fastq.gz,fasta,fasta.gz" label="Input sequences" help="Select your reads in FASTA/FASTQ format."/> + <conditional name="options_kmer_size"> + <param name="kmer_size" type="select" label="K-mer size selector"> + <option value="provide">Set a k-mer size</option> + <option value="estimate">Estimate the best k-mer size</option> + </param> + <when value="provide"> + <param name="input_kmer_size" type="integer" min="1" max="50" value="" label="K-mer size" help="For a human genome, the best k-mer size is k=21 for both haploid (3.1G) or diploid (6.2G).."/> + </when> + <when value="estimate"> + <param name="genome_size" type="integer" min="1000" max="70000000000" value="1000" label="Genome size" help="Haploid genome size or diploid genome size, depending on what we evaluate. In bp. Only required if the k-mer size is not provided."/> + <param name="collision_rate" type="float" min="0.0001" max="0.01" value="0.001" label="Tolerable collision rate" help="Tolerable collision rate. By default is 0.001."/> + </when> + </conditional> + </inputs> + <outputs> + <data name="read_db" format="meryldb" from_work_dir="read-db.meryldb"/> + </outputs> + <tests> + <test expect_num_outputs="1"> + <conditional name="options_kmer_size"> + <param name="kmer_size" value="provide"/> + <param name="input_kmer_size" value="7"/> + </conditional> + <param name="input_reads" value="child.fasta"/> + <param name="count_operation" value="count"/> + <output name="read_db" ftype="meryldb"> + <assert_contents> + <has_size value="23404" delta="3000"/> + <expand macro="meryldb_archive_assumptions"/> + </assert_contents> + </output> + <assert_stdout> + <has_line line="K-mer size: 7"/> + </assert_stdout> + </test> + <test expect_num_outputs="1"> + <conditional name="options_kmer_size"> + <param name="kmer_size" value="provide"/> + <param name="input_kmer_size" value="7"/> + </conditional> + <param name="input_reads" value="child.fasta.gz" ftype="fasta.gz"/> + <param name="count_operation" value="count"/> + <output name="read_db" ftype="meryldb"> + <assert_contents> + <has_size value="22700" delta="3000"/> + <expand macro="meryldb_archive_assumptions"/> + </assert_contents> + </output> + <assert_stdout> + <has_line line="K-mer size: 7"/> + </assert_stdout> + </test> + <test expect_num_outputs="1"> + <conditional name="options_kmer_size"> + <param name="kmer_size" value="provide"/> + <param name="input_kmer_size" value="7"/> + </conditional> + <param name="input_reads" value="child.fastq.gz" ftype="fastqsanger.gz"/> + <param name="count_operation" value="count"/> + <output name="read_db" ftype="meryldb"> + <assert_contents> + <has_size value="23155" delta="3000"/> + <expand macro="meryldb_archive_assumptions"/> + </assert_contents> + </output> + <assert_stdout> + <has_line line="K-mer size: 7"/> + </assert_stdout> + </test> + </tests> + <help> + +.. class:: infomark + +**Purpose** + +Meryl is the k-mer counter. This tool can be used to count kmers. + +- Count: count the occurrences of canonical k-mers +- Count-forward: count the occurreces of forward k-mers +- Count-reverse: count the occurreces of reverse k-mers + </help> + <expand macro="citations"/> +</tool>
