view micropita.xml @ 3:b4cf8c75305b draft default tip

Pointing to the right root directory
author george-weingart
date Tue, 30 Aug 2016 13:10:34 -0400
parents 2f4f6f08c8c4
children
line wrap: on
line source

<tool id="micropita" name="Run" version="1.0.1">
<code file="micropita_format_input_selector.py"/> 
<description>micropita</description>
<command interpreter="python">micropita_prepare.py 
--lastmeta $cls_x 
-m $cond.method_sel
-n $selected_samples
--input $inp_data
--output $out_file1
--stratify_value $cls_s

#if $cond.method_sel  == "features":
	--feature_method $cond.feature_method
	--targets $cond.cls_f
#end if
#if $cond.method_sel  == "distinct" or   $cond.method_sel  == "discriminant" :
	--label_value $cond.cls_L
#end if

</command>
  <inputs>
	<param format="micropita" name="inp_data" type="data" label="Input file"/>

	<param name="cls_x" type="select" label="Last metadata row (Use 'Label' for demo data)"  multiple="False" size ="70"  dynamic_options="get_cols(inp_data,'0')"/>


	<param name="cond" type="data_column" data_ref="inp_data" accept_default="true" /> 
		<conditional name="cond" type="data_column" data_ref="inp_data" accept_default="true">
		      	<param name="method_sel" type="select" data_ref="inp_data" label="Select method">
		         	<option value="representative" selected="True">Representative</option>
				<option value="diverse">Diverse</option>
				<option value="extreme" >Extreme</option>
				<option value="features" >Features</option>
				<option value="distinct" >Distinct (Supervised)</option>
				<option value="discriminant" >Discriminant (Supervised)</option>
			</param>
		     	<when value="representative">
			</when>
		      	<when value="diverse">
		       	</when>
		      	<when value="extreme">
		       	</when>
		      	<when value="features">
				<param name="cls_f" type="select" label="Targeted feature(s)"  multiple="True" size ="70"  dynamic_options="get_cols_features(inp_data,'0',cls_x)"/>
				<param name="feature_method" type="select" format="text">
					<label>Selection type</label>
						<option value="rank">Rank</option>
						<option value="abundance">Abundance</option>
				</param>
		       	</when>
		      	<when value="distinct">
				<param name="cls_L" type="select" label="Label (Use 'Group' for demo data)"  multiple="False" size ="70"  dynamic_options="get_cols_add_line(inp_data,'0',cls_x)"/>
		       	</when>
	
		      	<when value="discriminant">
				<param name="cls_L" type="select" label="Label (Use 'Group' for demo data)"  multiple="False" size ="70"  dynamic_options="get_cols_add_line(inp_data,'0',cls_x)"/>
		       	</when>

               	</conditional>

	
	<param name="cls_s" type="select" label="Stratify by (optional) (Use 'StratifyLabel' for demo data)"  multiple="False" size ="70"  dynamic_options="get_cols_add_line(inp_data,'0',cls_x)"/>

	<param name="selected_samples" type="integer" size="4" value="10"  label="Number of samples to select"/>

	

  </inputs>

  <outputs>
    <data format="text" name="out_file1" />
  </outputs>
  <requirements>
    <requirement type="set_environment">micropita_SCRIPT_PATH</requirement>
  </requirements>
  <help>
	  

microbiome: Picking Interesting Taxonomic Abundance
---------------------------------------------------



microPITA is a computational tool enabling sample selection in tiered studies. Using tiered-study designs can more efficiently allocate resources, reducing study costs, and maximizing the use of samples. From a survey study, selection of samples can be performed to target various microbial communities including:

1. Samples with the most diverse community (maximum diversity);
2. Samples dominated by specific microbes (targeted feature);
3. Samples with microbial communities representative of the survey (representative dissimilarity);
4. Samples with the most extreme microbial communities in the survey (most dissimilar);
5. Given a phenotype (like disease state), samples at the border of phenotypes (discriminant) or samples typical of each phenotype (distinct). 

Additionally, methods can leverage clinical metadata by stratifying samples into groups in which samples are subsequently selected. This enables the use of microPITA in cohort studies.


.. image:: https://bytebucket.org/biobakery/galaxy_micropita/wiki/HMPStool10PCoA.png
    :height: 500        
    :width: 600  

