From 2c85c6fee962f972722afc60781ee2090f3c48d1 Mon Sep 17 00:00:00 2001 From: Anton Nekrutenko Date: Mon, 19 Jan 2009 12:12:36 -0500 Subject: [PATCH] Preliminary commity for lca. Still in progress. --- static/welcome.html | 107 +++++++++++++++++++++---------- tools/taxonomy/find_diag_hits.py | 7 +- tools/taxonomy/lca.py | 47 +++++++++++++- tools/taxonomy/lca.xml | 38 ++++++++++- 4 files changed, 159 insertions(+), 40 deletions(-) diff --git a/static/welcome.html b/static/welcome.html index 5bd2ab245cd..08021b9fe94 100644 --- a/static/welcome.html +++ b/static/welcome.html @@ -6,47 +6,88 @@ + + + + + + + + + + +
-
- Workflows are finally here! -
- Watch how you can (Click link to play)... - -
- For more screencasts click here. -
-
+
+ The Galaxy Main Server was recently upgraded. -
- Unsequenced Genomes of the World | October 2008 -
-
- -
- Costa's hummingbird (Calypte costae) | Kings Canyon NP, California -
-
+
+ There was some instability as Galaxy was restarted numerous times between 8:30 and 10:00 AM EST (UTC -0500) this morning (Wednesday, January 14). Any jobs from this time that ended in error can be tried again. If you continue to have any problems, please contact the Galaxy Team by using the 'report this error' link within a red history item, or emailing galaxy-bugs@bx.psu.edu. +
+ +

+

+ We are hiring! +
+ Thanks to your support and an unprecedented level of usage, we are looking for an experienced software developer to join our team. For more information about this position, please, click here.

-
- Galaxy is for Biologists -
- Use this site to access popular sources of data like the UCSC Table Browser. Run analyses right on the spot using a variety of integrated tools. Your results are always available and can be easily shared with others. Just watch how. -
-
-
- Galaxy is for Developers -
- Galaxy is an easy-to-use, open-source, scalable framework for tool and data integration. Stop wasting time writing interfaces and get your tools used by biologists! Galaxy includes everything you need to get started, so download and start integrating! -
+ +
+Introducing Galactic Quickies +
+ Galactic quickies are super-short screencasts that are always under 5 minutes. We thought it may be a good way to spread the word about Galaxy's functionality while keeping the "annoyance factor" to the minimum. The quickies will be updated weekly. +
+ + + + +
+ +
+ + + +
+
+ For a high resolution version click here. +
+
+
+ +
+

Galaxy team is a part of BX at Penn State.


This project is supported in part by NSF and the Huck Institutes of the Life Sciences.

Galaxy build: $Rev$

diff --git a/tools/taxonomy/find_diag_hits.py b/tools/taxonomy/find_diag_hits.py index a481cab65dd..993c066bb2b 100644 --- a/tools/taxonomy/find_diag_hits.py +++ b/tools/taxonomy/find_diag_hits.py @@ -71,7 +71,8 @@ taxRank = { 'genus' :20, 'subgenus' :21, 'species' :22, - 'subspecies' :23 + 'subspecies' :23, + 'order' :13 } @@ -157,12 +158,16 @@ try: for item in cur.fetchall(): out_string = '%s\t%s\t%d\t' % ( item[0], item[1], item[2] ) out_string += rankName + out_string += '\t' + out_string += str(taxRank[rankName]) print >>out_file, out_string else: cur.execute('select rank, count(*) from %s_count where N = 1 and length(rank)>1 group by rank' % rank) for item in cur.fetchall(): out_string = '%s\t%s\t' % ( item[0], item[1] ) out_string += rankName + out_string += '\t' + out_string += str(taxRank[rankName]) print >>out_file, out_string except Exception, e: stop_err("%s\n" % e) diff --git a/tools/taxonomy/lca.py b/tools/taxonomy/lca.py index beb356f160b..0b9785d9dd5 100644 --- a/tools/taxonomy/lca.py +++ b/tools/taxonomy/lca.py @@ -14,6 +14,32 @@ def main(): try: inputfile = sys.argv[1] outfile = sys.argv[2] + rank_bound = int( sys.argv[3] ) + """ + Mapping of ranks: + root :2, + superkingdom:3, + kingdom :4, + subkingdom :5, + superphylum :6, + phylum :7, + subphylum :8, + superclass :9, + class :10, + subclass :11, + superorder :12, + order :13, + suborder :14, + superfamily :15, + family :16, + subfamily :17, + tribe :18, + subtribe :19, + genus :20, + subgenus :21, + species :22, + subspecies :23, + """ except: stop_err("Syntax error: Use correct syntax: program infile outfile") group_col = 0 @@ -91,7 +117,16 @@ def main(): out_list[k+1] = 'n' k += 1 - print >>fout, '\t'.join(out_list) + # print >>fout, '\t'.join(out_list) + + if rank_bound == 0: + print >>fout, ''.join(out_list) + print 'n'*( 24 - rank_bound ) + else: + print '\t'.join(out_list[rank_bound:24]) + if ''.join(out_list[rank_bound:24]) != 'n'*( 24 - rank_bound ): + print >>fout, '\t'.join(out_list) + block_valid = True prev_item = item @@ -134,9 +169,15 @@ def main(): while k < 23: out_list[k+1] = 'n' k += 1 - - print >>fout, '\t'.join(out_list) + if rank_bound == 0: + print >>fout, '\t'.join(out_list) + else: + print ''.join(out_list[rank_bound:24]) + print 'n'*( 24 - rank_bound ) + if ''.join(out_list[rank_bound:24]) != 'n'*( 24 - rank_bound ): + print >>fout, '\t'.join(out_list) + if skipped_lines > 0: msg= "Skipped %d invalid lines starting with line %d. Value '%s' in column %d is not numeric." % ( skipped_lines, first_invalid_line, invalid_value, invalid_column ) print msg diff --git a/tools/taxonomy/lca.xml b/tools/taxonomy/lca.xml index 8ba556c50dd..f608a16cfc3 100644 --- a/tools/taxonomy/lca.xml +++ b/tools/taxonomy/lca.xml @@ -1,12 +1,44 @@ - lca.py $input1 $out_file1 + lca.py $input1 $out_file1 $rank_bound - + + + + + + + + + + + + + + + + + + + + + + + + + - + + + +**What it does** + +When performing metagenomic analyses it is often necessary to identify sequence reads corresponding to a particular taxonomic group, or, in other words, diagnostic of a particular taxonomic rank. This utility performs this analysis. It takes data generated by *Taxonomy manipulation->Fetch Taxonomic Ranks* as input and outputs either a list of sequence reads unique to a particular taxonomic rank, or a list of taxonomic ranks and the count of unique reads corresponding to each rank. + + + \ No newline at end of file