view mob_recon.xml @ 9:93ba63eaf394 draft default tip

"planemo upload for repository https://github.com/phac-nml/mob-suite commit 7ecd5079d62ccc38a9cc41bd2b9553b21221c76a"
author nml
date Thu, 05 Aug 2021 21:53:36 +0000
parents 53f50adcb78e
children
line wrap: on
line source

<tool id="mob_recon" name="MOB-Recon" version="@VERSION@+galaxy0">
  <description>Type contigs and extract plasmid sequences</description>
  <macros>
    <import>macros.xml</import>
  </macros>  
  <expand macro="requirements" />
  <version_command>mob_recon --version</version_command>
  <command detect_errors="exit_code">
  <![CDATA[  
    #import re
    #import os.path
    
    #set $named_input = re.sub(r'(\s|\(|\)|:|!)', '_', str($input.element_identifier)+'.fasta')
    ln -s '$input' '$named_input' &&
    

    mob_recon  --num_threads \${GALAXY_SLOTS:-4}  --infile '${named_input}' --run_typer

    #if $adv_param.unicycler_contigs:
      --unicycler_contigs 
    #end if   

    #if $adv_param.run_overhang:
      --run_overhang
    #end if 
    
    #if $adv_param.debug:
      --debug
    #end if

    #if $adv_param.plasmid_db
      --plasmid_db '$adv_param.plasmid_db'
    #end if

    #if $adv_param.plasmid_mash_db
      --plasmid_mash_db '$adv_param.plasmid_mash_db'
    #end if

    #if $adv_param.plasmid_meta
      --plasmid_meta '$adv_param.plasmid_meta'
    #end if

    #if $adv_param.repetitive_mask
      --repetitive_mask '$adv_param.repetitive_mask'
    #end if

   #if $adv_param.plasmid_mob
   --plasmid_mob '$adv_param.plasmid_mob'
   #end if
   
   #if $adv_param.plasmid_mpf
   --plasmid_mpf '$adv_param.plasmid_mpf'
   #end if

   #if $adv_param.plasmid_orit
   --plasmid_orit '$adv_param.plasmid_orit'
   #end if

    --min_length '${adv_param.min_length}'  
    --min_rep_evalue '${adv_param.min_rep_evalue}'
    --min_rep_evalue '${adv_param.min_rep_evalue}'
    --min_mob_evalue '${adv_param.min_mob_evalue}'
    --min_con_evalue '${adv_param.min_con_evalue}'
    --min_rep_ident '${adv_param.min_rep_ident}'
    --min_mob_ident '${adv_param.min_mob_ident}'
    --min_con_ident  '${adv_param.min_con_ident}'
    --min_rpp_ident   '${adv_param.min_rpp_ident}'

    --min_rep_cov '${adv_param.min_rep_cov}'
    --min_mob_cov '${adv_param.min_mob_cov}'
    --min_con_cov '${adv_param.min_con_cov}'
    --min_rpp_cov '${adv_param.min_rpp_cov}'
    --outdir 'outdir' &&
    mkdir ./outdir/plasmids && (mv outdir/plasmid*.fasta ./outdir/plasmids 2> /dev/null || true)
  ]]>  
  </command>
  <inputs>
    <param name="input" type="data" format="fasta" label="Input" help="FASTA file with contig(s)"/>
    <section name="adv_param" title="Advanced parameters" expanded="False">
      <param name="unicycler_contigs" type="boolean" truevalue="true" falsevalue="" checked="true" label="Check for circularity flag generated by unicycler in contigs fasta headers?"/>
      <param name="run_overhang" type="boolean" truevalue="true" falsevalue="" checked="true" label="Detect circular contigs (i.e. potential plasmids) with assembly overhangs?"/>  
      <param name="debug" type="boolean" truevalue="true" falsevalue="" checked="false" label="Provide debug information?"/>
      
      <param name="min_rep_evalue" label="Minimum evalue threshold for replicon blastn" type="float"  min="0.00001" max="1" value="0.00001"/>
      <param name="min_mob_evalue" label="Minimum evalue threshold for relaxase tblastn" type="float"  min="0.00001" max="1" value="0.00001"/>
      <param name="min_con_evalue" label="Minimum evalue threshold for contig blastn" type="float"  min="0.00001" max="1" value="0.00001"/>
      <param name="min_rpp_evalue" label="Minimum evalue threshold for repetitve elements blastn" type="float"  min="0.00001" max="1" value="0.00001"/>
      <param name="min_length" label="Minimum length of contigs to classify" type="integer" value="1000"/>
      <param name="min_rep_ident" label="Minimum sequence identity for replicons" type="integer"  min="0" max="100" value="80"/>
      <param name="min_mob_ident" label="Minimum sequence identity for relaxases" type="integer"  min="0" max="100" value="80"/>
      <param name="min_con_ident" label="Minimum sequence identity for contigs" type="integer"  min="0" max="100" value="80"/>
      <param name="min_rpp_ident" label="Minimum sequence identity for repetitive elements" type="integer"  min="0" max="100" value="80"/>

      <param name="min_rep_cov" label="Minimum percentage coverage of replicon query by input assembly" type="integer"  min="0" max="100" value="80"/>
      <param name="min_mob_cov" label="Minimum percentage coverage of relaxase query by input assembly" type="integer"  min="0" max="100" value="80"/>
      <param name="min_con_cov" label="Minimum percentage coverage of assembly contig by the plasmid reference database to be considered" type="integer"  min="0" max="100" value="60"/>
      <param name="min_rpp_cov" label="Minimum percentage coverage of contigs by repetitive elements" type="integer"  min="0" max="100" value="80"/>

      <param name="plasmid_db" optional="true" type="data" format="fasta" label="Reference Database of complete plasmids" help=""/>
      <param name="plasmid_mash_db" optional="true" type="data" format="binary" label="Custom MASH database of plasmids" help="MASH sketch of the reference plasmids database"/>
      <param name="plasmid_meta" type="data" optional="true" format="text" label="Plasmid cluster metadata file" help=""/>
      <param name="plasmid_replicons" type="data" optional="true" format="fasta" label="FASTA file with plasmid replicons" help=""/>
      <param name="repetitive_mask" type="data" optional="true" format="fasta" label="FASTA of known repetitive elements" help=""/>
      <param name="plasmid_mob" type="data" optional="true" format="fasta" label="FASTA of plasmid relaxases" help=""/>
      <param name="plasmid_mpf" type="data" optional="true" format="fasta" label="FASTA of known plasmid mate-pair proteins" help=""/>
      <param name="plasmid_orit" type="data" optional="true" format="fasta" label="FASTA of known plasmid oriT dna sequences" help=""/>
    </section>  
  </inputs>
  <outputs>
    <data name="contig_report" format="tabular" from_work_dir="outdir/contig_report.txt" label="${tool.name} on ${input.element_identifier}: Overall contig MOB-recon report"/> 
    <data name="mobtyper_aggregate_report" format="tabular" from_work_dir="outdir/mobtyper_results.txt" label="${tool.name} on ${input.element_identifier}: Aggregate MOB-typer report for all contigs"/>
    <data name="chromosome" format="fasta" from_work_dir="outdir/chromosome.fasta" label="${tool.name} on ${input.element_identifier}: Chromosomal sequences"/>
    <collection name="plasmids" type="list" label="${tool.name} on ${input.element_identifier}: Plasmids">
      <discover_datasets pattern="__name_and_ext__" directory="outdir/plasmids" />
    </collection>
  </outputs>
  <tests>
    <test>
      <param name="input" value="Ecoli_strain_KV7_complete_LT795502.fasta" ftype="fasta"/>
      <section name="adv_param">
        <param name="unicycler_contigs" value="True"/>
        <param name="run_overhang" value="True"/>
      </section>
      <output name="contig_report">
        <assert_contents>
          <has_text text="chromosome"/>
          <has_text text="plasmid"/>
          <has_text text="IncHI1A"/>
          <has_text text="IncN"/>
        </assert_contents>
      </output>
      <output name="mobtyper_aggregate_report">
        <assert_contents>
          <has_text text="conjugative"/>
          <has_text text="Gammaproteobacteria"/>
          <has_text text="223020"/>
        </assert_contents>
      </output>
    </test>
  </tests>
  <help>

