|
| 1 | +<tool id="motus_map_snv" name="Map SNV" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> |
| 2 | + <description>Map reads to the marker gene database for SNV calling</description> |
| 3 | + <macros> |
| 4 | + <import>macros.xml</import> |
| 5 | + </macros> |
| 6 | + <expand macro="biotools"/> |
| 7 | + <expand macro="requirements"/> |
| 8 | + <command detect_errors="exit_code"><![CDATA[ |
| 9 | +
|
| 10 | + #if $db.db_source == 'cached' |
| 11 | + #set $DATABASE_DIR=$db.db_cached.fields.path |
| 12 | + #else |
| 13 | + #set $database_path = $db.database |
| 14 | + mkdir database_dir && |
| 15 | + tar -xvf '$database_path' -C database_dir/ && |
| 16 | + #set $DATABASE_DIR = 'database_dir/db_mOTU' ##the actual DB folder in the archive called db_mOTU |
| 17 | + #end if |
| 18 | + echo "Database Directory:" $DATABASE_DIR && |
| 19 | + |
| 20 | +
|
| 21 | + motus map_snv |
| 22 | +
|
| 23 | + #if $inputs.reads_type.selector == 'paired' |
| 24 | + -f '${inputs.reads_type.forward_reads}' |
| 25 | + -r '${inputs.reads_type.reverse_reads}' |
| 26 | + #elif $inputs.reads_type.selector == 'single' |
| 27 | + -s '${inputs.reads_type.unpaired_reads}' |
| 28 | + #end if |
| 29 | + -db '$DATABASE_DIR' |
| 30 | + -l $algorithm_advanced_options.minimum_alignment_len |
| 31 | + -v $algorithm_advanced_options.verbosity_level_selection |
| 32 | + -o '$bam_output' |
| 33 | +
|
| 34 | + ]]></command> |
| 35 | + <inputs> |
| 36 | + |
| 37 | + <section name="inputs" title="Inputs" expanded="true"> |
| 38 | + <conditional name="reads_type"> |
| 39 | + <param name="selector" type="select" format="fastq,fastq.gz" label="Choose input file(s)"> |
| 40 | + <option value="paired">Paired-end</option> |
| 41 | + <option value="single" selected="true">Single</option> |
| 42 | + </param> |
| 43 | + <when value="paired"> |
| 44 | + <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"/> |
| 45 | + <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"/> |
| 46 | + </when> |
| 47 | + <when value="single"> |
| 48 | + <param name="unpaired_reads" type="data" format="fastq,fastq.gz" label="Single reads" help="-s input file(s) for single reads, fastq(.gz)-formatted"/> |
| 49 | + </when> |
| 50 | + </conditional> |
| 51 | + |
| 52 | + <conditional name="db"> |
| 53 | + <param name="db_source" type="select" label="mOTUs Database"> |
| 54 | + <option value="cached" selected="True">Use a pre-installed database</option> |
| 55 | + <option value="history">Use a database from history</option> |
| 56 | + </param> |
| 57 | + <when value="cached"> |
| 58 | + <param name="db_cached" type="select" label="A pre-installed mOTUs databese" help="no pre-installed mOTUs databases are avalable yet"> |
| 59 | + <options from_data_table="motus_db_versioned"> |
| 60 | + <filter type="sort_by" column="1"/> |
| 61 | + <validator type="no_options" message="No compatible motus database is available"/> |
| 62 | + </options> |
| 63 | + </param> |
| 64 | + </when> |
| 65 | + <when value="history"> |
| 66 | + <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"/> |
| 67 | + </when> |
| 68 | + </conditional> |
| 69 | + </section> |
| 70 | + <section name="algorithm_advanced_options" title="Advanced Options" expanded="true"> |
| 71 | + <param argument="-v" name="verbosity_level_selection" type="select" label="verbosity level" help="-v verbosity level"> |
| 72 | + <option value="1">error</option> |
| 73 | + <option value="2">warning</option> |
| 74 | + <option value="3" selected="True">message default</option> |
| 75 | + <option value="4">debugging</option> |
| 76 | + </param> |
| 77 | + |
| 78 | + <param argument="-l" name="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."/> |
| 79 | + </section> |
| 80 | + |
| 81 | + </inputs> |
| 82 | + <outputs> |
| 83 | + <data name="bam_output" format="bam" label="${tool.name} on ${on_string}: mapped reads"/> |
| 84 | + </outputs> |
| 85 | + <tests> |
| 86 | + <test expect_num_outputs="1"> |
| 87 | + |
| 88 | + <section name="inputs"> |
| 89 | + |
| 90 | + <conditional name="reads_type"> |
| 91 | + <param name="selector" value="single"/> |
| 92 | + <param name="unpaired_reads" ftype="fastq.gz" value="test1_single.fastq"/> |
| 93 | + </conditional> |
| 94 | + |
| 95 | + <conditional name="db"> |
| 96 | + <param name="db_source" value="history"/> |
| 97 | + <param name="database" location="https://zenodo.org/record/7778108/files/db_mOTU_v3.1.0.tar.gz"/> |
| 98 | + </conditional> |
| 99 | + </section> |
| 100 | + <output name="bam_output" ftype="bam"> |
| 101 | + <assert_contents> |
| 102 | + <has_size value="7133479" delta="1000"/> |
| 103 | + </assert_contents> |
| 104 | + </output> |
| 105 | + </test> |
| 106 | + |
| 107 | + </tests> |
| 108 | + <help><![CDATA[ |
| 109 | +What it does |
| 110 | +============ |
| 111 | +
|
| 112 | +The mOTUs Map SNV tool maps metagenomic reads to the marker gene database for single nucleotide variant (SNV) calling. |
| 113 | +This is the first step in the mOTUs SNV analysis pipeline, preparing read alignments for subsequent variant detection with 'snv_call'. |
| 114 | +]]></help> |
| 115 | + <expand macro="citations"/> |
| 116 | +</tool> |
0 commit comments