Mercurial > repos > bgruening > motus
diff motus_profiler.xml @ 0:d20f3b9a59a2 draft default tip
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/mOTUs commit 36fa40d4507065b7240c0a98815a079aba589e25
author | bgruening |
---|---|
date | Fri, 06 Sep 2024 15:00:49 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/motus_profiler.xml Fri Sep 06 15:00:49 2024 +0000 @@ -0,0 +1,307 @@ +<tool id="motus_profiler" name="mOTUs_profiler" version="@TOOL_VERSION@+galaxy0" profile="21.05"> + <description>performs taxonomic profiling of metagenomics and metatrancriptomics samples</description> + <macros> + <import>macros.xml</import> + </macros> + <expand macro="biotools"/> + <expand macro="requirements"/> + <command detect_errors="exit_code"><![CDATA[ + #if $db.db_source == 'cached' + #set $DATABASE_DIR=$db.db_cached.fields.path + #else + #set $database_path = $db.database + mkdir database_dir && + tar -xvf '$database_path' -C database_dir/ && + #set $DATABASE_DIR = 'database_dir/db_mOTU' ##the actual DB folder in the archive called db_mOTU + #end if + echo "Database Directory:" $DATABASE_DIR && + + motus profile + -t \${GALAXY_SLOTS:-8} + -n '$sample_name' + -db '$DATABASE_DIR' + #if $inputs.input_type.selector == 'reads' + #if $inputs.input_type.reads_type.selector == 'paired' + -f '${inputs.input_type.reads_type.forward_reads}' + -r '${inputs.input_type.reads_type.reverse_reads}' + #elif $inputs.input_type.reads_type.selector == 'single' + -s '${inputs.input_type.reads_type.unpaired_reads}' + #elif $input_type.selector == 'SAM_BAM_input' + -i '${inputs.input_type.SAM_BAM_input}' + #elif $input_type.selector == 'mgc_read_count' + -m '${inputs.input_type.mgc_read_count}' + #end if + #end if + #if $algorithm_advanced_options.advanced_options.customize_algorithm_options == 'customize' + -g $algorithm_advanced_options.advanced_options.marker_genes_cutoff + -l $algorithm_advanced_options.advanced_options.minimum_alignment_len + -v $algorithm_advanced_options.advanced_options.verbosity_level_selection + -y $algorithm_advanced_options.advanced_options.read_count_type_selection + #end if + + #if $biom_format + -o '$output_biom' + $biom_format + #elif $ref_motus + -o '$output_ref' + $ref_motus + #elif $full_species_name + -o '$output_species' + $full_species_name + #elif $result_as_counts + -o '$output_counts' + $result_as_counts + #elif $ncbi_taxonomy_ids + -o '$output_ncbi' + $ncbi_taxonomy_ids + #elif $full_rank_taxonomy + -o '$output_fullrank' + $full_rank_taxonomy + #elif $all_taxonomic_level + -o '$output_alltaxonomy' + $all_taxonomic_level + + #elif $cami_format_option.cami_options == 'yes' + -o '$output_cami' + -C $cami_format_option.cami_format + #elif $taxonomic_level_option.taxonomic_option == 'yes' + -o '$output_taxonomic' + -k $taxonomic_level_option.taxonomic_level + #else + -o '$output_motus' + #end if + #if $save_bam + -I '$output_bam' + #end if + #if $save_mgc + -M '$output_mgc' + #end if + + ]]></command> + <inputs> + <section name="inputs" title="Inputs" expanded="true"> + <conditional name="input_type"> + <param name="selector" type="select" label="Input file(s)"> + <option value="reads" selected="True">fastq,fastq.gz file(s)</option> + <option value="SAM_BAM_input">SAM/BAM input file(s) generated by motus map_tax</option> + <option value="mgc_read_count">mgc_read_count file(s) generated by motus cal-mgc</option> + </param> + <when value="reads"> + <conditional name="reads_type"> + <param name="selector" type="select" format="fastq,fastq.gz" label="Choose input file(s)"> + <option value="paired">Paired-end</option> + <option value="single" selected="true">Single</option> + </param> + <when value="paired"> + <param name="forward_reads" type="data" format="fastq,fastq.gz" label="Forward reads" help="-f Input file(s) for reads in forward orientation, fastq(.gz)-formatted"/> + <param name="reverse_reads" type="data" format="fastq,fastq.gz" label="Reverse reads" help="-r Input file(s) for reads in reverse orientation, fastq(.gz)-formatted"/> + </when> + <when value="single"> + <param name="unpaired_reads" type="data" format="fastq,fastq.gz" label="Single reads" help="-s input file(s) for single reads, fastq(.gz)-formatted"/> + </when> + </conditional> + </when> + <when value="SAM_BAM_input"> + <param name="SAM_BAM_input" type="data" format="sam,bam" label="motus map_tax SAM or BAM file" help="-i SAM or BAM input file(s) generated by motus map_tax"/> + </when> + <when value="mgc_read_count"> + <param name="mgc_count" type="data" format="mgc" label="mgc read count file)(s)" help="-m mgc reads count file generated by motus calc_mgc"/> + </when> + </conditional> + <param name="sample_name" type="text" label="Sample name" help="sample name can contain letters and/or numbers" default_value="unnamed sample"/> + <conditional name="db"> + <param name="db_source" type="select" label="mOTUs Database"> + <option value="cached" selected="True">Use a pre-installed database</option> + <option value="history">Use a database from history</option> + </param> + <when value="cached"> + <param name="db_cached" type="select" label="A pre-installed mOTUs databese" help="no pre-installed mOTUs databases are avalable yet"> + <options from_data_table="motus_db_versioned"> + <filter type="sort_by" column="1"/> + <validator type="no_options" message="No compatible motus database is available"/> + </options> + </param> + </when> + <when value="history"> + <param name="database" type="data" format="tar" label="Database from history" help="Custom database or other version of mOTUs database from link: https://zenodo.org/records/5140350"/> + </when> + </conditional> + </section> + <param argument="ref_motus" type="boolean" label="only species with reference genomes (ref-mOTUs)" truevalue="-e" falsevalue="" checked="false"/> + <param argument="full_species_name" type="boolean" label="print the full name of the species" truevalue="-u" falsevalue="" checked="false"/> + <param argument="result_as_counts" type="boolean" label="print result as counts" help="-c print result as counts instead of relative abundances." truevalue="-p" falsevalue="" checked="false"/> + <param argument="ncbi_taxonomy_ids" type="boolean" label="print NCBI taxonomy identifiers" truevalue="-p" falsevalue="" checked="false"/> + <param argument="biom_format" type="boolean" label="print result in BIOM format" truevalue="-B" falsevalue="" checked="false"/> + <param argument="full_rank_taxonomy" type="boolean" label="print the full rank taxonomy" truevalue="-q" falsevalue="" checked="false"/> + <param argument="all_taxonomic_level" type="boolean" label="print all taxonomic levels together" help="-A print all taxonomic levels together (kingdom to mOTUs, override -k)." truevalue="-A" falsevalue="" checked="false"/> + <param argument="save_bam" type="boolean" label="BAM output" help="-I save the result of BWA in BAM format (output of motus map_tax)." truevalue="-I" falsevalue="" checked="false"/> + <param argument="save_mgc" type="boolean" label="Mgc output" help="-M save the mgc reads count(output of motus calc_mgc)." truevalue="-M" falsevalue="" checked="false"/> + <conditional name="cami_format_option"> + <param argument="cami_options" type="select" label="Choose cami_format"> + <option value="yes">yes</option> + <option value="no" selected="True">no</option> + </param> + <when value="yes"> + <param argument="cami_format" type="select" label="Select value for cami format"> + <option value="precision">Precision</option> + <option value="recall">Recall</option> + <option value="parenthesis">Parenthesis</option> + </param> + </when> + <when value="no"> + <!-- Define actions or defaults for the default option if necessary --> + </when> + </conditional> + <conditional name="taxonomic_level_option"> + <param argument="taxonomic_option" type="select" label="taxonomic_level"> + <option value="yes">yes</option> + <option value="no" selected="True">no</option> + </param> + <when value="yes"> + <param argument="taxonomic_level" type="select" label="taxonomic_level"> + <option value="kingdom">kingdom</option> + <option value="phylum">phylum</option> + <option value="class">class</option> + <option value="order">order</option> + <option value="family">family</option> + <option value="genus">genus</option> + <option value="mOTU" selected="True">default mOTU</option> + </param> + </when> + <when value="no"> + <!-- Define actions or defaults for the default option if necessary --> + </when> + </conditional> + <section name="algorithm_advanced_options" title="algorithm" expanded="true"> + <conditional name="advanced_options"> + <param argument="customize_algorithm_options" type="select" label="Advanced algorithm options"> + <option value="default_options" selected="True">No, Use param defaults</option> + <option value="customize">Yes, See full parameter list</option> + </param> + <when value="customize"> + <param argument="marker_genes_cutoff" type="select" label="Select number of marker genes cutoff" help="-g Select number of marker genes cutoff: 1=higher recall, 6=higher precision"> + <option value="1">higher recall</option> + <option value="2">option 2</option> + <option value="3" selected="True">default option</option> + <option value="4">option 4</option> + <option value="5">option 5</option> + <option value="6">higher precision</option> + </param> + <param argument="minimum_alignment_len" type="integer" value="75" optional="true" label="Minimum Alignment Length (bp)" help="Specify the desired minimum alignment length in base pairs. Default value is 75bp."/> + <param argument="verbosity_level_selection" type="select" label="verbosity level" help="-v verbosity level: 1=error, 2=warning, 3=message, 4+=debugging"> + <option value="1">error</option> + <option value="2">warning</option> + <option value="3" selected="True">message default</option> + <option value="4">debugging</option> + </param> + <param argument="read_count_type_selection" type="select" label="slect tyepe of read counts" help="-y type of read counts Values: [base.coverage, insert.raw_counts, insert.scaled_counts]"> + <option value="base.coverage">base.coverage</option> + <option value="insert.raw_counts">insert.raw_counts</option> + <option value="insert.scaled_counts" selected="True">insert.scaled_counts default_value</option> + </param> + </when> + <when value="default_options"> + <!-- Define actions or defaults for the default option if necessary --> + </when> + </conditional> + </section> + </inputs> + <outputs> + <data name="output_motus" format="txt" label="${tool.name} on ${on_string}: default Output"> + <filter>not biom_format and not ref_motus</filter> + </data> + <data name="output_biom" format="biom1" label="${tool.name} on ${on_string}: BIOM Output"> + <filter>biom_format</filter> + </data> + <data name="output_ref" format="txt" label="${tool.name} on ${on_string}: ref_motus Output"> + <filter>ref_motus</filter> + </data> + <data name="output_species" format="txt" label="${tool.name} on ${on_string}: species Output"> + <filter>full_species_name</filter> + </data> + <data name="output_counts" format="txt" label="${tool.name} on ${on_string}: count Output"> + <filter>result_as_counts</filter> + </data> + <data name="output_ncbi" format="txt" label="${tool.name} on ${on_string}: ncbi taxonomy Output"> + <filter>ncbi_taxonomy_ids</filter> + </data> + <data name="output_fullrank" format="txt" label="${tool.name} on ${on_string}: full rank taxonomy Output"> + <filter>full_rank_taxonomy</filter> + </data> + <data name="output_alltaxonomy" format="txt" label="${tool.name} on ${on_string}: all taxonomic level Output"> + <filter>all_taxonomic_level</filter> + </data> + <data name="output_bam" format="bam_no_index" label="${tool.name} on ${on_string}: BAM Output"> + <filter>save_bam</filter> + </data> + <data name="output_mgc" format="txt" label="${tool.name} on ${on_string}: mgc Output"> + <filter>save_mgc</filter> + </data> + <data name="output_cami" format="txt" label="${tool.name} on ${on_string}: cami Output"> + <filter>cami_format_option['cami_options']=="yes"</filter> + </data> + <data name="output_taxonomic" format="txt" label="${tool.name} on ${on_string}: taxonomic Output"> + <filter>taxonomic_level_option['taxonomic_option']=="yes"</filter> + </data> + </outputs> + <tests> + <test expect_num_outputs="2"> + <param name="biom_format" value="false"/> + <param name="ref_motus" value="false"/> + <param name="full_species_name" value="false"/> + <param name="result_as_counts" value="false"/> + <param name="ncbi_taxonomy_ids" value="false"/> + <param name="full_rank_taxonomy" value="false"/> + <param name="all_taxonomic_level" value="false"/> + <param name="cami_format_option|cami_options" value="no"/> + <param name="taxonomic_level_option|taxonomic_option" value="no"/> + <param name="save_bam" value="false"/> + <param name="save_mgc" value="true"/> + + <section name="inputs"> + <conditional name="input_type"> + <param name="selector" value="reads"/> + <conditional name="reads_type"> + <param name="selector" value="single"/> + <param name="unpaired_reads" ftype="fastq.gz" value="test1_single.fastq"/> + </conditional> + </conditional> + <conditional name="db"> + <param name="db_source" value="history"/> + <param name="database" location="https://zenodo.org/record/7778108/files/db_mOTU_v3.1.0.tar.gz"/> + </conditional> + </section> + <output name="output_motus" ftype="txt"> + <assert_contents> + <has_text_matching expression=".*#consensus_taxonomy.*"/> + <has_n_lines n="34344" delta="5"/> + <has_size value="2300000" delta="100000"/> + </assert_contents> + </output> + <output name="output_mgc" ftype="txt"> + <assert_contents> + <has_text_matching expression=".*# map_tax*"/> + <has_n_lines n="82" delta="5"/> + </assert_contents> + </output> + </test> + </tests> + <help><![CDATA[ +What it does +============ + +The mOTUs profiler is a tool designed for taxonomic profiling of metagenomic and metatranscriptomic data. +It allows for the identification and quantification of microbial community composition directly from sequencing reads. +mOTUs utilizes a database of marker genes identified across a wide range of microbial taxa, enabling the detection of known and unknown microorganisms in your sample data. + +Additional Resources +==================== + +For a more comprehensive understanding of mOTUs and detailed usage instructions, please visit the mOTUs GitHub repository: + +mOTUs GitHub Repository: [https://github.com/motu-tool/mOTUs] + + + ]]></help> + <expand macro="citations"/> +</tool>