view pairwise.xml @ 6:af9eb7b4872f draft

planemo upload for repository https://github.com/abims-sbr/adaptsearch commit 17acd02c547bd1f7661a846661aa99de9743efe9
author abims-sbr
date Tue, 27 Feb 2018 08:41:20 -0500
parents 6e44f0c3e7c1
children f1ee838a8966
line wrap: on
line source

<tool name="Pairwise" id="pairwise" version="2.0.1">

	<description>
		Run reciproque tblastx pairwise
	</description>

	<macros>
		<import>macros.xml</import>
	</macros>

	<requirements>
		<expand macro="python_required" />
		<requirement type="package" version="2.2.22">blast-legacy</requirement>
		<requirement type="package" version="1.3.1">samtools</requirement>
	</requirements>

  	<command><![CDATA[
        #set $infiles = ""
        #for $input in $inputs
            ln -s '$input' '$input.element_identifier';
            #set $infiles = $infiles + $input.element_identifier + ","
        #end for
        #set $infiles = $infiles[:-1]

        ln -s $__tool_directory__/scripts/functions.py . &&
        ln -s $__tool_directory__/scripts/S02_xxx_patron_pipeline.sh . &&
        ln -s $__tool_directory__/scripts/S03_run_blast_with_k_filter.sh . &&
        ln -s $__tool_directory__/scripts/S04_run_blast2_with_k_filter.sh . &&
        ln -s $__tool_directory__/scripts/S05_script_extract_match_v20_blastx.py . &&
        ln -s $__tool_directory__/scripts/S06_post_processing_of_pairwise.py . &&
        ln -s $__tool_directory__/scripts/S07_format_match_get_back_nucleotides.py . &&
        ln -s $__tool_directory__/scripts/S08_script_extract_match_v20_blastx.py . &&
        ln -s $__tool_directory__/scripts/S09_post_processing_of_pairwise.py . &&
        ln -s $__tool_directory__/scripts/S10_compare_list_pairs_for_reciprocal_best_hits_test.py . &&
        ln -s $__tool_directory__/scripts/S11_post_processing_of_pairwise.py . &&
        ln -s $__tool_directory__/scripts/S12_prot2dna.py . &&

		python $__tool_directory__/scripts/S01_organize_rbh.py $infiles ${e_value} \${GALAXY_SLOTS:-1}
		> ${output};
  	]]></command>

 	<inputs>
        <param name="inputs" type="data" format="fasta" multiple="true" label="Input files" />
		<param name="e_value" type="float" value="1e-5" label="e_value" help="By default, it's 1e-5. you can write the e-value like this: 1e-5" />
	</inputs>

	<outputs>
		<data format="txt" name="output" label="Pairwise" />
        <collection name="output_fasta_dna" type="list" label="Pairwise DNA">
            <discover_datasets pattern="__name_and_ext__" directory="outputs_dna" />
        </collection>
        <collection name="output_fasta_prot" type="list" label="Pairwise PROT">
            <discover_datasets pattern="__name_and_ext__" directory="outputs_prot" />
        </collection>
	</outputs>

	<tests>
        <test>
            <param name="inputs" ftype="fasta" value="inputs2/PfPfiji_trinity.fasta,inputs2/ApApomp_trinity.fasta,inputs2/AmAmphi_trinity.fasta,inputs2/AcAcaud_trinity.fasta" />
            <param name="e-value" value="1e-5" />
            <output_collection name="output_fasta_dna" type="list">
                <element name="DNAalignment_corresponding_to_protein_from_RBH_AmAmphi_AcAcaud" value="outputs_dna2/DNAalignment_corresponding_to_protein_from_RBH_AmAmphi_AcAcaud.fasta" />                
                <element name="DNAalignment_corresponding_to_protein_from_RBH_PfPfiji_AcAcaud" value="outputs_dna2/DNAalignment_corresponding_to_protein_from_RBH_PfPfiji_AcAcaud.fasta" />                
                <element name="DNAalignment_corresponding_to_protein_from_RBH_PfPfiji_AmAmphi" value="outputs_dna2/DNAalignment_corresponding_to_protein_from_RBH_PfPfiji_AmAmphi.fasta" />
                <element name="DNAalignment_corresponding_to_protein_from_RBH_PfPfiji_ApApomp" value="outputs_dna2/DNAalignment_corresponding_to_protein_from_RBH_PfPfiji_ApApomp.fasta" />
            </output_collection>
        </test>
		<test>
            <param name="inputs" ftype="fasta" value="inputs/PfPfiji_Trinity.fasta,inputs/ApApomp_Trinity.fasta,inputs/AmAmphi_Trinity.fasta,inputs/AcAcaud_Trinity.fasta" />
			<param name="e-value" value="1e-5" />
			<output name="output" >
				<assert_contents>
					<has_line line="('PfPfiji_Trinity.fasta', 'ApApomp_Trinity.fasta')"/>
					<has_line line="('PfPfiji_Trinity.fasta', 'AmAmphi_Trinity.fasta')"/>
					<has_line line="('PfPfiji_Trinity.fasta', 'AcAcaud_Trinity.fasta')"/>
					<has_line line="('ApApomp_Trinity.fasta', 'AmAmphi_Trinity.fasta')"/>
					<has_line line="('ApApomp_Trinity.fasta', 'AcAcaud_Trinity.fasta')"/>
					<has_line line="('AmAmphi_Trinity.fasta', 'AcAcaud_Trinity.fasta')"/>

					<has_text text="Number of pairwises parsed = 2" />
					<has_text text="Number of pairwises parsed = 3" />
					<has_text text="Number of pairwises parsed = 0" />
					<has_text text="Number of pairwises parsed = 5" />
					<has_text text="Number of pairwises parsed = 1" />
				</assert_contents>
			</output>
            <output_collection name="output_fasta_prot" type="list">
                <element name="ReciprocalBestHits_AmAmphi_AcAcaud" value="outputs_prot/ReciprocalBestHits_AmAmphi_AcAcaud.fasta" />
                <element name="ReciprocalBestHits_ApApomp_AcAcaud" value="outputs_prot/ReciprocalBestHits_ApApomp_AcAcaud.fasta" />
                <element name="ReciprocalBestHits_ApApomp_AmAmphi" value="outputs_prot/ReciprocalBestHits_ApApomp_AmAmphi.fasta" />
                <element name="ReciprocalBestHits_PfPfiji_AcAcaud" value="outputs_prot/ReciprocalBestHits_PfPfiji_AcAcaud.fasta" />
                <element name="ReciprocalBestHits_PfPfiji_AmAmphi" value="outputs_prot/ReciprocalBestHits_PfPfiji_AmAmphi.fasta" />
                <element name="ReciprocalBestHits_PfPfiji_ApApomp" value="outputs_prot/ReciprocalBestHits_PfPfiji_ApApomp.fasta" />
            </output_collection>
            <output_collection name="output_fasta_dna" type="list">
                <element name="DNAalignment_corresponding_to_protein_from_RBH_AmAmphi_AcAcaud" value="outputs_dna/DNAalignment_corresponding_to_protein_from_RBH_AmAmphi_AcAcaud.fasta" />
                <element name="DNAalignment_corresponding_to_protein_from_RBH_ApApomp_AcAcaud" value="outputs_dna/DNAalignment_corresponding_to_protein_from_RBH_ApApomp_AcAcaud.fasta" />
                <element name="DNAalignment_corresponding_to_protein_from_RBH_ApApomp_AmAmphi" value="outputs_dna/DNAalignment_corresponding_to_protein_from_RBH_ApApomp_AmAmphi.fasta" />
                <element name="DNAalignment_corresponding_to_protein_from_RBH_PfPfiji_AcAcaud" value="outputs_dna/DNAalignment_corresponding_to_protein_from_RBH_PfPfiji_AcAcaud.fasta" />
                <element name="DNAalignment_corresponding_to_protein_from_RBH_PfPfiji_AmAmphi" value="outputs_dna/DNAalignment_corresponding_to_protein_from_RBH_PfPfiji_AmAmphi.fasta" />
                <element name="DNAalignment_corresponding_to_protein_from_RBH_PfPfiji_ApApomp" value="outputs_dna/DNAalignment_corresponding_to_protein_from_RBH_PfPfiji_ApApomp.fasta" />
            </output_collection>
		</test>
	</tests>

	<help>

 @HELP_AUTHORS@
 