**Syntax**

This tool reconstructs individual plasmid sequences from draft genome assemblies using the plasmid reference databases.

For more information please visit https://github.com/phac-nml/mob-suite/. 

**Workflow**

This preliminary \"Mobilome and Resistome Analysis Workflow\" linking mob_recon with staramr provides reports on mobilome and resistome for a given isolate given a draft genome assembly. The workflow is located in Shared Data --> Workflows --> Mobilome and Resistome Analysis Workflow (MOB-Recon and STARAMR). The workflow file can also be manually downloaded from https://raw.githubusercontent.com/phac-nml/galaxy_tools/master/tools/mob_suite/workflows/AMRworkflow_STARAMR.ga.

-----

**Input:**

A FASTA file with a single or multiple contigs (e.g. a draft genome assembly):


**Output:**

Tab-delimited report listing information for each input contig on its cluster number, possible replicon, relaxase, and repetitive elements types, etc. Refer to https://github.com/phac-nml/mob-suite#mob-recon-contig-report-format for the description of each column.

Note: Plasmid sequences will not be output if none are found. Some plasmid could be intergrated into a chromosome.


  </help>
  <citations>
    <citation type="bibtex">
  @misc{githubmob-suite,
  author = {Robertson J, Nash J},
  title = {MOB-Suite: Software tools for clustering, reconstruction and typing of plasmids from draft assemblies.},
  publisher = {GitHub},
  journal = {GitHub repository},
  doi = {10.1099/mgen.0.000206},
  url = {https://github.com/phac-nml/mob-suite}
    }</citation>
  </citations>
</tool>