galaxy-dev
Threads by month
- ----- 2025 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- 10008 discussions
details: http://www.bx.psu.edu/hg/galaxy/rev/c0192e97a79a
changeset: 3425:c0192e97a79a
user: gua110
date: Mon Feb 22 16:22:12 2010 -0500
description:
Bug fixes to LCA tool
diffstat:
test-data/lca_input2.taxonomy | 4 +
test-data/lca_input3.taxonomy | 100 +++++++++++++++++++++++++++++++++++++++++
test-data/lca_output2.taxonomy | 1 +
test-data/lca_output3.taxonomy | 40 ++++++++++++++++
tools/taxonomy/lca.py | 49 +++++++++++++------
tools/taxonomy/lca.xml | 24 +++++++--
6 files changed, 195 insertions(+), 23 deletions(-)
diffs (308 lines):
diff -r 9d9f0dfeeebf -r c0192e97a79a test-data/lca_input2.taxonomy
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/lca_input2.taxonomy Mon Feb 22 16:22:12 2010 -0500
@@ -0,0 +1,4 @@
+read_1 1 root superkingdom1 kingdom1 subkingdom1 superphylum1 phylum1 subphylum1 superclass1 class1 subclass1 superorder1 order1 suborder1 superfamily1 family1 subfamily1 tribe1 subtribe1 genus1 subgenus1 species1 subspecies1 1 2 3 4
+read_1 2 root superkingdom1 kingdom1 subkingdom1 superphylum1 phylum1 subphylum1 superclass1 class1 subclass1 superorder1 order1 suborder1 superfamily1 family1 subfamily1 tribe1 subtribe1 genus2 subgenus2 species2 subspecies2 1 2 3 4
+read_2 3 root superkingdom1 kingdom1 subkingdom1 superphylum1 phylum3 subphylum3 superclass3 class3 subclass3 superorder3 order3 suborder3 superfamily3 family3 subfamily3 tribe3 subtribe3 genus3 subgenus3 species3 subspecies3 1 X Y Z
+read_2 4 root superkingdom1 kingdom1 subkingdom1 superphylum1 phylum4 subphylum4 superclass4 class4 subclass4 superorder4 order4 suborder4 superfamily4 family4 subfamily4 tribe4 subtribe4 genus4 subgenus4 species4 subspecies4 1 X Y Z
diff -r 9d9f0dfeeebf -r c0192e97a79a test-data/lca_input3.taxonomy
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/lca_input3.taxonomy Mon Feb 22 16:22:12 2010 -0500
@@ -0,0 +1,100 @@
+IA_1-79371 591020 root Bacteria n n n Proteobacteria n n Gammaproteobacteria n n Enterobacteriales n n Enterobacteriaceae n n n Shigella n Shigella flexneri n 281604065
+IA_1-84488 591020 root Bacteria n n n Proteobacteria n n Gammaproteobacteria n n Enterobacteriales n n Enterobacteriaceae n n n Shigella n Shigella flexneri n 281604065
+IA_1-270826 591020 root Bacteria n n n Proteobacteria n n Gammaproteobacteria n n Enterobacteriales n n Enterobacteriaceae n n n Shigella n Shigella flexneri n 281604070
+IA_1-285361 591020 root Bacteria n n n Proteobacteria n n Gammaproteobacteria n n Enterobacteriales n n Enterobacteriaceae n n n Shigella n Shigella flexneri n 281604070
+IA_1-93958 591020 root Bacteria n n n Proteobacteria n n Gammaproteobacteria n n Enterobacteriales n n Enterobacteriaceae n n n Shigella n Shigella flexneri n 281604070
+IA_1-99821 591020 root Bacteria n n n Proteobacteria n n Gammaproteobacteria n n Enterobacteriales n n Enterobacteriaceae n n n Shigella n Shigella flexneri n 281604070
+IA_1-144417 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604077
+IA_1-278966 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604077
+IA_1-314709 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604077
+IA_1-324951 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604077
+IA_1-27817 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604153
+IA_1-95255 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604181
+IA_1-104173 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-135979 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-139090 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-139090 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-139090 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-144996 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-160446 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-160446 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-160446 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-160446 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-160446 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-160446 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-160446 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-160446 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-161439 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-190855 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-190855 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-190855 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-190855 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-190855 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-190855 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-190855 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-190855 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-190855 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-190855 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-190855 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-190855 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-190855 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-190855 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-190855 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-190855 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-190855 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-190855 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-190855 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-190855 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-190855 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-205154 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-205154 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-205154 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-205154 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-205154 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-205154 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-205154 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-205154 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-205154 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-205154 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-216231 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-236286 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-236286 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-236286 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-236286 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-236286 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-236286 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-236286 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-236286 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-236286 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-236286 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-236286 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-236286 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-237681 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-250166 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-254274 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-254274 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-27817 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-29000 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-291427 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-291427 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-293054 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-293054 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-296315 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-296315 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus
+IA_1-310974 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-310974 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-311282 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-311282 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-322295 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n
+IA_1-42600 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-45102 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-45102 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-48105 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-48105 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-57254 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-61975 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-61975 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-66943 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-68288 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-82334 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-95526 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
diff -r 9d9f0dfeeebf -r c0192e97a79a test-data/lca_output2.taxonomy
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/lca_output2.taxonomy Mon Feb 22 16:22:12 2010 -0500
@@ -0,0 +1,1 @@
+read_1 1 root superkingdom1 kingdom1 subkingdom1 superphylum1 phylum1 subphylum1 superclass1 class1 subclass1 superorder1 order1 suborder1 superfamily1 family1 subfamily1 tribe1 subtribe1 n n n n 1 2 3 4
diff -r 9d9f0dfeeebf -r c0192e97a79a test-data/lca_output3.taxonomy
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/lca_output3.taxonomy Mon Feb 22 16:22:12 2010 -0500
@@ -0,0 +1,40 @@
+IA_1-104173 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-135979 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-139090 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-144417 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604077
+IA_1-144996 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-160446 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-161439 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-190855 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-205154 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-216231 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-236286 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-237681 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-250166 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-254274 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-270826 591020 root Bacteria n n n Proteobacteria n n Gammaproteobacteria n n Enterobacteriales n n Enterobacteriaceae n n n Shigella n Shigella flexneri n 281604070
+IA_1-27817 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604153
+IA_1-278966 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604077
+IA_1-285361 591020 root Bacteria n n n Proteobacteria n n Gammaproteobacteria n n Enterobacteriales n n Enterobacteriaceae n n n Shigella n Shigella flexneri n 281604070
+IA_1-29000 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-291427 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-293054 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-296315 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-310974 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-311282 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-314709 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604077
+IA_1-324951 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604077
+IA_1-42600 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-45102 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-48105 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-57254 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-61975 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-66943 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-68288 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-79371 591020 root Bacteria n n n Proteobacteria n n Gammaproteobacteria n n Enterobacteriales n n Enterobacteriaceae n n n Shigella n Shigella flexneri n 281604065
+IA_1-82334 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-84488 591020 root Bacteria n n n Proteobacteria n n Gammaproteobacteria n n Enterobacteriales n n Enterobacteriaceae n n n Shigella n Shigella flexneri n 281604065
+IA_1-93958 591020 root Bacteria n n n Proteobacteria n n Gammaproteobacteria n n Enterobacteriales n n Enterobacteriaceae n n n Shigella n Shigella flexneri n 281604070
+IA_1-95255 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604181
+IA_1-95526 10116 root Eukaryota Metazoa n n Chordata Craniata Gnathostomata Mammalia n Euarchontoglires Rodentia Sciurognathi n Muridae Murinae n n Rattus n Rattus norvegicus n 281604186
+IA_1-99821 591020 root Bacteria n n n Proteobacteria n n Gammaproteobacteria n n Enterobacteriales n n Enterobacteriaceae n n n Shigella n Shigella flexneri n 281604070
diff -r 9d9f0dfeeebf -r c0192e97a79a tools/taxonomy/lca.py
--- a/tools/taxonomy/lca.py Mon Feb 22 13:56:51 2010 -0500
+++ b/tools/taxonomy/lca.py Mon Feb 22 16:22:12 2010 -0500
@@ -42,6 +42,16 @@
except:
stop_err("Syntax error: Use correct syntax: program infile outfile")
+ fin = open(sys.argv[1],'r')
+ for j, line in enumerate( fin ):
+ elems = line.strip().split('\t')
+ if len(elems) < 24:
+ stop_err("The format of the input dataset is incorrect. Taxonomy datatype should contain at least 24 columns.")
+ if j > 30:
+ break
+ cols = range(1,len(elems))
+ fin.close()
+
group_col = 0
tmpfile = tempfile.NamedTemporaryFile()
@@ -68,11 +78,11 @@
remaining_vals = []
skipped_lines = 0
fout = open(outfile, "w")
- cols = range(1,25)
block_valid = False
+
for ii, line in enumerate( file( tmpfile.name )):
- if line and not line.startswith( '#' ):
+ if line and not line.startswith( '#' ) and len(line.split('\t')) >= 24: #Taxonomy datatype should have at least 24 columns
line = line.rstrip( '\r\n' )
try:
fields = line.split("\t")
@@ -95,14 +105,11 @@
corresponding aggregate values into the output file. This works
due to the sort on group_col we've applied to the data above.
"""
- out_list = ['']*25
+ out_list = ['']*24
out_list[0] = str(prev_item)
out_list[1] = str(prev_vals[0][0])
out_list[2] = str(prev_vals[1][0])
- try:
- out_list[24] = str(prev_vals[23][0])
- except:
- pass
+
for k, col in enumerate(cols):
if col >= 3 and col < 24:
if len(set(prev_vals[k])) == 1:
@@ -113,11 +120,17 @@
out_list[k+1] = 'n'
k += 1
+ j = 0
+ while True:
+ try:
+ out_list.append(str(prev_vals[23+j][0]))
+ j += 1
+ except:
+ break
+
if rank_bound == 0:
print >>fout, '\t'.join(out_list).strip()
- #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).strip()
@@ -144,15 +157,11 @@
skipped_lines += 1
# Handle the last grouped value
- out_list = ['']*25
+ out_list = ['']*24
out_list[0] = str(prev_item)
out_list[1] = str(prev_vals[0][0])
out_list[2] = str(prev_vals[1][0])
- try:
- out_list[24] = str(prev_vals[23][0])
- except:
- pass
-
+
for k, col in enumerate(cols):
if col >= 3 and col < 24:
if len(set(prev_vals[k])) == 1:
@@ -163,11 +172,17 @@
out_list[k+1] = 'n'
k += 1
+ j = 0
+ while True:
+ try:
+ out_list.append(str(prev_vals[23+j][0]))
+ j += 1
+ except:
+ break
+
if rank_bound == 0:
print >>fout, '\t'.join(out_list).strip()
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).strip()
diff -r 9d9f0dfeeebf -r c0192e97a79a tools/taxonomy/lca.xml
--- a/tools/taxonomy/lca.xml Mon Feb 22 13:56:51 2010 -0500
+++ b/tools/taxonomy/lca.xml Mon Feb 22 16:22:12 2010 -0500
@@ -1,4 +1,4 @@
-<tool id="lca1" name="Find lowest diagnostic rank" version="1.0.0">
+<tool id="lca1" name="Find lowest diagnostic rank" version="1.0.1">
<description></description>
<command interpreter="python">
lca.py $input1 $out_file1 $rank_bound
@@ -34,11 +34,23 @@
<data format="taxonomy" name="out_file1" metadata_source="input1" />
</outputs>
<tests>
- <test>
- <param name="input1" value="lca_input.taxonomy" ftype="taxonomy"/>
- <param name="rank_bound" value="0" />
- <output name="out_file1" file="lca_output.taxonomy" ftype="taxonomy"/>
- </test>
+ <test>
+ <param name="input1" value="lca_input.taxonomy" ftype="taxonomy"/>
+ <param name="rank_bound" value="0" />
+ <output name="out_file1" file="lca_output.taxonomy" ftype="taxonomy"/>
+ </test>
+ <test>
+ <param name="input1" value="lca_input2.taxonomy" ftype="taxonomy"/>
+ <param name="rank_bound" value="7" />
+ <output name="out_file1" file="lca_output2.taxonomy" ftype="taxonomy"/>
+ </test>
+
+ <!--Test case with invalid lines -->
+ <test>
+ <param name="input1" value="lca_input3.taxonomy" ftype="taxonomy"/>
+ <param name="rank_bound" value="10" />
+ <output name="out_file1" file="lca_output3.taxonomy" ftype="taxonomy"/>
+ </test>
</tests>
<help>
1
0

24 Feb '10
details: http://www.bx.psu.edu/hg/galaxy/rev/9d9f0dfeeebf
changeset: 3424:9d9f0dfeeebf
user: jeremy goecks <jeremy.goecks(a)emory.edu>
date: Mon Feb 22 13:56:51 2010 -0500
description:
Annotations for published items: (1) added annotations to pages; (2) added annotation column to all published item grids; (3) refactored annotation code out of base controller and into its own mixin.
diffstat:
lib/galaxy/model/__init__.py | 3 +
lib/galaxy/model/mapping.py | 13 ++++-
lib/galaxy/model/migrate/versions/0040_page_annotations.py | 42 ++++++++++++++
lib/galaxy/web/base/controller.py | 8 ++-
lib/galaxy/web/controllers/dataset.py | 2 +-
lib/galaxy/web/controllers/history.py | 3 +-
lib/galaxy/web/controllers/page.py | 24 +++++--
lib/galaxy/web/controllers/root.py | 2 +-
lib/galaxy/web/controllers/workflow.py | 3 +-
lib/galaxy/web/framework/helpers/grids.py | 39 ++++++++++--
10 files changed, 118 insertions(+), 21 deletions(-)
diffs (351 lines):
diff -r 8d77e3acf653 -r 9d9f0dfeeebf lib/galaxy/model/__init__.py
--- a/lib/galaxy/model/__init__.py Mon Feb 22 09:21:42 2010 -0500
+++ b/lib/galaxy/model/__init__.py Mon Feb 22 13:56:51 2010 -0500
@@ -1567,6 +1567,9 @@
class WorkflowStepAnnotationAssociation( object ):
pass
+class PageAnnotationAssociation( object ):
+ pass
+
class UserPreference ( object ):
def __init__( self, name=None, value=None ):
self.name = name
diff -r 8d77e3acf653 -r 9d9f0dfeeebf lib/galaxy/model/mapping.py
--- a/lib/galaxy/model/mapping.py Mon Feb 22 09:21:42 2010 -0500
+++ b/lib/galaxy/model/mapping.py Mon Feb 22 13:56:51 2010 -0500
@@ -814,6 +814,12 @@
Column( "workflow_step_id", Integer, ForeignKey( "workflow_step.id" ), index=True ),
Column( "user_id", Integer, ForeignKey( "galaxy_user.id" ), index=True ),
Column( "annotation", TEXT, index=True) )
+
+PageAnnotationAssociation.table = Table( "page_annotation_association", metadata,
+ Column( "id", Integer, primary_key=True ),
+ Column( "page_id", Integer, ForeignKey( "page.id" ), index=True ),
+ Column( "user_id", Integer, ForeignKey( "galaxy_user.id" ), index=True ),
+ Column( "annotation", TEXT, index=True) )
# User tables.
@@ -1304,7 +1310,8 @@
latest_revision=relation( PageRevision, post_update=True,
primaryjoin=( Page.table.c.latest_revision_id == PageRevision.table.c.id ),
lazy=False ),
- tags=relation(PageTagAssociation, order_by=PageTagAssociation.table.c.id, backref="pages")
+ tags=relation(PageTagAssociation, order_by=PageTagAssociation.table.c.id, backref="pages"),
+ annotations=relation( PageAnnotationAssociation, order_by=PageAnnotationAssociation.table.c.id, backref="pages" )
) )
# Set up proxy so that
@@ -1377,6 +1384,10 @@
properties=dict( workflow_step=relation( WorkflowStep ), user=relation( User ) )
)
+assign_mapper( context, PageAnnotationAssociation, PageAnnotationAssociation.table,
+ properties=dict( page=relation( Page ), user=relation( User ) )
+ )
+
assign_mapper( context, UserPreference, UserPreference.table,
properties = {}
)
diff -r 8d77e3acf653 -r 9d9f0dfeeebf lib/galaxy/model/migrate/versions/0040_page_annotations.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/galaxy/model/migrate/versions/0040_page_annotations.py Mon Feb 22 13:56:51 2010 -0500
@@ -0,0 +1,42 @@
+"""
+Migration script to (a) create tables for annotating pages.
+"""
+
+from sqlalchemy import *
+from sqlalchemy.orm import *
+from migrate import *
+from migrate.changeset import *
+
+import logging
+log = logging.getLogger( __name__ )
+
+metadata = MetaData( migrate_engine )
+db_session = scoped_session( sessionmaker( bind=migrate_engine, autoflush=False, autocommit=True ) )
+
+PageAnnotationAssociation_table = Table( "page_annotation_association", metadata,
+ Column( "id", Integer, primary_key=True ),
+ Column( "page_id", Integer, ForeignKey( "page.id" ), index=True ),
+ Column( "user_id", Integer, ForeignKey( "galaxy_user.id" ), index=True ),
+ Column( "annotation", TEXT, index=True) )
+
+def upgrade():
+ print __doc__
+ metadata.reflect()
+
+ # Create history_annotation_association table.
+ try:
+ PageAnnotationAssociation_table.create()
+ except Exception, e:
+ print str(e)
+ log.debug( "Creating page_annotation_association table failed: %s" % str( e ) )
+
+def downgrade():
+ metadata.reflect()
+
+ # Drop page_annotation_association table.
+ try:
+ PageAnnotationAssociation_table.drop()
+ except Exception, e:
+ print str(e)
+ log.debug( "Dropping page_annotation_association table failed: %s" % str( e ) )
+
\ No newline at end of file
diff -r 8d77e3acf653 -r 9d9f0dfeeebf lib/galaxy/web/base/controller.py
--- a/lib/galaxy/web/base/controller.py Mon Feb 22 09:21:42 2010 -0500
+++ b/lib/galaxy/web/base/controller.py Mon Feb 22 13:56:51 2010 -0500
@@ -41,6 +41,10 @@
item_class = None
return item_class
+Root = BaseController
+
+class UsesAnnotations:
+ """ Mixin for getting and setting item annotations. """
def get_item_annotation_str( self, db_session, user, item ):
""" Returns a user's annotation string for an item. """
annotation_obj = self.get_item_annotation_obj( db_session, user, item )
@@ -67,6 +71,8 @@
annotation_assoc = annotation_assoc.filter_by( stored_workflow=item )
elif item.__class__ == model.WorkflowStep:
annotation_assoc = annotation_assoc.filter_by( workflow_step=item )
+ elif item.__class__ == model.Page:
+ annotation_assoc = annotation_assoc.filter_by( page=item )
return annotation_assoc.first()
def add_item_annotation( self, trans, item, annotation ):
@@ -89,8 +95,6 @@
# Set annotation.
annotation_assoc.annotation = annotation
return True
-
-Root = BaseController
class SharableItemSecurity:
""" Mixin for handling security for sharable items. """
diff -r 8d77e3acf653 -r 9d9f0dfeeebf lib/galaxy/web/controllers/dataset.py
--- a/lib/galaxy/web/controllers/dataset.py Mon Feb 22 09:21:42 2010 -0500
+++ b/lib/galaxy/web/controllers/dataset.py Mon Feb 22 13:56:51 2010 -0500
@@ -110,7 +110,7 @@
# a user relation.
return query.select_from( model.HistoryDatasetAssociation.table.join( model.History.table ) ).filter( model.History.user == trans.user )
-class DatasetInterface( BaseController, UsesHistoryDatasetAssociation ):
+class DatasetInterface( BaseController, UsesAnnotations, UsesHistoryDatasetAssociation ):
stored_list_grid = HistoryDatasetAssociationListGrid()
diff -r 8d77e3acf653 -r 9d9f0dfeeebf lib/galaxy/web/controllers/history.py
--- a/lib/galaxy/web/controllers/history.py Mon Feb 22 09:21:42 2010 -0500
+++ b/lib/galaxy/web/controllers/history.py Mon Feb 22 13:56:51 2010 -0500
@@ -128,6 +128,7 @@
use_async = True
columns = [
NameURLColumn( "Name", key="name", model_class=model.History, filterable="advanced" ),
+ grids.OwnerAnnotationColumn( "Annotation", key="annotation", model_class=model.History, model_annotation_association_class=model.HistoryAnnotationAssociation, filterable="advanced" ),
grids.OwnerColumn( "Owner", key="username", model_class=model.User, filterable="advanced", sortable=False ),
grids.CommunityTagsColumn( "Community Tags", "tags", model.History, model.HistoryTagAssociation, filterable="advanced", grid_name="PublicHistoryListGrid" ),
grids.GridColumn( "Last Updated", key="update_time", format=time_ago )
@@ -146,7 +147,7 @@
# A public history is published, has a slug, and is not deleted.
return query.filter( self.model_class.published == True ).filter( self.model_class.slug != None ).filter( self.model_class.deleted == False )
-class HistoryController( BaseController, Sharable, UsesHistory ):
+class HistoryController( BaseController, Sharable, UsesAnnotations, UsesHistory ):
@web.expose
def index( self, trans ):
return ""
diff -r 8d77e3acf653 -r 9d9f0dfeeebf lib/galaxy/web/controllers/page.py
--- a/lib/galaxy/web/controllers/page.py Mon Feb 22 09:21:42 2010 -0500
+++ b/lib/galaxy/web/controllers/page.py Mon Feb 22 13:56:51 2010 -0500
@@ -45,7 +45,7 @@
]
operations = [
grids.DisplayByUsernameAndSlugGridOperation( "View", allow_multiple=False ),
- grids.GridOperation( "Edit name/id", allow_multiple=False, url_args=dict( action='edit') ),
+ grids.GridOperation( "Edit attributes", allow_multiple=False, url_args=dict( action='edit') ),
grids.GridOperation( "Edit content", allow_multiple=False, url_args=dict( action='edit_content') ),
grids.GridOperation( "Share or Publish", allow_multiple=False, condition=( lambda item: not item.deleted ), async_compatible=False ),
grids.GridOperation( "Delete" ),
@@ -63,6 +63,7 @@
default_filter = dict( title="All", username="All" )
columns = [
grids.PublicURLColumn( "Title", key="title", model_class=model.Page, filterable="advanced"),
+ grids.OwnerAnnotationColumn( "Annotation", key="annotation", model_class=model.Page, model_annotation_association_class=model.PageAnnotationAssociation, filterable="advanced" ),
grids.OwnerColumn( "Owner", key="username", model_class=model.User, filterable="advanced", sortable=False ),
grids.CommunityTagsColumn( "Community Tags", "tags", model.Page, model.PageTagAssociation, filterable="advanced", grid_name="PageAllPublishedGrid" ),
grids.GridColumn( "Last Updated", key="update_time", format=time_ago )
@@ -70,7 +71,7 @@
columns.append(
grids.MulticolFilterColumn(
"Search",
- cols_to_filter=[ columns[0], columns[1], columns[2] ],
+ cols_to_filter=[ columns[0], columns[1], columns[2], columns[3] ],
key="free-text-search", visible=False, filterable="standard" )
)
def build_initial_query( self, session ):
@@ -285,7 +286,7 @@
# Default behavior:
_BaseHTMLProcessor.unknown_endtag( self, tag )
-class PageController( BaseController, Sharable, UsesHistory, UsesStoredWorkflow, UsesHistoryDatasetAssociation ):
+class PageController( BaseController, Sharable, UsesAnnotations, UsesHistory, UsesStoredWorkflow, UsesHistoryDatasetAssociation ):
_page_list = PageListGrid()
_all_published_list = PageAllPublishedGrid()
@@ -385,7 +386,7 @@
@web.expose
@web.require_login( "create pages" )
- def edit( self, trans, id, page_title="", page_slug="" ):
+ def edit( self, trans, id, page_title="", page_slug="", page_annotation="" ):
"""
Create a new page
"""
@@ -395,7 +396,7 @@
page = session.query( model.Page ).get( id )
user = trans.user
assert page.user == user
- page_title_err = page_slug_err = ""
+ page_title_err = page_slug_err = page_annotation_err = ""
if trans.request.method == "POST":
if not page_title:
page_title_err = "Page name is required"
@@ -403,17 +404,24 @@
page_slug_err = "Page id is required"
elif not VALID_SLUG_RE.match( page_slug ):
page_slug_err = "Page identifier must consist of only lowercase letters, numbers, and the '-' character"
- elif page_slug == page.slug or trans.sa_session.query( model.Page ).filter_by( user=user, slug=page_slug, deleted=False ).first():
+ elif page_slug != page.slug and trans.sa_session.query( model.Page ).filter_by( user=user, slug=page_slug, deleted=False ).first():
page_slug_err = "Page id must be unique"
+ elif not page_annotation:
+ page_annotation_err = "Page annotation is required"
else:
page.title = page_title
page.slug = page_slug
+ page_annotation = sanitize_html( page_annotation, 'utf-8', 'text/html' )
+ self.add_item_annotation( trans, page, page_annotation )
session.flush()
# Redirect to page list.
return trans.response.send_redirect( web.url_for( action='list' ) )
else:
page_title = page.title
page_slug = page.slug
+ page_annotation = self.get_item_annotation_str( trans.sa_session, trans.get_user(), page )
+ if not page_annotation:
+ page_annotation = ""
return trans.show_form(
web.FormBuilder( web.url_for( id=encoded_id ), "Edit page attributes", submit_text="Submit" )
.add_text( "page_title", "Page title", value=page_title, error=page_title_err )
@@ -422,7 +430,9 @@
public links to this page. A default is generated
from the page title, but can be edited. This field
must contain only lowercase letters, numbers, and
- the '-' character.""" ),
+ the '-' character.""" )
+ .add_text( "page_annotation", "Page annotation", value=page_annotation, error=page_annotation_err,
+ help="A description of or notes about the page. Annotation is shown alongside published pages."),
template="page/create.mako" )
@web.expose
diff -r 8d77e3acf653 -r 9d9f0dfeeebf lib/galaxy/web/controllers/root.py
--- a/lib/galaxy/web/controllers/root.py Mon Feb 22 09:21:42 2010 -0500
+++ b/lib/galaxy/web/controllers/root.py Mon Feb 22 13:56:51 2010 -0500
@@ -10,7 +10,7 @@
log = logging.getLogger( __name__ )
-class RootController( BaseController, UsesHistory ):
+class RootController( BaseController, UsesHistory, UsesAnnotations ):
@web.expose
def default(self, trans, target1=None, target2=None, **kwd):
diff -r 8d77e3acf653 -r 9d9f0dfeeebf lib/galaxy/web/controllers/workflow.py
--- a/lib/galaxy/web/controllers/workflow.py Mon Feb 22 09:21:42 2010 -0500
+++ b/lib/galaxy/web/controllers/workflow.py Mon Feb 22 13:56:51 2010 -0500
@@ -60,6 +60,7 @@
use_async = True
columns = [
grids.PublicURLColumn( "Name", key="name", model_class=model.StoredWorkflow, filterable="advanced" ),
+ grids.OwnerAnnotationColumn( "Annotation", key="annotation", model_class=model.StoredWorkflow, model_annotation_association_class=model.StoredWorkflowAnnotationAssociation, filterable="advanced" ),
grids.OwnerColumn( "Owner", key="username", model_class=model.User, filterable="advanced", sortable=False ),
grids.CommunityTagsColumn( "Community Tags", "tags", model.StoredWorkflow, model.StoredWorkflowTagAssociation, filterable="advanced", grid_name="PublicWorkflowListGrid" ),
grids.GridColumn( "Last Updated", key="update_time", format=time_ago )
@@ -78,7 +79,7 @@
# A public workflow is published, has a slug, and is not deleted.
return query.filter( self.model_class.published==True ).filter( self.model_class.slug != None ).filter( self.model_class.deleted == False )
-class WorkflowController( BaseController, Sharable, UsesStoredWorkflow ):
+class WorkflowController( BaseController, Sharable, UsesStoredWorkflow, UsesAnnotations ):
stored_list_grid = StoredWorkflowListGrid()
published_list_grid = StoredWorkflowAllPublishedGrid()
diff -r 8d77e3acf653 -r 9d9f0dfeeebf lib/galaxy/web/framework/helpers/grids.py
--- a/lib/galaxy/web/framework/helpers/grids.py Mon Feb 22 09:21:42 2010 -0500
+++ b/lib/galaxy/web/framework/helpers/grids.py Mon Feb 22 13:56:51 2010 -0500
@@ -1,6 +1,7 @@
from galaxy.model import *
from galaxy.model.orm import *
+from galaxy.web.base import controller
from galaxy.web.framework.helpers import iff
from galaxy.tags.tag_handler import TagHandler
from galaxy.web import url_for
@@ -341,22 +342,46 @@
elif column_filter:
query = query.filter( self.get_filter( user, column_filter ) )
return query
+
def get_filter( self, user, column_filter ):
- """ Returns a SQLAlchemy criterion derived from column_filter. """
- model_class_key_field = getattr( self.model_class, self.key )
-
+ """ Returns a SQLAlchemy criterion derived from column_filter. """
if isinstance( column_filter, basestring ):
- return func.lower( model_class_key_field ).like( "%" + column_filter.lower() + "%" )
+ return self.get_single_filter( user, column_filter )
elif isinstance( column_filter, list ):
clause_list = []
for filter in column_filter:
- clause_list.append( func.lower( model_class_key_field ).like( "%" + filter.lower() + "%" ) )
+ clause_list.append( self.get_single_filter( user, filter ) )
return and_( *clause_list )
-
+
+ def get_single_filter( self, user, a_filter ):
+ """ Returns a SQLAlchemy criterion derived for a single filter. Single filter is the most basic filter--usually a string--and cannot be a list. """
+ model_class_key_field = getattr( self.model_class, self.key )
+ return func.lower( model_class_key_field ).like( "%" + a_filter.lower() + "%" )
+
+class OwnerAnnotationColumn( TextColumn, controller.UsesAnnotations ):
+ """ Column that displays and filters item owner's annotations. """
+ def __init__( self, col_name, key, model_class, model_annotation_association_class, filterable ):
+ GridColumn.__init__( self, col_name, key=key, model_class=model_class, filterable=filterable )
+ self.sortable = False
+ self.model_annotation_association_class = model_annotation_association_class
+
+ def get_value( self, trans, grid, item ):
+ """ Returns item annotation. """
+ annotation = self.get_item_annotation_str( trans.sa_session, item.user, item )
+ return iff( annotation, annotation, "" )
+
+ def get_single_filter( self, user, a_filter ):
+ """ Filter by annotation and annotation owner. """
+ return self.model_class.annotations.any(
+ and_( func.lower( self.model_annotation_association_class.annotation ).like( "%" + a_filter.lower() + "%" ),
+ # TODO: not sure why, to filter by owner's annotations, we have to do this rather than
+ # 'self.model_class.user==self.model_annotation_association_class.user'
+ self.model_annotation_association_class.table.c.user_id==self.model_class.table.c.user_id ) )
+
class CommunityTagsColumn( TextColumn ):
""" Column that supports community tags. """
def __init__( self, col_name, key, model_class, model_tag_association_class, filterable, grid_name=None ):
- GridColumn.__init__(self, col_name, key=key, model_class=model_class, filterable=filterable)
+ GridColumn.__init__( self, col_name, key=key, model_class=model_class, filterable=filterable )
self.model_tag_association_class = model_tag_association_class
# Tags cannot be sorted.
self.sortable = False
1
0

24 Feb '10
details: http://www.bx.psu.edu/hg/galaxy/rev/8d77e3acf653
changeset: 3423:8d77e3acf653
user: Greg Von Kuster <greg(a)bx.psu.edu>
date: Mon Feb 22 09:21:42 2010 -0500
description:
Fix for displaying datasets in the bx browser.
diffstat:
lib/galaxy/datatypes/interval.py | 2 +-
lib/galaxy/datatypes/tabular.py | 2 --
2 files changed, 1 insertions(+), 3 deletions(-)
diffs (24 lines):
diff -r 94741c94de0a -r 8d77e3acf653 lib/galaxy/datatypes/interval.py
--- a/lib/galaxy/datatypes/interval.py Mon Feb 22 08:12:03 2010 -0500
+++ b/lib/galaxy/datatypes/interval.py Mon Feb 22 09:21:42 2010 -0500
@@ -54,7 +54,7 @@
"""Initialize interval datatype, by adding UCSC display apps"""
Tabular.__init__(self, **kwd)
self.add_display_app ( 'ucsc', 'display at UCSC', 'as_ucsc_display_file', 'ucsc_links' )
- self.add_display_app ( 'main', 'BX', 'as_bx_display_file', 'bx_links' )
+ self.add_display_app ( 'main', 'BX', 'as_ucsc_display_file', 'bx_links' )
def init_meta( self, dataset, copy_from=None ):
Tabular.init_meta( self, dataset, copy_from=copy_from )
diff -r 94741c94de0a -r 8d77e3acf653 lib/galaxy/datatypes/tabular.py
--- a/lib/galaxy/datatypes/tabular.py Mon Feb 22 08:12:03 2010 -0500
+++ b/lib/galaxy/datatypes/tabular.py Mon Feb 22 09:21:42 2010 -0500
@@ -214,8 +214,6 @@
return open( dataset.file_name )
def as_ucsc_display_file( self, dataset, **kwd ):
return open( dataset.file_name )
- def as_bx_display_file( self, dataset, **kwd ):
- return open( dataset.file_name )
class Taxonomy( Tabular ):
def __init__(self, **kwd):
1
0
details: http://www.bx.psu.edu/hg/galaxy/rev/94741c94de0a
changeset: 3422:94741c94de0a
user: jeremy goecks <jeremy.goecks(a)emory.edu>
date: Mon Feb 22 08:12:03 2010 -0500
description:
Make anchor ID/name editable in pages.
diffstat:
templates/page/editor.mako | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (13 lines):
diff -r 831bbcccc4b2 -r 94741c94de0a templates/page/editor.mako
--- a/templates/page/editor.mako Mon Feb 22 07:43:12 2010 -0500
+++ b/templates/page/editor.mako Mon Feb 22 08:12:03 2010 -0500
@@ -138,7 +138,8 @@
// Set input elt class, value.
var attribute_input = $(".wym_href");
attribute_input.addClass("wym_id").removeClass("wym_href");
- attribute_input.val( attribute_input.attr('id') );
+ if (selected)
+ attribute_input.val( $(selected).attr('id') );
// Remove link.
$(this).remove();
1
0
details: http://www.bx.psu.edu/hg/galaxy/rev/831bbcccc4b2
changeset: 3421:831bbcccc4b2
user: jeremy goecks <jeremy.goecks(a)emory.edu>
date: Mon Feb 22 07:43:12 2010 -0500
description:
Pack script.
diffstat:
static/scripts/packed/galaxy.panels.js | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (8 lines):
diff -r 47aa31eb9cb6 -r 831bbcccc4b2 static/scripts/packed/galaxy.panels.js
--- a/static/scripts/packed/galaxy.panels.js Mon Feb 22 07:42:07 2010 -0500
+++ b/static/scripts/packed/galaxy.panels.js Mon Feb 22 07:43:12 2010 -0500
@@ -1,1 +1,1 @@
-function ensure_dd_helper(){if($("#DD-helper").length==0){$("<div id='DD-helper'/>").css({background:"white",opacity:0,zIndex:9000,position:"absolute",top:0,left:0,width:"100%",height:"100%"}).appendTo("body").hide()}}function make_left_panel(h,c,e){var g=false;var f=null;var d=function(i){var j=i;if(i<0){i=0}$(h).css("width",i);$(e).css("left",j);$(c).css("left",i+7);if(document.recalc){document.recalc()}};var a=function(){if(g){$(e).removeClass("hover");$(e).animate({left:f},"fast");$(h).css("left",-f).show().animate({left:0},"fast",function(){d(f);$(e).removeClass("hidden")});g=false}else{f=$(e).position().left;$(c).css("left",$(e).innerWidth());if(document.recalc){document.recalc()}$(e).removeClass("hover");$(h).animate({left:-f},"fast");$(e).animate({left:-1},"fast",function(){$(this).addClass("hidden")});g=true}};$(e).hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")}).bind("dragstart",function(i){$("#DD-helper").show()}).bind("dragen!
d",function(i){$("#DD-helper").hide()}).bind("drag",function(i){x=i.offsetX;x=Math.min(400,Math.max(100,x));if(g){$(h).css("left",0);$(e).removeClass("hidden");g=false}d(x)}).bind("dragclickonly",function(i){a()}).find("div").show();var b=function(i){if((g&&i=="show")||(!g&&i=="hide")){a()}};return{force_panel:b}}function make_right_panel(a,e,h){var j=false;var g=false;var c=null;var d=function(k){$(a).css("width",k);$(e).css("right",k+9);$(h).css("right",k).css("left","");if(document.recalc){document.recalc()}};var i=function(){if(j){$(h).removeClass("hover");$(h).animate({right:c},"fast");$(a).css("right",-c).show().animate({right:0},"fast",function(){d(c);$(h).removeClass("hidden")});j=false}else{c=$(document).width()-$(h).position().left-$(h).outerWidth();$(e).css("right",$(h).innerWidth()+1);if(document.recalc){document.recalc()}$(h).removeClass("hover");$(a).animate({right:-c},"fast");$(h).animate({right:-1},"fast",function(){$(this).addClass("hidden")});j=true}g=fals!
e};var b=function(k){var l=$(e).width()-(j?c:0);if(l<k){if(!j){i();g=t
rue}}else{if(g){i();g=false}}};$(h).hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")}).bind("dragstart",function(k){$("#DD-helper").show()}).bind("dragend",function(k){$("#DD-helper").hide()}).bind("drag",function(k){x=k.offsetX;w=$(window).width();x=Math.min(w-100,x);x=Math.max(w-400,x);if(j){$(a).css("right",0);$(h).removeClass("hidden");j=false}d(w-x-$(this).outerWidth())}).bind("dragclickonly",function(k){i()}).find("div").show();var f=function(k){if((j&&k=="show")||(!j&&k=="hide")){i()}};return{handle_minwidth_hint:b,force_panel:f}}function hide_modal(){$(".dialog-box-container").fadeOut(function(){$("#overlay").hide();$(".dialog-box").find(".body").children().remove()})}function show_modal(f,c,e,d){if(f){$(".dialog-box").find(".title").html(f);$(".dialog-box").find(".unified-panel-header").show()}else{$(".dialog-box").find(".unified-panel-header").hide()}var a=$(".dialog-box").find(".buttons").html("");if(e){$.each(e,function(b,g){a.a!
ppend($("<button/>").text(b).click(g));a.append(" ")});a.show()}else{a.hide()}var a=$(".dialog-box").find(".extra_buttons").html("");if(d){$.each(d,function(b,g){a.append($("<button/>").text(b).click(g));a.append(" ")});a.show()}else{a.hide()}if(c=="progress"){c=$("<img src='../images/yui/rel_interstitial_loading.gif')' />")}$(".dialog-box").find(".body").html(c);if(!$(".dialog-box-container").is(":visible")){$("#overlay").show();$(".dialog-box-container").fadeIn()}}function show_in_overlay(c){var d=c.width||"600";var b=c.height||"400";var a=c.scroll||"auto";$("#overlay-background").bind("click.overlay",function(){hide_modal();$("#overlay-background").unbind("click.overlay")});show_modal(null,$("<div style='margin: -5px;'><img id='close_button' style='position:absolute;right:-17px;top:-15px;' src='../images/closebox.png'><iframe style='margin: 0; padding: 0;' src='"+c.url+"' width='"+d+"' height='"+b+"' scrolling='"+a+"' frameborder='0'></iframe></div>"));$("#close_button")!
.bind("click",function(){hide_modal()})}$(function(){$(".tab").each(fu
nction(){var a=$(this).children(".submenu");if(a.length>0){if($.browser.msie){a.prepend("<iframe style=\"position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; filter:Alpha(Opacity='0');\"></iframe>")}$(this).hover(function(){a.show()},function(){a.hide()});a.click(function(){a.hide()})}})});function user_changed(a,b){if(a){$(".loggedin-only").show();$(".loggedout-only").hide();$("#user-email").text(a);if(b){$(".admin-only").show()}}else{$(".loggedin-only").hide();$(".loggedout-only").show();$(".admin-only").hide()}};
\ No newline at end of file
+function ensure_dd_helper(){if($("#DD-helper").length==0){$("<div id='DD-helper'/>").css({background:"white",opacity:0,zIndex:9000,position:"absolute",top:0,left:0,width:"100%",height:"100%"}).appendTo("body").hide()}}function make_left_panel(h,c,e){var g=false;var f=null;var d=function(i){var j=i;if(i<0){i=0}$(h).css("width",i);$(e).css("left",j);$(c).css("left",i+7);if(document.recalc){document.recalc()}};var a=function(){if(g){$(e).removeClass("hover");$(e).animate({left:f},"fast");$(h).css("left",-f).show().animate({left:0},"fast",function(){d(f);$(e).removeClass("hidden")});g=false}else{f=$(e).position().left;$(c).css("left",$(e).innerWidth());if(document.recalc){document.recalc()}$(e).removeClass("hover");$(h).animate({left:-f},"fast");$(e).animate({left:-1},"fast",function(){$(this).addClass("hidden")});g=true}};$(e).hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")}).bind("dragstart",function(i){$("#DD-helper").show()}).bind("dragen!
d",function(i){$("#DD-helper").hide()}).bind("drag",function(i){x=i.offsetX;x=Math.min(400,Math.max(100,x));if(g){$(h).css("left",0);$(e).removeClass("hidden");g=false}d(x)}).bind("dragclickonly",function(i){a()}).find("div").show();var b=function(i){if((g&&i=="show")||(!g&&i=="hide")){a()}};return{force_panel:b}}function make_right_panel(a,e,h){var j=false;var g=false;var c=null;var d=function(k){$(a).css("width",k);$(e).css("right",k+9);$(h).css("right",k).css("left","");if(document.recalc){document.recalc()}};var i=function(){if(j){$(h).removeClass("hover");$(h).animate({right:c},"fast");$(a).css("right",-c).show().animate({right:0},"fast",function(){d(c);$(h).removeClass("hidden")});j=false}else{c=$(document).width()-$(h).position().left-$(h).outerWidth();$(e).css("right",$(h).innerWidth()+1);if(document.recalc){document.recalc()}$(h).removeClass("hover");$(a).animate({right:-c},"fast");$(h).animate({right:-1},"fast",function(){$(this).addClass("hidden")});j=true}g=fals!
e};var b=function(k){var l=$(e).width()-(j?c:0);if(l<k){if(!j){i();g=t
rue}}else{if(g){i();g=false}}};$(h).hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")}).bind("dragstart",function(k){$("#DD-helper").show()}).bind("dragend",function(k){$("#DD-helper").hide()}).bind("drag",function(k){x=k.offsetX;w=$(window).width();x=Math.min(w-100,x);x=Math.max(w-400,x);if(j){$(a).css("right",0);$(h).removeClass("hidden");j=false}d(w-x-$(this).outerWidth())}).bind("dragclickonly",function(k){i()}).find("div").show();var f=function(k){if((j&&k=="show")||(!j&&k=="hide")){i()}};return{handle_minwidth_hint:b,force_panel:f}}function hide_modal(){$(".dialog-box-container").fadeOut(function(){$("#overlay").hide();$(".dialog-box").find(".body").children().remove()})}function show_modal(g,c,e,d,f){if(g){$(".dialog-box").find(".title").html(g);$(".dialog-box").find(".unified-panel-header").show()}else{$(".dialog-box").find(".unified-panel-header").hide()}var a=$(".dialog-box").find(".buttons").html("");if(e){$.each(e,function(b,h){a!
.append($("<button/>").text(b).click(h));a.append(" ")});a.show()}else{a.hide()}var a=$(".dialog-box").find(".extra_buttons").html("");if(d){$.each(d,function(b,h){a.append($("<button/>").text(b).click(h));a.append(" ")});a.show()}else{a.hide()}if(c=="progress"){c=$("<img src='../images/yui/rel_interstitial_loading.gif')' />")}$(".dialog-box").find(".body").html(c);if(!$(".dialog-box-container").is(":visible")){$("#overlay").show();$(".dialog-box-container").fadeIn()}if(f){f()}}function show_in_overlay(c){var d=c.width||"600";var b=c.height||"400";var a=c.scroll||"auto";$("#overlay-background").bind("click.overlay",function(){hide_modal();$("#overlay-background").unbind("click.overlay")});show_modal(null,$("<div style='margin: -5px;'><img id='close_button' style='position:absolute;right:-17px;top:-15px;' src='../images/closebox.png'><iframe style='margin: 0; padding: 0;' src='"+c.url+"' width='"+d+"' height='"+b+"' scrolling='"+a+"' frameborder='0'></iframe></div>"));$("#cl!
ose_button").bind("click",function(){hide_modal()})}$(function(){$(".t
ab").each(function(){var a=$(this).children(".submenu");if(a.length>0){if($.browser.msie){a.prepend("<iframe style=\"position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; filter:Alpha(Opacity='0');\"></iframe>")}$(this).hover(function(){a.show()},function(){a.hide()});a.click(function(){a.hide()})}})});function user_changed(a,b){if(a){$(".loggedin-only").show();$(".loggedout-only").hide();$("#user-email").text(a);if(b){$(".admin-only").show()}}else{$(".loggedin-only").hide();$(".loggedout-only").show();$(".admin-only").hide()}};
\ No newline at end of file
1
0

