changeset 1:42c899125802 default tip

Uploaded
author ondovb
date Mon, 19 Mar 2012 17:39:59 -0400
parents e2500c3c8f1b
children
files krona/README.txt krona/classify_blast.xml krona/krona.xml
diffstat 3 files changed, 140 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/krona/README.txt	Wed Sep 21 17:19:28 2011 -0400
+++ b/krona/README.txt	Mon Mar 19 17:39:59 2012 -0400
@@ -2,23 +2,38 @@
 interactive charts of hierarchical abundance. Problems can be reported to
 ondovb@nbacc.net.
 
+TOOLS:
+
+    - Krona chart
+      Creates a Krona chart from tabular BLAST output (which is classified using
+      a lowest common ancestor approach), Galaxy taxonomic representations, or
+      NCBI taxonomy IDs.
+
+    - Classify BLAST
+      Classifies tabular BLAST results as in the above tool, but only outputs
+      the classifications (as NCBI taxonomy IDs) instead of the chart. These can
+      also be used to create a chart. 
+
 REQUIRED:
-        - KronaTools (krona.sourceforge.net)
+
+    - KronaTools 2.0 or later (krona.sourceforge.net)
 
 INSTALL:
-        - Copy krona.xml to the desired tools directory and update
-          tool_conf.xml to include it.
+
+    - Copy krona.xml (and classify_blast.xml if required) to the desired
+      tools directory and update tool_conf.xml to include it.
 
 INTRANETS:
-        - If the machines accessing your Galaxy server are not connected to the
-          internet, you will need to deploy Krona web resources to the Galaxy
-          server.  To do this:
 
-          - From the KronaTools directory, run:
+    - If the machines accessing your Galaxy server are not connected to the
+      internet, you will need to deploy Krona web resources to the Galaxy
+      server.  To do this:
+
+      - From the KronaTools directory, run:
 
-            ./deployResources.sh <galaxy>/static/krona
-            	(where <galaxy> is the directory of the Galaxy installation)
+        ./deployResources.sh <galaxy>/static/krona
+        (where <galaxy> is the directory of the Galaxy installation)
           
-          - Uncomment the line of krona.xml that reads:
+      - Uncomment the line of krona.xml that reads:
 
-            -u /static/krona
+        -u /static/krona
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/krona/classify_blast.xml	Mon Mar 19 17:39:59 2012 -0400
@@ -0,0 +1,75 @@
+<tool id="classify_blast" name="Classify BLAST" version="1.0.0">
+<description>results using KronaTools</description>
+<command>
+	ktClassifyBLAST
+	-o $output
+	-e $factor
+	$random
+	#if $score == 'percentIdentity':
+		-p
+	#elif $score == 'bitScore':
+		-b
+	#end if
+	$summarize
+	#for $input in $inputs
+		${input.input}
+	#end for
+</command>
+
+<inputs>
+	<repeat name="inputs" title="BLAST result">
+		<param name="input" format="tabular" type="data" label="BLAST result"/>
+	</repeat>
+	<param name="factor" type="float" value="10" label="E-value factor" help="For each query, hits with e-values within this factor of the best hit's e-value will be included when computing the lowest common ancestor (or picking randomly)."/>
+	<param name="random" type="boolean" truevalue="-r" falsevalue="" label="Random" help="Pick from hits within E-value factor randomly instead of finding the lowest common ancestor"/>
+	<param name="score" type="select" label="Score by">
+		<option value="evalue">E-value</option>
+		<option value="percentIdentity">Percent identity</option>
+		<option value="bitScore">Bit score</option>
+	</param>
+	<param name="summarize" type="boolean" truevalue="-s" falsevalue="" label="Summarize" help="Sum results by taxonomy ID and list totals in the first column instead of query IDs"/>
+</inputs>
+
+<outputs>
+	<data format="tabular" name="output"/>
+</outputs>
+
+<help>
+
+**What it does**
+
+Creates taxonomic classifications for each query in BLAST results by finding the lowest common ancestor (or by picking randomly, if specified) of "best" hits (as determined by e-value factor above). Requires a KronaTools_ installation (2.0 or higher) with taxonomy downloaded.
+
+ .. _KronaTools: http://krona.sourceforge.net
+
+**Input**
+
+Tabular BLAST results containing gi numbers. If comment lines are present, queries with no hits will be assigned to taxon -1 (consistent with MEGAN).
+
+Example input (BLAST)::
+
+  1      2                            3      4    5  6  7  8    9        10       11     12
+  read1  gi|211853080|gb|EQ846228.1|  97.33  150  1  3  6  154  9518999  9519146  5e-64  252
+  read2  gi|211853080|gb|EQ846228.1|  96.69  151  0  5  6  154  9496147  9496294  2e-62  246
+
+**Output**
+
+The output is a list of query IDs (or counts, if **summarize** is specified) followed by NCBI taxonomy IDs and scores. This can be used to create a Krona chart by specifying "Taxonomy ID list" as the **input type**. If the output is summarized, the **summarized** option must also be specified when creating the chart.
+
+Example output (default)::
+
+  1 (query ID)  2 (tax ID)  3 (score)
+  read1         9606        94.34
+  read2         9616        32.17
+
+Example output (summarized)::
+
+  1 (count)  2 (tax ID)  3 (score)
+  243        9606        94.34
+  17         9616        32.17
+
+</help>
+  <requirements>
+  	<requirement type="binary">ktClassifyBLAST</requirement>
+  </requirements>
+</tool>
--- a/krona/krona.xml	Wed Sep 21 17:19:28 2011 -0400
+++ b/krona/krona.xml	Mon Mar 19 17:39:59 2012 -0400
@@ -1,29 +1,31 @@
-<tool id="krona" name="Krona chart" version="1.0.0">
+<tool id="krona" name="Krona chart" version="1.1.0">
 <description>of taxonomic abundance</description>
 <command>
 	#if $type.program == 'galaxy':
 		ktImportGalaxy
 	#else if $type.program == 'blast':
 		ktImportBLAST
