view PDAUG_TSVtoFASTA/PDAUG_TSVtoFASTA.xml @ 12:03f954dd8360 draft default tip

"planemo upload for repository https://github.com/jaidevjoshi83/pdaug commit d396d7ff89705cc0dd626ed32c45a9f4029b1b05"
author jay
date Wed, 12 Jan 2022 19:42:36 +0000
parents 95c09c06f655
children
line wrap: on
line source

<tool id="pdaug_tsvtofasta" name="PDAUG TSVtoFASTA" version="0.1.0">

  <description>Converts tabular peptide sequence data into fasta format</description>

  <requirements>
    <requirement type="package" version="1.2.0">pandas</requirement>
  </requirements>
  <stdio>
    <exit_code range="1" level="fatal" />
  </stdio>
    <command detect_errors="exit_code"><![CDATA[

            python '$__tool_directory__/PDAUG_TSVtoFASTA.py'  -I '$infile' -P '$peps'

            #if $selmethod.method == 'withlabel'
              #if $selmethod.advancefeature.columnselect == 'advancefeature'
                --ClmPepID $selmethod.advancefeature.clmname
              #end if 
              --SlcClassLabel '$selmethod.classlabel'
              -M '$selmethod.method'
              -F '$output2' 
              -S '$output3'
            #end if 

            #if $selmethod.method == 'withoutlabel'
              #if $selmethod.advancefeature.columnselect == 'advancefeature'
                --ClmPepID $selmethod.advancefeature.clmname
              #end if 
              -M '$selmethod.method'
              -O '$output1'
            #end if 

            &&

            ls

    ]]></command>

  <inputs>
    <param name="infile" type="data" label="Peptide data" format="tabular" argument= "--InFile1" help="Input tabular file"/>
    <param name="peps" type="text" label="Peptide Column" argument= "--PeptideColumn" help="Peptide Column Name"/>

    <conditional name='selmethod' >
      <param name="method" type="select" label="Method to convert data"  argument="--Method" help="Split file if class labels are present" >   
        <option value="withoutlabel"> Convert Without Split </option>
        <option value="withlabel" selected="true" >Split Data By Class Label</option>
      </param> 

      <when value="withlabel">
        <param name="classlabel" type="text" label="Column with the class label"  value="Class_label" argument= "--SlcClassLabel" help="Select Class Label"/>

        <conditional name='advancefeature' >
          <param name="columnselect" type="select" label="Peptide ID Column"  argument="--Method" help="Split file if class labels are present" >   
           <option value="advancefeature" > Add Peptide ID Column Name </option>
           <option value="normalfeature" selected="true"> No Peptide ID Column </option>
          </param> 

          <when value="advancefeature">
            <param name="clmname" type="text" label="Column name with peptide IDs"  argument= "--ClmPepID" help="Select Peptide ID Column"/>
          </when>
          <when value="normalfeature"/>
        </conditional>
      </when>

      <when value="withoutlabel">
        <conditional name='advancefeature' >
          <param name="columnselect" type="select" label="Column name with peptide IDs"  argument="--Method" help="Split file if class labels are present" >   
            <option value="advancefeature" > Add Peptide ID Column Name </option>
            <option value="normalfeature" selected="true"> No Peptide ID Column </option>
          </param>

          <when value="advancefeature">
            <param name="clmname" type="text" label="Select Peptide ID Column"  argument= "--ClmPepID" help="Select Peptide ID Column"/>
          </when>
          <when value="normalfeature"/>
          
        </conditional>
      </when>
    </conditional>
  </inputs>

  <outputs>
    <data name='output1' format='fasta' label="${tool.name} on $on_string -(fasta)" >  
       <filter>selmethod['method'] == "withoutlabel"</filter>
    </data>

    <data name='output2' format='fasta' label="${tool.name} on $on_string - Second (fasta)">   
       <filter>selmethod['method'] == "withlabel"</filter>
    </data>

    <data name='output3' format='fasta' label="${tool.name} on $on_string - First (fasta)" >
      <filter>selmethod['method'] == "withlabel"</filter>
    </data>
  </outputs>

  <tests>
 
    <test>
      <param name="infile" value="test.tsv"/>
      <param name="method" value="withoutlabel" />
      <param name="peps" value="Peptides" />
      <output name="output1" file="out.fasta" />
    </test>

    <test>
      <param name="infile" value="test.tsv"/>
      <param name="method" value="withlabel" />
      <param name="peps" value="Peptides" />
      <param name="withlabel" value="Class_label" />
      <output name="output2" file="1.fasta" />
      <output name="output3" file="2.fasta" />
    </test>

  </tests>
    <help><![CDATA[
.. class:: infomark

**What it does**

This tool converts tabular files into fasta file and split fasta file on the basis of the class label.

-----

**Inputs**
    * **Method to convert data** Converts tabular data into fasta with or without splitting based on the availability of class labels.

    * **Column with the class label** Enter the column name with the class labels. 

    * **Peptide data** Enter the column name with peptides.

    * **Peptide ID Column** Enter the column name with peptide IDs.

-----

**Outputs**
    * Returns fasta file.]]></help>
<citations>
  <citation type="bibtex">
    @misc{PDAUGGITHUB, 
      author = {Joshi, Jayadev  and Blankenberg, Daniel}, 
      year = {2020}, 
      title ={PDAUG - a Galaxy based toolset for peptide library analysis, visualization, and machine learning modeling}, 
      publisher = {GitHub}, 
      journal = {GitHub repository}, 
      url =
      {https://github.com/jaidevjoshi83/pdaug.git}, 
      }
  </citation>
</citations>
</tool>