24 Feb '10
details: http://www.bx.psu.edu/hg/galaxy/rev/47aa31eb9cb6
changeset: 3420:47aa31eb9cb6
user: jeremy goecks <jeremy.goecks(a)emory.edu>
date: Mon Feb 22 07:42:07 2010 -0500
description:
Added functionality for creating links on pages: (1) existing links are editable and (2) can create in-page, named anchors.
diffstat:
static/scripts/galaxy.panels.js | 5 ++-
templates/page/editor.mako | 64 ++++++++++++++++++++++++++++++++--------
2 files changed, 54 insertions(+), 15 deletions(-)
diffs (119 lines):
diff -r 1e23f73647bb -r 47aa31eb9cb6 static/scripts/galaxy.panels.js
--- a/static/scripts/galaxy.panels.js Fri Feb 19 17:54:44 2010 -0500
+++ b/static/scripts/galaxy.panels.js Mon Feb 22 07:42:07 2010 -0500
@@ -165,7 +165,7 @@
} );
};
-function show_modal( title, body, buttons, extra_buttons ) {
+function show_modal( title, body, buttons, extra_buttons, init_fn ) {
if ( title ) {
$( ".dialog-box" ).find( ".title" ).html( title );
$( ".dialog-box" ).find( ".unified-panel-header" ).show();
@@ -200,6 +200,9 @@
$("#overlay").show();
$(".dialog-box-container").fadeIn()
}
+ if ( init_fn ) {
+ init_fn();
+ }
};
function show_in_overlay( options ) {
diff -r 1e23f73647bb -r 47aa31eb9cb6 templates/page/editor.mako
--- a/templates/page/editor.mako Fri Feb 19 17:54:44 2010 -0500
+++ b/templates/page/editor.mako Mon Feb 22 07:42:07 2010 -0500
@@ -126,6 +126,25 @@
var sStamp = wym.uniqueStamp();
var selected = wym.selected();
+ // Swap out URL attribute for id/name attribute in link creation to enable anchor creation in page.
+ function set_link_id()
+ {
+ // When "set link id" link clicked, update UI.
+ $('#set_link_id').click( function()
+ {
+ // Set label.
+ $("#link_attribute_label").text("ID/Name");
+
+ // Set input elt class, value.
+ var attribute_input = $(".wym_href");
+ attribute_input.addClass("wym_id").removeClass("wym_href");
+ attribute_input.val( attribute_input.attr('id') );
+
+ // Remove link.
+ $(this).remove();
+ });
+ }
+
// LINK DIALOG
if ( dialogType == WYMeditor.DIALOG_LINK ) {
if(selected) {
@@ -134,28 +153,45 @@
jQuery(wym._options.titleSelector).val(jQuery(selected).attr(WYMeditor.TITLE));
jQuery(wym._options.altSelector).val(jQuery(selected).attr(WYMeditor.ALT));
}
+ // Get current URL, title.
+ var curURL, curTitle;
+ if (selected)
+ {
+ curURL = $(selected).attr("href");
+ if (curURL == undefined)
+ curURL = "";
+ curTitle = $(selected).attr("title");
+ if (curTitle == undefined)
+ curTitle = "";
+ }
show_modal(
- "Link",
- "<div><div><label>URL</label><br><input type='text' class='wym_href' value='' size='40' /></div>"
- + "<div><label>Title</label><br><input type='text' class='wym_title' value='' size='40' /></div><div>",
+ "Create Link",
+ "<div><div><label id='link_attribute_label'>URL <span style='float: right; font-size: 90%'><a href='#' id='set_link_id'>Create in-page anchor</a></span></label><br><input type='text' class='wym_href' value='" + curURL + "' size='40' /></div>"
+ + "<div><label>Title</label><br><input type='text' class='wym_title' value='" + curTitle + "' size='40' /></div><div>",
{
"Make link": function() {
var sUrl = jQuery(wym._options.hrefSelector).val();
- if(sUrl.length > 0) {
-
- wym._exec(WYMeditor.CREATE_LINK, sStamp);
-
- jQuery("a[href=" + sStamp + "]", wym._doc.body)
- .attr(WYMeditor.HREF, sUrl)
- .attr(WYMeditor.TITLE, jQuery(wym._options.titleSelector).val());
-
+ sUrl = ( sUrl ? sUrl : "" );
+ var sName = $(".wym_id").val();
+ sName = ( sName ? sName : "" );
+ if ( (sUrl.length > 0) || (sName.length > 0) ) {
+ // Create link.
+ wym._exec(WYMeditor.CREATE_LINK, sStamp);
+
+ var link = jQuery("a[href=" + sStamp + "]", wym._doc.body);
+ link.attr(WYMeditor.HREF, sUrl);
+ link.attr(WYMeditor.TITLE, jQuery(wym._options.titleSelector).val());
+ if (sName.length > 0)
+ link.attr("id", sName);
}
hide_modal();
},
- "Cancel:": function() {
+ "Cancel": function() {
hide_modal();
}
- }
+ },
+ {},
+ set_link_id
);
return;
}
@@ -668,7 +704,7 @@
##"Embed Page": function() {
## editor.dialog(Galaxy.DIALOG_EMBED_PAGE);
##}
- });
+ });
});
</script>
</%def>
1
0
details: http://www.bx.psu.edu/hg/galaxy/rev/1e23f73647bb
changeset: 3419:1e23f73647bb
user: Kanwei Li <kanwei(a)gmail.com>
date: Fri Feb 19 17:54:44 2010 -0500
description:
trackster:
- Refactor
- Focus on new browser text
- Fixed linetrack bug when switching chroms
diffstat:
static/scripts/packed/trackster.js | 2 +-
static/scripts/trackster.js | 152 +++++++++++++++++-------------------
templates/tracks/browser.mako | 13 +-
templates/tracks/new_browser.mako | 2 +-
4 files changed, 83 insertions(+), 86 deletions(-)
diffs (313 lines):
diff -r 879432079138 -r 1e23f73647bb static/scripts/packed/trackster.js
--- a/static/scripts/packed/trackster.js Fri Feb 19 14:34:25 2010 -0500
+++ b/static/scripts/packed/trackster.js Fri Feb 19 17:54:44 2010 -0500
@@ -1,1 +1,1 @@
-var DEBUG=false;var DENSITY=1000,FEATURE_LEVELS=10,DATA_ERROR="There was an error in indexing this dataset.",DATA_NONE="No data for this chrom/contig.",DATA_PENDING="Currently indexing... please wait",DATA_LOADING="Loading data...",CACHED_TILES_FEATURE=10,CACHED_TILES_LINE=30,CACHED_DATA=20,CONTEXT=$("<canvas></canvas>").get(0).getContext("2d"),RIGHT_STRAND,LEFT_STRAND;var right_img=new Image();right_img.src="../images/visualization/strand_right.png";right_img.onload=function(){RIGHT_STRAND=CONTEXT.createPattern(right_img,"repeat")};var left_img=new Image();left_img.src="../images/visualization/strand_left.png";left_img.onload=function(){LEFT_STRAND=CONTEXT.createPattern(left_img,"repeat")};var right_img_inv=new Image();right_img_inv.src="../images/visualization/strand_right_inv.png";right_img_inv.onload=function(){RIGHT_STRAND_INV=CONTEXT.createPattern(right_img_inv,"repeat")};var left_img_inv=new Image();left_img_inv.src="../images/visualization/strand_left_inv.png";left_!
img_inv.onload=function(){LEFT_STRAND_INV=CONTEXT.createPattern(left_img_inv,"repeat")};function commatize(b){b+="";var a=/(\d+)(\d{3})/;while(a.test(b)){b=b.replace(a,"$1,$2")}return b}var Cache=function(a){this.num_elements=a;this.clear()};$.extend(Cache.prototype,{get:function(b){var a=this.key_ary.indexOf(b);if(a!=-1){this.key_ary.splice(a,1);this.key_ary.push(b)}return this.obj_cache[b]},set:function(b,c){if(!this.obj_cache[b]){if(this.key_ary.length>=this.num_elements){var a=this.key_ary.shift();delete this.obj_cache[a]}this.key_ary.push(b)}this.obj_cache[b]=c;return c},clear:function(){this.obj_cache={};this.key_ary=[]}});var View=function(b,d,c,a){this.vis_id=c;this.dbkey=a;this.title=d;this.chrom=b;this.tracks=[];this.label_tracks=[];this.max_low=0;this.max_high=0;this.center=(this.max_high-this.max_low)/2;this.zoom_factor=3;this.zoom_level=0;this.track_id_counter=0};$.extend(View.prototype,{add_track:function(a){a.view=this;a.track_id=this.track_id_counter;this.tr!
acks.push(a);if(a.init){a.init()}a.container_div.attr("id","track_"+a.
track_id);this.track_id_counter+=1},add_label_track:function(a){a.view=this;this.label_tracks.push(a)},remove_track:function(a){a.container_div.fadeOut("slow",function(){$(this).remove()});delete this.tracks[a]},update_options:function(){var b=$("ul#sortable-ul").sortable("toArray");var d=[];var c=$("#viewport > div").sort(function(g,f){return b.indexOf($(g).attr("id"))>b.indexOf($(f).attr("id"))});$("#viewport > div").remove();$("#viewport").html(c);for(var e in view.tracks){var a=view.tracks[e];if(a.update_options){a.update_options(e)}}},redraw:function(f){this.span=this.max_high-this.max_low;var d=this.span/Math.pow(this.zoom_factor,this.zoom_level),b=this.center-(d/2),e=b+d;if(b<0){b=0;e=b+d}else{if(e>this.max_high){e=this.max_high;b=e-d}}this.low=Math.floor(b);this.high=Math.ceil(e);this.center=Math.round(this.low+(this.high-this.low)/2);this.resolution=Math.pow(10,Math.ceil(Math.log((this.high-this.low)/DENSITY)/Math.LN10));this.zoom_res=Math.pow(FEATURE_LEVELS,Math.ma!
x(0,Math.ceil(Math.log(this.resolution,FEATURE_LEVELS)/Math.log(FEATURE_LEVELS))));$("#overview-box").css({left:(this.low/this.span)*$("#overview-viewport").width(),width:Math.max(12,((this.high-this.low)/this.span)*$("#overview-viewport").width())}).show();$("#low").val(commatize(this.low));$("#high").val(commatize(this.high));if(!f){for(var c=0,a=this.tracks.length;c<a;c++){this.tracks[c].draw()}for(var c=0,a=this.label_tracks.length;c<a;c++){this.label_tracks[c].draw()}}},zoom_in:function(a){if(this.max_high===0||this.high-this.low<30){return}if(a){this.center=a/$(document).width()*(this.high-this.low)+this.low}this.zoom_level+=1;this.redraw()},zoom_out:function(){if(this.max_high===0){return}if(this.zoom_level<=0){this.zoom_level=0;return}this.zoom_level-=1;this.redraw()}});var Track=function(a,b){this.name=a;this.parent_element=b;this.init_global()};$.extend(Track.prototype,{init_global:function(){this.header_div=$("<div class='track-header'>").text(this.name);this.con!
tent_div=$("<div class='track-content'>");this.container_div=$("<div><
/div>").addClass("track").append(this.header_div).append(this.content_div);this.parent_element.append(this.container_div)}});var TiledTrack=function(){};$.extend(TiledTrack.prototype,Track.prototype,{draw:function(){var i=this.view.low,e=this.view.high,f=e-i,d=this.view.resolution;if(DEBUG){$("#debug").text(d+" "+this.view.zoom_res)}var k=$("<div style='position: relative;'></div>");this.content_div.children(":first").remove();this.content_div.append(k);var l=this.content_div.width()/f;var h;var a=Math.floor(i/d/DENSITY);while((a*DENSITY*d)<e){var j=this.content_div.width()+"_"+this.view.zoom_level+"_"+a;var c=this.tile_cache.get(j);if(c){var g=a*DENSITY*d;var b=(g-i)*l;if(this.left_offset){b-=this.left_offset}c.css({left:b});k.append(c);this.max_height=Math.max(this.max_height,c.height())}else{this.delayed_draw(this,j,i,e,a,d,k,l)}a+=1}},delayed_draw:function(c,e,a,f,b,d,g,h){setTimeout(function(){if(!(a>c.view.high||f<c.view.low)){tile_element=c.draw_tile(d,b,g,h);if(tile_!
element){c.tile_cache.set(e,tile_element);c.max_height=Math.max(c.max_height,tile_element.height());c.content_div.css("height",c.max_height)}}},50)}});var LabelTrack=function(a){Track.call(this,null,a);this.track_type="LabelTrack";this.hidden=true;this.container_div.addClass("label-track")};$.extend(LabelTrack.prototype,Track.prototype,{draw:function(){var c=this.view,d=c.high-c.low,g=Math.floor(Math.pow(10,Math.floor(Math.log(d)/Math.log(10)))),a=Math.floor(c.low/g)*g,e=this.content_div.width(),b=$("<div style='position: relative; height: 1.3em;'></div>");while(a<c.high){var f=(a-c.low)/d*e;b.append($("<div class='label'>"+commatize(a)+"</div>").css({position:"absolute",left:f-1}));a+=g}this.content_div.children(":first").remove();this.content_div.append(b)}});var LineTrack=function(c,a,d,b){this.track_type="LineTrack";this.tile_cache=new Cache(CACHED_TILES_LINE);Track.call(this,c,$("#viewport"));TiledTrack.call(this);this.indexer=d;this.height_px=100;this.container_div.ad!
dClass("line-track");this.dataset_id=a;this.prefs={min_value:undefined
,max_value:undefined};if(b.min_value!==undefined){this.prefs.min_value=b.min_value}if(b.max_value!==undefined){this.prefs.max_value=b.max_value}};$.extend(LineTrack.prototype,TiledTrack.prototype,{init:function(){this.data_queue={};this.data_cache=new Cache(CACHED_DATA);var a=this,b=a.view.tracks.indexOf(a);a.content_div.text(DATA_LOADING);a.container_div.removeClass("nodata error pending");$.getJSON(data_url,{stats:true,indexer:a.indexer,chrom:a.view.chrom,low:null,high:null,dataset_id:a.dataset_id},function(d){if(!d||d=="error"){a.container_div.addClass("error");a.content_div.text(DATA_ERROR)}else{if(d.length===0||d=="no data"){a.container_div.addClass("nodata");a.content_div.text(DATA_NONE)}else{if(d=="pending"){a.container_div.addClass("pending");a.content_div.text(DATA_PENDING);setTimeout(function(){a.init()},5000)}else{a.content_div.text("");a.content_div.css("height",a.height_px+"px");if(a.prefs.min_value===undefined||a.prefs.max_value===undefined){a.prefs.min_value=d!
.min;a.prefs.max_value=d.max;$("#track_"+b+"_minval").val(a.prefs.min_value);$("#track_"+b+"_maxval").val(a.prefs.max_value)}a.vertical_range=a.prefs.max_value-a.prefs.min_value;if($("#linetrack_"+b+"_minval").length===0){var e=$("<div></div>").addClass("yaxislabel").attr("id","linetrack_"+b+"_minval").text(a.prefs.min_value);var c=$("<div></div>").addClass("yaxislabel").attr("id","linetrack_"+b+"_maxval").text(a.prefs.max_value);c.css({position:"relative",top:"25px"});c.prependTo(a.container_div);e.css({position:"relative",top:a.height_px+55+"px"});e.prependTo(a.container_div)}a.draw()}}}})},get_data:function(d,b){var c=this,a=b*DENSITY*d,f=(b+1)*DENSITY*d,e=d+"_"+b;if(!c.data_queue[e]){c.data_queue[e]=true;$.getJSON(data_url,{indexer:this.indexer,chrom:this.view.chrom,low:a,high:f,dataset_id:this.dataset_id,resolution:this.view.resolution},function(g){c.data_cache.set(e,g);delete c.data_queue[e];c.draw()})}},draw_tile:function(n,p,c,e){if(this.vertical_range===undefined){!
return}var q=p*DENSITY*n,a=DENSITY*n,b=$("<canvas class='tile'></canva
s>"),s=n+"_"+p;if(!this.data_cache.get(s)){this.get_data(n,p);return}var r=this.data_cache.get(s);b.css({position:"absolute",top:0,left:(q-this.view.low)*e});b.get(0).width=Math.ceil(a*e);b.get(0).height=this.height_px;var m=b.get(0).getContext("2d"),j=false,k=this.prefs.min_value,f=this.prefs.max_value,l=this.vertical_range,d=this.height_px;m.beginPath();for(var o=0;o<r.length-1;o++){var h=r[o][0]-q;var g=r[o][1];if(isNaN(g)){j=false}else{h=h*e;if(g<=k){g=k}else{if(g>=f){g=f}}g=Math.round(d-(g-k)/l*d);if(j){m.lineTo(h,g)}else{m.moveTo(h,g);j=true}}}m.stroke();c.append(b);return b},gen_options:function(j){var a=$("<div></div>").addClass("form-row");var e="track_"+j+"_minval",g="track_"+j+"_maxval",h=$("<label></label>").attr("for",e).text("Min value:"),b=(this.prefs.min_value===undefined?"":this.prefs.min_value),i=$("<input></input>").attr("id",e).val(b),d=$("<label></label>").attr("for",g).text("Max value:"),f=(this.prefs.max_value===undefined?"":this.prefs.max_value),c=$("!
<input></input>").attr("id",g).val(f);return a.append(h).append(i).append(d).append(c)},update_options:function(c){var a=$("#track_"+c+"_minval").val(),b=$("#track_"+c+"_maxval").val();if(a!==this.prefs.min_value||b!==this.prefs.max_value){this.prefs.min_value=parseFloat(a);this.prefs.max_value=parseFloat(b);this.vertical_range=this.prefs.max_value-this.prefs.min_value;$("#linetrack_"+c+"_minval").text(this.prefs.min_value);$("#linetrack_"+c+"_maxval").text(this.prefs.max_value);this.tile_cache.clear();this.draw()}}});var FeatureTrack=function(c,a,d,b){this.track_type="FeatureTrack";this.tile_cache=new Cache(CACHED_TILES_FEATURE);Track.call(this,c,$("#viewport"));TiledTrack.call(this);this.indexer=d;this.height_px=100;this.container_div.addClass("feature-track");this.dataset_id=a;this.zo_slots={};this.show_labels_scale=0.001;this.showing_details=false;this.vertical_detail_px=10;this.vertical_nodetail_px=3;this.default_font="9px Monaco, Lucida Console, monospace";this.left_o!
ffset=200;this.inc_slots={};this.data_queue={};this.s_e_by_tile={};thi
s.data_cache=new Cache(20);this.prefs={block_color:"black",label_color:"black"};if(b.block_color!==undefined){this.prefs.block_color=b.block_color}if(b.label_color!==undefined){this.prefs.label_color=b.label_color}};$.extend(FeatureTrack.prototype,TiledTrack.prototype,{init:function(){var a=this;a.content_div.text(DATA_LOADING);a.container_div.removeClass("nodata error pending");$.getJSON(data_url,{indexer:a.indexer,low:a.view.max_low,high:a.view.max_high,dataset_id:a.dataset_id,chrom:a.view.chrom},function(b){if(b=="error"){a.container_div.addClass("error");a.content_div.text(DATA_ERROR)}else{if(b.length===0||b=="no data"){a.container_div.addClass("nodata");a.content_div.text(DATA_NONE)}else{if(b=="pending"){a.container_div.adClass("pending");a.content_div.text(DATA_PENDING);setTimeout(function(){a.init()},5000)}else{a.content_div.text("");a.content_div.css("height",a.height_px+"px");a.values=b;a.calc_slots();a.slots=a.zo_slots;a.draw()}}}})},get_data:function(a,d){var b=th!
is,c=a+"_"+d;if(!b.data_queue[c]){b.data_queue[c]=true;$.getJSON(data_url,{indexer:b.indexer,chrom:b.view.chrom,low:a,high:d,dataset_id:b.dataset_id,include_blocks:true},function(e){b.data_cache.set(c,e);delete b.data_queue[c];b.draw()})}},calc_slots:function(){var b=[],a=this.content_div.width()/(this.view.high-this.view.low),d=this.view.max_low;for(var e=0,f=this.values.length;e<f;e++){var g,h,k=this.values[e];g=Math.floor((k.start-d)*a);h=Math.ceil((k.end-d)*a);var c=0;while(true){if(b[c]===undefined||b[c]<g){b[c]=h;this.zo_slots[k.uid]=c;break}c++}}this.height_px=b.length*this.vertical_nodetail_px+15;this.content_div.css("height",this.height_px+"px")},incremental_slots:function(a,f){if(!this.inc_slots[a]){this.inc_slots[a]={};this.inc_slots[a].w_scale=1/a;this.s_e_by_tile[a]={}}var h=this.inc_slots[a].w_scale,s=[],g=0,b=$("<canvas></canvas>").get(0).getContext("2d"),l=this.view.max_low;var c,e,u=[];for(var p=0,q=f.length;p<q;p++){var d=f[p];if(this.inc_slots[a][d.uid]!=!
=undefined){g=Math.max(g,this.inc_slots[a][d.uid]);u.push(this.inc_slo
ts[a][d.uid])}else{s.push(p)}}for(var p=0,q=s.length;p<q;p++){var d=f[s[p]];c=Math.floor((d.start-l)*h);c-=b.measureText(d.name).width;e=Math.ceil((d.end-l)*h);var o=0;while(true){var m=true;if(this.s_e_by_tile[a][o]!==undefined){for(var n=0,t=this.s_e_by_tile[a][o].length;n<t;n++){var r=this.s_e_by_tile[a][o][n];if(e>r[0]&&c<r[1]){m=false;break}}}if(m){if(this.s_e_by_tile[a][o]===undefined){this.s_e_by_tile[a][o]=[]}this.s_e_by_tile[a][o].push([c,e]);this.inc_slots[a][d.uid]=o;g=Math.max(g,o);break}o++}}return g},draw_tile:function(B,f,g,M){if(!this.values){return}var s=f*DENSITY*B,G=(f+1)*DENSITY*B,r=DENSITY*B;var K,L,m;if(M>this.show_labels_scale){if(!this.showing_details){this.showing_details=true}for(var H in this.data_cache.obj_cache){var C=H.split("_"),z=C[0],c=C[1];if(z<=s&&c>=G){K=this.data_cache.get(H);break}}if(!K){this.data_queue[[s,G]]=true;this.get_data(s,G);return}m=this.incremental_slots(this.view.zoom_res,K)*this.vertical_detail_px+15;L=this.inc_slots[this.v!
iew.zoom_res]}else{if(this.showing_details){this.showing_details=false}m=this.height_px;L=this.zo_slots;K=this.values}var a=Math.ceil(r*M),u=$("<canvas class='tile'></canvas>"),D=this.prefs.label_color,e=this.prefs.block_color,x=this.left_offset,N=this.showing_details,O=(this.showing_details?this.vertical_detail_px:this.vertical_nodetail_px);u.css({position:"absolute",top:0,left:(s-this.view.low)*M-x});u.get(0).width=a+x;u.get(0).height=m;var p=u.get(0).getContext("2d");p.fillStyle=this.prefs.block_color;p.font=this.default_font;p.textAlign="right";var I=0;for(var J=0,o=K.length;J<o;J++){var v=K[J];if(v.start<=G&&v.end>=s){var A=Math.floor(Math.max(0,(v.start-s)*M)),q=Math.ceil(Math.min(a,(v.end-s)*M)),y=L[v.uid]*O;var n,E,t=null,P=null;if(v.thick_start&&v.thick_end){t=Math.floor(Math.max(0,(v.thick_start-s)*M));P=Math.ceil(Math.min(a,(v.thick_end-s)*M))}if(!N){p.fillRect(A+x,y+5,q-A,1)}else{if(v.start>s){p.fillStyle=D;p.fillText(v.name,A-1+x,y+8);p.fillStyle=e}var Q=v.bloc!
ks;if(Q){if(v.strand){if(v.strand=="+"){p.fillStyle=RIGHT_STRAND}else{
if(v.strand=="-"){p.fillStyle=LEFT_STRAND}}p.fillRect(A+x,y,q-A,10);p.fillStyle=e}for(var H=0,d=Q.length;H<d;H++){var h=Q[H],b=Math.floor(Math.max(0,(h[0]-s)*M)),w=Math.ceil(Math.min(a,(h[1]-s)*M));if(b>w){continue}n=5;E=3;p.fillRect(b+x,y+E,w-b,n);if(t!==undefined&&!(b>P||w<t)){n=9;E=1;var F=Math.max(b,t),l=Math.min(w,P);p.fillRect(F+x,y+E,l-F,n)}}}else{n=9;E=1;p.fillRect(A+x,y+E,q-A,n);if(v.strand){if(v.strand=="+"){p.fillStyle=RIGHT_STRAND_INV}else{if(v.strand=="-"){p.fillStyle=LEFT_STRAND_INV}}p.fillRect(A+x,y,q-A,10);p.fillStyle=prefs.block_color}}}I++}}g.append(u);return u},gen_options:function(g){var a=$("<div></div>").addClass("form-row");var d="track_"+g+"_block_color",c=$("<label></label>").attr("for",d).text("Block color:"),b=$("<input></input>").attr("id",d).attr("name",d).val(this.prefs.block_color),f="track_"+g+"_label_color",h=$("<label></label>").attr("for",f).text("Label color:"),e=$("<input></input>").attr("id",f).attr("name",f).val(this.prefs.label_color);!
return a.append(c).append(b).append(h).append(e)},update_options:function(c){var a=$("#track_"+c+"_block_color").val(),b=$("#track_"+c+"_label_color").val();if(a!==this.prefs.block_color||b!==this.prefs.label_color){this.prefs.block_color=a;this.prefs.label_color=b;this.tile_cache.clear();this.draw()}}});var ReadTrack=function(c,a,d,b){this.track_type="ReadTrack";this.tile_cache=new Cache(CACHED_TILES_FEATURE);Track.call(this,c,$("#viewport"));TiledTrack.call(this);FeatureTrack.call(this,c,a,d,b)};$.extend(ReadTrack.prototype,TiledTrack.prototype,FeatureTrack.prototype,{draw_tile:function(v,z,m,n){if(!this.values){return}var A=z*DENSITY*v,e=(z+1)*DENSITY*v,q=DENSITY*v;var D,p,h;h=this.height_px;p=this.zo_slots;D=this.values;var t=Math.ceil(q*n),r=$("<canvas class='tile'></canvas>");r.css({position:"absolute",top:0,left:(A-this.view.low)*n-this.left_offset});r.get(0).width=t+this.left_offset;r.get(0).height=h;var u=r.get(0).getContext("2d");u.fillStyle=this.prefs.block_color!
;u.font=this.default_font;u.textAlign="right";var s=u.measureText("A")
.width;var w=0;for(var x=0,y=D.length;x<y;x++){var l=D[x];if(l.start<=e&&l.end>=A){var g=Math.floor(Math.max(0,(l.start-A)*n)),k=Math.ceil(Math.min(t,(l.end-A)*n)),f=p[l.uid]*this.vertical_detail_px;var a,E,d=null,o=null;if(n>s){for(var B=0,b=l.name.length;B<b;B++){var C=Math.floor(Math.max(0,(l.start+B-A)*n));u.fillText(l.name[B],C+this.left_offset,f+8)}}else{u.fillRect(g+this.left_offset,f+4,k-g,3)}}}m.append(r);return r}});
\ No newline at end of file
+var DEBUG=false;var DENSITY=1000,FEATURE_LEVELS=10,DATA_ERROR="There was an error in indexing this dataset.",DATA_NONE="No data for this chrom/contig.",DATA_PENDING="Currently indexing... please wait",DATA_LOADING="Loading data...",CACHED_TILES_FEATURE=10,CACHED_TILES_LINE=30,CACHED_DATA=20,CONTEXT=$("<canvas></canvas>").get(0).getContext("2d"),RIGHT_STRAND,LEFT_STRAND;var right_img=new Image();right_img.src="../images/visualization/strand_right.png";right_img.onload=function(){RIGHT_STRAND=CONTEXT.createPattern(right_img,"repeat")};var left_img=new Image();left_img.src="../images/visualization/strand_left.png";left_img.onload=function(){LEFT_STRAND=CONTEXT.createPattern(left_img,"repeat")};var right_img_inv=new Image();right_img_inv.src="../images/visualization/strand_right_inv.png";right_img_inv.onload=function(){RIGHT_STRAND_INV=CONTEXT.createPattern(right_img_inv,"repeat")};var left_img_inv=new Image();left_img_inv.src="../images/visualization/strand_left_inv.png";left_!
img_inv.onload=function(){LEFT_STRAND_INV=CONTEXT.createPattern(left_img_inv,"repeat")};function commatize(b){b+="";var a=/(\d+)(\d{3})/;while(a.test(b)){b=b.replace(a,"$1,$2")}return b}var Cache=function(a){this.num_elements=a;this.clear()};$.extend(Cache.prototype,{get:function(b){var a=this.key_ary.indexOf(b);if(a!=-1){this.key_ary.splice(a,1);this.key_ary.push(b)}return this.obj_cache[b]},set:function(b,c){if(!this.obj_cache[b]){if(this.key_ary.length>=this.num_elements){var a=this.key_ary.shift();delete this.obj_cache[a]}this.key_ary.push(b)}this.obj_cache[b]=c;return c},clear:function(){this.obj_cache={};this.key_ary=[]}});var View=function(b,d,c,a){this.vis_id=c;this.dbkey=a;this.title=d;this.chrom=b;this.tracks=[];this.label_tracks=[];this.max_low=0;this.max_high=0;this.center=(this.max_high-this.max_low)/2;this.zoom_factor=3;this.zoom_level=0;this.track_id_counter=0};$.extend(View.prototype,{add_track:function(a){a.view=this;a.track_id=this.track_id_counter;this.tr!
acks.push(a);if(a.init){a.init()}a.container_div.attr("id","track_"+a.
track_id);this.track_id_counter+=1},add_label_track:function(a){a.view=this;this.label_tracks.push(a)},remove_track:function(a){a.container_div.fadeOut("slow",function(){$(this).remove()});delete this.tracks[a]},update_options:function(){var b=$("ul#sortable-ul").sortable("toArray");var d=[];var c=$("#viewport > div").sort(function(g,f){return b.indexOf($(g).attr("id"))>b.indexOf($(f).attr("id"))});$("#viewport > div").remove();$("#viewport").html(c);for(var e in view.tracks){var a=view.tracks[e];if(a.update_options){a.update_options(e)}}},redraw:function(f){this.span=this.max_high-this.max_low;var d=this.span/Math.pow(this.zoom_factor,this.zoom_level),b=this.center-(d/2),e=b+d;if(b<0){b=0;e=b+d}else{if(e>this.max_high){e=this.max_high;b=e-d}}this.low=Math.floor(b);this.high=Math.ceil(e);this.center=Math.round(this.low+(this.high-this.low)/2);this.resolution=Math.pow(10,Math.ceil(Math.log((this.high-this.low)/DENSITY)/Math.LN10));this.zoom_res=Math.pow(FEATURE_LEVELS,Math.ma!
x(0,Math.ceil(Math.log(this.resolution,FEATURE_LEVELS)/Math.log(FEATURE_LEVELS))));$("#overview-box").css({left:(this.low/this.span)*$("#overview-viewport").width(),width:Math.max(12,((this.high-this.low)/this.span)*$("#overview-viewport").width())}).show();$("#low").val(commatize(this.low));$("#high").val(commatize(this.high));if(!f){for(var c=0,a=this.tracks.length;c<a;c++){this.tracks[c].draw()}for(var c=0,a=this.label_tracks.length;c<a;c++){this.label_tracks[c].draw()}}},zoom_in:function(a){if(this.max_high===0||this.high-this.low<30){return}if(a){this.center=a/$(document).width()*(this.high-this.low)+this.low}this.zoom_level+=1;this.redraw()},zoom_out:function(){if(this.max_high===0){return}if(this.zoom_level<=0){this.zoom_level=0;return}this.zoom_level-=1;this.redraw()}});var Track=function(a,b){this.name=a;this.parent_element=b;this.init_global()};$.extend(Track.prototype,{init_global:function(){this.header_div=$("<div class='track-header'>").text(this.name);this.con!
tent_div=$("<div class='track-content'>");this.container_div=$("<div><
/div>").addClass("track").append(this.header_div).append(this.content_div);this.parent_element.append(this.container_div)},init_each:function(c,b){var a=this;a.data_queue={};a.tile_cache.clear();a.data_cache.clear();a.content_div.css("height","30px");a.content_div.text(DATA_LOADING);a.container_div.removeClass("nodata error pending");if(a.view.chrom){$.getJSON(data_url,c,function(d){if(!d||d=="error"){a.container_div.addClass("error");a.content_div.text(DATA_ERROR)}else{if(d.length===0||d=="no data"){a.container_div.addClass("nodata");a.content_div.text(DATA_NONE)}else{if(d=="pending"){a.container_div.addClass("pending");a.content_div.text(DATA_PENDING);setTimeout(function(){a.init()},5000)}else{a.content_div.text("");a.content_div.css("height",a.height_px+"px");b(d);a.draw()}}}})}else{a.container_div.addClass("nodata");a.content_div.text(DATA_NONE)}}});var TiledTrack=function(){};$.extend(TiledTrack.prototype,Track.prototype,{draw:function(){var i=this.view.low,e=this.view.!
high,f=e-i,d=this.view.resolution;if(DEBUG){$("#debug").text(d+" "+this.view.zoom_res)}var k=$("<div style='position: relative;'></div>");this.content_div.children(":first").remove();this.content_div.append(k);var l=this.content_div.width()/f;var h;var a=Math.floor(i/d/DENSITY);while((a*DENSITY*d)<e){var j=this.content_div.width()+"_"+this.view.zoom_level+"_"+a;var c=this.tile_cache.get(j);if(c){var g=a*DENSITY*d;var b=(g-i)*l;if(this.left_offset){b-=this.left_offset}c.css({left:b});k.append(c);this.max_height=Math.max(this.max_height,c.height())}else{this.delayed_draw(this,j,i,e,a,d,k,l)}a+=1}},delayed_draw:function(c,e,a,f,b,d,g,h){setTimeout(function(){if(!(a>c.view.high||f<c.view.low)){tile_element=c.draw_tile(d,b,g,h);if(tile_element){c.tile_cache.set(e,tile_element);c.max_height=Math.max(c.max_height,tile_element.height());c.content_div.css("height",c.max_height+"px")}}},50)}});var LabelTrack=function(a){Track.call(this,null,a);this.track_type="LabelTrack";this.hidden!
=true;this.container_div.addClass("label-track")};$.extend(LabelTrack.
prototype,Track.prototype,{draw:function(){var c=this.view,d=c.high-c.low,g=Math.floor(Math.pow(10,Math.floor(Math.log(d)/Math.log(10)))),a=Math.floor(c.low/g)*g,e=this.content_div.width(),b=$("<div style='position: relative; height: 1.3em;'></div>");while(a<c.high){var f=(a-c.low)/d*e;b.append($("<div class='label'>"+commatize(a)+"</div>").css({position:"absolute",left:f-1}));a+=g}this.content_div.children(":first").remove();this.content_div.append(b)}});var LineTrack=function(c,a,d,b){this.track_type="LineTrack";Track.call(this,c,$("#viewport"));TiledTrack.call(this);this.indexer=d;this.height_px=100;this.container_div.addClass("line-track");this.dataset_id=a;this.data_cache=new Cache(CACHED_DATA);this.tile_cache=new Cache(CACHED_TILES_LINE);this.prefs={min_value:undefined,max_value:undefined};if(b.min_value!==undefined){this.prefs.min_value=b.min_value}if(b.max_value!==undefined){this.prefs.max_value=b.max_value}};$.extend(LineTrack.prototype,TiledTrack.prototype,{init:fu!
nction(){var a=this,b=a.view.tracks.indexOf(a);a.vertical_range=undefined;this.init_each({stats:true,indexer:a.indexer,chrom:a.view.chrom,low:null,high:null,dataset_id:a.dataset_id},function(d){if(isNaN(parseFloat(a.prefs.min_value))||isNaN(parseFloat(a.prefs.max_value))){a.prefs.min_value=d.min;a.prefs.max_value=d.max;$("#track_"+b+"_minval").val(a.prefs.min_value);$("#track_"+b+"_maxval").val(a.prefs.max_value)}a.vertical_range=a.prefs.max_value-a.prefs.min_value;$("#linetrack_"+b+"_minval").remove();$("#linetrack_"+b+"_maxval").remove();var e=$("<div></div>").addClass("yaxislabel").attr("id","linetrack_"+b+"_minval").text(a.prefs.min_value);var c=$("<div></div>").addClass("yaxislabel").attr("id","linetrack_"+b+"_maxval").text(a.prefs.max_value);c.css({position:"relative",top:"25px"});c.prependTo(a.container_div);e.css({position:"relative",top:a.height_px+55+"px"});e.prependTo(a.container_div)})},get_data:function(d,b){var c=this,a=b*DENSITY*d,f=(b+1)*DENSITY*d,e=d+"_"+b;!
if(!c.data_queue[e]){c.data_queue[e]=true;$.getJSON(data_url,{indexer:
this.indexer,chrom:this.view.chrom,low:a,high:f,dataset_id:this.dataset_id,resolution:this.view.resolution,},function(g){c.data_cache.set(e,g);delete c.data_queue[e];c.draw()})}},draw_tile:function(n,p,c,e){if(this.vertical_range===undefined){return}var q=p*DENSITY*n,a=DENSITY*n,b=$("<canvas class='tile'></canvas>"),s=n+"_"+p;if(!this.data_cache.get(s)){this.get_data(n,p);return}var r=this.data_cache.get(s);b.css({position:"absolute",top:0,left:(q-this.view.low)*e});b.get(0).width=Math.ceil(a*e);b.get(0).height=this.height_px;var m=b.get(0).getContext("2d"),j=false,k=this.prefs.min_value,f=this.prefs.max_value,l=this.vertical_range,d=this.height_px;m.beginPath();for(var o=0;o<r.length-1;o++){var h=r[o][0]-q;var g=r[o][1];if(isNaN(g)){j=false}else{h=h*e;if(g<=k){g=k}else{if(g>=f){g=f}}g=Math.round(d-(g-k)/l*d);if(j){m.lineTo(h,g)}else{m.moveTo(h,g);j=true}}}m.stroke();c.append(b);return b},gen_options:function(j){var a=$("<div></div>").addClass("form-row");var e="track_"+j+"_!
minval",g="track_"+j+"_maxval",h=$("<label></label>").attr("for",e).text("Min value:"),b=(this.prefs.min_value===undefined?"":this.prefs.min_value),i=$("<input></input>").attr("id",e).val(b),d=$("<label></label>").attr("for",g).text("Max value:"),f=(this.prefs.max_value===undefined?"":this.prefs.max_value),c=$("<input></input>").attr("id",g).val(f);return a.append(h).append(i).append(d).append(c)},update_options:function(c){var a=$("#track_"+c+"_minval").val(),b=$("#track_"+c+"_maxval").val();if(a!==this.prefs.min_value||b!==this.prefs.max_value){this.prefs.min_value=parseFloat(a);this.prefs.max_value=parseFloat(b);this.vertical_range=this.prefs.max_value-this.prefs.min_value;$("#linetrack_"+c+"_minval").text(this.prefs.min_value);$("#linetrack_"+c+"_maxval").text(this.prefs.max_value);this.tile_cache.clear();this.draw()}}});var FeatureTrack=function(c,a,d,b){this.track_type="FeatureTrack";Track.call(this,c,$("#viewport"));TiledTrack.call(this);this.indexer=d;this.height_px!
=100;this.container_div.addClass("feature-track");this.dataset_id=a;th
is.zo_slots={};this.show_labels_scale=0.001;this.showing_details=false;this.vertical_detail_px=10;this.vertical_nodetail_px=3;this.default_font="9px Monaco, Lucida Console, monospace";this.left_offset=200;this.inc_slots={};this.data_queue={};this.s_e_by_tile={};this.tile_cache=new Cache(CACHED_TILES_FEATURE);this.data_cache=new Cache(20);this.prefs={block_color:"black",label_color:"black"};if(b.block_color!==undefined){this.prefs.block_color=b.block_color}if(b.label_color!==undefined){this.prefs.label_color=b.label_color}};$.extend(FeatureTrack.prototype,TiledTrack.prototype,{init:function(){var a=this;this.init_each({indexer:a.indexer,low:a.view.max_low,high:a.view.max_high,dataset_id:a.dataset_id,chrom:a.view.chrom},function(b){a.values=b;a.calc_slots();a.slots=a.zo_slots})},get_data:function(a,d){var b=this,c=a+"_"+d;if(!b.data_queue[c]){b.data_queue[c]=true;$.getJSON(data_url,{indexer:b.indexer,chrom:b.view.chrom,low:a,high:d,dataset_id:b.dataset_id,include_blocks:true},!
function(e){b.data_cache.set(c,e);delete b.data_queue[c];b.draw()})}},calc_slots:function(){var b=[],a=this.content_div.width()/(this.view.high-this.view.low),d=this.view.max_low;for(var e=0,f=this.values.length;e<f;e++){var g,h,k=this.values[e];g=Math.floor((k.start-d)*a);h=Math.ceil((k.end-d)*a);var c=0;while(true){if(b[c]===undefined||b[c]<g){b[c]=h;this.zo_slots[k.uid]=c;break}c++}}this.height_px=b.length*this.vertical_nodetail_px+15;this.content_div.css("height",this.height_px+"px")},incremental_slots:function(a,f){if(!this.inc_slots[a]){this.inc_slots[a]={};this.inc_slots[a].w_scale=1/a;this.s_e_by_tile[a]={}}var h=this.inc_slots[a].w_scale,s=[],g=0,b=$("<canvas></canvas>").get(0).getContext("2d"),l=this.view.max_low;var c,e,u=[];for(var p=0,q=f.length;p<q;p++){var d=f[p];if(this.inc_slots[a][d.uid]!==undefined){g=Math.max(g,this.inc_slots[a][d.uid]);u.push(this.inc_slots[a][d.uid])}else{s.push(p)}}for(var p=0,q=s.length;p<q;p++){var d=f[s[p]];c=Math.floor((d.start-l)!
*h);c-=b.measureText(d.name).width;e=Math.ceil((d.end-l)*h);var o=0;wh
ile(true){var m=true;if(this.s_e_by_tile[a][o]!==undefined){for(var n=0,t=this.s_e_by_tile[a][o].length;n<t;n++){var r=this.s_e_by_tile[a][o][n];if(e>r[0]&&c<r[1]){m=false;break}}}if(m){if(this.s_e_by_tile[a][o]===undefined){this.s_e_by_tile[a][o]=[]}this.s_e_by_tile[a][o].push([c,e]);this.inc_slots[a][d.uid]=o;g=Math.max(g,o);break}o++}}return g},draw_tile:function(B,f,g,M){if(!this.values){return}var s=f*DENSITY*B,G=(f+1)*DENSITY*B,r=DENSITY*B;var K,L,m;if(M>this.show_labels_scale){if(!this.showing_details){this.showing_details=true}for(var H in this.data_cache.obj_cache){var C=H.split("_"),z=C[0],c=C[1];if(z<=s&&c>=G){K=this.data_cache.get(H);break}}if(!K){this.data_queue[[s,G]]=true;this.get_data(s,G);return}m=this.incremental_slots(this.view.zoom_res,K)*this.vertical_detail_px+15;L=this.inc_slots[this.view.zoom_res]}else{if(this.showing_details){this.showing_details=false}m=this.height_px;L=this.zo_slots;K=this.values}var a=Math.ceil(r*M),u=$("<canvas class='tile'></can!
vas>"),D=this.prefs.label_color,e=this.prefs.block_color,x=this.left_offset,N=this.showing_details,O=(this.showing_details?this.vertical_detail_px:this.vertical_nodetail_px);u.css({position:"absolute",top:0,left:(s-this.view.low)*M-x});u.get(0).width=a+x;u.get(0).height=m;var p=u.get(0).getContext("2d");p.fillStyle=this.prefs.block_color;p.font=this.default_font;p.textAlign="right";var I=0;for(var J=0,o=K.length;J<o;J++){var v=K[J];if(v.start<=G&&v.end>=s){var A=Math.floor(Math.max(0,(v.start-s)*M)),q=Math.ceil(Math.min(a,(v.end-s)*M)),y=L[v.uid]*O;var n,E,t=null,P=null;if(v.thick_start&&v.thick_end){t=Math.floor(Math.max(0,(v.thick_start-s)*M));P=Math.ceil(Math.min(a,(v.thick_end-s)*M))}if(!N){p.fillRect(A+x,y+5,q-A,1)}else{if(v.start>s){p.fillStyle=D;p.fillText(v.name,A-1+x,y+8);p.fillStyle=e}var Q=v.blocks;if(Q){if(v.strand){if(v.strand=="+"){p.fillStyle=RIGHT_STRAND}else{if(v.strand=="-"){p.fillStyle=LEFT_STRAND}}p.fillRect(A+x,y,q-A,10);p.fillStyle=e}for(var H=0,d=Q.le!
ngth;H<d;H++){var h=Q[H],b=Math.floor(Math.max(0,(h[0]-s)*M)),w=Math.c
eil(Math.min(a,(h[1]-s)*M));if(b>w){continue}n=5;E=3;p.fillRect(b+x,y+E,w-b,n);if(t!==undefined&&!(b>P||w<t)){n=9;E=1;var F=Math.max(b,t),l=Math.min(w,P);p.fillRect(F+x,y+E,l-F,n)}}}else{n=9;E=1;p.fillRect(A+x,y+E,q-A,n);if(v.strand){if(v.strand=="+"){p.fillStyle=RIGHT_STRAND_INV}else{if(v.strand=="-"){p.fillStyle=LEFT_STRAND_INV}}p.fillRect(A+x,y,q-A,10);p.fillStyle=prefs.block_color}}}I++}}g.append(u);return u},gen_options:function(g){var a=$("<div></div>").addClass("form-row");var d="track_"+g+"_block_color",c=$("<label></label>").attr("for",d).text("Block color:"),b=$("<input></input>").attr("id",d).attr("name",d).val(this.prefs.block_color),f="track_"+g+"_label_color",h=$("<label></label>").attr("for",f).text("Label color:"),e=$("<input></input>").attr("id",f).attr("name",f).val(this.prefs.label_color);return a.append(c).append(b).append(h).append(e)},update_options:function(c){var a=$("#track_"+c+"_block_color").val(),b=$("#track_"+c+"_label_color").val();if(a!==this.p!
refs.block_color||b!==this.prefs.label_color){this.prefs.block_color=a;this.prefs.label_color=b;this.tile_cache.clear();this.draw()}}});var ReadTrack=function(c,a,d,b){this.track_type="ReadTrack";this.tile_cache=new Cache(CACHED_TILES_FEATURE);Track.call(this,c,$("#viewport"));TiledTrack.call(this);FeatureTrack.call(this,c,a,d,b)};$.extend(ReadTrack.prototype,TiledTrack.prototype,FeatureTrack.prototype,{draw_tile:function(v,z,m,n){if(!this.values){return}var A=z*DENSITY*v,e=(z+1)*DENSITY*v,q=DENSITY*v;var D,p,h;h=this.height_px;p=this.zo_slots;D=this.values;var t=Math.ceil(q*n),r=$("<canvas class='tile'></canvas>");r.css({position:"absolute",top:0,left:(A-this.view.low)*n-this.left_offset});r.get(0).width=t+this.left_offset;r.get(0).height=h;var u=r.get(0).getContext("2d");u.fillStyle=this.prefs.block_color;u.font=this.default_font;u.textAlign="right";var s=u.measureText("A").width;var w=0;for(var x=0,y=D.length;x<y;x++){var l=D[x];if(l.start<=e&&l.end>=A){var g=Math.floor(!
Math.max(0,(l.start-A)*n)),k=Math.ceil(Math.min(t,(l.end-A)*n)),f=p[l.
uid]*this.vertical_detail_px;var a,E,d=null,o=null;if(n>s){for(var B=0,b=l.name.length;B<b;B++){var C=Math.floor(Math.max(0,(l.start+B-A)*n));u.fillText(l.name[B],C+this.left_offset,f+8)}}else{u.fillRect(g+this.left_offset,f+4,k-g,3)}}}m.append(r);return r}});
\ No newline at end of file
diff -r 879432079138 -r 1e23f73647bb static/scripts/trackster.js
--- a/static/scripts/trackster.js Fri Feb 19 14:34:25 2010 -0500
+++ b/static/scripts/trackster.js Fri Feb 19 17:54:44 2010 -0500
@@ -198,6 +198,39 @@
this.content_div = $("<div class='track-content'>");
this.container_div = $("<div></div>").addClass('track').append( this.header_div ).append( this.content_div );
this.parent_element.append( this.container_div );
+ },
+ init_each: function(params, success_fn) {
+ var track = this;
+ track.data_queue = {};
+ track.tile_cache.clear();
+ track.data_cache.clear();
+ track.content_div.css( "height", "30px" );
+ track.content_div.text(DATA_LOADING);
+ track.container_div.removeClass("nodata error pending");
+
+ if (track.view.chrom) {
+ $.getJSON( data_url, params, function ( data ) {
+ if (!data || data == "error") {
+ track.container_div.addClass("error");
+ track.content_div.text(DATA_ERROR);
+ } else if (data.length === 0 || data == "no data") {
+ track.container_div.addClass("nodata");
+ track.content_div.text(DATA_NONE);
+ } else if (data == "pending") {
+ track.container_div.addClass("pending");
+ track.content_div.text(DATA_PENDING);
+ setTimeout(function() { track.init(); }, 5000);
+ } else {
+ track.content_div.text("");
+ track.content_div.css( "height", track.height_px + "px" );
+ success_fn(data);
+ track.draw();
+ }
+ });
+ } else {
+ track.container_div.addClass("nodata");
+ track.content_div.text(DATA_NONE);
+ }
}
});
@@ -233,9 +266,7 @@
if (this.left_offset) {
left -= this.left_offset;
}
- cached.css( {
- left: left
- });
+ cached.css({ left: left });
// Our responsibility to move the element to the new parent
parent_element.append( cached );
this.max_height = Math.max( this.max_height, cached.height() );
@@ -252,7 +283,7 @@
if ( tile_element ) {
track.tile_cache.set(key, tile_element);
track.max_height = Math.max( track.max_height, tile_element.height() );
- track.content_div.css( "height", track.max_height );
+ track.content_div.css( "height", track.max_height + "px");
}
}
}, 50);
@@ -289,7 +320,6 @@
var LineTrack = function ( name, dataset_id, indexer, prefs ) {
this.track_type = "LineTrack";
- this.tile_cache = new Cache(CACHED_TILES_LINE);
Track.call( this, name, $("#viewport") );
TiledTrack.call( this );
@@ -297,61 +327,42 @@
this.height_px = 100;
this.container_div.addClass( "line-track" );
this.dataset_id = dataset_id;
+ this.data_cache = new Cache(CACHED_DATA);
+ this.tile_cache = new Cache(CACHED_TILES_LINE);
this.prefs = { 'min_value': undefined, 'max_value': undefined };
if (prefs.min_value !== undefined) { this.prefs.min_value = prefs.min_value; }
if (prefs.max_value !== undefined) { this.prefs.max_value = prefs.max_value; }
};
$.extend( LineTrack.prototype, TiledTrack.prototype, {
init: function() {
- this.data_queue = {};
- this.data_cache = new Cache(CACHED_DATA); // We need to cache some data because of
- // asynchronous calls
var track = this,
track_id = track.view.tracks.indexOf(track);
- track.content_div.text(DATA_LOADING);
- track.container_div.removeClass("nodata error pending");
- $.getJSON( data_url, { stats: true, indexer: track.indexer,
+ track.vertical_range = undefined;
+ this.init_each({ stats: true, indexer: track.indexer,
chrom: track.view.chrom, low: null, high: null,
- dataset_id: track.dataset_id }, function ( data ) {
- if (!data || data == "error") {
- track.container_div.addClass("error");
- track.content_div.text(DATA_ERROR);
- } else if (data.length === 0 || data == "no data") {
- track.container_div.addClass("nodata");
- track.content_div.text(DATA_NONE);
- } else if (data == "pending") {
- track.container_div.addClass("pending");
- track.content_div.text(DATA_PENDING);
- setTimeout(function() { track.init(); }, 5000);
- } else {
- track.content_div.text("");
- track.content_div.css( "height", track.height_px + "px" );
-
- if (track.prefs.min_value === undefined || track.prefs.max_value === undefined) {
- track.prefs.min_value = data.min;
- track.prefs.max_value = data.max;
-
- // Update the config
- $('#track_' + track_id + '_minval').val(track.prefs.min_value);
- $('#track_' + track_id + '_maxval').val(track.prefs.max_value);
- }
- track.vertical_range = track.prefs.max_value - track.prefs.min_value;
-
- // Draw y-axis labels if necessary
- if ( $('#linetrack_' + track_id + '_minval').length === 0) {
- var min_label = $("<div></div>").addClass('yaxislabel').attr("id", 'linetrack_' + track_id + '_minval').text(track.prefs.min_value);
- var max_label = $("<div></div>").addClass('yaxislabel').attr("id", 'linetrack_' + track_id + '_maxval').text(track.prefs.max_value);
-
- max_label.css({ position: "relative", top: "25px" });
- max_label.prependTo(track.container_div);
-
- min_label.css({ position: "relative", top: track.height_px + 55 + "px" });
- min_label.prependTo(track.container_div);
- }
-
- track.draw();
+ dataset_id: track.dataset_id }, function(data) {
+ if ( isNaN(parseFloat(track.prefs.min_value)) || isNaN(parseFloat(track.prefs.max_value)) ) {
+ track.prefs.min_value = data.min;
+ track.prefs.max_value = data.max;
+ // Update the config
+ $('#track_' + track_id + '_minval').val(track.prefs.min_value);
+ $('#track_' + track_id + '_maxval').val(track.prefs.max_value);
}
+ track.vertical_range = track.prefs.max_value - track.prefs.min_value;
+
+ // Draw y-axis labels if necessary
+ $('#linetrack_' + track_id + '_minval').remove();
+ $('#linetrack_' + track_id + '_maxval').remove();
+
+ var min_label = $("<div></div>").addClass('yaxislabel').attr("id", 'linetrack_' + track_id + '_minval').text(track.prefs.min_value);
+ var max_label = $("<div></div>").addClass('yaxislabel').attr("id", 'linetrack_' + track_id + '_maxval').text(track.prefs.max_value);
+
+ max_label.css({ position: "relative", top: "25px" });
+ max_label.prependTo(track.container_div);
+
+ min_label.css({ position: "relative", top: track.height_px + 55 + "px" });
+ min_label.prependTo(track.container_div);
});
},
get_data: function( resolution, position ) {
@@ -362,9 +373,9 @@
if (!track.data_queue[key]) {
track.data_queue[key] = true;
- $.getJSON( data_url, { indexer: this.indexer, chrom: this.view.chrom,
- low: low, high: high, dataset_id: this.dataset_id,
- resolution: this.view.resolution }, function ( data ) {
+ $.getJSON( data_url, { "indexer": this.indexer, "chrom": this.view.chrom,
+ "low": low, "high": high, "dataset_id": this.dataset_id,
+ "resolution": this.view.resolution, }, function (data) {
track.data_cache.set(key, data);
delete track.data_queue[key];
track.draw();
@@ -392,7 +403,7 @@
top: 0,
left: ( tile_low - this.view.low ) * w_scale
});
-
+
canvas.get(0).width = Math.ceil( tile_length * w_scale );
canvas.get(0).height = this.height_px;
var ctx = canvas.get(0).getContext("2d"),
@@ -462,7 +473,6 @@
var FeatureTrack = function ( name, dataset_id, indexer, prefs ) {
this.track_type = "FeatureTrack";
- this.tile_cache = new Cache(CACHED_TILES_FEATURE);
Track.call( this, name, $("#viewport") );
TiledTrack.call( this );
@@ -480,7 +490,9 @@
this.inc_slots = {};
this.data_queue = {};
this.s_e_by_tile = {};
+ this.tile_cache = new Cache(CACHED_TILES_FEATURE);
this.data_cache = new Cache(20);
+
this.prefs = { 'block_color': 'black', 'label_color': 'black' };
if (prefs.block_color !== undefined) { this.prefs.block_color = prefs.block_color; }
if (prefs.label_color !== undefined) { this.prefs.label_color = prefs.label_color; }
@@ -489,33 +501,15 @@
$.extend( FeatureTrack.prototype, TiledTrack.prototype, {
init: function() {
var track = this;
- track.content_div.text(DATA_LOADING);
- track.container_div.removeClass("nodata error pending");
- $.getJSON( data_url, { indexer: track.indexer, low: track.view.max_low,
- high: track.view.max_high, dataset_id: track.dataset_id,
- chrom: track.view.chrom }, function ( data ) {
- if (data == "error") {
- track.container_div.addClass("error");
- track.content_div.text(DATA_ERROR);
- } else if (data.length === 0 || data == "no data") {
- track.container_div.addClass("nodata");
- track.content_div.text(DATA_NONE);
- } else if (data == "pending") {
- track.container_div.adClass("pending");
- track.content_div.text(DATA_PENDING);
- setTimeout(function() { track.init(); }, 5000);
- } else {
- track.content_div.text("");
- track.content_div.css( "height", track.height_px + "px" );
- track.values = data;
- track.calc_slots();
- track.slots = track.zo_slots;
- track.draw();
- }
+ this.init_each({ indexer: track.indexer, low: track.view.max_low,
+ high: track.view.max_high, dataset_id: track.dataset_id,
+ chrom: track.view.chrom }, function (data) {
+ track.values = data;
+ track.calc_slots();
+ track.slots = track.zo_slots;
});
},
get_data: function( low, high ) {
- // console.log("getting: ", low, high);
var track = this,
key = low + '_' + high;
@@ -523,7 +517,7 @@
track.data_queue[key] = true;
$.getJSON( data_url, { indexer: track.indexer, chrom: track.view.chrom,
low: low, high: high, dataset_id: track.dataset_id,
- include_blocks: true }, function ( data ) {
+ include_blocks: true }, function (data) {
track.data_cache.set(key, data);
// console.log("datacache", track.data_cache.get(key));
delete track.data_queue[key];
diff -r 879432079138 -r 1e23f73647bb templates/tracks/browser.mako
--- a/templates/tracks/browser.mako Fri Feb 19 14:34:25 2010 -0500
+++ b/templates/tracks/browser.mako Fri Feb 19 17:54:44 2010 -0500
@@ -107,8 +107,10 @@
error: function() { alert( "Couldn't create new browser" ) },
success: function(form_html) {
show_modal("New Track Browser", form_html, {
+ "Cancel": function() { window.location = "/"; },
"Continue": continue_fn
});
+ $("#new-title").focus();
}
});
%endif
@@ -292,7 +294,7 @@
track.init();
}
}
- // view.redraw();
+ view.redraw();
});
});
@@ -301,8 +303,9 @@
var track_id = track.track_id,
label = $('<label for="track_' + track_id + 'title">' + track.name + '</label>'),
title = $('<div class="historyItemTitle"></div>'),
- del_icon = $('<a style="display:block; float:right" href="#" class="icon-button delete" />'),
- edit_icon = $('<a style="display:block; float:right" href="#" class="icon-button edit" />'),
+ icon_div = $('<div class="historyItemButtons"></div>');
+ del_icon = $('<a href="#" class="icon-button delete" />'),
+ edit_icon = $('<a href="#" class="icon-button edit" />'),
body = $('<div class="historyItemBody"></div>'),
checkbox = $('<input type="checkbox" checked="checked"></input>').attr("id", "track_" + track_id + "title"),
li = $('<li class="sortable"></li>').attr("id", "track_" + track_id),
@@ -318,8 +321,8 @@
view.remove_track(track);
view.update_options();
});
-
- title.append(label).append(del_icon).append(edit_icon);
+ icon_div.append(edit_icon).append(del_icon);
+ title.append(label).prepend(icon_div);
if (track.gen_options) {
editable.append(track.gen_options(track_id)).appendTo(body);
}
diff -r 879432079138 -r 1e23f73647bb templates/tracks/new_browser.mako
--- a/templates/tracks/new_browser.mako Fri Feb 19 14:34:25 2010 -0500
+++ b/templates/tracks/new_browser.mako Fri Feb 19 17:54:44 2010 -0500
@@ -2,7 +2,7 @@
<div class="form-row">
<label for="title">Browser name:</label>
<div class="form-row-input">
- <input type="text" name="title" id="new-title" value="Unnamed Browser"></input>
+ <input type="text" name="title" id="new-title" value="Unnamed"></input>
</div>
<div style="clear: both;"></div>
</div>
1
0
details: http://www.bx.psu.edu/hg/galaxy/rev/879432079138
changeset: 3418:879432079138
user: Nate Coraor <nate(a)bx.psu.edu>
date: Fri Feb 19 14:34:25 2010 -0500
description:
Fix MySQL_python static egg on OS X
diffstat:
eggs.ini | 2 +-
scripts/scramble/scripts/MySQL_python.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diffs (24 lines):
diff -r 68eaeb1b1d69 -r 879432079138 eggs.ini
--- a/eggs.ini Fri Feb 19 11:29:25 2010 -0500
+++ b/eggs.ini Fri Feb 19 14:34:25 2010 -0500
@@ -71,7 +71,7 @@
bx_python = http://bitbucket.org/james_taylor/bx-python/get/3b9d30e47619.bz2
Cheetah = http://pypi.python.org/packages/source/C/Cheetah/Cheetah-2.2.2.tar.gz
DRMAA_python = http://gridengine.sunsource.net/files/documents/7/36/DRMAA-python-0.2.tar.gz
-MySQL_python = http://superb-west.dl.sourceforge.net/sourceforge/mysql-python/MySQL-python… http://downloads.mysql.com/archives/mysql-5.0/mysql-5.0.67.tar.gz
+MySQL_python = http://downloads.sourceforge.net/project/mysql-python/mysql-python/1.2.2/My… http://downloads.mysql.com/archives/mysql-5.0/mysql-5.0.67.tar.gz
pbs_python = http://ftp.sara.nl/pub/outgoing/pbs_python-2.9.4.tar.gz
pexpect = http://pypi.python.org/packages/source/p/pexpect/pexpect-2.4.tar.gz
psycopg2 = http://initd.org/pub/software/psycopg/PSYCOPG-2-0/psycopg2-2.0.6.tar.gz ftp://ftp-archives.postgresql.org/pub/source/v8.2.6/postgresql-8.2.6.tar.bz2
diff -r 68eaeb1b1d69 -r 879432079138 scripts/scramble/scripts/MySQL_python.py
--- a/scripts/scramble/scripts/MySQL_python.py Fri Feb 19 11:29:25 2010 -0500
+++ b/scripts/scramble/scripts/MySQL_python.py Fri Feb 19 14:34:25 2010 -0500
@@ -80,7 +80,7 @@
CONFIGURE += "CXXFLAGS='-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc' "
CONFIGURE += "LDFLAGS='-arch i386 -arch ppc' "
CONFIGURE += "LD='gcc -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -nostartfiles -arch i386 -arch ppc' "
- CONFIGURE += "./configure --prefix=%s/mysql --disable-dependency-tracking --without-server --without-uca --without-libwrap " %os.getcwd()
+ CONFIGURE += "./configure --prefix=%s/mysql --disable-dependency-tracking --disable-shared --without-server --without-uca --without-libwrap " %os.getcwd()
CONFIGURE += "--without-extra-tools --without-openssl --without-yassl --without-docs --without-man --without-bench --enable-thread-safe-client"
else:
CONFIGURE = "CFLAGS='-fPIC' ./configure --prefix=%s/mysql --disable-shared --without-server --without-uca --without-libwrap " %os.getcwd()
1
0

24 Feb '10
details: http://www.bx.psu.edu/hg/galaxy/rev/68eaeb1b1d69
changeset: 3417:68eaeb1b1d69
user: jeremy goecks <jeremy.goecks(a)emory.edu>
date: Fri Feb 19 11:29:25 2010 -0500
description:
Fix bug so that, when a user submits edits to a page's attributes, he is redicted to his page list.
diffstat:
lib/galaxy/web/controllers/page.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (14 lines):
diff -r d995557d383b -r 68eaeb1b1d69 lib/galaxy/web/controllers/page.py
--- a/lib/galaxy/web/controllers/page.py Fri Feb 19 10:01:33 2010 -0500
+++ b/lib/galaxy/web/controllers/page.py Fri Feb 19 11:29:25 2010 -0500
@@ -409,8 +409,8 @@
page.title = page_title
page.slug = page_slug
session.flush()
- # Display the management page
- return trans.response.send_redirect( web.url_for( action='index' ) )
+ # Redirect to page list.
+ return trans.response.send_redirect( web.url_for( action='list' ) )
else:
page_title = page.title
page_slug = page.slug
1
0
Hi Nate,
Sorry I had an empty database set the first time (which was giving me the
revision error):
Part of my problem has been trying to convert the db from sqlite to mysql --
the closest I got using scripts was 40 tables in the database:
datasetdataset_permissionsdefault_history_permissions
default_user_permissionseventform_definition_currentgalaxy_group
galaxy_sessiongalaxy_session_to_historygalaxy_usergroup_role_association
historyhistory_dataset_associationhistory_user_share_association
implicitly_converted_dataset_associationjobjob_external_output_metadata
job_parameterjob_to_input_datasetjob_to_output_datasetlibrarylibrary_dataset
library_dataset_dataset_association
library_dataset_dataset_association_permissionslibrary_dataset_permissions
library_folderlibrary_folder_permissionslibrary_permissionsmetadata_file
migrate_versionrolestored_workflowstored_workflow_menu_entry
stored_workflow_user_share_connectionuser_group_association
user_role_associationvalidation_errorworkflowworkflow_step
workflow_step_connection
When I try to run it linked to the above database I get the following error:
galaxy.model.migrate.check DEBUG 2010-02-19 13:42:18,987 MySQL_python egg
successfully loaded for mysql dialect
Traceback (most recent call last):
File
"/Users/rsw3284/Downloads/galaxy-0c07212afc00/lib/galaxy/web/buildapp.py",
line 61, in app_factory
app = UniverseApplication( global_conf = global_conf, **kwargs )
File "/Users/rsw3284/Downloads/galaxy-0c07212afc00/lib/galaxy/app.py",
line 28, in __init__
create_or_verify_database( db_url, self.config.database_engine_options )
File
"/Users/rsw3284/Downloads/galaxy-0c07212afc00/lib/galaxy/model/migrate/check.py",
line 102, in create_or_verify_database
% ( db_schema.version, migrate_repository.versions.latest ) )
Exception: Your database has version '22' but this code expects version
'39'. Please backup your database and then migrate the schema by running
'sh manage_db.sh upgrade'.
So when I try to run the manage_db.sh I get:
22 -> 23...
Migration script to add columns for tracking whether pages are deleted and
publicly accessible.
Traceback (most recent call last):
File "./scripts/manage_db.py", line 45, in <module>
main( repository='lib/galaxy/model/migrate', url=db_url )
File
"/Users/rsw3284/Downloads/galaxy-0c07212afc00/eggs/py2.5-noplatform/sqlalchemy_migrate-0.5.4-py2.5.egg/migrate/versioning/shell.py",
line 150, in main
ret = command_func(**kwargs)
File
"/Users/rsw3284/Downloads/galaxy-0c07212afc00/eggs/py2.5-noplatform/sqlalchemy_migrate-0.5.4-py2.5.egg/migrate/versioning/api.py",
line 221, in upgrade
return _migrate(url, repository, version, upgrade=True, err=err, **opts)
File
"/Users/rsw3284/Downloads/galaxy-0c07212afc00/eggs/py2.5-noplatform/sqlalchemy_migrate-0.5.4-py2.5.egg/migrate/versioning/api.py",
line 349, in _migrate
schema.runchange(ver, change, changeset.step)
File
"/Users/rsw3284/Downloads/galaxy-0c07212afc00/eggs/py2.5-noplatform/sqlalchemy_migrate-0.5.4-py2.5.egg/migrate/versioning/schema.py",
line 184, in runchange
change.run(self.engine, step)
File
"/Users/rsw3284/Downloads/galaxy-0c07212afc00/eggs/py2.5-noplatform/sqlalchemy_migrate-0.5.4-py2.5.egg/migrate/versioning/script/py.py",
line 101, in run
func()
File
"lib/galaxy/model/migrate/versions/0023_page_published_and_deleted_columns.py",
line 20, in upgrade
Page_table = Table( "page", metadata, autoload=True )
File
"/Users/rsw3284/Downloads/galaxy-0c07212afc00/eggs/py2.5-noplatform/SQLAlchemy-0.5.6_dev_r6498-py2.5.egg/sqlalchemy/schema.py",
line 108, in __call__
return type.__call__(self, name, metadata, *args, **kwargs)
File
"/Users/rsw3284/Downloads/galaxy-0c07212afc00/eggs/py2.5-noplatform/SQLAlchemy-0.5.6_dev_r6498-py2.5.egg/sqlalchemy/schema.py",
line 236, in __init__
_bind_or_error(metadata).reflecttable(self,
include_columns=include_columns)
File
"/Users/rsw3284/Downloads/galaxy-0c07212afc00/eggs/py2.5-noplatform/SQLAlchemy-0.5.6_dev_r6498-py2.5.egg/sqlalchemy/engine/base.py",
line 1265, in reflecttable
self.dialect.reflecttable(conn, table, include_columns)
File
"/Users/rsw3284/Downloads/galaxy-0c07212afc00/eggs/py2.5-noplatform/SQLAlchemy-0.5.6_dev_r6498-py2.5.egg/sqlalchemy/databases/mysql.py",
line 1664, in reflecttable
sql = self._show_create_table(connection, table, charset)
File
"/Users/rsw3284/Downloads/galaxy-0c07212afc00/eggs/py2.5-noplatform/SQLAlchemy-0.5.6_dev_r6498-py2.5.egg/sqlalchemy/databases/mysql.py",
line 1835, in _show_create_table
raise exc.NoSuchTableError(full_name)
sqlalchemy.exc.NoSuchTableError: page
I guess my problem all along is not having the full table schema for use in
mySQL.
Rgds,
Roy Weckiewicz
On Fri, Feb 19, 2010 at 1:33 PM, Nate Coraor <nate(a)bx.psu.edu> wrote:
> Roy Weckiewicz wrote:
>
>> Thanks again Nate,
>>
>> I just tried the one you sent me - it seems I just have a database
>> revision issue:
>>
>> Traceback (most recent call last):
>> File
>> "/Users/rsw3284/Downloads/galaxy-0c07212afc00/lib/galaxy/web/buildapp.py",
>> line 61, in app_factory
>> app = UniverseApplication( global_conf = global_conf, **kwargs )
>> File "/Users/rsw3284/Downloads/galaxy-0c07212afc00/lib/galaxy/app.py",
>> line 28, in __init__
>> create_or_verify_database( db_url, self.config.database_engine_options
>> )
>> File
>> "/Users/rsw3284/Downloads/galaxy-0c07212afc00/lib/galaxy/model/migrate/check.py",
>> line 72, in create_or_verify_database
>> raise Exception( "Your database is older than hg revision
>> 1464:c7acaa1bb88f and will need to be updated manually" )
>> Exception: Your database is older than hg revision 1464:c7acaa1bb88f and
>> will need to be updated manually
>>
>
> Hi Roy,
>
> Is this the database you converted from sqlite? Does it include the
> 'migrate_version' table? Could you paste the output of 'SHOW TABLES;'?
>
> Thanks,
>
>
>>
>> Rgds,
>>
>>
>> Roy Weckiewicz
>>
>>
>> On Fri, Feb 19, 2010 at 1:28 PM, Nate Coraor <nate(a)bx.psu.edu <mailto:
>> nate(a)bx.psu.edu>> wrote:
>>
>> Roy Weckiewicz wrote:
>>
>> What's strange is that eventhough the file name on the egg is
>> MySQL*fat-ucs2.egg the error still reports the file in question
>> as MySQL*fat.egg -- I've tried renaming the egg to match the
>> original file, but it didn't seem to make a difference.
>> Furthermore, when I run.sh, the program will create a directory
>> in home called .python-eggs/ containing the _MySQL.so file,
>> among other things - Will I have to add a different URL to the
>> eggs.ini to keep it from re-downloading the old file?
>>
>>
>> Ah, sorry, that egg relies on some uncommitted patches. I've
>> rebuilt it using a clean checkout, could you try this one instead?:
>>
>>
>> http://www.bx.psu.edu/~nate/galaxy/MySQL_python-1.2.2_5.0.67_static-py2.5-m…
>>
>> Thanks,
>> --nate
>>
>>
>>
>>
>> --
>> Roy Weckiewicz
>> Texas A&M University
>>
>
>
--
Roy Weckiewicz
Texas A&M University
4
5