<![CDATA[
---------

**Description**

This tool searches for different homologous genes from pairwise comparisons between a set of fasta files (one file per species).
 
--------

**Parameters**

    - 'Input files' : a collection of fasta files (one file per species)
    - 'e_value' : the blast e-value. By default it's 1e-5.

--------

**Outputs**

    - 'Pairwise' : the general output. It gives the information about what the tool has done for each pairwise.

    - 'Pairwise_DNA' : the output which contains nucleic sequences (of the pairwise) that are homologous. The sequences are with nucleotides. It shows for both the query and match :
        the name        
        the sequence in nucleotides
   
    - 'Pairwise_PROT' : the output which contains proteic sequences (of the pairwise) that are homologous. The sequences are with protein. It shows :
        Name, position, length, and part of the sequence in protein for query and match sequences
        Divergence
        Number of gaps 
        Real divergence

--------

**The AdaptSearch Pipeline**

.. image:: adaptsearch_picture_helps.png :heigth: 593 :width: 852

---------

Changelog
---------

**Version 2.0 - 18/04/2017**

 - NEW: Replace the zip between tools by Dataset Collection


**Version 1.0 - 13/04/2017**

 - TEST: Add functional test with planemo

 - IMPROVEMENT: Use conda dependencies for blast, samtools and python

    ]]>
    </help>

    <expand macro="citations" />

</tool>