mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-16 07:19:13 +08:00
128 lines
5.4 KiB
XML
128 lines
5.4 KiB
XML
<tool id="Extract_features1" name="Extract features">
|
|
<description> from GFF file</description>
|
|
<command interpreter="python2.4">extract_GFF_Features.py $input1 $out_file1 ${column_choice.col} ${column_choice.feature}</command>
|
|
<inputs>
|
|
<param format="gff" name="input1" type="data" label="Select GFF data"/>
|
|
<conditional name="column_choice">
|
|
<param name="col" type="select" label="Select field">
|
|
<option value="0" selected="true">Column 1 / Sequence name</option>
|
|
<option value="1">Column 2 / Source</option>
|
|
<option value="2">Column 3 / Feature</option>
|
|
<option value="6">Column 7 / Strand</option>
|
|
<option value="7">Column 8 / Frame</option>
|
|
</param>
|
|
<when value="0">
|
|
<param name="feature" type="select" multiple="true" label="Select features" >
|
|
<options>
|
|
<filter type="data_meta" data_ref="input1" key="file_name" />
|
|
<filter type="column" name="value_col" value="0" />
|
|
</options>
|
|
</param>
|
|
</when>
|
|
<when value="1">
|
|
<param name="feature" type="select" multiple="true" label="Select features" >
|
|
<options>
|
|
<filter type="data_meta" data_ref="input1" key="file_name" />
|
|
<filter type="column" name="value_col" value="1" />
|
|
</options>
|
|
</param>
|
|
</when>
|
|
<when value="2">
|
|
<param name="feature" type="select" multiple="true" label="Select features" >
|
|
<options>
|
|
<filter type="data_meta" data_ref="input1" key="file_name" />
|
|
<filter type="column" name="value_col" value="2" />
|
|
</options>
|
|
</param>
|
|
</when>
|
|
<when value="6">
|
|
<param name="feature" type="select" multiple="true" label="Select features" >
|
|
<options>
|
|
<filter type="data_meta" data_ref="input1" key="file_name" />
|
|
<filter type="column" name="value_col" value="6" />
|
|
</options>
|
|
</param>
|
|
</when>
|
|
<when value="7">
|
|
<param name="feature" type="select" multiple="true" label="Select features" >
|
|
<options>
|
|
<filter type="data_meta" data_ref="input1" key="file_name" />
|
|
<filter type="column" name="value_col" value="7" />
|
|
</options>
|
|
</param>
|
|
</when>
|
|
</conditional>
|
|
<!--
|
|
<param name="out_format" type="select" label="Output format">
|
|
<option value="GFF" selected="true">GFF</option>
|
|
<option value="BED">BED</option>
|
|
</param>
|
|
-->
|
|
</inputs>
|
|
<outputs>
|
|
<data format="gff" name="out_file1" />
|
|
</outputs>
|
|
<tests>
|
|
<test>
|
|
<param name="input1" value="5.gff"/>
|
|
<param name="col" value="0" />
|
|
<param name="feature" value="chr5,chr6,chr7,chr8" />
|
|
<output name="out_file1" file="Extract_features1_out.gff"/>
|
|
</test>
|
|
</tests>
|
|
<help>
|
|
|
|
**What it does**
|
|
|
|
This tool extracts selected features from a history item in GFF format. To convert the output GFF file to BED format, please use **GFF-to-BED converter** under **Convert Formats** section.
|
|
|
|
The interface for this tool contains two pages (steps):
|
|
|
|
* **Step 1 of 2**. Choose GFF data from history to extract features from.
|
|
* **Step 2 of 2**. Choose field and features to be extracted. Once you select the field the **Select features** widget will refresh and display non-redundant set of values present in that column.
|
|
|
|
----
|
|
|
|
.. class:: warningmark
|
|
|
|
If the chosen column is absent in the input GFF file, the tool displays a message in the "Select Features" drop-down menu. Running the tool in this case will return an empty output. Also, running the tool on columns with ONLY one feature will return an output same as the input.
|
|
|
|
|
|
-----
|
|
|
|
**Example**
|
|
|
|
Selecting **promoter** from the following GFF-formatted data::
|
|
|
|
chr22 GeneA enhancer 10000000 10001000 500 + . TGA
|
|
chr22 GeneA promoter 10010000 10010100 900 + . TGA
|
|
chr22 GeneB promoter 10020000 10025000 400 - . TGB
|
|
chr22 GeneB CCDS2220 10030000 10065000 800 - . TGB
|
|
|
|
will produce the following output::
|
|
|
|
chr22 GeneA promoter 10010000 10010100 900 + . TGA
|
|
chr22 GeneB promoter 10020000 10025000 400 - . TGB
|
|
|
|
----
|
|
|
|
.. class:: infomark
|
|
|
|
**About formats**
|
|
|
|
**GFF format** General Feature Format is a format for describing genes and other features associated with DNA, RNA and Protein sequences. GFF lines have nine tab-separated fields::
|
|
|
|
1. seqname - Must be a chromosome or scaffold.
|
|
2. source - The program that generated this feature.
|
|
3. feature - The name of this type of feature. Some examples of standard feature types are "CDS", "start_codon", "stop_codon", and "exon".
|
|
4. start - The starting position of the feature in the sequence. The first base is numbered 1.
|
|
5. end - The ending position of the feature (inclusive).
|
|
6. score - A score between 0 and 1000. If there is no score value, enter ".".
|
|
7. strand - Valid entries include '+', '-', or '.' (for don't know/care).
|
|
8. frame - If the feature is a coding exon, frame should be a number between 0-2 that represents the reading frame of the first base. If the feature is not a coding exon, the value should be '.'.
|
|
9. group - All lines with the same group are linked together into a single item.
|
|
|
|
|
|
</help>
|
|
</tool>
|