+		-e ${type.factor}
+		${type.random}
 	#else
 		ktImportTaxonomy
+		${type.summary}
 	#end if
 	-o $output
 	${type.include}
-	#if $type.program == 'blast':
-		-e ${type.factor}
-	#end if
 	
+	-d $depth
+
 	## uncomment for isolated intranets (see README)
-	#
-	#-u /static/krona
+	##
+	##-u /static/krona
 	
 	#if $datasets.multiple == 'single':
 		$input
 	#else
 		$datasets.combine
 		#for $input in $datasets.inputs
-			${input.file},\"${input.name}\"
+			${input.file},'${input.name}'
 		#end for
 	#end if
 </command>
@@ -42,12 +44,15 @@
 		<when value="blast">
 			<param name="factor" type="float" value="10" label="E-value factor" help="For each query, hits with e-values within this factor of the best hit's e-value will be included when computing the lowest common ancestor."/>
 			<param name="include" type="boolean" truevalue="-i" falsevalue="" label="Include reads with no hits (comment lines must be present in BLAST results)"/>
+			<param name="random" type="boolean" truevalue="-r" falsevalue="" label="Random" help="Pick from hits within E-value factor randomly instead of finding the lowest common ancestor"/>
 		</when>
 		<when value="taxonomy">
 			<param name="factor" type="hidden" value=""/>
+			<param name="summary" type="boolean" truevalue="-m 1" falsevalue="" label="Summarized" help="The first column is counts rather than query IDs."/>
 			<param name="include" type="boolean" truevalue="-i" falsevalue="" label="Include reads with no hits"/>
 		</when>
 	</conditional>
+	<param name="depth" label="Depth" type="integer" help="The maximum depth to show in the chart (0 for unlimited)." value="0"/>
 	<conditional name="datasets">
 		<param name="multiple" type="select" label="Number of datasets">
 			<option value="single">Single</option>
@@ -95,7 +100,7 @@
 
 **What it does**
 
-Creates an interactive Krona_ chart of taxonomic abundance. Requires a KronaTools installation (1.3 or higher) with taxonomy downloaded.
+Creates an interactive Krona_ chart of taxonomic abundance. Requires a KronaTools installation (2.0 or higher) with taxonomy downloaded.
 
  .. _Krona: http://krona.sourceforge.net
 
@@ -108,22 +113,38 @@
 
 ...or, they can be tabular BLAST results containing gi numbers, which will be used to look up taxonomy IDs and find lowest common ancestors for best hits (comment lines are optional but required for showing queries with no hits in the chart)::
 
-  1                 2                           3       4   5   6   7   8   9       10      11       12
-  G58TM3O01ATAI0	gi|211853080|gb|EQ846228.1|	97.33	150	1	3	6	154	9518999	9519146	5e-64	 252
-  G58TM3O01ATAI0	gi|211853080|gb|EQ846228.1|	96.69	151	0	5	6	154	9496147	9496294	2e-62	 246
-  G58TM3O01ATAI0	gi|211853080|gb|EQ846228.1|	96.69	151	0	5	6	154	9517265	9517412	2e-62	 246
+  1      2                            3      4    5  6  7  8    9        10       11     12
+  read1  gi|211853080|gb|EQ846228.1|  97.33  150  1  3  6  154  9518999  9519146  5e-64  252
+  read2  gi|211853080|gb|EQ846228.1|  96.69  151  0  5  6  154  9496147  9496294  2e-62  246
+
+...or, they can be lists of taxonomy IDs preceded by query IDs or counts (these formats can be exported by ktClassifyBLAST or MEGAN), but **Summarized** must be checked if they are counts::
 
-...or, they can be taxonomy IDs with magnitudes (this format can be exported by MEGAN)::
+  1	    2
+  read1 9606
+  read2 9616
+
+Summarized::
 
   1     2
-  9606  243
-  9616  17
+  243   9606
+  17    9616
 
-...that can optionally have scores::
+Both forms can optionally have scores::
 
   1     2    3
-  9606  243  94.34
-  9616  17   32.17
+  read1 9606 94.34
+  read2 9616 32.17
+
+Summarized::
+  
+  1     2    3
+  243   9606 94.34
+  17    9616 32.17
 
   </help>
+  <requirements>
+  	<requirement type="binary">ktImportGalaxy</requirement>
+  	<requirement type="binary">ktImportBLAST</requirement>
+  	<requirement type="binary">ktImportTaxonomy</requirement>
+  </requirements>
 </tool>