MicroPITA unsupervised method selection in the HMP 16S Gut Microbiome. Selection of 10 samples using targeted feature targeting *Bacteroides* (blue), maximum diversity (orange), representative dissimilarity (purple), and most dissimilar (pink) using Principle Covariance Analysis (PCoA) for ordination. Targeted feature selects samples dominated by *Bacteroides* (upper left) while maximum diversity select more diverse samples away from *Bacteroides* dominant samples. Representative selection selects samples covering the range of samples in the PCoA plot focusing on the higher density central region while maximum dissimilarity selects samples at the periphery of the plot.


Intructions to run:
-------------------

Before running microPita,  you must upload your data using Glaxay's **Get Data -  Upload File**
Please make sure that you choose **File Format Micropita**
An example can be found at https://bytebucket.org/biobakery/micropita/wiki/micropita_sample_PCL.txt

Required inputs
---------------

microPITA requires an input pcl file of metadata and microbial community measurements. Although some defaults can be changed, microPITA expects a PCL file as an input file. A PCL file is a text delimited file similar to an excel spread sheet with the following characteristics.

1. **Rows** represent metadata and features (bugs), **columns** represent samples.
2. The **first row** by default should be the sample ids.
3. Metadata rows should be next.
4. Lastly, rows containing features (bugs) measurements (like abundance) should be after metadata rows.
5. The **first column** should contain the ID describing the column. For metadata this may be, for example, "Age" for a row containing the age of the patients donating the samples. For measurements, this should be the feature name (bug name).
6. The file is expected to be TAB delimited.
7. If a consensus lineage or hierarchy of taxonomy is contained in the feature name, the default delimiter between clades is the pipe ("|").

**Note** MAC users, please save file as windows formatted text.

.. image:: https://bytebucket.org/biobakery/galaxy_micropita/wiki/pcl_diagram.png
    :height: 500        
    :width: 600  

Outputs
-------

The Run MicroPITA module will create one output text file. The output will consist of one line starting with a key word for the selection method and then followed by selected samples delimited by tabs. An example of 6 samples selected by the representative:

representative	sample_1	sample_2	sample_3	sample_4	sample_5	sample_6


	  
	  
Run microPITA
-------------

A brief description of the Run micropita module.

**Input file:**
This should be populated by the Load microPITA module.

**Last metadata row:**
The row on the input pcl file that is the last metadata. All microbial measurements should follow this row.

**Select method:**
Select which method to use for sample selection. Selection methods include:

1. Representative. Samples with microbial communities representative of the survey (representative dissimilarity);
2. Diverse. Samples with the most diverse community (maximum diversity);
3. Extreme. Samples with the most extreme microbial communities in the survey (most dissimilar);
4. Features. Samples dominated by specific microbes (targeted feature);
5. Distinct. Given a phenotype (like disease state), samples typical of each phenotype (Distinct). 
6. Discriminant. Given a phenotype (like disease state), samples at the border of phenotypes (Discriminant). 

**Targeted feature(s):** (visible with Features method selection only)
Select 1 or more features to target in sample selection.

**Selection type:** (visible with Features method selection only)
Rank or Abundance. 

1. Rank indicates selecting samples that have the highest rank of the Targeted features(s), this tends to select sample in which these feature dominant the sample.
2. Abundance indicates selecting samples that have the highest average abundance of the Targeted features(s), this selects samples where features are most abundant but not necessarily dominant in the community.

**Label:** (visible with supervised method selection only)
The row which contains the label used to classify the samples from supervised methods.

**Stratify by (optional):**
The row which contains the groupings the samples will first be placed in before running the selection method on each group. If no grouping is selected, selection methods will be performed on the data set as a whole.

**Number of samples to select:**
The number of samples to select. If samples are stratified, this is per stratification (or group). If supervised methods are used, this is the number of samples selected per classification group (as defined by the label).

For more information please visit http://huttenhower.sph.harvard.edu/micropita


Acknowledgments
---------------
Special thanks to Eric Franzosa for developing the above PCL figure!

Citation and Contacts
---------------------

For more information please visit http://huttenhower.sph.harvard.edu/micropita
When using MicroPITA please cite:
Tickle T, Segata N, Waldron L, Weingart G, Huttenhower C. Two-stage microbial community experimental design. (Under review)

Please feel free to contact us at ttickle@hsph.harvard.edu for any questions or comments!
  
	  
 </help>
</tool>