view delete_organism.xml @ 13:6ea838bf1f2f draft

"planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 7bf18c69becc57152efdadedf7ebd0bcfa382a15"
author gga
date Mon, 29 Jun 2020 09:15:25 -0400
parents dd63c6e11a95
children
line wrap: on
line source

<?xml version="1.0"?>
<tool id="delete_organism" name="Delete an Apollo record" version="@WRAPPER_VERSION@" profile="16.04">
  <description></description>
  <macros>
    <import>macros.xml</import>
  </macros>
  <expand macro="requirements"/>
  <code file="webapollo.py"/>
  <command detect_errors="aggressive"><![CDATA[
@AUTH@

#if str($ask_one) == "yes":
    #if str($ask_two) == "yes":
        ## Nope, still don't trust them to not be dumb (or malicious), so we backup first.
        python '$__tool_directory__/export.py'
        @ORG_OR_GUESS@
        --gff '$gff_out'
        --fasta_pep '$fasta_pep'
        --fasta_cds '$fasta_cds'
        --fasta_cdna '$fasta_cdna'
        --vcf '$vcf_out'
        --json '$json_out'
        '$__user_email__'

        &&

        ## Now we delete
        python '$__tool_directory__/delete_organism.py'
        @ORG_OR_GUESS@
        '$__user_email__'
        >> '$output';
    #else
        echo "Nothing to do" > '$output';
    #end if
#else
    echo "Nothing to do" > '$output';
#end if
    ]]></command>
  <inputs>
    <expand macro="org_or_guess" />
    <param name="ask_one" type="boolean" truevalue="yes" falsevalue="" label="Are you SURE you want to do this?" help="It will PERMANENTLY delete all of the features on this organism."/>
    <param name="ask_two" type="boolean" truevalue="yes" falsevalue="" label="Are you really, really SURE you want to do this?" help="There's NO coming back from this."/>
  </inputs>
  <outputs>
    <data format="json" name="output" label="Process and Error Log">
        <discover_datasets pattern="(?P&lt;designation&gt;.+)\.txt" format="tabular" visible="true"/>
    </data>

    <data format="gff3" name="gff_out" label="Annotations from Apollo"/>
    <data format="fasta" name="fasta_pep" label="Peptide sequences from Apollo"/>
    <data format="fasta" name="fasta_cds" label="CDS sequences from Apollo"/>
    <data format="fasta" name="fasta_cdna" label="cDNA sequences from Apollo"/>
    <data format="vcf" name="vcf_out" label="Sequence alterations from Apollo"/>
    <data format="json" name="json_out" label="Metadata from Apollo"/>
  </outputs>
  <tests>
      <test>
          <conditional name="org_source">
              <param name="source_select" value="direct"/>
              <param name="org_raw" value="org3" />
          </conditional>
          <param name="ask_one" value="true"/>
          <param name="ask_two" value="true"/>

          <output name="gff_out">
              <assert_contents>
                  <has_text text="##sequence-region Merlin 1 172788" />
                  <has_text text="owner=admin@local.host;" />
              </assert_contents>
          </output>
          <output name="fasta_pep" file="export/pep.fa" lines_diff="12"/>
          <output name="fasta_cds" file="export/cds.fa" lines_diff="12"/>
          <output name="fasta_cdna" file="export/cdna.fa" lines_diff="12"/>
          <output name="vcf_out" file="export/out.vcf" lines_diff="4"/>
          <output name="json_out">
              <assert_contents>
                  <has_text text="org3" />
                  <has_text text="Foo3" />
              </assert_contents>
          </output>
          <output name="output">
              <assert_contents>
                  <has_text text="org3" />
                  <has_text text="Foo3" />
              </assert_contents>
          </output>
      </test>
  </tests>
  <help><![CDATA[
**What it does**

Deletes every single one of the annotations on an organism. Intentionally.

**Why?**

There are legitimate uses for this tool, generally re-opened genomes is a good
one. Needing to transfer annotations from one build of an organism to another
(with the same refseq name).


@REFERENCES@
]]></help>
  <expand macro="citations"/>
</tool>