view fimo.xml @ 19:01f5d04846c4 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 93fe7345e2b6a97000975d978bf06513b3a442d9
author iuc
date Thu, 29 Aug 2024 10:19:40 +0000
parents c5209f38700d
children
line wrap: on
line source

<tool id="meme_fimo" name="FIMO" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
    <description>- Scan a set of sequences for motifs</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <xrefs>
        <xref type="bio.tools">meme_fimo</xref>
    </xrefs>
    <expand macro="requirements"/>
    <command detect_errors="exit_code"><![CDATA[
@CHECK_NON_COMMERCIAL_USE@
fimo
    -o ./out/
    $scanrc
    #if str( $options_type.options_type_selector ) == 'advanced':
        --thresh $options_type.thresh
        $options_type.qv_thresh
        #if str( $options_type.bgfile_type.bgfile_type_selector ) == 'motif_file':
            --bgfile --motif--
        #elif str( $options_type.bgfile_type.bgfile_type_selector ) == 'bgfile':
            --bgfile $options_type.bgfile_type.bgfile
        #elif str( $options_type.bgfile_type.bgfile_type_selector ) == 'uniform_distr':
            --bgfile --uniform--
        #end if
        $options_type.max_strand
        --max-stored-scores $options_type.max_stored_scores

        #if str( $options_type.motifs_cond.motif_selector) == 'yes':
            #for $motif in $options_type.motifs_cond.motifs:
                --motif '$motif.motif'
            #end for
        #end if

        --motif-pseudo $options_type.motif_pseudo
        $options_type.no_qvalue
        $options_type.parse_genomic_coords
        
        #if str( $options_type.psp_cond.psp_selector ) == 'yes':
            --psp $options_type.psp_cond.input_psp
            --alpha $options_type.psp_cond.alpha
        #end if

        #if str( $options_type.prior_dist_cond.prior_dist_selector ) == 'yes':
            --prior-dist $options_type.prior_dist_cond.input_prior_dist
        #end if
    #end if
    '$input_motifs'
    #if str($fasta_type.fasta_type_selector) == 'history':
        '${fasta_type.input_database}'
    #else:
        '${fasta_type.input_database.fields.path}'
    #end if
&& mv ./out/fimo.html '${html_outfile}'
&& mv ./out/fimo.tsv '${txt_outfile}'
&& mv ./out/fimo.xml '${xml_outfile}'
&& mv ./out/fimo.gff '${gff_outfile}'
    ]]></command>
    <inputs>
        <param name="input_motifs" type="data" format="memexml" label="DREME or MEME output XML file" help="DREME or MEME output XML file containing found motifs"/>
        <conditional name="fasta_type">
            <param name="fasta_type_selector" type="select" label="Source for sequence to search">
                <option value="cached">Locally Cached sequences</option>
                <option value="history" selected="true">Sequences from your history</option>
            </param>
            <when value="cached">
                <param name="input_database" type="select" label="Genome to search">
                    <options from_data_table="all_fasta"/>
                </param>
            </when>
            <when value="history">
                <param name="input_database" type="data" format="fasta" label="Sequences"/>
            </when>
        </conditional>
        <param name="scanrc" type="boolean" truevalue="" falsevalue="--norc" checked="False" label="Check reverse complement strand" help="Search for motifs also on reverse complement strand"/>
        <conditional name="options_type">
            <param name="options_type_selector" type="select" label="Options configuration">
                <option value="basic" selected="true">Basic</option>
                <option value="advanced">Advanced</option>
            </param>
            <when value="basic"/>
            <when value="advanced">
                <param argument="--thresh" type="float" value="1e-4" label="Output threshold for displaying search results" help="Only output results with a p-value less than the given threshold. To apply set threshold to q-values rather than p-values, set --qv-thresh."/>
                <param argument="--qv-thresh" type="boolean" truevalue="--qv_thresh" falsevalue="" checked="False" label="Apply output threshold to q-values?" help="Default: apply set threshold on p-values"/>
                <conditional name="bgfile_type">
                    <param name="bgfile_type_selector" type="select" label="Background model selection">
                        <option value="default" selected="true">Use embedded letter frequencies from non-redundant DNA/protein database</option>
                        <option value="motif_file">Use 0-order letter frequencies from motif file</option>
                        <option value="bgfile">Use 0-order letter frequencies from background file</option>
                        <option value="uniform_distr">Use uniform letter frequencies</option>
                    </param>
                    <when value="motif_file"/>
                    <when value="default"/>
                    <when value="uniform_distr"/>
                    <when value="bgfile">
                        <param name="bgfile" type="data" format="txt" optional="True" label="Background model file" help="File must be in Markov background model format (see MEME suite tool fasta-get-markov for details)"/>
                    </when>
                </conditional>
                <param argument="--max-strand" type="boolean" truevalue="--max-strand" falsevalue="" checked="False" label="Report best match in case of overlapping matches on both strands?" help="If matches on both strands at a given position satisfy the output threshold, only report the match for the strand with the higher score. If the scores are tied, the matching strand is chosen at random (default: report both matches)."/>
                <param argument="--max-stored-scores" type="integer" value="100000" label="Maximum number of scores that will be stored" help="Keeping a complete list of scores may exceed available memory. Once the number of stored scores reaches the maximum allowed, the least significant 50% of scores will be dropped. In this case, the list of reported motifs may be incomplete and the q-value calculation will be approximate."/>
                <conditional name="motifs_cond">
                    <param name="motif_selector" type="select" label="Specify single input motifs for scanning?">
                        <option value="no" selected="true">No</option>
                        <option value="yes">Yes</option>
                    </param>
                    <when value="no"/>
                    <when value="yes">
                        <repeat name="motifs" title="Supply input motif ID">
                            <param name="motif" type="text" value="" label="Specify motif by id">
                                <validator type="empty_field"/>
                                <validator type="regex" message="Value may include alphanumeric characters.">[A-Za-z]+</validator>
                            </param>
                        </repeat>
                    </when>
                </conditional>
                <param argument="--motif-pseudo" type="float" value="0.1" label="Pseudocount to add to counts in motif matrix" help="A pseudocount to be added to each count in the motif matrix, after first multiplying by the corresponding background frequency"/>
                <param argument="--no-qvalue" type="boolean" truevalue="--no-qvalue" falsevalue="" checked="False" label="Disable q-value calculation?" help="The q-value calculation is that of Benjamini and Hochberg (1995) (default: calculate q-value for each p-value)"/>
                <param name="parse_genomic_coords" argument="--parse-genomic-coord" type="boolean" truevalue="--parse-genomic-coord" falsevalue="" checked="False" label="Check each sequence header for UCSC-style genomic coordinates?" help=" If genomic coordinates are found they will be used as the coordinates in the output."/>
                <conditional name="psp_cond">
                    <param name="psp_selector" type="select" label="Use position-specific priors?">
                        <option value="no" selected="true">No</option>
                        <option value="yes">Yes</option>
                    </param>
                    <when value="no"/>
                    <when value="yes">
                        <param name="input_psp" argument="--psp" type="data" format="txt" label="Select file containing position-specific priors" help="File should be in MEME PSP format or wiggle format (can be generated by MEME suite tool create-priors)"/>
                        <param argument="--alpha" type="float" min="0" max="1.0" value="1.0" label="Alpha parameter for calculating position-specific priors" help="Represents the fraction of all transcription factor binding sites that are binding sites for the TF of interest (must be between 0 and 1)"/>
                    </when>
                </conditional>
                <conditional name="prior_dist_cond">
                    <param name="prior_dist_selector" type="select" label="Use binned distribution of priors?">
                        <option value="no" selected="true">No</option>
                        <option value="yes">Yes</option>
                    </param>
                    <when value="no"/>
                    <when value="yes">
                        <param name="input_prior_dist" argument="--prior-dist" type="data" format="txt" label="Select dataset containing binned distribution of priors" help="This file can be generated using the MEME suite tool create-priors"/>
                    </when>
                </conditional>
            </when>
        </conditional>
        <param name="non_commercial_use" type="boolean" truevalue="NON_COMMERCIAL_USE" falsevalue="COMMERCIAL_USE" checked="False" label="I certify that I am not using this tool for commercial purposes.">
            <validator type="expression" message="This tool is only available for non-commercial use.">value == True</validator>
        </param>
        <section name="output_options" title="Additional output options">
            <param name="html_outfile" type="boolean" value="False" label="Output HTML file" help="FIMO HTML output file"/>
            <param name="xml_outfile" type="boolean" value="False" label="Output XML file" help="FIMO XML output file"/>
            <param name="gff_outfile" type="boolean" value="False" label="Output GFF file" help="FIMO GFF output file"/>
        </section>
    </inputs>
    <outputs>
        <data format="txt" name="txt_outfile" label="${tool.name} on ${on_string} (text)">
            <actions>
                <conditional name="fasta_type.fasta_type_selector">
                    <when value="cached">
                        <action type="metadata" name="dbkey">
                            <option type="from_data_table" name="all_fasta" column="1" offset="0">
                                <filter type="param_value" ref="fasta_type.input_database" column="0"/>
                            </option>
                        </action>
                    </when>
                </conditional>
            </actions>
        </data>
        <data format="html" name="html_outfile" label="${tool.name} on ${on_string} (html)">
            <filter>(output_options['html_outfile'] is True)</filter>
            <actions>
                <conditional name="fasta_type.fasta_type_selector">
                    <when value="cached">
                        <action type="metadata" name="dbkey">
                            <option type="from_data_table" name="all_fasta" column="1" offset="0">
                                <filter type="param_value" column="0" value="seq" keep="True"/>
                                <filter type="param_value" ref="fasta_type.input_database" column="1"/>
                            </option>
                        </action>
                    </when>
                </conditional>
            </actions>
        </data>
        <data format="gff" name="gff_outfile" label="${tool.name} on ${on_string} (gff)">
            <filter>(output_options['gff_outfile'] is True)</filter>
            <actions>
                <conditional name="fasta_type.fasta_type_selector">
                    <when value="cached">
                        <action type="metadata" name="dbkey">
                            <option type="from_data_table" name="all_fasta" column="1" offset="0">
                                <filter type="param_value" ref="fasta_type.input_database" column="0"/>
                            </option>
                        </action>
                    </when>
                </conditional>
            </actions>
        </data>
        <data format="memexml" name="xml_outfile" label="${tool.name} on ${on_string} (xml)">
            <filter>(output_options['xml_outfile'] is True)</filter>
            <actions>
                <conditional name="fasta_type.fasta_type_selector">
                    <when value="cached">
                        <action type="metadata" name="dbkey">
                            <option type="from_data_table" name="all_fasta" column="1" offset="0">
                                <filter type="param_value" ref="fasta_type.input_database" column="0"/>
                            </option>
                        </action>
                    </when>
                </conditional>
            </actions>
        </data>
    </outputs>
    <tests>
        <test expect_num_outputs="4">
            <param name="input_motifs" value="meme_fimo_input_1.xml" ftype="memexml"/>
            <param name="fasta_type_selector" value="history"/>
            <param name="input_database" value="hsa_chrM.fa" ftype="fasta"/>
            <param name="scanrc" value="true"/>
            <param name="options_type_selector" value="basic"/>
            <param name="html_outfile" value="True"/>
            <param name="xml_outfile" value="True"/>
            <param name="gff_outfile" value="True"/>
            <param name="non_commercial_use" value="True"/>
            <output name="html_outfile" ftype="html">
                <assert_contents>
                    <has_text text="TACTAAYM"/>
                    <has_text text="MEME file name"/>
                </assert_contents>
            </output>
            <output name="txt_outfile">
                <assert_contents>
                    <has_text text="motif_id"/>
                    <has_text text="sequence_name"/>
                    <has_text text="matched_sequence"/>
                    <has_text text="TACTAATA"/>
                </assert_contents>
            </output>
            <output name="xml_outfile" ftype="memexml">
                <assert_contents>
                    <has_text text="sequence-data num-sequences"/>
                    <has_text text="16569"/>
                    <has_text text="Cytosine"/>
                    <has_text text="TACTAACA"/>
                </assert_contents>
            </output>
            <output name="gff_outfile" ftype="gff">
                <assert_contents>
                    <has_text text="gff-version 3"/>
                    <has_text text="TACTAAYM_chrM"/>
                    <has_text text="qvalue"/>
                    <has_text text="nucleotide_motif"/>
                    <has_text text="fimo"/>
                    <has_text text="chrM"/>
                    <has_n_lines n="12"/>
                </assert_contents>
            </output>
        </test>
        <test expect_num_outputs="4">
            <param name="input_motifs" value="dreme_fimo_input_1.xml" ftype="memexml"/>
            <param name="fasta_type_selector" value="history"/>
            <param name="input_database" value="hsa_chrM.fa" ftype="fasta"/>
            <param name="scanrc" value="true"/>
            <param name="options_type_selector" value="advanced"/>
            <param name="bgfile_type_selector" value="bgfile"/>
            <param name="bgfile" value="fimo_background_probs_hsa_chrM.txt"/>
            <param name="html_outfile" value="True"/>
            <param name="xml_outfile" value="True"/>
            <param name="gff_outfile" value="True"/>
            <param name="non_commercial_use" value="True"/>
            <output name="html_outfile">
                <assert_contents>
                    <has_text text="MOTIF"/>
                    <has_text text="WIDTH"/>
                    <has_text text="TTAACA"/>
                    <has_text text="GAATGT"/>
                </assert_contents>
            </output>
            <output name="txt_outfile">
                <assert_contents>
                    <has_text text="sequence_name"/>
                    <has_text text="motif_id"/>
                    <has_text text="matched_sequence"/>
                    <has_text text="ACTAAYH"/>
                    <has_text text="chrM"/>
                </assert_contents>
            </output>
            <output name="xml_outfile" ftype="memexml">
                <assert_contents>
                    <has_text text="MEME file name"/>
                    <has_text text="pseudocount"/>
                    <has_text text="Not G"/>
                    <has_text text="Keto"/>
                </assert_contents>
            </output>
            <output name="gff_outfile" ftype="gff">
                <assert_contents>
                    <has_text text="gff-version 3"/>
                    <has_text text="ID=ACTAAYH-DREME-1-4-chrM"/>
                    <has_text text="nucleotide_motif"/>
                    <has_text text="fimo"/>
                    <has_text text="chrM"/>
                    <has_n_lines n="12"/>
                </assert_contents>
            </output>
        </test>
        <test expect_num_outputs="3">
            <param name="input_motifs" value="dreme_fimo_input_1.xml" ftype="memexml"/>
            <param name="fasta_type_selector" value="history"/>
            <param name="input_database" value="hsa_chrM.fa" ftype="fasta"/>
            <param name="scanrc" value="true"/>
            <param name="options_type_selector" value="advanced"/>
            <param name="thresh" value="0.01"/>
            <param name="bgfile_type_selector" value="uniform_distr"/>
            <param name="motif_selector" value="yes"/>
            <repeat name="motifs">
                <param name="motif" value="ACTAAYH"/>
            </repeat>
            <param name="html_outfile" value="True"/>
            <param name="xml_outfile" value="True"/>
            <param name="gff_outfile" value="False"/>
            <param name="non_commercial_use" value="True"/>
            <output name="html_outfile">
                <assert_contents>
                    <has_text text="top_buttons"/>
                    <has_text text="database_and_motifs"/>
                    <has_text text="YTAACA"/>
                    <has_text text="ACTAAYH"/>
                    <has_text text="DREME"/>
                </assert_contents>
            </output>
            <output name="txt_outfile">
                <assert_contents>
                    <has_text text="motif_alt_id"/>
                    <has_text text="matched_sequence"/>
                    <has_text text="ACTAAYH"/>
                    <has_text text="ACTAACA"/>
                </assert_contents>
            </output>
            <output name="xml_outfile" ftype="memexml">
                <assert_contents>
                    <has_text text="complement"/>
                    <has_text text="letter"/>
                    <has_text text="16569"/>
                    <has_text text="dna"/>
                    <has_text text="ACTAAYH"/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help>

.. class:: warningmark

**WARNING: This tool is only available for non-commercial use. Use for educational, research and non-profit purposes is permitted.
Before using, be sure to review, agree, and comply with the license.**

FIMO scans a sequence database for individual matches to each of the motifs you provide (sample output for motifs and sequences).
The name FIMO stands for 'Find Individual Motif Occurrences'.  The program searches a database of sequences for occurrences of
known motifs, treating each motif independently.  Motifs must be in MEME Motif Format.  You can define the statistical threshold
(p-value) for motifs and whether FIMO scans just the given sequences or their reverse complements (where applicable).

.. class:: infomark

For detailed information on FIMO, click here_, or view the license_.

.. _here: http://meme-suite.org/doc/fimo.html?man_type=web
.. _license: http://meme-suite.org/doc/copyright.html?man_type=web

    </help>
    <citations>
        <citation type="doi">10.1093/bioinformatics/btr064</citation>
    </citations>
</tool>