galaxy-commits
Threads by month
- ----- 2026 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- 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
- 15302 discussions
20 May '10
details: http://www.bx.psu.edu/hg/galaxy/rev/b5391bd3e9c7
changeset: 3784:b5391bd3e9c7
user: jeremy goecks <jeremy.goecks(a)emory.edu>
date: Fri May 14 10:15:48 2010 -0400
description:
Add GFF filtering tool. Tool filters GFF file based on an attribute value.
diffstat:
test-data/gff_filtering_in1.gff | 200 +++++++++++++++++++++++++++++++++++++++
test-data/gff_filtering_out1.gff | 46 ++++++++
tool_conf.xml.sample | 13 +-
tools/ngs_rna/gff_filtering.py | 137 ++++++++++++++++++++++++++
tools/ngs_rna/gff_filtering.xml | 58 +++++++++++
5 files changed, 449 insertions(+), 5 deletions(-)
diffs (481 lines):
diff -r e972d3f8413e -r b5391bd3e9c7 test-data/gff_filtering_in1.gff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/gff_filtering_in1.gff Fri May 14 10:15:48 2010 -0400
@@ -0,0 +1,200 @@
+chr1 Cufflinks exon 21199802 21199861 1000 + . gene_id "CUFF.1383"; transcript_id "CUFF.1383.1"; exon_number "1"; FPKM "5.0037092300"; frac "1.000000"; conf_lo "0.000000"; conf_hi "15.011128"; cov "0.284211";
+chr1 Cufflinks transcript 55716264 55716295 1000 . . gene_id "CUFF.5021"; transcript_id "CUFF.5021.1"; FPKM "29.7095235531"; frac "1.000000"; conf_lo "0.000000"; conf_hi "71.725135"; cov "1.687500";
+chr1 Cufflinks transcript 74904128 74904154 1000 . . gene_id "CUFF.7563"; transcript_id "CUFF.7563.1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr1 Cufflinks exon 134487086 134487123 1000 . . gene_id "CUFF.11837"; transcript_id "CUFF.11837.1"; exon_number "1"; FPKM "25.0185461500"; frac "1.000000"; conf_lo "0.000000"; conf_hi "60.400113"; cov "1.421053";
+chr1 Cufflinks exon 136200923 136200959 1000 . . gene_id "CUFF.12099"; transcript_id "CUFF.12099.1"; exon_number "1"; FPKM "38.5420846095"; frac "1.000000"; conf_lo "0.000000"; conf_hi "83.046650"; cov "2.189189";
+chr1 Cufflinks transcript 138116837 138116866 1000 . . gene_id "CUFF.12557"; transcript_id "CUFF.12557.1"; FPKM "31.6901584567"; frac "1.000000"; conf_lo "0.000000"; conf_hi "76.506810"; cov "1.800000";
+chr1 Cufflinks exon 152240694 152240779 1000 . . gene_id "CUFF.13107"; transcript_id "CUFF.13107.1"; exon_number "1"; FPKM "16.5820596576"; frac "1.000000"; conf_lo "0.000000"; conf_hi "35.729373"; cov "0.941860";
+chr1 Cufflinks exon 157633998 157634024 1000 . . gene_id "CUFF.13967"; transcript_id "CUFF.13967.1"; exon_number "1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr1 Cufflinks exon 167704819 167704854 1000 . . gene_id "CUFF.15347"; transcript_id "CUFF.15347.1"; exon_number "1"; FPKM "26.4084653806"; frac "1.000000"; conf_lo "0.000000"; conf_hi "63.755675"; cov "1.500000";
+chr1 Cufflinks transcript 184245403 184245429 1000 . . gene_id "CUFF.17679"; transcript_id "CUFF.17679.1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr10 Cufflinks exon 12731734 12731826 1000 . . gene_id "CUFF.19287"; transcript_id "CUFF.19287.1"; exon_number "1"; FPKM "10.2226317602"; frac "1.000000"; conf_lo "0.000000"; conf_hi "24.679616"; cov "0.580645";
+chr10 Cufflinks transcript 42305464 42305515 1000 . . gene_id "CUFF.21709"; transcript_id "CUFF.21709.1"; FPKM "18.2827837250"; frac "1.000000"; conf_lo "0.000000"; conf_hi "44.138544"; cov "1.038462";
+chr10 Cufflinks exon 52431636 52431662 1000 . . gene_id "CUFF.22495"; transcript_id "CUFF.22495.1"; exon_number "1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr10 Cufflinks transcript 62044837 62045189 1000 . . gene_id "CUFF.23531"; transcript_id "CUFF.23531.1"; FPKM "19.5178121606"; frac "1.000000"; conf_lo "9.264456"; conf_hi "29.771168"; cov "1.108611";
+chr10 Cufflinks transcript 75372919 75373002 1000 . . gene_id "CUFF.24985"; transcript_id "CUFF.24985.1"; FPKM "124.4970510798"; frac "1.000000"; conf_lo "71.411330"; conf_hi "177.582772"; cov "7.071429";
+chr10 Cufflinks transcript 80362428 80363292 1000 - . gene_id "CUFF.26065"; transcript_id "CUFF.26065.1"; FPKM "43.6170921216"; frac "1.000000"; conf_lo "32.260169"; conf_hi "54.974016"; cov "2.477449";
+chr10 Cufflinks exon 87908564 87908597 1000 + . gene_id "CUFF.27209"; transcript_id "CUFF.27209.1"; exon_number "2"; FPKM "11.4913582411"; frac "1.000000"; conf_lo "0.000000"; conf_hi "30.264098"; cov "0.652709";
+chr10 Cufflinks exon 89142681 89142707 1000 . . gene_id "CUFF.27307"; transcript_id "CUFF.27307.1"; exon_number "1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr10 Cufflinks exon 93425781 93425807 1000 . . gene_id "CUFF.28101"; transcript_id "CUFF.28101.1"; exon_number "1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr10 Cufflinks exon 108207916 108207986 1000 . . gene_id "CUFF.29319"; transcript_id "CUFF.29319.1"; exon_number "1"; FPKM "13.3902077986"; frac "1.000000"; conf_lo "0.000000"; conf_hi "32.326821"; cov "0.760563";
+chr10 Cufflinks transcript 117583959 117584039 1000 . . gene_id "CUFF.30522"; transcript_id "CUFF.30522.1"; FPKM "17.6056435870"; frac "1.000000"; conf_lo "0.000000"; conf_hi "37.934890"; cov "1.000000";
+chr11 Cufflinks transcript 3357264 3357347 1000 . . gene_id "CUFF.32520"; transcript_id "CUFF.32520.1"; FPKM "16.9768706018"; frac "1.000000"; conf_lo "0.000000"; conf_hi "36.580072"; cov "0.964286";
+chr11 Cufflinks transcript 5005248 5005351 1000 . . gene_id "CUFF.33024"; transcript_id "CUFF.33024.1"; FPKM "9.1413918625"; frac "1.000000"; conf_lo "0.000000"; conf_hi "22.069272"; cov "0.519231";
+chr11 Cufflinks transcript 7904565 7904642 1000 . . gene_id "CUFF.33508"; transcript_id "CUFF.33508.1"; FPKM "61.6484988869"; frac "1.000000"; conf_lo "22.882428"; conf_hi "100.414569"; cov "3.501633";
+chr11 Cufflinks exon 49932116 49932142 1000 . . gene_id "CUFF.37546"; transcript_id "CUFF.37546.1"; exon_number "1"; FPKM "17.6056435870"; frac "1.000000"; conf_lo "0.000000"; conf_hi "52.816931"; cov "1.000000";
+chr11 Cufflinks transcript 60046420 60046446 1000 . . gene_id "CUFF.39152"; transcript_id "CUFF.39152.1"; FPKM "52.8169307611"; frac "1.000000"; conf_lo "0.000000"; conf_hi "113.804669"; cov "3.000000";
+chr11 Cufflinks exon 78140156 78140259 1000 . . gene_id "CUFF.43148"; transcript_id "CUFF.43148.1"; exon_number "1"; FPKM "54.8483511750"; frac "1.000000"; conf_lo "23.181641"; conf_hi "86.515061"; cov "3.115385";
+chr11 Cufflinks transcript 79846512 79846547 1000 . . gene_id "CUFF.43570"; transcript_id "CUFF.43570.1"; FPKM "26.4084653806"; frac "1.000000"; conf_lo "0.000000"; conf_hi "63.755675"; cov "1.500000";
+chr11 Cufflinks transcript 85583926 85583952 1000 . . gene_id "CUFF.44478"; transcript_id "CUFF.44478.1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr11 Cufflinks transcript 98554214 98554301 1000 . . gene_id "CUFF.46823"; transcript_id "CUFF.46823.1"; FPKM "10.8034631102"; frac "1.000000"; conf_lo "0.000000"; conf_hi "26.081867"; cov "0.613636";
+chr11 Cufflinks transcript 100797512 100797539 1000 . . gene_id "CUFF.47191"; transcript_id "CUFF.47191.1"; FPKM "33.9537412036"; frac "1.000000"; conf_lo "0.000000"; conf_hi "81.971583"; cov "1.928571";
+chr11 Cufflinks exon 105616462 105616737 1000 . . gene_id "CUFF.48385"; transcript_id "CUFF.48385.1"; exon_number "1"; FPKM "18.9452034252"; frac "1.000000"; conf_lo "7.520816"; conf_hi "30.369591"; cov "1.076087";
+chr11 Cufflinks transcript 106985457 106985483 1000 . . gene_id "CUFF.48949"; transcript_id "CUFF.48949.1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr11 Cufflinks exon 120257794 120257821 1000 . . gene_id "CUFF.51205"; transcript_id "CUFF.51205.1"; exon_number "1"; FPKM "50.9306118054"; frac "1.000000"; conf_lo "0.000000"; conf_hi "109.740217"; cov "2.892857";
+chr12 Cufflinks transcript 16542765 16542791 1000 . . gene_id "CUFF.52907"; transcript_id "CUFF.52907.1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr12 Cufflinks exon 21319385 21319483 1000 . . gene_id "CUFF.53189"; transcript_id "CUFF.53189.1"; exon_number "1"; FPKM "9.6030783202"; frac "1.000000"; conf_lo "0.000000"; conf_hi "23.183882"; cov "0.545455";
+chr12 Cufflinks transcript 30469129 30469156 1000 . . gene_id "CUFF.53733"; transcript_id "CUFF.53733.1"; FPKM "33.9537412036"; frac "1.000000"; conf_lo "0.000000"; conf_hi "81.971583"; cov "1.928571";
+chr12 Cufflinks transcript 30557416 30557442 1000 . . gene_id "CUFF.53863"; transcript_id "CUFF.53863.1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr12 Cufflinks exon 30701762 30702509 1000 . . gene_id "CUFF.53897"; transcript_id "CUFF.53897.1"; exon_number "1"; FPKM "48.9333329111"; frac "1.000000"; conf_lo "37.780391"; conf_hi "60.086275"; cov "2.779412";
+chr12 Cufflinks transcript 56895077 56895103 1000 . . gene_id "CUFF.55817"; transcript_id "CUFF.55817.1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr12 Cufflinks transcript 81915713 81915797 1000 . . gene_id "CUFF.58203"; transcript_id "CUFF.58203.1"; FPKM "22.3695236165"; frac "1.000000"; conf_lo "0.000000"; conf_hi "44.739047"; cov "1.270588";
+chr12 Cufflinks transcript 118458135 118458232 1000 . . gene_id "CUFF.63640"; transcript_id "CUFF.63640.1"; FPKM "9.7010689153"; frac "1.000000"; conf_lo "0.000000"; conf_hi "23.420452"; cov "0.551020";
+chr13 Cufflinks exon 8262302 8262372 1000 . . gene_id "CUFF.64064"; transcript_id "CUFF.64064.1"; exon_number "1"; FPKM "13.3902077986"; frac "1.000000"; conf_lo "0.000000"; conf_hi "32.326821"; cov "0.760563";
+chr13 Cufflinks transcript 14110852 14110956 1000 . . gene_id "CUFF.64684"; transcript_id "CUFF.64684.1"; FPKM "13.5814964814"; frac "1.000000"; conf_lo "0.000000"; conf_hi "29.264058"; cov "0.771429";
+chr13 Cufflinks transcript 14146567 14146593 1000 . . gene_id "CUFF.64702"; transcript_id "CUFF.64702.1"; FPKM "17.6056435870"; frac "1.000000"; conf_lo "0.000000"; conf_hi "52.816931"; cov "1.000000";
+chr13 Cufflinks transcript 14564150 14564243 1000 . . gene_id "CUFF.64894"; transcript_id "CUFF.64894.1"; FPKM "15.1708205378"; frac "1.000000"; conf_lo "0.000000"; conf_hi "32.688575"; cov "0.861702";
+chr13 Cufflinks transcript 17823162 17823188 1000 . . gene_id "CUFF.65082"; transcript_id "CUFF.65082.1"; FPKM "52.8169307611"; frac "1.000000"; conf_lo "0.000000"; conf_hi "113.804669"; cov "3.000000";
+chr13 Cufflinks transcript 29757640 29757666 1000 . . gene_id "CUFF.65972"; transcript_id "CUFF.65972.1"; FPKM "70.4225743482"; frac "1.000000"; conf_lo "0.000000"; conf_hi "140.845149"; cov "4.000000";
+chr13 Cufflinks transcript 42402998 42403051 1000 . . gene_id "CUFF.66816"; transcript_id "CUFF.66816.1"; FPKM "26.4084653806"; frac "1.000000"; conf_lo "0.000000"; conf_hi "56.902335"; cov "1.500000";
+chr13 Cufflinks transcript 42853325 42853406 1000 . . gene_id "CUFF.66850"; transcript_id "CUFF.66850.1"; FPKM "17.3909406165"; frac "1.000000"; conf_lo "0.000000"; conf_hi "37.472269"; cov "0.987805";
+chr13 Cufflinks exon 42990504 42990546 1000 . . gene_id "CUFF.66994"; transcript_id "CUFF.66994.1"; exon_number "1"; FPKM "33.1641193151"; frac "1.000000"; conf_lo "0.000000"; conf_hi "71.458746"; cov "1.883721";
+chr13 Cufflinks exon 49159496 49159569 1000 . . gene_id "CUFF.67788"; transcript_id "CUFF.67788.1"; exon_number "1"; FPKM "44.9657653777"; frac "1.000000"; conf_lo "10.974842"; conf_hi "78.956689"; cov "2.554054";
+chr13 Cufflinks exon 49243161 49243187 1000 + . gene_id "CUFF.67842"; transcript_id "CUFF.67842.1"; exon_number "2"; FPKM "17.3246767151"; frac "1.000000"; conf_lo "0.000000"; conf_hi "35.848677"; cov "0.984041";
+chr13 Cufflinks transcript 74671517 74671579 1000 . . gene_id "CUFF.70454"; transcript_id "CUFF.70454.1"; FPKM "18.8363155420"; frac "1.000000"; conf_lo "0.000000"; conf_hi "42.679570"; cov "1.069902";
+chr13 Cufflinks exon 100759121 100759147 1000 . . gene_id "CUFF.72728"; transcript_id "CUFF.72728.1"; exon_number "1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr13 Cufflinks transcript 100200304 100200330 1000 . . gene_id "CUFF.73108"; transcript_id "CUFF.73108.1"; FPKM "123.2395051093"; frac "1.000000"; conf_lo "30.079196"; conf_hi "216.399814"; cov "7.000000";
+chr13 Cufflinks exon 107766857 107766915 1000 . . gene_id "CUFF.73428"; transcript_id "CUFF.73428.1"; exon_number "1"; FPKM "16.1136398932"; frac "1.000000"; conf_lo "0.000000"; conf_hi "38.901768"; cov "0.915254";
+chr13 Cufflinks transcript 115623552 115623640 1000 . . gene_id "CUFF.74362"; transcript_id "CUFF.74362.1"; FPKM "21.3641517686"; frac "1.000000"; conf_lo "0.000000"; conf_hi "42.728304"; cov "1.213483";
+chr14 Cufflinks transcript 31651249 31651275 1000 . . gene_id "CUFF.77182"; transcript_id "CUFF.77182.1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr14 Cufflinks transcript 31949103 31949152 1000 . . gene_id "CUFF.77316"; transcript_id "CUFF.77316.1"; FPKM "85.5634278330"; frac "1.000000"; conf_lo "28.521143"; conf_hi "142.605713"; cov "4.860000";
+chr14 Cufflinks transcript 32190589 32190685 1000 . . gene_id "CUFF.77438"; transcript_id "CUFF.77438.1"; FPKM "14.7016199026"; frac "1.000000"; conf_lo "0.000000"; conf_hi "31.677588"; cov "0.835052";
+chr14 Cufflinks exon 55013239 55013265 1000 . . gene_id "CUFF.79372"; transcript_id "CUFF.79372.1"; exon_number "1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr14 Cufflinks exon 55250464 55250514 1000 . . gene_id "CUFF.79616"; transcript_id "CUFF.79616.1"; exon_number "1"; FPKM "18.6412696804"; frac "1.000000"; conf_lo "0.000000"; conf_hi "45.004006"; cov "1.058824";
+chr14 Cufflinks exon 67604227 67604668 1000 . . gene_id "CUFF.81446"; transcript_id "CUFF.81446.1"; exon_number "1"; FPKM "123.6776546104"; frac "1.000000"; conf_lo "100.611653"; conf_hi "146.743656"; cov "7.024887";
+chr14 Cufflinks exon 75165582 75165744 1000 . . gene_id "CUFF.82088"; transcript_id "CUFF.82088.1"; exon_number "1"; FPKM "20.4139057543"; frac "1.000000"; conf_lo "4.982443"; conf_hi "35.845368"; cov "1.159509";
+chr15 Cufflinks transcript 8254591 8254734 1000 . . gene_id "CUFF.85556"; transcript_id "CUFF.85556.1"; FPKM "13.2042326903"; frac "1.000000"; conf_lo "0.000000"; conf_hi "26.408465"; cov "0.750000";
+chr15 Cufflinks transcript 34371407 34371433 1000 . . gene_id "CUFF.87246"; transcript_id "CUFF.87246.1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr15 Cufflinks exon 65980225 65980255 1000 + . gene_id "CUFF.89502"; transcript_id "CUFF.89502.1"; exon_number "2"; FPKM "14.1193775302"; frac "1.000000"; conf_lo "0.000000"; conf_hi "30.423030"; cov "0.801980";
+chr15 Cufflinks transcript 85895971 85896018 1000 . . gene_id "CUFF.92834"; transcript_id "CUFF.92834.1"; FPKM "19.8063490354"; frac "1.000000"; conf_lo "0.000000"; conf_hi "47.816756"; cov "1.125000";
+chr15 Cufflinks exon 90828279 90828371 1000 . . gene_id "CUFF.93426"; transcript_id "CUFF.93426.1"; exon_number "1"; FPKM "15.3339476403"; frac "1.000000"; conf_lo "0.000000"; conf_hi "33.040065"; cov "0.870968";
+chr15 Cufflinks exon 99013431 99013472 1000 . . gene_id "CUFF.94604"; transcript_id "CUFF.94604.1"; exon_number "1"; FPKM "22.6358274691"; frac "1.000000"; conf_lo "0.000000"; conf_hi "54.647722"; cov "1.285714";
+chr15 Cufflinks transcript 102336976 102337075 1000 . . gene_id "CUFF.95298"; transcript_id "CUFF.95298.1"; FPKM "9.5070475370"; frac "1.000000"; conf_lo "0.000000"; conf_hi "22.952043"; cov "0.540000";
+chr16 Cufflinks transcript 10417989 10425202 1000 - . gene_id "CUFF.97232"; transcript_id "CUFF.97232.1"; FPKM "21.1642179587"; frac "1.000000"; conf_lo "0.000000"; conf_hi "44.805591"; cov "1.202127";
+chr16 Cufflinks transcript 40788986 40789084 1000 . . gene_id "CUFF.101774"; transcript_id "CUFF.101774.1"; FPKM "9.6030783202"; frac "1.000000"; conf_lo "0.000000"; conf_hi "23.183882"; cov "0.545455";
+chr16 Cufflinks transcript 57154027 57154067 1000 . . gene_id "CUFF.103364"; transcript_id "CUFF.103364.1"; FPKM "162.3154457537"; frac "1.000000"; conf_lo "75.554191"; conf_hi "249.076701"; cov "9.219512";
+chr16 Cufflinks exon 74862302 74862560 1000 . . gene_id "CUFF.105450"; transcript_id "CUFF.105450.1"; exon_number "1"; FPKM "11.0120241741"; frac "1.000000"; conf_lo "2.020744"; conf_hi "20.003304"; cov "0.625483";
+chr16 Cufflinks exon 91023578 91023669 1000 . . gene_id "CUFF.106912"; transcript_id "CUFF.106912.1"; exon_number "1"; FPKM "10.3337473228"; frac "1.000000"; conf_lo "0.000000"; conf_hi "24.947873"; cov "0.586957";
+chr16 Cufflinks transcript 98168779 98168914 1000 . . gene_id "CUFF.107834"; transcript_id "CUFF.107834.1"; FPKM "24.4666664555"; frac "1.000000"; conf_lo "5.971605"; conf_hi "42.961728"; cov "1.389706";
+chr17 Cufflinks exon 8483212 8483268 1000 . . gene_id "CUFF.108498"; transcript_id "CUFF.108498.1"; exon_number "1"; FPKM "50.0370923000"; frac "1.000000"; conf_lo "9.181978"; conf_hi "90.892207"; cov "2.842105";
+chr17 Cufflinks transcript 17478023 17478102 1000 . . gene_id "CUFF.109264"; transcript_id "CUFF.109264.1"; FPKM "23.7676188425"; frac "1.000000"; conf_lo "0.000000"; conf_hi "47.535238"; cov "1.350000";
+chr17 Cufflinks exon 24611086 24611151 1000 . . gene_id "CUFF.110088"; transcript_id "CUFF.110088.1"; exon_number "1"; FPKM "21.6069262205"; frac "1.000000"; conf_lo "0.000000"; conf_hi "46.556456"; cov "1.227273";
+chr17 Cufflinks exon 30355791 30355913 1000 . . gene_id "CUFF.111759"; transcript_id "CUFF.111759.1"; exon_number "1"; FPKM "19.3232673516"; frac "1.000000"; conf_lo "2.040012"; conf_hi "36.606523"; cov "1.097561";
+chr17 Cufflinks exon 31608702 31608787 1000 . . gene_id "CUFF.111943"; transcript_id "CUFF.111943.1"; exon_number "1"; FPKM "16.5820596576"; frac "1.000000"; conf_lo "0.000000"; conf_hi "35.729373"; cov "0.941860";
+chr17 Cufflinks transcript 32414547 32414573 1000 . . gene_id "CUFF.112117"; transcript_id "CUFF.112117.1"; FPKM "52.8169307611"; frac "1.000000"; conf_lo "0.000000"; conf_hi "113.804669"; cov "3.000000";
+chr17 Cufflinks transcript 33245409 33245463 1000 . . gene_id "CUFF.112363"; transcript_id "CUFF.112363.1"; FPKM "17.2855409764"; frac "1.000000"; conf_lo "0.000000"; conf_hi "41.730987"; cov "0.981818";
+chr17 Cufflinks transcript 56750339 56750374 1000 . . gene_id "CUFF.115617"; transcript_id "CUFF.115617.1"; FPKM "52.8169307611"; frac "1.000000"; conf_lo "0.000000"; conf_hi "105.633862"; cov "3.000000";
+chr17 Cufflinks transcript 57144800 57144939 1000 . . gene_id "CUFF.115679"; transcript_id "CUFF.115679.1"; FPKM "13.5814964814"; frac "1.000000"; conf_lo "0.000000"; conf_hi "27.162993"; cov "0.771429";
+chr17 Cufflinks exon 71694628 71694708 1000 . . gene_id "CUFF.117117"; transcript_id "CUFF.117117.1"; exon_number "1"; FPKM "23.4741914494"; frac "1.000000"; conf_lo "0.000000"; conf_hi "46.948383"; cov "1.333333";
+chr17 Cufflinks transcript 71698227 71698263 1000 . . gene_id "CUFF.117119"; transcript_id "CUFF.117119.1"; FPKM "25.6947230730"; frac "1.000000"; conf_lo "0.000000"; conf_hi "62.032549"; cov "1.459459";
+chr17 Cufflinks exon 87862079 87862105 1000 . . gene_id "CUFF.118851"; transcript_id "CUFF.118851.1"; exon_number "1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr18 Cufflinks transcript 39571718 39571880 1000 . . gene_id "CUFF.123569"; transcript_id "CUFF.123569.1"; FPKM "20.4139057543"; frac "1.000000"; conf_lo "4.982443"; conf_hi "35.845368"; cov "1.159509";
+chr18 Cufflinks exon 46452826 46452864 1000 . . gene_id "CUFF.124197"; transcript_id "CUFF.124197.1"; exon_number "1"; FPKM "48.7540899334"; frac "1.000000"; conf_lo "0.000000"; conf_hi "97.508180"; cov "2.769231";
+chr18 Cufflinks exon 50151390 50151416 1000 . . gene_id "CUFF.124439"; transcript_id "CUFF.124439.1"; exon_number "1"; FPKM "17.5638395629"; frac "1.000000"; conf_lo "0.000000"; conf_hi "52.733298"; cov "0.997626";
+chr18 Cufflinks exon 65106749 65106787 1000 . . gene_id "CUFF.125675"; transcript_id "CUFF.125675.1"; exon_number "1"; FPKM "48.7540899334"; frac "1.000000"; conf_lo "0.000000"; conf_hi "97.508180"; cov "2.769231";
+chr18 Cufflinks transcript 65202282 65202424 1000 . . gene_id "CUFF.125729"; transcript_id "CUFF.125729.1"; FPKM "13.2965699818"; frac "1.000000"; conf_lo "0.000000"; conf_hi "26.593140"; cov "0.755245";
+chr18 Cufflinks exon 69735254 69735280 1000 . . gene_id "CUFF.126371"; transcript_id "CUFF.126371.1"; exon_number "1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr19 Cufflinks transcript 5370466 5370492 1000 . . gene_id "CUFF.129319"; transcript_id "CUFF.129319.1"; FPKM "52.8169307611"; frac "1.000000"; conf_lo "0.000000"; conf_hi "113.804669"; cov "3.000000";
+chr19 Cufflinks exon 17633088 17633203 1000 . . gene_id "CUFF.131333"; transcript_id "CUFF.131333.1"; exon_number "1"; FPKM "20.4893265884"; frac "1.000000"; conf_lo "2.163116"; conf_hi "38.815537"; cov "1.163793";
+chr19 Cufflinks transcript 41997624 41997859 1000 . . gene_id "CUFF.133569"; transcript_id "CUFF.133569.1"; FPKM "28.1988698132"; frac "1.000000"; conf_lo "13.125940"; conf_hi "43.271800"; cov "1.601695";
+chr19 Cufflinks transcript 53311236 53311262 1000 . . gene_id "CUFF.134885"; transcript_id "CUFF.134885.1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr19 Cufflinks exon 56516515 56516684 1000 . . gene_id "CUFF.135203"; transcript_id "CUFF.135203.1"; exon_number "1"; FPKM "33.5542854247"; frac "1.000000"; conf_lo "14.181710"; conf_hi "52.926861"; cov "1.905882";
+chr2 Cufflinks transcript 3246910 3246936 1000 . . gene_id "CUFF.136019"; transcript_id "CUFF.136019.1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr2 Cufflinks transcript 4543774 4543977 1000 . . gene_id "CUFF.136435"; transcript_id "CUFF.136435.1"; FPKM "37.2825393608"; frac "1.000000"; conf_lo "18.641270"; conf_hi "55.923809"; cov "2.117647";
+chr2 Cufflinks exon 7271328 7271354 1000 . . gene_id "CUFF.137407"; transcript_id "CUFF.137407.1"; exon_number "1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr2 Cufflinks exon 11509202 11509287 1000 . . gene_id "CUFF.137559"; transcript_id "CUFF.137559.1"; exon_number "1"; FPKM "22.1094128768"; frac "1.000000"; conf_lo "0.000000"; conf_hi "44.218826"; cov "1.255814";
+chr2 Cufflinks transcript 30200331 30200938 1000 . . gene_id "CUFF.140289"; transcript_id "CUFF.140289.1"; FPKM "100.0741846001"; frac "1.000000"; conf_lo "82.383401"; conf_hi "117.764968"; cov "5.684211";
+chr2 Cufflinks transcript 49559781 49559842 1000 . . gene_id "CUFF.143035"; transcript_id "CUFF.143035.1"; FPKM "15.3339476403"; frac "1.000000"; conf_lo "0.000000"; conf_hi "37.019424"; cov "0.870968";
+chr2 Cufflinks transcript 78736720 78736746 1000 . . gene_id "CUFF.146383"; transcript_id "CUFF.146383.1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr2 Cufflinks transcript 97470595 97470703 1000 . . gene_id "CUFF.148117"; transcript_id "CUFF.148117.1"; FPKM "17.4441239211"; frac "1.000000"; conf_lo "0.000000"; conf_hi "34.888248"; cov "0.990826";
+chr2 Cufflinks transcript 106644220 106644341 1000 . . gene_id "CUFF.148977"; transcript_id "CUFF.148977.1"; FPKM "27.2743167045"; frac "1.000000"; conf_lo "6.656871"; conf_hi "47.891762"; cov "1.549180";
+chr2 Cufflinks transcript 118960859 118961004 1000 . . gene_id "CUFF.150015"; transcript_id "CUFF.150015.1"; FPKM "9.7675145928"; frac "1.000000"; conf_lo "0.000000"; conf_hi "21.046069"; cov "0.554795";
+chr2 Cufflinks exon 125388931 125389219 1000 . . gene_id "CUFF.151331"; transcript_id "CUFF.151331.1"; exon_number "1"; FPKM "23.0274507817"; frac "1.000000"; conf_lo "10.718761"; conf_hi "35.336141"; cov "1.307958";
+chr2 Cufflinks transcript 145141669 145141755 1000 . . gene_id "CUFF.153993"; transcript_id "CUFF.153993.1"; FPKM "10.9276408471"; frac "1.000000"; conf_lo "0.000000"; conf_hi "26.381659"; cov "0.620690";
+chr2 Cufflinks exon 178035510 178035611 1000 . . gene_id "CUFF.158329"; transcript_id "CUFF.158329.1"; exon_number "1"; FPKM "9.3206348402"; frac "1.000000"; conf_lo "0.000000"; conf_hi "22.502003"; cov "0.529412";
+chr2 Cufflinks transcript 181047445 181047471 1000 . . gene_id "CUFF.158989"; transcript_id "CUFF.158989.1"; FPKM "17.6056435870"; frac "1.000000"; conf_lo "0.000000"; conf_hi "52.816931"; cov "1.000000";
+chr3 Cufflinks transcript 55664118 55664197 1000 . . gene_id "CUFF.163141"; transcript_id "CUFF.163141.1"; FPKM "11.8838094213"; frac "1.000000"; conf_lo "0.000000"; conf_hi "28.690054"; cov "0.675000";
+chr3 Cufflinks exon 66896354 66896433 1000 . . gene_id "CUFF.163935"; transcript_id "CUFF.163935.1"; exon_number "1"; FPKM "5.9419047106"; frac "1.000000"; conf_lo "0.000000"; conf_hi "17.825714"; cov "0.337500";
+chr3 Cufflinks transcript 80648745 80648771 1000 . . gene_id "CUFF.164995"; transcript_id "CUFF.164995.1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr3 Cufflinks exon 107424385 107424452 1000 . . gene_id "CUFF.169311"; transcript_id "CUFF.169311.1"; exon_number "1"; FPKM "13.9809522603"; frac "1.000000"; conf_lo "0.000000"; conf_hi "33.753005"; cov "0.794118";
+chr3 Cufflinks transcript 130936639 130936898 1000 . . gene_id "CUFF.171349"; transcript_id "CUFF.171349.1"; FPKM "20.1110620975"; frac "1.000000"; conf_lo "7.983635"; conf_hi "32.238489"; cov "1.142308";
+chr3 Cufflinks exon 136592671 136592771 1000 . . gene_id "CUFF.171861"; transcript_id "CUFF.171861.1"; exon_number "1"; FPKM "32.9452142371"; frac "1.000000"; conf_lo "8.040973"; conf_hi "57.849455"; cov "1.871287";
+chr3 Cufflinks transcript 152641383 152641451 1000 . . gene_id "CUFF.172987"; transcript_id "CUFF.172987.1"; FPKM "20.6674946457"; frac "1.000000"; conf_lo "0.000000"; conf_hi "44.532262"; cov "1.173913";
+chr3 Cufflinks transcript 152861374 152861508 1000 . . gene_id "CUFF.173007"; transcript_id "CUFF.173007.1"; FPKM "24.6479010219"; frac "1.000000"; conf_lo "6.015839"; conf_hi "43.279963"; cov "1.400000";
+chr3 Cufflinks transcript 157698536 157698562 1000 . . gene_id "CUFF.173579"; transcript_id "CUFF.173579.1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr4 Cufflinks exon 13715310 13715630 1000 . . gene_id "CUFF.174817"; transcript_id "CUFF.174817.1"; exon_number "1"; FPKM "19.2510308382"; frac "1.000000"; conf_lo "8.572480"; conf_hi "29.929581"; cov "1.093458";
+chr4 Cufflinks transcript 62063768 62063821 1000 . . gene_id "CUFF.179577"; transcript_id "CUFF.179577.1"; FPKM "26.3875633685"; frac "1.000000"; conf_lo "0.000000"; conf_hi "56.869362"; cov "1.498813";
+chr4 Cufflinks transcript 77180436 77180462 1000 . . gene_id "CUFF.181019"; transcript_id "CUFF.181019.1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr4 Cufflinks transcript 102112070 102112096 1000 . . gene_id "CUFF.183381"; transcript_id "CUFF.183381.1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr4 Cufflinks exon 117233771 117233830 1000 + . gene_id "CUFF.185373"; transcript_id "CUFF.185373.1"; exon_number "1"; FPKM "4.8015391601"; frac "1.000000"; conf_lo "0.000000"; conf_hi "14.404617"; cov "0.272727";
+chr4 Cufflinks exon 135563059 135563110 1000 . . gene_id "CUFF.189099"; transcript_id "CUFF.189099.1"; exon_number "1"; FPKM "18.2827837250"; frac "1.000000"; conf_lo "0.000000"; conf_hi "44.138544"; cov "1.038462";
+chr4 Cufflinks exon 147515029 147515097 1000 . . gene_id "CUFF.190627"; transcript_id "CUFF.190627.1"; exon_number "1"; FPKM "34.4458244094"; frac "1.000000"; conf_lo "3.636542"; conf_hi "65.255106"; cov "1.956522";
+chr5 Cufflinks exon 3949522 3949685 1000 . . gene_id "CUFF.192485"; transcript_id "CUFF.192485.1"; exon_number "1"; FPKM "23.1879208220"; frac "1.000000"; conf_lo "6.791585"; conf_hi "39.584257"; cov "1.317073";
+chr5 Cufflinks exon 22635516 22635542 1000 . . gene_id "CUFF.194445"; transcript_id "CUFF.194445.1"; exon_number "1"; FPKM "52.8169307611"; frac "1.000000"; conf_lo "0.000000"; conf_hi "113.804669"; cov "3.000000";
+chr5 Cufflinks exon 34172212 34172238 1000 . . gene_id "CUFF.196463"; transcript_id "CUFF.196463.1"; exon_number "1"; FPKM "17.6056435870"; frac "1.000000"; conf_lo "0.000000"; conf_hi "52.816931"; cov "1.000000";
+chr5 Cufflinks transcript 35362816 35362905 1000 . . gene_id "CUFF.196905"; transcript_id "CUFF.196905.1"; FPKM "10.5633861522"; frac "1.000000"; conf_lo "0.000000"; conf_hi "25.502270"; cov "0.600000";
+chr5 Cufflinks transcript 37083127 37083166 1000 . . gene_id "CUFF.197139"; transcript_id "CUFF.197139.1"; FPKM "23.7676188425"; frac "1.000000"; conf_lo "0.000000"; conf_hi "57.380108"; cov "1.350000";
+chr5 Cufflinks transcript 68089694 68089831 1000 . . gene_id "CUFF.199409"; transcript_id "CUFF.199409.1"; FPKM "17.2229122047"; frac "1.000000"; conf_lo "1.818271"; conf_hi "32.627553"; cov "0.978261";
+chr5 Cufflinks exon 98615179 98615254 1000 . . gene_id "CUFF.201693"; transcript_id "CUFF.201693.1"; exon_number "1"; FPKM "12.5092730750"; frac "1.000000"; conf_lo "0.000000"; conf_hi "30.200057"; cov "0.710526";
+chr5 Cufflinks exon 105915104 105915181 1000 . . gene_id "CUFF.202385"; transcript_id "CUFF.202385.1"; exon_number "1"; FPKM "12.1885224833"; frac "1.000000"; conf_lo "0.000000"; conf_hi "29.425696"; cov "0.692308";
+chr5 Cufflinks transcript 116136788 116136814 1000 . . gene_id "CUFF.204349"; transcript_id "CUFF.204349.1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr5 Cufflinks exon 122819526 122819619 1000 . . gene_id "CUFF.205487"; transcript_id "CUFF.205487.1"; exon_number "1"; FPKM "25.2486782797"; frac "1.000000"; conf_lo "2.649470"; conf_hi "47.847887"; cov "1.434124";
+chr5 Cufflinks exon 132055557 132055583 1000 . . gene_id "CUFF.207163"; transcript_id "CUFF.207163.1"; exon_number "1"; FPKM "52.8169307611"; frac "1.000000"; conf_lo "0.000000"; conf_hi "113.804669"; cov "3.000000";
+chr5 Cufflinks transcript 145619548 145619710 1000 . . gene_id "CUFF.209965"; transcript_id "CUFF.209965.1"; FPKM "40.8278115086"; frac "1.000000"; conf_lo "19.004428"; conf_hi "62.651195"; cov "2.319018";
+chr6 Cufflinks exon 48466822 48466848 1000 . . gene_id "CUFF.215907"; transcript_id "CUFF.215907.1"; exon_number "1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr6 Cufflinks exon 63803818 63803844 1000 . . gene_id "CUFF.217337"; transcript_id "CUFF.217337.1"; exon_number "1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr6 Cufflinks transcript 77393088 77393138 1000 . . gene_id "CUFF.218387"; transcript_id "CUFF.218387.1"; FPKM "18.6412696804"; frac "1.000000"; conf_lo "0.000000"; conf_hi "45.004006"; cov "1.058824";
+chr6 Cufflinks transcript 82379452 82379478 1000 . . gene_id "CUFF.218947"; transcript_id "CUFF.218947.1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr6 Cufflinks exon 83928984 83929105 1000 . . gene_id "CUFF.219317"; transcript_id "CUFF.219317.1"; exon_number "1"; FPKM "46.7559714935"; frac "1.000000"; conf_lo "19.761399"; conf_hi "73.750544"; cov "2.655738";
+chr6 Cufflinks exon 103658447 103658521 1000 . . gene_id "CUFF.221849"; transcript_id "CUFF.221849.1"; exon_number "1"; FPKM "19.0140950740"; frac "1.000000"; conf_lo "0.000000"; conf_hi "40.969681"; cov "1.080000";
+chr6 Cufflinks exon 113781332 113781358 1000 . . gene_id "CUFF.222775"; transcript_id "CUFF.222775.1"; exon_number "1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr6 Cufflinks exon 118857949 118858148 1000 . . gene_id "CUFF.223543"; transcript_id "CUFF.223543.1"; exon_number "1"; FPKM "19.0140950740"; frac "1.000000"; conf_lo "5.569100"; conf_hi "32.459091"; cov "1.080000";
+chr6 Cufflinks transcript 124996314 124996340 1000 . . gene_id "CUFF.224545"; transcript_id "CUFF.224545.1"; FPKM "17.6056435870"; frac "1.000000"; conf_lo "0.000000"; conf_hi "52.816931"; cov "1.000000";
+chr6 Cufflinks transcript 127077329 127077364 1000 . . gene_id "CUFF.225409"; transcript_id "CUFF.225409.1"; FPKM "52.8169307611"; frac "1.000000"; conf_lo "0.000000"; conf_hi "105.633862"; cov "3.000000";
+chr6 Cufflinks exon 136038245 136038304 1000 . . gene_id "CUFF.225521"; transcript_id "CUFF.225521.1"; exon_number "1"; FPKM "23.7676188425"; frac "1.000000"; conf_lo "0.000000"; conf_hi "51.212101"; cov "1.350000";
+chr7 Cufflinks exon 13845893 13845919 1000 . . gene_id "CUFF.227869"; transcript_id "CUFF.227869.1"; exon_number "1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr7 Cufflinks exon 56060938 56061023 1000 . . gene_id "CUFF.232920"; transcript_id "CUFF.232920.1"; exon_number "1"; FPKM "11.0547064384"; frac "1.000000"; conf_lo "0.000000"; conf_hi "26.688422"; cov "0.627907";
+chr7 Cufflinks exon 71484947 71484992 1000 . . gene_id "CUFF.234766"; transcript_id "CUFF.234766.1"; exon_number "1"; FPKM "20.6674946457"; frac "1.000000"; conf_lo "0.000000"; conf_hi "49.895746"; cov "1.173913";
+chr7 Cufflinks transcript 71784522 71784548 1000 . . gene_id "CUFF.234810"; transcript_id "CUFF.234810.1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr7 Cufflinks exon 72605044 72605070 1000 . . gene_id "CUFF.234948"; transcript_id "CUFF.234948.1"; exon_number "1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr7 Cufflinks transcript 85554210 85554343 1000 . . gene_id "CUFF.235778"; transcript_id "CUFF.235778.1"; FPKM "17.7370289869"; frac "1.000000"; conf_lo "1.872548"; conf_hi "33.601510"; cov "1.007463";
+chr7 Cufflinks transcript 98723325 98723416 1000 . . gene_id "CUFF.237594"; transcript_id "CUFF.237594.1"; FPKM "10.3337473228"; frac "1.000000"; conf_lo "0.000000"; conf_hi "24.947873"; cov "0.586957";
+chr7 Cufflinks exon 104055491 104055589 1000 . . gene_id "CUFF.238474"; transcript_id "CUFF.238474.1"; exon_number "1"; FPKM "28.8092349606"; frac "1.000000"; conf_lo "5.286593"; conf_hi "52.331877"; cov "1.636364";
+chr7 Cufflinks exon 107603711 107603748 1000 . . gene_id "CUFF.239180"; transcript_id "CUFF.239180.1"; exon_number "1"; FPKM "25.0185461500"; frac "1.000000"; conf_lo "0.000000"; conf_hi "60.400113"; cov "1.421053";
+chr7 Cufflinks exon 133792511 133792572 1000 . . gene_id "CUFF.242136"; transcript_id "CUFF.242136.1"; exon_number "1"; FPKM "15.3339476403"; frac "1.000000"; conf_lo "0.000000"; conf_hi "37.019424"; cov "0.870968";
+chr8 Cufflinks exon 9970398 9970545 1000 . . gene_id "CUFF.245320"; transcript_id "CUFF.245320.1"; exon_number "1"; FPKM "22.4828826889"; frac "1.000000"; conf_lo "5.487421"; conf_hi "39.478345"; cov "1.277027";
+chr8 Cufflinks transcript 10425062 10425088 1000 . . gene_id "CUFF.245408"; transcript_id "CUFF.245408.1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr8 Cufflinks transcript 13018897 13018981 1000 . . gene_id "CUFF.245840"; transcript_id "CUFF.245840.1"; FPKM "16.7771427124"; frac "1.000000"; conf_lo "0.000000"; conf_hi "36.149718"; cov "0.952941";
+chr8 Cufflinks transcript 14745123 14745149 1000 . . gene_id "CUFF.246146"; transcript_id "CUFF.246146.1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr8 Cufflinks exon 29820895 29820930 1000 . . gene_id "CUFF.247504"; transcript_id "CUFF.247504.1"; exon_number "1"; FPKM "26.4084653806"; frac "1.000000"; conf_lo "0.000000"; conf_hi "63.755675"; cov "1.500000";
+chr8 Cufflinks transcript 36676568 36676665 1000 . . gene_id "CUFF.248480"; transcript_id "CUFF.248480.1"; FPKM "9.7010689153"; frac "1.000000"; conf_lo "0.000000"; conf_hi "23.420452"; cov "0.551020";
+chr8 Cufflinks transcript 50146533 50146584 1000 . . gene_id "CUFF.249617"; transcript_id "CUFF.249617.1"; FPKM "27.4241755875"; frac "1.000000"; conf_lo "0.000000"; conf_hi "59.090886"; cov "1.557692";
+chr8 Cufflinks exon 51010775 51010850 1000 . . gene_id "CUFF.249695"; transcript_id "CUFF.249695.1"; exon_number "1"; FPKM "18.7639096125"; frac "1.000000"; conf_lo "0.000000"; conf_hi "40.430606"; cov "1.065789";
+chr8 Cufflinks exon 63391023 63391095 1000 . . gene_id "CUFF.250329"; transcript_id "CUFF.250329.1"; exon_number "1"; FPKM "13.0233527904"; frac "1.000000"; conf_lo "0.000000"; conf_hi "31.441155"; cov "0.739726";
+chr8 Cufflinks transcript 73858591 73858706 1000 . . gene_id "CUFF.251697"; transcript_id "CUFF.251697.1"; FPKM "12.2935959530"; frac "1.000000"; conf_lo "0.000000"; conf_hi "26.489018"; cov "0.698276";
+chr8 Cufflinks transcript 75514699 75514725 1000 . . gene_id "CUFF.252263"; transcript_id "CUFF.252263.1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr8 Cufflinks exon 86101515 86101548 1000 . . gene_id "CUFF.252891"; transcript_id "CUFF.252891.1"; exon_number "1"; FPKM "27.9619045206"; frac "1.000000"; conf_lo "0.000000"; conf_hi "67.506009"; cov "1.588235";
+chr8 Cufflinks transcript 93627215 93627241 1000 . . gene_id "CUFF.254225"; transcript_id "CUFF.254225.1"; FPKM "52.8169307611"; frac "1.000000"; conf_lo "0.000000"; conf_hi "113.804669"; cov "3.000000";
+chr8 Cufflinks exon 108148187 108148357 1000 . . gene_id "CUFF.255477"; transcript_id "CUFF.255477.1"; exon_number "1"; FPKM "11.1193538445"; frac "1.000000"; conf_lo "0.000000"; conf_hi "22.238708"; cov "0.631579";
+chr8 Cufflinks exon 108190587 108190664 1000 . . gene_id "CUFF.255507"; transcript_id "CUFF.255507.1"; exon_number "1"; FPKM "12.1885224833"; frac "1.000000"; conf_lo "0.000000"; conf_hi "29.425696"; cov "0.692308";
+chr8 Cufflinks exon 120931685 120931769 1000 . . gene_id "CUFF.257375"; transcript_id "CUFF.257375.1"; exon_number "1"; FPKM "16.7771427124"; frac "1.000000"; conf_lo "0.000000"; conf_hi "36.149718"; cov "0.952941";
+chr9 Cufflinks transcript 20449846 20449932 1000 . . gene_id "CUFF.260747"; transcript_id "CUFF.260747.1"; FPKM "234.9313045507"; frac "1.000000"; conf_lo "163.275950"; conf_hi "306.586659"; cov "13.344091";
+chr9 Cufflinks exon 25083606 25083643 1000 . . gene_id "CUFF.261551"; transcript_id "CUFF.261551.1"; exon_number "1"; FPKM "25.0185461500"; frac "1.000000"; conf_lo "0.000000"; conf_hi "60.400113"; cov "1.421053";
+chr9 Cufflinks transcript 27906894 27906964 1000 . . gene_id "CUFF.261925"; transcript_id "CUFF.261925.1"; FPKM "26.7804155972"; frac "1.000000"; conf_lo "0.000000"; conf_hi "53.560831"; cov "1.521127";
+chr9 Cufflinks transcript 34418034 34418065 1000 . . gene_id "CUFF.262975"; transcript_id "CUFF.262975.1"; FPKM "29.7095235531"; frac "1.000000"; conf_lo "0.000000"; conf_hi "71.725135"; cov "1.687500";
+chr9 Cufflinks exon 34710789 34710815 1000 . . gene_id "CUFF.263065"; transcript_id "CUFF.263065.1"; exon_number "1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr9 Cufflinks transcript 40823051 40823090 1000 . . gene_id "CUFF.263747"; transcript_id "CUFF.263747.1"; FPKM "23.7676188425"; frac "1.000000"; conf_lo "0.000000"; conf_hi "57.380108"; cov "1.350000";
+chr9 Cufflinks exon 59236547 59236671 1000 . . gene_id "CUFF.267045"; transcript_id "CUFF.267045.1"; exon_number "1"; FPKM "12.1905895442"; frac "1.000000"; conf_lo "0.000000"; conf_hi "25.808020"; cov "0.692425";
+chr9 Cufflinks transcript 66418162 66418188 1000 . . gene_id "CUFF.268423"; transcript_id "CUFF.268423.1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr9 Cufflinks transcript 95913236 95913262 1000 . . gene_id "CUFF.270957"; transcript_id "CUFF.270957.1"; FPKM "35.2112871741"; frac "1.000000"; conf_lo "0.000000"; conf_hi "85.007567"; cov "2.000000";
+chr9 Cufflinks exon 103101949 103102030 1000 . . gene_id "CUFF.271979"; transcript_id "CUFF.271979.1"; exon_number "1"; FPKM "11.5939604110"; frac "1.000000"; conf_lo "0.000000"; conf_hi "27.990296"; cov "0.658537";
+chr9 Cufflinks transcript 105579135 105579173 1000 . . gene_id "CUFF.272347"; transcript_id "CUFF.272347.1"; FPKM "24.3770449667"; frac "1.000000"; conf_lo "0.000000"; conf_hi "58.851393"; cov "1.384615";
+chr9 Cufflinks exon 107445870 107445930 1000 . . gene_id "CUFF.272761"; transcript_id "CUFF.272761.1"; exon_number "1"; FPKM "38.9633095779"; frac "1.000000"; conf_lo "4.113466"; conf_hi "73.813153"; cov "2.213115";
+chr9 Cufflinks exon 113779194 113779220 1000 . . gene_id "CUFF.274445"; transcript_id "CUFF.274445.1"; exon_number "1"; FPKM "52.8169307611"; frac "1.000000"; conf_lo "0.000000"; conf_hi "113.804669"; cov "3.000000";
+chr9 Cufflinks transcript 120860476 120860606 1000 . . gene_id "CUFF.275115"; transcript_id "CUFF.275115.1"; FPKM "25.4005086867"; frac "1.000000"; conf_lo "6.199529"; conf_hi "44.601488"; cov "1.442748";
+chrX Cufflinks exon 10274057 10274087 1000 . . gene_id "CUFF.276147"; transcript_id "CUFF.276147.1"; exon_number "1"; FPKM "99.5432248142"; frac "1.000000"; conf_lo "21.405127"; conf_hi "177.681323"; cov "5.654052";
+chrX Cufflinks transcript 39881431 39881678 1000 . . gene_id "CUFF.277419"; transcript_id "CUFF.277419.1"; FPKM "42.1683560109"; frac "1.000000"; conf_lo "24.187709"; conf_hi "60.149003"; cov "2.395161";
+chrX Cufflinks transcript 90114645 90131913 1000 - . gene_id "CUFF.279771"; transcript_id "CUFF.279771.1"; FPKM "6.8891648819"; frac "1.000000"; conf_lo "0.000000"; conf_hi "20.667495"; cov "0.391304";
+chrX Cufflinks transcript 148249672 148249713 1000 . . gene_id "CUFF.282847"; transcript_id "CUFF.282847.1"; FPKM "56.5895686726"; frac "1.000000"; conf_lo "5.974320"; conf_hi "107.204818"; cov "3.214286";
+chrX Cufflinks transcript 148481505 148482455 1000 + . gene_id "CUFF.282965"; transcript_id "CUFF.282965.1"; FPKM "40.1706233958"; frac "1.000000"; conf_lo "16.978103"; conf_hi "63.363144"; cov "2.281690";
+chrX Cufflinks transcript 158986411 158986471 1000 . . gene_id "CUFF.283831"; transcript_id "CUFF.283831.1"; FPKM "15.5853238312"; frac "1.000000"; conf_lo "0.000000"; conf_hi "37.626300"; cov "0.885246";
\ No newline at end of file
diff -r e972d3f8413e -r b5391bd3e9c7 test-data/gff_filtering_out1.gff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/gff_filtering_out1.gff Fri May 14 10:15:48 2010 -0400
@@ -0,0 +1,46 @@
+chr10 Cufflinks transcript 62044837 62045189 1000 . . gene_id "CUFF.23531"; transcript_id "CUFF.23531.1"; FPKM "19.5178121606"; frac "1.000000"; conf_lo "9.264456"; conf_hi "29.771168"; cov "1.108611";
+chr10 Cufflinks transcript 75372919 75373002 1000 . . gene_id "CUFF.24985"; transcript_id "CUFF.24985.1"; FPKM "124.4970510798"; frac "1.000000"; conf_lo "71.411330"; conf_hi "177.582772"; cov "7.071429";
+chr10 Cufflinks transcript 80362428 80363292 1000 - . gene_id "CUFF.26065"; transcript_id "CUFF.26065.1"; FPKM "43.6170921216"; frac "1.000000"; conf_lo "32.260169"; conf_hi "54.974016"; cov "2.477449";
+chr11 Cufflinks transcript 7904565 7904642 1000 . . gene_id "CUFF.33508"; transcript_id "CUFF.33508.1"; FPKM "61.6484988869"; frac "1.000000"; conf_lo "22.882428"; conf_hi "100.414569"; cov "3.501633";
+chr11 Cufflinks exon 78140156 78140259 1000 . . gene_id "CUFF.43148"; transcript_id "CUFF.43148.1"; exon_number "1"; FPKM "54.8483511750"; frac "1.000000"; conf_lo "23.181641"; conf_hi "86.515061"; cov "3.115385";
+chr11 Cufflinks exon 105616462 105616737 1000 . . gene_id "CUFF.48385"; transcript_id "CUFF.48385.1"; exon_number "1"; FPKM "18.9452034252"; frac "1.000000"; conf_lo "7.520816"; conf_hi "30.369591"; cov "1.076087";
+chr12 Cufflinks exon 30701762 30702509 1000 . . gene_id "CUFF.53897"; transcript_id "CUFF.53897.1"; exon_number "1"; FPKM "48.9333329111"; frac "1.000000"; conf_lo "37.780391"; conf_hi "60.086275"; cov "2.779412";
+chr13 Cufflinks exon 49159496 49159569 1000 . . gene_id "CUFF.67788"; transcript_id "CUFF.67788.1"; exon_number "1"; FPKM "44.9657653777"; frac "1.000000"; conf_lo "10.974842"; conf_hi "78.956689"; cov "2.554054";
+chr13 Cufflinks transcript 100200304 100200330 1000 . . gene_id "CUFF.73108"; transcript_id "CUFF.73108.1"; FPKM "123.2395051093"; frac "1.000000"; conf_lo "30.079196"; conf_hi "216.399814"; cov "7.000000";
+chr14 Cufflinks transcript 31949103 31949152 1000 . . gene_id "CUFF.77316"; transcript_id "CUFF.77316.1"; FPKM "85.5634278330"; frac "1.000000"; conf_lo "28.521143"; conf_hi "142.605713"; cov "4.860000";
+chr14 Cufflinks exon 67604227 67604668 1000 . . gene_id "CUFF.81446"; transcript_id "CUFF.81446.1"; exon_number "1"; FPKM "123.6776546104"; frac "1.000000"; conf_lo "100.611653"; conf_hi "146.743656"; cov "7.024887";
+chr14 Cufflinks exon 75165582 75165744 1000 . . gene_id "CUFF.82088"; transcript_id "CUFF.82088.1"; exon_number "1"; FPKM "20.4139057543"; frac "1.000000"; conf_lo "4.982443"; conf_hi "35.845368"; cov "1.159509";
+chr16 Cufflinks transcript 57154027 57154067 1000 . . gene_id "CUFF.103364"; transcript_id "CUFF.103364.1"; FPKM "162.3154457537"; frac "1.000000"; conf_lo "75.554191"; conf_hi "249.076701"; cov "9.219512";
+chr16 Cufflinks exon 74862302 74862560 1000 . . gene_id "CUFF.105450"; transcript_id "CUFF.105450.1"; exon_number "1"; FPKM "11.0120241741"; frac "1.000000"; conf_lo "2.020744"; conf_hi "20.003304"; cov "0.625483";
+chr16 Cufflinks transcript 98168779 98168914 1000 . . gene_id "CUFF.107834"; transcript_id "CUFF.107834.1"; FPKM "24.4666664555"; frac "1.000000"; conf_lo "5.971605"; conf_hi "42.961728"; cov "1.389706";
+chr17 Cufflinks exon 8483212 8483268 1000 . . gene_id "CUFF.108498"; transcript_id "CUFF.108498.1"; exon_number "1"; FPKM "50.0370923000"; frac "1.000000"; conf_lo "9.181978"; conf_hi "90.892207"; cov "2.842105";
+chr17 Cufflinks exon 30355791 30355913 1000 . . gene_id "CUFF.111759"; transcript_id "CUFF.111759.1"; exon_number "1"; FPKM "19.3232673516"; frac "1.000000"; conf_lo "2.040012"; conf_hi "36.606523"; cov "1.097561";
+chr18 Cufflinks transcript 39571718 39571880 1000 . . gene_id "CUFF.123569"; transcript_id "CUFF.123569.1"; FPKM "20.4139057543"; frac "1.000000"; conf_lo "4.982443"; conf_hi "35.845368"; cov "1.159509";
+chr19 Cufflinks exon 17633088 17633203 1000 . . gene_id "CUFF.131333"; transcript_id "CUFF.131333.1"; exon_number "1"; FPKM "20.4893265884"; frac "1.000000"; conf_lo "2.163116"; conf_hi "38.815537"; cov "1.163793";
+chr19 Cufflinks transcript 41997624 41997859 1000 . . gene_id "CUFF.133569"; transcript_id "CUFF.133569.1"; FPKM "28.1988698132"; frac "1.000000"; conf_lo "13.125940"; conf_hi "43.271800"; cov "1.601695";
+chr19 Cufflinks exon 56516515 56516684 1000 . . gene_id "CUFF.135203"; transcript_id "CUFF.135203.1"; exon_number "1"; FPKM "33.5542854247"; frac "1.000000"; conf_lo "14.181710"; conf_hi "52.926861"; cov "1.905882";
+chr2 Cufflinks transcript 4543774 4543977 1000 . . gene_id "CUFF.136435"; transcript_id "CUFF.136435.1"; FPKM "37.2825393608"; frac "1.000000"; conf_lo "18.641270"; conf_hi "55.923809"; cov "2.117647";
+chr2 Cufflinks transcript 30200331 30200938 1000 . . gene_id "CUFF.140289"; transcript_id "CUFF.140289.1"; FPKM "100.0741846001"; frac "1.000000"; conf_lo "82.383401"; conf_hi "117.764968"; cov "5.684211";
+chr2 Cufflinks transcript 106644220 106644341 1000 . . gene_id "CUFF.148977"; transcript_id "CUFF.148977.1"; FPKM "27.2743167045"; frac "1.000000"; conf_lo "6.656871"; conf_hi "47.891762"; cov "1.549180";
+chr2 Cufflinks exon 125388931 125389219 1000 . . gene_id "CUFF.151331"; transcript_id "CUFF.151331.1"; exon_number "1"; FPKM "23.0274507817"; frac "1.000000"; conf_lo "10.718761"; conf_hi "35.336141"; cov "1.307958";
+chr3 Cufflinks transcript 130936639 130936898 1000 . . gene_id "CUFF.171349"; transcript_id "CUFF.171349.1"; FPKM "20.1110620975"; frac "1.000000"; conf_lo "7.983635"; conf_hi "32.238489"; cov "1.142308";
+chr3 Cufflinks exon 136592671 136592771 1000 . . gene_id "CUFF.171861"; transcript_id "CUFF.171861.1"; exon_number "1"; FPKM "32.9452142371"; frac "1.000000"; conf_lo "8.040973"; conf_hi "57.849455"; cov "1.871287";
+chr3 Cufflinks transcript 152861374 152861508 1000 . . gene_id "CUFF.173007"; transcript_id "CUFF.173007.1"; FPKM "24.6479010219"; frac "1.000000"; conf_lo "6.015839"; conf_hi "43.279963"; cov "1.400000";
+chr4 Cufflinks exon 13715310 13715630 1000 . . gene_id "CUFF.174817"; transcript_id "CUFF.174817.1"; exon_number "1"; FPKM "19.2510308382"; frac "1.000000"; conf_lo "8.572480"; conf_hi "29.929581"; cov "1.093458";
+chr4 Cufflinks exon 147515029 147515097 1000 . . gene_id "CUFF.190627"; transcript_id "CUFF.190627.1"; exon_number "1"; FPKM "34.4458244094"; frac "1.000000"; conf_lo "3.636542"; conf_hi "65.255106"; cov "1.956522";
+chr5 Cufflinks exon 3949522 3949685 1000 . . gene_id "CUFF.192485"; transcript_id "CUFF.192485.1"; exon_number "1"; FPKM "23.1879208220"; frac "1.000000"; conf_lo "6.791585"; conf_hi "39.584257"; cov "1.317073";
+chr5 Cufflinks transcript 68089694 68089831 1000 . . gene_id "CUFF.199409"; transcript_id "CUFF.199409.1"; FPKM "17.2229122047"; frac "1.000000"; conf_lo "1.818271"; conf_hi "32.627553"; cov "0.978261";
+chr5 Cufflinks exon 122819526 122819619 1000 . . gene_id "CUFF.205487"; transcript_id "CUFF.205487.1"; exon_number "1"; FPKM "25.2486782797"; frac "1.000000"; conf_lo "2.649470"; conf_hi "47.847887"; cov "1.434124";
+chr5 Cufflinks transcript 145619548 145619710 1000 . . gene_id "CUFF.209965"; transcript_id "CUFF.209965.1"; FPKM "40.8278115086"; frac "1.000000"; conf_lo "19.004428"; conf_hi "62.651195"; cov "2.319018";
+chr6 Cufflinks exon 83928984 83929105 1000 . . gene_id "CUFF.219317"; transcript_id "CUFF.219317.1"; exon_number "1"; FPKM "46.7559714935"; frac "1.000000"; conf_lo "19.761399"; conf_hi "73.750544"; cov "2.655738";
+chr6 Cufflinks exon 118857949 118858148 1000 . . gene_id "CUFF.223543"; transcript_id "CUFF.223543.1"; exon_number "1"; FPKM "19.0140950740"; frac "1.000000"; conf_lo "5.569100"; conf_hi "32.459091"; cov "1.080000";
+chr7 Cufflinks transcript 85554210 85554343 1000 . . gene_id "CUFF.235778"; transcript_id "CUFF.235778.1"; FPKM "17.7370289869"; frac "1.000000"; conf_lo "1.872548"; conf_hi "33.601510"; cov "1.007463";
+chr7 Cufflinks exon 104055491 104055589 1000 . . gene_id "CUFF.238474"; transcript_id "CUFF.238474.1"; exon_number "1"; FPKM "28.8092349606"; frac "1.000000"; conf_lo "5.286593"; conf_hi "52.331877"; cov "1.636364";
+chr8 Cufflinks exon 9970398 9970545 1000 . . gene_id "CUFF.245320"; transcript_id "CUFF.245320.1"; exon_number "1"; FPKM "22.4828826889"; frac "1.000000"; conf_lo "5.487421"; conf_hi "39.478345"; cov "1.277027";
+chr9 Cufflinks transcript 20449846 20449932 1000 . . gene_id "CUFF.260747"; transcript_id "CUFF.260747.1"; FPKM "234.9313045507"; frac "1.000000"; conf_lo "163.275950"; conf_hi "306.586659"; cov "13.344091";
+chr9 Cufflinks exon 107445870 107445930 1000 . . gene_id "CUFF.272761"; transcript_id "CUFF.272761.1"; exon_number "1"; FPKM "38.9633095779"; frac "1.000000"; conf_lo "4.113466"; conf_hi "73.813153"; cov "2.213115";
+chr9 Cufflinks transcript 120860476 120860606 1000 . . gene_id "CUFF.275115"; transcript_id "CUFF.275115.1"; FPKM "25.4005086867"; frac "1.000000"; conf_lo "6.199529"; conf_hi "44.601488"; cov "1.442748";
+chrX Cufflinks exon 10274057 10274087 1000 . . gene_id "CUFF.276147"; transcript_id "CUFF.276147.1"; exon_number "1"; FPKM "99.5432248142"; frac "1.000000"; conf_lo "21.405127"; conf_hi "177.681323"; cov "5.654052";
+chrX Cufflinks transcript 39881431 39881678 1000 . . gene_id "CUFF.277419"; transcript_id "CUFF.277419.1"; FPKM "42.1683560109"; frac "1.000000"; conf_lo "24.187709"; conf_hi "60.149003"; cov "2.395161";
+chrX Cufflinks transcript 148249672 148249713 1000 . . gene_id "CUFF.282847"; transcript_id "CUFF.282847.1"; FPKM "56.5895686726"; frac "1.000000"; conf_lo "5.974320"; conf_hi "107.204818"; cov "3.214286";
+chrX Cufflinks transcript 148481505 148482455 1000 + . gene_id "CUFF.282965"; transcript_id "CUFF.282965.1"; FPKM "40.1706233958"; frac "1.000000"; conf_lo "16.978103"; conf_hi "63.363144"; cov "2.281690";
diff -r e972d3f8413e -r b5391bd3e9c7 tool_conf.xml.sample
--- a/tool_conf.xml.sample Thu May 13 15:35:41 2010 -0400
+++ b/tool_conf.xml.sample Fri May 14 10:15:48 2010 -0400
@@ -237,11 +237,14 @@
<tool file="sr_mapping/PerM.xml" />
</section>
<section name="NGS: Expression Analysis" id="ngs-rna-tools">
- <tool file="ngs_rna/tophat_wrapper.xml" />
- <tool file="ngs_rna/cufflinks_wrapper.xml" />
- <tool file="ngs_rna/cuffcompare_wrapper.xml" />
- <tool file="ngs_rna/cuffdiff_wrapper.xml" />
- <tool file="ngs_rna/filter_transcripts_via_tracking.xml" />
+ <label text="RNA-seq" id="rna_seq" />
+ <tool file="ngs_rna/tophat_wrapper.xml" />
+ <tool file="ngs_rna/cufflinks_wrapper.xml" />
+ <tool file="ngs_rna/cuffcompare_wrapper.xml" />
+ <tool file="ngs_rna/cuffdiff_wrapper.xml" />
+ <label text="Filtering" id="filtering" />
+ <tool file="ngs_rna/filter_transcripts_via_tracking.xml" />
+ <tool file="ngs_rna/gff_filtering.xml" />
</section>
<section name="NGS: SAM Tools" id="samtools">
<tool file="samtools/sam_bitwise_flag_filter.xml" />
diff -r e972d3f8413e -r b5391bd3e9c7 tools/ngs_rna/gff_filtering.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/ngs_rna/gff_filtering.py Fri May 14 10:15:48 2010 -0400
@@ -0,0 +1,137 @@
+#!/usr/bin/env python
+# This tool takes a gff file as input and creates filters on attributes based on certain properties.
+# The tool will skip over invalid lines within the file, informing the user about the number of lines skipped.
+# TODO: much of this code is copied from the Filter1 tool (filtering.py in this directory). The commonalities should be
+# abstracted and leveraged in each filtering tool.
+
+from __future__ import division
+import sys, re, os.path
+
+# Older py compatibility
+try:
+ set()
+except:
+ from sets import Set as set
+
+assert sys.version_info[:2] >= ( 2, 4 )
+
+def get_operands( filter_condition ):
+ # Note that the order of all_operators is important
+ items_to_strip = ['+', '-', '**', '*', '//', '/', '%', '<<', '>>', '&', '|', '^', '~', '<=', '<', '>=', '>', '==', '!=', '<>', ' and ', ' or ', ' not ', ' is ', ' is not ', ' in ', ' not in ']
+ for item in items_to_strip:
+ if filter_condition.find( item ) >= 0:
+ filter_condition = filter_condition.replace( item, ' ' )
+ operands = set( filter_condition.split( ' ' ) )
+ return operands
+
+def stop_err( msg ):
+ sys.stderr.write( msg )
+ sys.exit()
+
+in_fname = sys.argv[1]
+out_fname = sys.argv[2]
+attribute_type = sys.argv[3]
+attribute_name = sys.argv[4]
+cond_text = sys.argv[5]
+
+# Unescape if input has been escaped
+mapped_str = {
+ '__lt__': '<',
+ '__le__': '<=',
+ '__eq__': '==',
+ '__ne__': '!=',
+ '__gt__': '>',
+ '__ge__': '>=',
+ '__sq__': '\'',
+ '__dq__': '"',
+}
+for key, value in mapped_str.items():
+ cond_text = cond_text.replace( key, value )
+
+# Add attribute name to condition text.
+cond_text = attribute_name + cond_text
+
+# Attempt to determine if the condition includes executable stuff and, if so, exit
+secured = dir()
+operands = get_operands(cond_text)
+for operand in operands:
+ try:
+ check = int( operand )
+ except:
+ if operand in secured:
+ stop_err( "Illegal value '%s' in condition '%s'" % ( operand, cond_text ) )
+
+# Set up assignment.
+assignment = "%s = attributes[ '%s' ]" % ( attribute_name, attribute_name )
+
+# Set up type casting based on attribute type.
+type_cast = "%s = %s(%s)" % ( attribute_name, attribute_type, attribute_name)
+
+# Stats
+skipped_lines = 0
+first_invalid_line = 0
+invalid_line = None
+lines_kept = 0
+total_lines = 0
+out = open( out_fname, 'wt' )
+
+# Read and filter input file, skipping invalid lines
+code = '''
+for i, line in enumerate( file( in_fname ) ):
+ total_lines += 1
+ line = line.rstrip( '\\r\\n' )
+ if not line or line.startswith( '#' ):
+ skipped_lines += 1
+ if not invalid_line:
+ first_invalid_line = i + 1
+ invalid_line = line
+ continue
+ try:
+ # GTF format: chrom source, name, chromStart, chromEnd, score, strand, frame, attributes.
+ # Attributes format: name1 "value1" ; name2 "value2" ; ...
+ elems = line.split( '\t' )
+ attributes_list = elems[8].split(";")
+ attributes = {}
+ for name_value_pair in attributes_list:
+ pair = name_value_pair.strip().split(" ")
+ if pair == '':
+ continue
+ name = pair[0].strip()
+ if name == '':
+ continue
+ # Need to strip double quote from values
+ value = pair[1].strip(" \\"")
+ attributes[name] = value
+ %s
+ %s
+ if %s:
+ lines_kept += 1
+ print >> out, line
+ except:
+ skipped_lines += 1
+ if not invalid_line:
+ first_invalid_line = i + 1
+ invalid_line = line
+''' % ( assignment, type_cast, cond_text )
+
+valid_filter = True
+try:
+ exec code
+except Exception, e:
+ out.close()
+ if str( e ).startswith( 'invalid syntax' ):
+ valid_filter = False
+ stop_err( 'Filter condition "%s" likely invalid. See tool tips, syntax and examples.' % cond_text )
+ else:
+ stop_err( str( e ) )
+
+if valid_filter:
+ out.close()
+ valid_lines = total_lines - skipped_lines
+ print 'Filtering with %s, ' % ( cond_text )
+ if valid_lines > 0:
+ print 'kept %4.2f%% of %d lines.' % ( 100.0*lines_kept/valid_lines, total_lines )
+ else:
+ print 'Possible invalid filter condition "%s" or non-existent column referenced. See tool tips, syntax and examples.' % cond_text
+ if skipped_lines > 0:
+ print 'Skipped %d invalid lines starting at line #%d: "%s"' % ( skipped_lines, first_invalid_line, invalid_line )
diff -r e972d3f8413e -r b5391bd3e9c7 tools/ngs_rna/gff_filtering.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/ngs_rna/gff_filtering.xml Fri May 14 10:15:48 2010 -0400
@@ -0,0 +1,58 @@
+<tool id="gff_filtering" name="Filter GFF" version="0.1">
+ <description>file on any attribute using simple expressions</description>
+ <command interpreter="python">
+ gff_filtering.py $input $out_file1 "$attribute_type" "$attribute_name" "$cond"
+ </command>
+ <inputs>
+ <param format="gff" name="input" type="data" label="Filter" help="Query missing? See TIP below."/>
+ <param name="attribute_name" size="40" type="text" label="Attribute name" help="">
+ <validator type="empty_field" message="Enter a valid attribute name."/>
+ </param>
+ <param name="attribute_type" type="select" label="Attribute type">
+ <option value="float">Float</option>
+ <option value="integer">Integer</option>
+ <option value="str">String</option>
+ </param>
+ <param name="cond" size="40" type="text" value=">0" label="With following condition" help="Double equal signs, ==, must be used as shown above. To filter for an arbitrary string, use the Select tool.">
+ <validator type="empty_field" message="Enter a valid filtering condition, see syntax and examples below."/>
+ </param>
+ </inputs>
+ <outputs>
+ <data format="input" name="out_file1" metadata_source="input"/>
+ </outputs>
+ <tests>
+ <test>
+ <param name="input" value="gff_filtering_in1.gff"/>
+ <param name="attribute_name" value="conf_lo"/>
+ <param name="attribute_type" value="float"/>
+ <param name="cond" value=">0"/>
+ <output name="out_file1" file="gff_filtering_out1.gff"/>
+ </test>
+ </tests>
+
+ <help>
+
+.. class:: warningmark
+
+Double equal signs, ==, must be used as *"equal to"* (e.g., **c1 == 'chr22'**)
+
+.. class:: infomark
+
+**TIP:** Attempting to apply a filtering condition may throw exceptions if the data type (e.g., string, integer) in every line of the attribute being filtered is not appropriate for the condition (e.g., attempting certain numerical calculations on strings). If an exception is thrown when applying the condition to a line, that line is skipped as invalid for the filter condition. The number of invalid skipped lines is documented in the resulting history item as a "Condition/data issue".
+
+.. class:: infomark
+
+**TIP:** If your data is not TAB delimited, use *Text Manipulation->Convert*
+
+-----
+
+**Syntax**
+
+The filter tool allows you to restrict the dataset using simple conditional statements.
+
+- Make sure that multi-character operators contain no white space ( e.g., **<=** is valid while **< =** is not valid )
+- When using 'equal-to' operator **double equal sign '==' must be used** ( e.g., **attribute_name=='chr1'** )
+- Non-numerical values must be included in single or double quotes ( e.g., **attribute_name=='XX22'** )
+
+</help>
+</tool>
1
0
20 May '10
details: http://www.bx.psu.edu/hg/galaxy/rev/e972d3f8413e
changeset: 3783:e972d3f8413e
user: jeremy goecks <jeremy.goecks(a)emory.edu>
date: Thu May 13 15:35:41 2010 -0400
description:
Add track definition to bedgraph files generated by gtf2bedgraph.
diffstat:
test-data/gtf2bedgraph_out.bedgraph | 2 +-
tools/filters/gtf_to_bedgraph_converter.py | 25 ++++++++++++++++---------
2 files changed, 17 insertions(+), 10 deletions(-)
diffs (61 lines):
diff -r 0c1cb2c76b84 -r e972d3f8413e test-data/gtf2bedgraph_out.bedgraph
--- a/test-data/gtf2bedgraph_out.bedgraph Thu May 13 14:10:37 2010 -0400
+++ b/test-data/gtf2bedgraph_out.bedgraph Thu May 13 15:35:41 2010 -0400
@@ -1,3 +1,4 @@
+track type=bedGraph
chr1 36425949 36426026 4.8386844109
chr1 46891971 46892996 8.4688567539
chr1 71654477 71654594 0.4686878995
@@ -98,4 +99,3 @@
chr9 57867099 57867303 0.5359102332
chr9 106815437 106815604 5.4023275754
chr9 119703053 119703292 0.0814657030
-track type=bedGraph
diff -r 0c1cb2c76b84 -r e972d3f8413e tools/filters/gtf_to_bedgraph_converter.py
--- a/tools/filters/gtf_to_bedgraph_converter.py Thu May 13 14:10:37 2010 -0400
+++ b/tools/filters/gtf_to_bedgraph_converter.py Thu May 13 15:35:41 2010 -0400
@@ -9,16 +9,14 @@
output_name = sys.argv[2]
attribute_name = sys.argv[3]
- # Create temp file.
- tmp_name = tempfile.NamedTemporaryFile().name
+ # Create temp files.
+ tmp_name1 = tempfile.NamedTemporaryFile().name
+ tmp_name2 = tempfile.NamedTemporaryFile().name
# Do conversion.
skipped_lines = 0
first_skipped_line = 0
- out = open( tmp_name, 'w' )
-
- # Write track definition line.
- out.write( "track type=bedGraph\n")
+ out = open( tmp_name1, 'w' )
# Write track data to temporary file.
i = 0
@@ -56,11 +54,20 @@
first_skipped_line = i + 1
out.close()
- # Sort tmp file to create bedgraph file; sort by chromosome name and chromosome start.
- cmd = "sort -k1,1 -k2,2n < %s > %s" % ( tmp_name, output_name )
+ # Sort tmp file by chromosome name and chromosome start to create ordered track data.
+ cmd = "sort -k1,1 -k2,2n < %s > %s" % ( tmp_name1, tmp_name2 )
try:
os.system(cmd)
- os.remove(tmp_name)
+ os.remove(tmp_name1)
+ except Exception, ex:
+ sys.stderr.write( "%s\n" % ex )
+ sys.exit(1)
+
+ # Create bedgraph file by combining track definition with ordered track data.
+ cmd = "echo 'track type=bedGraph' | cat - %s > %s " % ( tmp_name2, output_name )
+ try:
+ os.system(cmd)
+ os.remove(tmp_name2)
except Exception, ex:
sys.stderr.write( "%s\n" % ex )
sys.exit(1)
1
0
20 May '10
details: http://www.bx.psu.edu/hg/galaxy/rev/0c1cb2c76b84
changeset: 3782:0c1cb2c76b84
user: Greg Von Kuster <greg(a)bx.psu.edu>
date: Thu May 13 14:10:37 2010 -0400
description:
Fix for editing category information in the community space.
diffstat:
lib/galaxy/webapps/community/controllers/admin.py | 32 +++++++++++-----------
1 files changed, 16 insertions(+), 16 deletions(-)
diffs (47 lines):
diff -r 17e1d798a59f -r 0c1cb2c76b84 lib/galaxy/webapps/community/controllers/admin.py
--- a/lib/galaxy/webapps/community/controllers/admin.py Thu May 13 12:14:52 2010 -0400
+++ b/lib/galaxy/webapps/community/controllers/admin.py Thu May 13 14:10:37 2010 -0400
@@ -756,27 +756,27 @@
status='error' ) )
category = get_category( trans, id )
if params.get( 'edit_category_button', False ):
- old_name = category.name
- new_name = util.restore_text( params.name )
- new_description = util.restore_text( params.description )
- if old_name != new_name:
+ new_name = util.restore_text( params.get( 'name', '' ) ).strip()
+ new_description = util.restore_text( params.get( 'description', '' ) ).strip()
+ if category.name != new_name or category.description != new_description:
if not new_name:
message = 'Enter a valid name'
status = 'error'
- elif trans.sa_session.query( trans.app.model.Category ).filter( trans.app.model.Category.table.c.name==new_name ).first():
+ elif category.name != new_name and \
+ trans.sa_session.query( trans.app.model.Category ).filter( trans.app.model.Category.table.c.name==new_name ).first():
message = 'A category with that name already exists'
status = 'error'
- else:
- category.name = new_name
- category.description = new_description
- trans.sa_session.add( category )
- trans.sa_session.flush()
- message = "The information has been saved for category '%s'" % ( new_name )
- return trans.response.send_redirect( web.url_for( controller='admin',
- action='manage_categories',
- webapp=webapp,
- message=util.sanitize_text( message ),
- status='done' ) )
+ else:
+ category.name = new_name
+ category.description = new_description
+ trans.sa_session.add( category )
+ trans.sa_session.flush()
+ message = "The information has been saved for category '%s'" % ( category.name )
+ return trans.response.send_redirect( web.url_for( controller='admin',
+ action='manage_categories',
+ webapp=webapp,
+ message=util.sanitize_text( message ),
+ status='done' ) )
return trans.fill_template( '/webapps/community/category/edit_category.mako',
category=category,
webapp=webapp,
1
0
20 May '10
details: http://www.bx.psu.edu/hg/galaxy/rev/17e1d798a59f
changeset: 3781:17e1d798a59f
user: jeremy goecks <jeremy.goecks(a)emory.edu>
date: Thu May 13 12:14:52 2010 -0400
description:
Only use search+select when jquery autocomplete plugin is defined.
diffstat:
static/scripts/galaxy.base.js | 16 ++++------------
static/scripts/packed/galaxy.base.js | 2 +-
static/scripts/packed/galaxy.workflow_editor.canvas.js | 2 +-
3 files changed, 6 insertions(+), 14 deletions(-)
diffs (56 lines):
diff -r 0c2b174f18e9 -r 17e1d798a59f static/scripts/galaxy.base.js
--- a/static/scripts/galaxy.base.js Thu May 13 12:03:17 2010 -0400
+++ b/static/scripts/galaxy.base.js Thu May 13 12:14:52 2010 -0400
@@ -147,6 +147,10 @@
// Replace select box with a text input box + autocomplete.
// TODO: make work with selects where refresh_on_change=True and refresh_on_change_values="..."
function replace_big_select_inputs(min_length) {
+ // To do replace, jQuery's autocomplete plugin must be loaded.
+ if (typeof jQuery().autocomplete == "undefined")
+ return;
+
// Set default for min_length.
if (min_length === undefined)
min_length = 20;
@@ -182,11 +186,6 @@
var text = $(this).text();
var value = $(this).attr('value');
- // HACK: dbkey-specific: ignore values that are '?'
- if (value == '?') {
- return;
- }
-
// Set options and mapping. Mapping is (i) [from text to value] AND (ii) [from value to value]. This
// enables a user to type the value directly rather than select the text that represents the value.
select_options.push( text );
@@ -199,13 +198,6 @@
}
});
- // HACK: dbkey-specific: add an unspecified option. We need to add this at the end b/c adding it first mucks
- // up the autocomplete sorting for some reason. (I.e. All options that start with the first character of the
- // first option are listed before the other, alphabetized options.)
- select_options.push( "unspecified (?)" );
- select_mapping[ "unspecified (?)" ] = "?";
- select_mapping[ "?" ] = "?";
-
// Set initial text if it's empty.
if ( text_input_elt.attr('value') == '' ) {
text_input_elt.attr('value', 'Click to Search or Select');
diff -r 0c2b174f18e9 -r 17e1d798a59f static/scripts/packed/galaxy.base.js
--- a/static/scripts/packed/galaxy.base.js Thu May 13 12:03:17 2010 -0400
+++ b/static/scripts/packed/galaxy.base.js Thu May 13 12:14:52 2010 -0400
@@ -1,1 +1,1 @@
-$(document).ready(function(){replace_big_select_inputs()});$.fn.makeAbsolute=function(a){return this.each(function(){var b=$(this);var c=b.position();b.css({position:"absolute",marginLeft:0,marginTop:0,top:c.top,left:c.left,right:$(window).width()-(c.left+b.width())});if(a){b.remove().appendTo("body")}})};function ensure_popup_helper(){if($("#popup-helper").length===0){$("<div id='popup-helper'/>").css({background:"white",opacity:0,zIndex:15000,position:"absolute",top:0,left:0,width:"100%",height:"100%"}).appendTo("body").hide()}}function attach_popupmenu(b,d){var a=function(){d.unbind().hide();$("#popup-helper").unbind("click.popupmenu").hide()};var c=function(g){$("#popup-helper").bind("click.popupmenu",a).show();d.click(a).css({left:0,top:-1000}).show();var f=g.pageX-d.width()/2;f=Math.min(f,$(document).scrollLeft()+$(window).width()-$(d).width()-20);f=Math.max(f,$(document).scrollLeft()+20);d.css({top:g.pageY-5,left:f});return false};$(b).click(c)}function make_popupmen!
u(c,b){ensure_popup_helper();var a=$("<ul id='"+c.attr("id")+"-menu'></ul>");$.each(b,function(f,e){if(e){$("<li/>").html(f).click(e).appendTo(a)}else{$("<li class='head'/>").html(f).appendTo(a)}});var d=$("<div class='popmenu-wrapper'>");d.append(a).append("<div class='overlay-border'>").css("position","absolute").appendTo("body").hide();attach_popupmenu(c,d)}function make_popup_menus(){jQuery("div[popupmenu]").each(function(){var c={};$(this).find("a").each(function(){var b=$(this).attr("confirm"),d=$(this).attr("href"),e=$(this).attr("target");c[$(this).text()]=function(){if(!b||confirm(b)){var g=window;if(e=="_parent"){g=window.parent}else{if(e=="_top"){g=window.top}}g.location=d}}});var a=$("#"+$(this).attr("popupmenu"));make_popupmenu(a,c);$(this).remove();a.addClass("popup").show()})}function array_length(b){if(b.length){return b.length}var c=0;for(var a in b){c++}return c}function naturalSort(i,g){var n=/(-?[0-9\.]+)/g,j=i.toString().toLowerCase()||"",f=g.toString()!
.toLowerCase()||"",k=String.fromCharCode(0),l=j.replace(n,k+"$1"+k).sp
lit(k),e=f.replace(n,k+"$1"+k).split(k),d=(new Date(j)).getTime(),m=d?(new Date(f)).getTime():null;if(m){if(d<m){return -1}else{if(d>m){return 1}}}for(var h=0,c=Math.max(l.length,e.length);h<c;h++){oFxNcL=parseFloat(l[h])||l[h];oFyNcL=parseFloat(e[h])||e[h];if(oFxNcL<oFyNcL){return -1}else{if(oFxNcL>oFyNcL){return 1}}}return 0}function replace_big_select_inputs(a){if(a===undefined){a=20}$('select[refresh_on_change!="true"]').each(function(){var b=$(this);if(b.find("option").length<a){return}var c=b.attr("value");var d=$("<input type='text' class='text-and-autocomplete-select'></input>");d.attr("size",40);d.attr("name",b.attr("name"));d.attr("id",b.attr("id"));d.click(function(){var i=$(this).attr("value");$(this).attr("value","Loading...");$(this).showAllInCache();$(this).attr("value",i);$(this).select()});var h=[];var g={};b.children("option").each(function(){var j=$(this).text();var i=$(this).attr("value");if(i=="?"){return}h.push(j);g[j]=i;g[i]=i;if(i==c){d.attr("value",j!
)}});h.push("unspecified (?)");g["unspecified (?)"]="?";g["?"]="?";if(d.attr("value")==""){d.attr("value","Click to Search or Select")}h=h.sort(naturalSort);var f={selectFirst:false,autoFill:false,mustMatch:false,matchContains:true,max:1000,minChars:0,hideForLessThanMinChars:false};d.autocomplete(h,f);b.replaceWith(d);var e=function(){var j=d.attr("value");var i=g[j];if(i!==null&&i!==undefined){d.attr("value",i)}else{if(c!=""){d.attr("value",c)}else{d.attr("value","?")}}};d.parents("form").submit(function(){e()});$(document).bind("convert_dbkeys",function(){e()})})}function async_save_text(d,f,e,a,c,h,i,g,b){if(c===undefined){c=30}if(i===undefined){i=4}$("#"+d).live("click",function(){if($("#renaming-active").length>0){return}var l=$("#"+f),k=l.text(),j;if(h){j=$("<textarea></textarea>").attr({rows:i,cols:c}).text(k)}else{j=$("<input type='text'></input>").attr({value:k,size:c})}j.attr("id","renaming-active");j.blur(function(){$(this).remove();l.show();if(b){b(j)}});j.keyup!
(function(n){if(n.keyCode===27){$(this).trigger("blur")}else{if(n.keyC
ode===13){var m={};m[a]=$(this).val();$(this).trigger("blur");$.ajax({url:e,data:m,error:function(){alert("Text editing for elt "+f+" failed")},success:function(o){l.text(o);if(b){b(j)}}})}}});if(g){g(j)}l.hide();j.insertAfter(l);j.focus();j.select();return})}function init_history_items(d,a,c){var b=function(){try{var e=$.jStore.store("history_expand_state");if(e){for(var g in e){$("#"+g+" div.historyItemBody").show()}}}catch(f){$.jStore.remove("history_expand_state")}if($.browser.mozilla){$("div.historyItemBody").each(function(){if(!$(this).is(":visible")){$(this).find("pre.peek").css("overflow","hidden")}})}d.each(function(){var j=this.id;var h=$(this).children("div.historyItemBody");var i=h.find("pre.peek");$(this).find(".historyItemTitleBar > .historyItemTitle").wrap("<a href='javascript:void(0);'></a>").click(function(){if(h.is(":visible")){if($.browser.mozilla){i.css("overflow","hidden")}h.slideUp("fast");if(!c){var k=$.jStore.store("history_expand_state");if(k){delete!
k[j];$.jStore.store("history_expand_state",k)}}}else{h.slideDown("fast",function(){if($.browser.mozilla){i.css("overflow","auto")}});if(!c){var k=$.jStore.store("history_expand_state");if(k===undefined){k={}}k[j]=true;$.jStore.store("history_expand_state",k)}}return false})});$("#top-links > a.toggle").click(function(){var h=$.jStore.store("history_expand_state");if(h===undefined){h={}}$("div.historyItemBody:visible").each(function(){if($.browser.mozilla){$(this).find("pre.peek").css("overflow","hidden")}$(this).slideUp("fast");if(h){delete h[$(this).parent().attr("id")]}});$.jStore.store("history_expand_state",h)}).show()};if(a){b()}else{$.jStore.init("galaxy");$.jStore.engineReady(function(){b()})}}$(document).ready(function(){$("a[confirm]").click(function(){return confirm($(this).attr("confirm"))});if($.fn.tipsy){$(".tooltip").tipsy({gravity:"s"})}make_popup_menus()});
\ No newline at end of file
+$(document).ready(function(){replace_big_select_inputs()});$.fn.makeAbsolute=function(a){return this.each(function(){var b=$(this);var c=b.position();b.css({position:"absolute",marginLeft:0,marginTop:0,top:c.top,left:c.left,right:$(window).width()-(c.left+b.width())});if(a){b.remove().appendTo("body")}})};function ensure_popup_helper(){if($("#popup-helper").length===0){$("<div id='popup-helper'/>").css({background:"white",opacity:0,zIndex:15000,position:"absolute",top:0,left:0,width:"100%",height:"100%"}).appendTo("body").hide()}}function attach_popupmenu(b,d){var a=function(){d.unbind().hide();$("#popup-helper").unbind("click.popupmenu").hide()};var c=function(g){$("#popup-helper").bind("click.popupmenu",a).show();d.click(a).css({left:0,top:-1000}).show();var f=g.pageX-d.width()/2;f=Math.min(f,$(document).scrollLeft()+$(window).width()-$(d).width()-20);f=Math.max(f,$(document).scrollLeft()+20);d.css({top:g.pageY-5,left:f});return false};$(b).click(c)}function make_popupmen!
u(c,b){ensure_popup_helper();var a=$("<ul id='"+c.attr("id")+"-menu'></ul>");$.each(b,function(f,e){if(e){$("<li/>").html(f).click(e).appendTo(a)}else{$("<li class='head'/>").html(f).appendTo(a)}});var d=$("<div class='popmenu-wrapper'>");d.append(a).append("<div class='overlay-border'>").css("position","absolute").appendTo("body").hide();attach_popupmenu(c,d)}function make_popup_menus(){jQuery("div[popupmenu]").each(function(){var c={};$(this).find("a").each(function(){var b=$(this).attr("confirm"),d=$(this).attr("href"),e=$(this).attr("target");c[$(this).text()]=function(){if(!b||confirm(b)){var g=window;if(e=="_parent"){g=window.parent}else{if(e=="_top"){g=window.top}}g.location=d}}});var a=$("#"+$(this).attr("popupmenu"));make_popupmenu(a,c);$(this).remove();a.addClass("popup").show()})}function array_length(b){if(b.length){return b.length}var c=0;for(var a in b){c++}return c}function naturalSort(i,g){var n=/(-?[0-9\.]+)/g,j=i.toString().toLowerCase()||"",f=g.toString()!
.toLowerCase()||"",k=String.fromCharCode(0),l=j.replace(n,k+"$1"+k).sp
lit(k),e=f.replace(n,k+"$1"+k).split(k),d=(new Date(j)).getTime(),m=d?(new Date(f)).getTime():null;if(m){if(d<m){return -1}else{if(d>m){return 1}}}for(var h=0,c=Math.max(l.length,e.length);h<c;h++){oFxNcL=parseFloat(l[h])||l[h];oFyNcL=parseFloat(e[h])||e[h];if(oFxNcL<oFyNcL){return -1}else{if(oFxNcL>oFyNcL){return 1}}}return 0}function replace_big_select_inputs(a){if(typeof jQuery().autocomplete=="undefined"){return}if(a===undefined){a=20}$('select[refresh_on_change!="true"]').each(function(){var b=$(this);if(b.find("option").length<a){return}var c=b.attr("value");var d=$("<input type='text' class='text-and-autocomplete-select'></input>");d.attr("size",40);d.attr("name",b.attr("name"));d.attr("id",b.attr("id"));d.click(function(){var i=$(this).attr("value");$(this).attr("value","Loading...");$(this).showAllInCache();$(this).attr("value",i);$(this).select()});var h=[];var g={};b.children("option").each(function(){var j=$(this).text();var i=$(this).attr("value");h.push(j);g[j]!
=i;g[i]=i;if(i==c){d.attr("value",j)}});if(d.attr("value")==""){d.attr("value","Click to Search or Select")}h=h.sort(naturalSort);var f={selectFirst:false,autoFill:false,mustMatch:false,matchContains:true,max:1000,minChars:0,hideForLessThanMinChars:false};d.autocomplete(h,f);b.replaceWith(d);var e=function(){var j=d.attr("value");var i=g[j];if(i!==null&&i!==undefined){d.attr("value",i)}else{if(c!=""){d.attr("value",c)}else{d.attr("value","?")}}};d.parents("form").submit(function(){e()});$(document).bind("convert_dbkeys",function(){e()})})}function async_save_text(d,f,e,a,c,h,i,g,b){if(c===undefined){c=30}if(i===undefined){i=4}$("#"+d).live("click",function(){if($("#renaming-active").length>0){return}var l=$("#"+f),k=l.text(),j;if(h){j=$("<textarea></textarea>").attr({rows:i,cols:c}).text(k)}else{j=$("<input type='text'></input>").attr({value:k,size:c})}j.attr("id","renaming-active");j.blur(function(){$(this).remove();l.show();if(b){b(j)}});j.keyup(function(n){if(n.keyCode==!
=27){$(this).trigger("blur")}else{if(n.keyCode===13){var m={};m[a]=$(t
his).val();$(this).trigger("blur");$.ajax({url:e,data:m,error:function(){alert("Text editing for elt "+f+" failed")},success:function(o){l.text(o);if(b){b(j)}}})}}});if(g){g(j)}l.hide();j.insertAfter(l);j.focus();j.select();return})}function init_history_items(d,a,c){var b=function(){try{var e=$.jStore.store("history_expand_state");if(e){for(var g in e){$("#"+g+" div.historyItemBody").show()}}}catch(f){$.jStore.remove("history_expand_state")}if($.browser.mozilla){$("div.historyItemBody").each(function(){if(!$(this).is(":visible")){$(this).find("pre.peek").css("overflow","hidden")}})}d.each(function(){var j=this.id;var h=$(this).children("div.historyItemBody");var i=h.find("pre.peek");$(this).find(".historyItemTitleBar > .historyItemTitle").wrap("<a href='javascript:void(0);'></a>").click(function(){if(h.is(":visible")){if($.browser.mozilla){i.css("overflow","hidden")}h.slideUp("fast");if(!c){var k=$.jStore.store("history_expand_state");if(k){delete k[j];$.jStore.store("histo!
ry_expand_state",k)}}}else{h.slideDown("fast",function(){if($.browser.mozilla){i.css("overflow","auto")}});if(!c){var k=$.jStore.store("history_expand_state");if(k===undefined){k={}}k[j]=true;$.jStore.store("history_expand_state",k)}}return false})});$("#top-links > a.toggle").click(function(){var h=$.jStore.store("history_expand_state");if(h===undefined){h={}}$("div.historyItemBody:visible").each(function(){if($.browser.mozilla){$(this).find("pre.peek").css("overflow","hidden")}$(this).slideUp("fast");if(h){delete h[$(this).parent().attr("id")]}});$.jStore.store("history_expand_state",h)}).show()};if(a){b()}else{$.jStore.init("galaxy");$.jStore.engineReady(function(){b()})}}$(document).ready(function(){$("a[confirm]").click(function(){return confirm($(this).attr("confirm"))});if($.fn.tipsy){$(".tooltip").tipsy({gravity:"s"})}make_popup_menus()});
\ No newline at end of file
diff -r 0c2b174f18e9 -r 17e1d798a59f static/scripts/packed/galaxy.workflow_editor.canvas.js
--- a/static/scripts/packed/galaxy.workflow_editor.canvas.js Thu May 13 12:03:17 2010 -0400
+++ b/static/scripts/packed/galaxy.workflow_editor.canvas.js Thu May 13 12:14:52 2010 -0400
@@ -1,1 +1,1 @@
-function Terminal(a){this.element=a;this.connectors=[]}$.extend(Terminal.prototype,{connect:function(a){this.connectors.push(a);if(this.node){this.node.changed()}},disconnect:function(a){this.connectors.splice($.inArray(a,this.connectors),1);if(this.node){this.node.changed()}},redraw:function(){$.each(this.connectors,function(a,b){b.redraw()})},destroy:function(){$.each(this.connectors.slice(),function(a,b){b.destroy()})}});function OutputTerminal(a,b){Terminal.call(this,a);this.datatype=b}OutputTerminal.prototype=new Terminal();function InputTerminal(a,b){Terminal.call(this,a);this.datatypes=b}InputTerminal.prototype=new Terminal();$.extend(InputTerminal.prototype,{can_accept:function(a){if(this.connectors.length<1){for(var b in this.datatypes){if(a.datatype=="input"){return true}if(issubtype(a.datatype,this.datatypes[b])){return true}}}return false}});function Connector(b,a){this.canvas=null;this.dragging=false;this.inner_color="#FFFFFF";this.outer_color="#D8B365";if(b&&a!
){this.connect(b,a)}}$.extend(Connector.prototype,{connect:function(b,a){this.handle1=b;this.handle1.connect(this);this.handle2=a;this.handle2.connect(this)},destroy:function(){if(this.handle1){this.handle1.disconnect(this)}if(this.handle2){this.handle2.disconnect(this)}$(this.canvas).remove()},redraw:function(){var d=$("#canvas-container");if(!this.canvas){this.canvas=document.createElement("canvas");if(window.G_vmlCanvasManager){G_vmlCanvasManager.initElement(this.canvas)}d.append($(this.canvas));if(this.dragging){this.canvas.style.zIndex="300"}}var n=function(c){return $(c).offset().left-d.offset().left};var i=function(c){return $(c).offset().top-d.offset().top};var h=n(this.handle1.element)+5;var g=i(this.handle1.element)+5;var p=n(this.handle2.element)+5;var m=i(this.handle2.element)+5;var f=100;var k=Math.min(h,p);var a=Math.max(h,p);var j=Math.min(g,m);var t=Math.max(g,m);var b=Math.min(Math.max(Math.abs(t-j)/2,100),300);var o=k-f;var s=j-f;var q=a-k+2*f;var l=t-j+2*!
f;this.canvas.style.left=o+"px";this.canvas.style.top=s+"px";this.canv
as.setAttribute("width",q);this.canvas.setAttribute("height",l);h-=o;g-=s;p-=o;m-=s;var r=this.canvas.getContext("2d");r.lineCap="round";r.strokeStyle=this.outer_color;r.lineWidth=7;r.beginPath();r.moveTo(h,g);r.bezierCurveTo(h+b,g,p-b,m,p,m);r.stroke();r.strokeStyle=this.inner_color;r.lineWidth=5;r.beginPath();r.moveTo(h,g);r.bezierCurveTo(h+b,g,p-b,m,p,m);r.stroke()}});function Node(a){this.element=a;this.input_terminals={};this.output_terminals={};this.tool_errors={}}$.extend(Node.prototype,{enable_input_terminal:function(d,a,b){var c=this;$(d).each(function(){var f=this.terminal=new InputTerminal(this,b);f.node=c;f.name=a;$(this).bind("dropstart",function(g){g.dragProxy.terminal.connectors[0].inner_color="#BBFFBB"}).bind("dropend",function(g){g.dragProxy.terminal.connectors[0].inner_color="#FFFFFF"}).bind("drop",function(g){(new Connector(g.dragTarget.terminal,g.dropTarget.terminal)).redraw()}).bind("hover",function(){if(f.connectors.length>0){var g=$("<div class='callou!
t'></div>").css({display:"none"}).appendTo("body").append($("<div class='buttons'></div>").append($("<img src='../images/delete_icon.png' />").click(function(){$.each(f.connectors,function(i,h){h.destroy()});g.remove()}))).bind("mouseleave",function(){$(this).remove()});g.css({top:$(this).offset().top-2,left:$(this).offset().left-g.width(),"padding-right":$(this).width()}).show()}});c.input_terminals[a]=f})},enable_output_terminal:function(d,a,b){var c=this;$(d).each(function(){var g=this;var f=this.terminal=new OutputTerminal(this,b);f.node=c;f.name=a;$(this).bind("dragstart",function(j){var i=$('<div class="drag-terminal" style="position: absolute;"></div>').appendTo("#canvas-container").get(0);i.terminal=new OutputTerminal(i);var k=new Connector();k.dragging=true;k.connect(this.terminal,i.terminal);$.dropManage({filter:function(h){return this.terminal.can_accept(f)}}).addClass("input-terminal-active");return i}).bind("drag",function(i){var h=function(){var k=$(i.dragProx!
y).offsetParent().offset(),j=i.offsetX-k.left,l=i.offsetY-k.top;$(i.dr
agProxy).css({left:j,top:l});i.dragProxy.terminal.redraw();canvas_manager.update_viewport_overlay()};h();$("#canvas-container").get(0).scroll_panel.test(i,h)}).bind("dragend",function(h){h.dragProxy.terminal.connectors[0].destroy();$(h.dragProxy).remove();$.dropManage().removeClass("input-terminal-active");$("#canvas-container").get(0).scroll_panel.stop()});c.output_terminals[a]=f})},redraw:function(){$.each(this.input_terminals,function(a,b){b.redraw()});$.each(this.output_terminals,function(a,b){b.redraw()})},destroy:function(){$.each(this.input_terminals,function(a,b){b.destroy()});$.each(this.output_terminals,function(a,b){b.destroy()});workflow.remove_node(this);$(this.element).remove()},make_active:function(){$(this.element).addClass("toolForm-active")},make_inactive:function(){var a=this.element.get(0);(function(b){b.removeChild(a);b.appendChild(a)})(a.parentNode);$(a).removeClass("toolForm-active")},init_field_data:function(g){var d=this.element;if(g.type){this.type=!
g.type}this.name=g.name;this.form_html=g.form_html;this.tool_state=g.tool_state;this.tool_errors=g.tool_errors;this.tooltip=g.tooltip?g.tooltip:"";this.annotation=g.annotation;if(this.tool_errors){d.addClass("tool-node-error")}else{d.removeClass("tool-node-error")}var c=this;var a=d.find(".toolFormBody");a.find("div").remove();var h=$("<div class='inputs'></div>").appendTo(a);$.each(g.data_inputs,function(j,b){var f=$("<div class='terminal input-terminal'></div>");c.enable_input_terminal(f,b.name,b.extensions);h.append($("<div class='form-row dataRow input-data-row' name='"+b.name+"'>"+b.label+"</div>").prepend(f))});if((g.data_inputs.length>0)&&(g.data_outputs.length>0)){a.append($("<div class='rule'></div>"))}$.each(g.data_outputs,function(k,b){var j=$("<div class='terminal output-terminal'></div>");c.enable_output_terminal(j,b.name,b.extension);var f=b.name;if(b.extension!="input"){f=f+" ("+b.extension+")"}a.append($("<div class='form-row dataRow'>"+f+"</div>").append(j)!
)});workflow.node_changed(this)},update_field_data:function(f){var c=$
(this.element),d=this;this.tool_state=f.tool_state;this.form_html=f.form_html;this.tool_errors=f.tool_errors;this.annotation=f.annotation;if(this.tool_errors){c.addClass("tool-node-error")}else{c.removeClass("tool-node-error")}var g=c.find("div.inputs");var b=$("<div class='inputs'></div>");var a=g.find("div.input-data-row");$.each(f.data_inputs,function(k,h){var j=$("<div class='terminal input-terminal'></div>");d.enable_input_terminal(j,h.name,h.extensions);g.find("div[name="+h.name+"]").each(function(){$(this).find(".input-terminal").each(function(){var i=this.terminal.connectors[0];if(i){j[0].terminal.connectors[0]=i;i.handle2=j[0].terminal}});$(this).remove()});b.append($("<div class='form-row dataRow input-data-row' name='"+h.name+"'>"+h.label+"</div>").prepend(j))});g.replaceWith(b);g.find("div.input-data-row > .terminal").each(function(){this.terminal.destroy()});this.changed();this.redraw()},error:function(d){var a=$(this.element).find(".toolFormBody");a.find("div")!
.remove();var c="<div style='color: red; text-style: italic;'>"+d+"</div>";this.form_html=c;a.html(c);workflow.node_changed(this)},changed:function(){workflow.node_changed(this)}});function Workflow(a){this.canvas_container=a;this.id_counter=0;this.nodes={};this.name=null;this.has_changes=false;this.active_form_has_changes=false}$.extend(Workflow.prototype,{add_node:function(a){a.id=this.id_counter;a.element.attr("id","wf-node-step-"+a.id);this.id_counter++;this.nodes[a.id]=a;this.has_changes=true;a.workflow=this},remove_node:function(a){if(this.active_node==a){this.clear_active_node()}delete this.nodes[a.id];this.has_changes=true},remove_all:function(){wf=this;$.each(this.nodes,function(b,a){a.destroy();wf.remove_node(a)})},to_simple:function(){var a={};$.each(this.nodes,function(b,d){var f={};$.each(d.input_terminals,function(g,h){f[h.name]=null;$.each(h.connectors,function(j,k){f[h.name]={id:k.handle1.node.id,output_name:k.handle1.name}})});var c={id:d.id,type:d.type,too!
l_id:d.tool_id,tool_state:d.tool_state,tool_errors:d.tool_errors,input
_connections:f,position:$(d.element).position(),annotation:d.annotation};a[d.id]=c});return{steps:a}},from_simple:function(a){wf=this;var b=0;wf.name=a.name;$.each(a.steps,function(f,d){var c=prebuild_node("tool",d.name,d.tool_id);c.init_field_data(d);if(d.position){c.element.css({top:d.position.top,left:d.position.left})}c.id=d.id;wf.nodes[c.id]=c;b=Math.max(b,parseInt(f))});wf.id_counter=b+1;$.each(a.steps,function(f,d){var c=wf.nodes[f];$.each(d.input_connections,function(h,g){if(g){var i=wf.nodes[g.id];var j=new Connector();j.connect(i.output_terminals[g.output_name],c.input_terminals[h]);j.redraw()}})})},check_changes_in_active_form:function(){if(this.active_form_has_changes){this.has_changes=true;$("#right-content").find("form").submit();this.active_form_has_changes=false}},clear_active_node:function(){if(this.active_node){this.active_node.make_inactive();this.active_node=null}parent.show_form_for_tool("<div>No node selected</div>")},activate_node:function(a){if(this.a!
ctive_node!=a){this.check_changes_in_active_form();this.clear_active_node();parent.show_form_for_tool(a.form_html+a.tooltip,a);a.make_active();this.active_node=a}},node_changed:function(a){this.has_changes=true;if(this.active_node==a){parent.show_form_for_tool(a.form_html+a.tooltip,a)}},layout:function(){this.check_changes_in_active_form();this.has_changes=true;var i={};var b={};$.each(this.nodes,function(l,k){if(i[l]===undefined){i[l]=0}if(b[l]===undefined){b[l]=[]}});$.each(this.nodes,function(l,k){$.each(k.input_terminals,function(m,n){$.each(n.connectors,function(p,q){var o=q.handle1.node;i[k.id]+=1;b[o.id].push(k.id)})})});node_ids_by_level=[];while(true){level_parents=[];for(var a in i){if(i[a]==0){level_parents.push(a)}}if(level_parents.length==0){break}node_ids_by_level.push(level_parents);for(var f in level_parents){var j=level_parents[f];delete i[j];for(var g in b[j]){i[b[j][g]]-=1}}}if(i.length){return}var d=this.nodes;var h=80;v_pad=30;var c=h;$.each(node_ids_by!
_level,function(k,l){l.sort(function(p,o){return $(d[p].element).posit
ion().top-$(d[o].element).position().top});var m=0;var n=v_pad;$.each(l,function(o,r){var q=d[r];var p=$(q.element);$(p).css({top:n,left:c});m=Math.max(m,$(p).width());n+=$(p).height()+v_pad});c+=m+h});$.each(d,function(k,l){l.redraw()})},bounds_for_all_nodes:function(){var d=Infinity,b=-Infinity,c=Infinity,a=-Infinity,f;$.each(this.nodes,function(h,g){e=$(g.element);f=e.position();d=Math.min(d,f.left);b=Math.max(b,f.left+e.width());c=Math.min(c,f.top);a=Math.max(a,f.top+e.width())});return{xmin:d,xmax:b,ymin:c,ymax:a}},fit_canvas_to_nodes:function(){var a=this.bounds_for_all_nodes();var f=this.canvas_container.position();var i=this.canvas_container.parent();var d=fix_delta(a.xmin,100);var h=fix_delta(a.ymin,100);d=Math.max(d,f.left);h=Math.max(h,f.top);var c=f.left-d;var g=f.top-h;var b=round_up(a.xmax+100,100)+d;var j=round_up(a.ymax+100,100)+h;b=Math.max(b,-c+i.width());j=Math.max(j,-g+i.height());this.canvas_container.css({left:c,top:g,width:b,height:j});this.canvas_cont!
ainer.children().each(function(){var k=$(this).position();$(this).css("left",k.left+d);$(this).css("top",k.top+h)})}});function fix_delta(a,b){if(a<b||a>3*b){new_pos=(Math.ceil(((a%b))/b)+1)*b;return(-(a-new_pos))}return 0}function round_up(a,b){return Math.ceil(a/b)*b}function prebuild_node(l,j,r){var i=$("<div class='toolForm toolFormInCanvas'></div>");var g=new Node(i);g.type=l;if(l=="tool"){g.tool_id=r}var n=$("<div class='toolFormTitle unselectable'>"+j+"</div>");i.append(n);i.css("left",$(window).scrollLeft()+20);i.css("top",$(window).scrollTop()+20);var m=$("<div class='toolFormBody'></div>");var h="<div><img height='16' align='middle' src='../images/loading_small_white_bg.gif'/> loading tool info...</div>";m.append(h);g.form_html=h;i.append(m);var k=$("<div class='buttons' style='float: right;'></div>");k.append($("<img src='../images/delete_icon.png' />").click(function(b){g.destroy()}).hover(function(){$(this).attr("src","../images/delete_icon_dark.png")},function!
(){$(this).attr("src","../images/delete_icon.png")}));i.appendTo("#can
vas-container");var d=$("#canvas-container").position();var c=$("#canvas-container").parent();var a=i.width();var q=i.height();i.css({left:(-d.left)+(c.width()/2)-(a/2),top:(-d.top)+(c.height()/2)-(q/2)});k.prependTo(n);a+=(k.width()+10);i.css("width",a);$(i).bind("dragstart",function(){workflow.activate_node(g)}).bind("dragend",function(){workflow.node_changed(this);workflow.fit_canvas_to_nodes();canvas_manager.draw_overview()}).bind("dragclickonly",function(){workflow.activate_node(g)}).bind("drag",function(o){var f=$(this).offsetParent().offset(),b=o.offsetX-f.left,p=o.offsetY-f.top;$(this).css({left:b,top:p});$(this).find(".terminal").each(function(){this.terminal.redraw()})});return g}var ext_to_type=null;var type_to_type=null;function issubtype(b,a){b=ext_to_type[b];a=ext_to_type[a];return(type_to_type[b])&&(a in type_to_type[b])}function populate_datatype_info(a){ext_to_type=a.ext_to_class_name;type_to_type=a.class_to_classes}function ScrollPanel(a){this.panel=a}$.ext!
end(ScrollPanel.prototype,{test:function(v,d){clearTimeout(this.timeout);var k=v.pageX,j=v.pageY,l=$(this.panel),c=l.position(),b=l.width(),i=l.height(),w=l.parent(),s=w.width(),a=w.height(),r=w.offset(),p=r.left,m=r.top,A=p+w.width(),u=m+w.height(),B=-(b-(s/2)),z=-(i-(a/2)),g=(s/2),f=(a/2),h=false,q=5,o=23;if(k-q<p){if(c.left<g){var n=Math.min(o,g-c.left);l.css("left",c.left+n);h=true}}else{if(k+q>A){if(c.left>B){var n=Math.min(o,c.left-B);l.css("left",c.left-n);h=true}}else{if(j-q<m){if(c.top<f){var n=Math.min(o,f-c.top);l.css("top",c.top+n);h=true}}else{if(j+q>u){if(c.top>z){var n=Math.min(o,c.top-B);l.css("top",(c.top-n)+"px");h=true}}}}}if(h){d();var l=this;this.timeout=setTimeout(function(){l.test(v,d)},50)}},stop:function(b,a){clearTimeout(this.timeout)}});function CanvasManager(b,a){this.cv=b;this.cc=this.cv.find("#canvas-container");this.oc=a.find("#overview-canvas");this.ov=a.find("#overview-viewport");this.init_drag()}$.extend(CanvasManager.prototype,{init_drag:f!
unction(){var b=this;var a=function(f,g){f=Math.min(f,b.cv.width()/2);
f=Math.max(f,-b.cc.width()+b.cv.width()/2);g=Math.min(g,b.cv.height()/2);g=Math.max(g,-b.cc.height()+b.cv.height()/2);b.cc.css({left:f,top:g});b.update_viewport_overlay()};this.cc.each(function(){this.scroll_panel=new ScrollPanel(this)});var d,c;this.cv.bind("dragstart",function(g){var h=$(this).offset();var f=b.cc.position();c=f.top-h.top;d=f.left-h.left}).bind("drag",function(f){a(f.offsetX+d,f.offsetY+c)}).bind("dragend",function(){workflow.fit_canvas_to_nodes();b.draw_overview()});this.ov.bind("drag",function(k){var j=b.cc.width(),g=b.cc.height(),f=b.oc.width(),h=b.oc.height(),i=$(this).offsetParent().offset(),m=k.offsetX-i.left,l=k.offsetY-i.top;a(-(m/f*j),-(l/h*g))}).bind("dragend",function(){workflow.fit_canvas_to_nodes();b.draw_overview()});$("#overview-border").bind("drag",function(g){var i=$(this).offsetParent();var h=i.offset();var f=Math.max(i.width()-(g.offsetX-h.left),i.height()-(g.offsetY-h.top));$(this).css({width:f,height:f});b.draw_overview()});$("#overview!
-border div").bind("drag",function(f){})},update_viewport_overlay:function(){var b=this.cc,f=this.cv,a=this.oc,c=this.ov,d=b.width(),j=b.height(),i=a.width(),g=a.height(),h=b.position();c.css({left:-(h.left/d*i),top:-(h.top/j*g),width:(f.width()/d*i)-2,height:(f.height()/j*g)-2})},draw_overview:function(){var j=$("#overview-canvas"),m=j.parent().parent().width(),i=j.get(0).getContext("2d"),d=$("#canvas-container").width(),l=$("#canvas-container").height();var g,a,k,f;var h=this.cv.width();var b=this.cv.height();if(d<h&&l<b){k=d/h*m;f=(m-k)/2;g=l/b*m;a=(m-g)/2}else{if(d<l){a=0;g=m;k=Math.ceil(g*d/l);f=(m-k)/2}else{k=m;f=0;g=Math.ceil(k*l/d);a=(m-g)/2}}j.parent().css({left:f,top:a,width:k,height:g});j.attr("width",k);j.attr("height",g);i.fillStyle="#D2C099";i.strokeStyle="#D8B365";i.lineWidth=1;$.each(workflow.nodes,function(t,q){var s=$(q.element),n=s.position(),c=n.left/d*k,r=n.top/l*g,o=s.width()/d*k,p=s.height()/l*g;i.fillRect(c,r,o,p);i.strokeRect(c,r,o,p)});this.update_!
viewport_overlay()}});
\ No newline at end of file
+function Terminal(a){this.element=a;this.connectors=[]}$.extend(Terminal.prototype,{connect:function(a){this.connectors.push(a);if(this.node){this.node.changed()}},disconnect:function(a){this.connectors.splice($.inArray(a,this.connectors),1);if(this.node){this.node.changed()}},redraw:function(){$.each(this.connectors,function(a,b){b.redraw()})},destroy:function(){$.each(this.connectors.slice(),function(a,b){b.destroy()})}});function OutputTerminal(a,b){Terminal.call(this,a);this.datatype=b}OutputTerminal.prototype=new Terminal();function InputTerminal(a,b){Terminal.call(this,a);this.datatypes=b}InputTerminal.prototype=new Terminal();$.extend(InputTerminal.prototype,{can_accept:function(a){if(this.connectors.length<1){for(var b in this.datatypes){if(a.datatype=="input"){return true}if(issubtype(a.datatype,this.datatypes[b])){return true}}}return false}});function Connector(b,a){this.canvas=null;this.dragging=false;this.inner_color="#FFFFFF";this.outer_color="#D8B365";if(b&&a!
){this.connect(b,a)}}$.extend(Connector.prototype,{connect:function(b,a){this.handle1=b;this.handle1.connect(this);this.handle2=a;this.handle2.connect(this)},destroy:function(){if(this.handle1){this.handle1.disconnect(this)}if(this.handle2){this.handle2.disconnect(this)}$(this.canvas).remove()},redraw:function(){var d=$("#canvas-container");if(!this.canvas){this.canvas=document.createElement("canvas");if(window.G_vmlCanvasManager){G_vmlCanvasManager.initElement(this.canvas)}d.append($(this.canvas));if(this.dragging){this.canvas.style.zIndex="300"}}var n=function(c){return $(c).offset().left-d.offset().left};var i=function(c){return $(c).offset().top-d.offset().top};var h=n(this.handle1.element)+5;var g=i(this.handle1.element)+5;var p=n(this.handle2.element)+5;var m=i(this.handle2.element)+5;var f=100;var k=Math.min(h,p);var a=Math.max(h,p);var j=Math.min(g,m);var t=Math.max(g,m);var b=Math.min(Math.max(Math.abs(t-j)/2,100),300);var o=k-f;var s=j-f;var q=a-k+2*f;var l=t-j+2*!
f;this.canvas.style.left=o+"px";this.canvas.style.top=s+"px";this.canv
as.setAttribute("width",q);this.canvas.setAttribute("height",l);h-=o;g-=s;p-=o;m-=s;var r=this.canvas.getContext("2d");r.lineCap="round";r.strokeStyle=this.outer_color;r.lineWidth=7;r.beginPath();r.moveTo(h,g);r.bezierCurveTo(h+b,g,p-b,m,p,m);r.stroke();r.strokeStyle=this.inner_color;r.lineWidth=5;r.beginPath();r.moveTo(h,g);r.bezierCurveTo(h+b,g,p-b,m,p,m);r.stroke()}});function Node(a){this.element=a;this.input_terminals={};this.output_terminals={};this.tool_errors={}}$.extend(Node.prototype,{enable_input_terminal:function(d,a,b){var c=this;$(d).each(function(){var f=this.terminal=new InputTerminal(this,b);f.node=c;f.name=a;$(this).bind("dropstart",function(g){g.dragProxy.terminal.connectors[0].inner_color="#BBFFBB"}).bind("dropend",function(g){g.dragProxy.terminal.connectors[0].inner_color="#FFFFFF"}).bind("drop",function(g){(new Connector(g.dragTarget.terminal,g.dropTarget.terminal)).redraw()}).bind("hover",function(){if(f.connectors.length>0){var g=$("<div class='callou!
t'></div>").css({display:"none"}).appendTo("body").append($("<div class='buttons'></div>").append($("<img src='../images/delete_icon.png' />").click(function(){$.each(f.connectors,function(i,h){h.destroy()});g.remove()}))).bind("mouseleave",function(){$(this).remove()});g.css({top:$(this).offset().top-2,left:$(this).offset().left-g.width(),"padding-right":$(this).width()}).show()}});c.input_terminals[a]=f})},enable_output_terminal:function(d,a,b){var c=this;$(d).each(function(){var g=this;var f=this.terminal=new OutputTerminal(this,b);f.node=c;f.name=a;$(this).bind("dragstart",function(j){var i=$('<div class="drag-terminal" style="position: absolute;"></div>').appendTo("#canvas-container").get(0);i.terminal=new OutputTerminal(i);var k=new Connector();k.dragging=true;k.connect(this.terminal,i.terminal);$.dropManage({filter:function(h){return this.terminal.can_accept(f)}}).addClass("input-terminal-active");return i}).bind("drag",function(i){var h=function(){var k=$(i.dragProx!
y).offsetParent().offset(),j=i.offsetX-k.left,l=i.offsetY-k.top;$(i.dr
agProxy).css({left:j,top:l});i.dragProxy.terminal.redraw();canvas_manager.update_viewport_overlay()};h();$("#canvas-container").get(0).scroll_panel.test(i,h)}).bind("dragend",function(h){h.dragProxy.terminal.connectors[0].destroy();$(h.dragProxy).remove();$.dropManage().removeClass("input-terminal-active");$("#canvas-container").get(0).scroll_panel.stop()});c.output_terminals[a]=f})},redraw:function(){$.each(this.input_terminals,function(a,b){b.redraw()});$.each(this.output_terminals,function(a,b){b.redraw()})},destroy:function(){$.each(this.input_terminals,function(a,b){b.destroy()});$.each(this.output_terminals,function(a,b){b.destroy()});workflow.remove_node(this);$(this.element).remove()},make_active:function(){$(this.element).addClass("toolForm-active")},make_inactive:function(){var a=this.element.get(0);(function(b){b.removeChild(a);b.appendChild(a)})(a.parentNode);$(a).removeClass("toolForm-active")},init_field_data:function(g){var d=this.element;if(g.type){this.type=!
g.type}this.name=g.name;this.form_html=g.form_html;this.tool_state=g.tool_state;this.tool_errors=g.tool_errors;this.tooltip=g.tooltip?g.tooltip:"";this.annotation=g.annotation;if(this.tool_errors){d.addClass("tool-node-error")}else{d.removeClass("tool-node-error")}var c=this;var a=d.find(".toolFormBody");a.find("div").remove();var h=$("<div class='inputs'></div>").appendTo(a);$.each(g.data_inputs,function(j,b){var f=$("<div class='terminal input-terminal'></div>");c.enable_input_terminal(f,b.name,b.extensions);h.append($("<div class='form-row dataRow input-data-row' name='"+b.name+"'>"+b.label+"</div>").prepend(f))});if((g.data_inputs.length>0)&&(g.data_outputs.length>0)){a.append($("<div class='rule'></div>"))}$.each(g.data_outputs,function(k,b){var j=$("<div class='terminal output-terminal'></div>");c.enable_output_terminal(j,b.name,b.extension);var f=b.name;if(b.extension!="input"){f=f+" ("+b.extension+")"}a.append($("<div class='form-row dataRow'>"+f+"</div>").append(j)!
)});workflow.node_changed(this)},update_field_data:function(f){var c=$
(this.element),d=this;this.tool_state=f.tool_state;this.form_html=f.form_html;this.tool_errors=f.tool_errors;this.annotation=f.annotation;if(this.tool_errors){c.addClass("tool-node-error")}else{c.removeClass("tool-node-error")}var g=c.find("div.inputs");var b=$("<div class='inputs'></div>");var a=g.find("div.input-data-row");$.each(f.data_inputs,function(k,h){var j=$("<div class='terminal input-terminal'></div>");d.enable_input_terminal(j,h.name,h.extensions);g.find("div[name="+h.name+"]").each(function(){$(this).find(".input-terminal").each(function(){var i=this.terminal.connectors[0];if(i){j[0].terminal.connectors[0]=i;i.handle2=j[0].terminal}});$(this).remove()});b.append($("<div class='form-row dataRow input-data-row' name='"+h.name+"'>"+h.label+"</div>").prepend(j))});g.replaceWith(b);g.find("div.input-data-row > .terminal").each(function(){this.terminal.destroy()});this.changed();this.redraw()},error:function(d){var a=$(this.element).find(".toolFormBody");a.find("div")!
.remove();var c="<div style='color: red; text-style: italic;'>"+d+"</div>";this.form_html=c;a.html(c);workflow.node_changed(this)},changed:function(){workflow.node_changed(this)}});function Workflow(a){this.canvas_container=a;this.id_counter=0;this.nodes={};this.name=null;this.has_changes=false;this.active_form_has_changes=false}$.extend(Workflow.prototype,{add_node:function(a){a.id=this.id_counter;a.element.attr("id","wf-node-step-"+a.id);this.id_counter++;this.nodes[a.id]=a;this.has_changes=true;a.workflow=this},remove_node:function(a){if(this.active_node==a){this.clear_active_node()}delete this.nodes[a.id];this.has_changes=true},remove_all:function(){wf=this;$.each(this.nodes,function(b,a){a.destroy();wf.remove_node(a)})},to_simple:function(){var a={};$.each(this.nodes,function(b,d){var f={};$.each(d.input_terminals,function(g,h){f[h.name]=null;$.each(h.connectors,function(j,k){f[h.name]={id:k.handle1.node.id,output_name:k.handle1.name}})});var c={id:d.id,type:d.type,too!
l_id:d.tool_id,tool_state:d.tool_state,tool_errors:d.tool_errors,input
_connections:f,position:$(d.element).position(),annotation:d.annotation};a[d.id]=c});return{steps:a}},from_simple:function(a){wf=this;var b=0;wf.name=a.name;$.each(a.steps,function(f,d){var c=prebuild_node("tool",d.name,d.tool_id);c.init_field_data(d);if(d.position){c.element.css({top:d.position.top,left:d.position.left})}c.id=d.id;wf.nodes[c.id]=c;b=Math.max(b,parseInt(f))});wf.id_counter=b+1;$.each(a.steps,function(f,d){var c=wf.nodes[f];$.each(d.input_connections,function(h,g){if(g){var i=wf.nodes[g.id];var j=new Connector();j.connect(i.output_terminals[g.output_name],c.input_terminals[h]);j.redraw()}})})},check_changes_in_active_form:function(){if(this.active_form_has_changes){this.has_changes=true;$("#right-content").find("form").submit();this.active_form_has_changes=false}},clear_active_node:function(){if(this.active_node){this.active_node.make_inactive();this.active_node=null}parent.show_form_for_tool("<div>No node selected</div>")},activate_node:function(a){if(this.a!
ctive_node!=a){this.check_changes_in_active_form();this.clear_active_node();parent.show_form_for_tool(a.form_html+a.tooltip,a);a.make_active();this.active_node=a}},node_changed:function(a){this.has_changes=true;if(this.active_node==a){this.check_changes_in_active_form();parent.show_form_for_tool(a.form_html+a.tooltip,a)}},layout:function(){this.check_changes_in_active_form();this.has_changes=true;var i={};var b={};$.each(this.nodes,function(l,k){if(i[l]===undefined){i[l]=0}if(b[l]===undefined){b[l]=[]}});$.each(this.nodes,function(l,k){$.each(k.input_terminals,function(m,n){$.each(n.connectors,function(p,q){var o=q.handle1.node;i[k.id]+=1;b[o.id].push(k.id)})})});node_ids_by_level=[];while(true){level_parents=[];for(var a in i){if(i[a]==0){level_parents.push(a)}}if(level_parents.length==0){break}node_ids_by_level.push(level_parents);for(var f in level_parents){var j=level_parents[f];delete i[j];for(var g in b[j]){i[b[j][g]]-=1}}}if(i.length){return}var d=this.nodes;var h=80!
;v_pad=30;var c=h;$.each(node_ids_by_level,function(k,l){l.sort(functi
on(p,o){return $(d[p].element).position().top-$(d[o].element).position().top});var m=0;var n=v_pad;$.each(l,function(o,r){var q=d[r];var p=$(q.element);$(p).css({top:n,left:c});m=Math.max(m,$(p).width());n+=$(p).height()+v_pad});c+=m+h});$.each(d,function(k,l){l.redraw()})},bounds_for_all_nodes:function(){var d=Infinity,b=-Infinity,c=Infinity,a=-Infinity,f;$.each(this.nodes,function(h,g){e=$(g.element);f=e.position();d=Math.min(d,f.left);b=Math.max(b,f.left+e.width());c=Math.min(c,f.top);a=Math.max(a,f.top+e.width())});return{xmin:d,xmax:b,ymin:c,ymax:a}},fit_canvas_to_nodes:function(){var a=this.bounds_for_all_nodes();var f=this.canvas_container.position();var i=this.canvas_container.parent();var d=fix_delta(a.xmin,100);var h=fix_delta(a.ymin,100);d=Math.max(d,f.left);h=Math.max(h,f.top);var c=f.left-d;var g=f.top-h;var b=round_up(a.xmax+100,100)+d;var j=round_up(a.ymax+100,100)+h;b=Math.max(b,-c+i.width());j=Math.max(j,-g+i.height());this.canvas_container.css({left:c,top:g!
,width:b,height:j});this.canvas_container.children().each(function(){var k=$(this).position();$(this).css("left",k.left+d);$(this).css("top",k.top+h)})}});function fix_delta(a,b){if(a<b||a>3*b){new_pos=(Math.ceil(((a%b))/b)+1)*b;return(-(a-new_pos))}return 0}function round_up(a,b){return Math.ceil(a/b)*b}function prebuild_node(l,j,r){var i=$("<div class='toolForm toolFormInCanvas'></div>");var g=new Node(i);g.type=l;if(l=="tool"){g.tool_id=r}var n=$("<div class='toolFormTitle unselectable'>"+j+"</div>");i.append(n);i.css("left",$(window).scrollLeft()+20);i.css("top",$(window).scrollTop()+20);var m=$("<div class='toolFormBody'></div>");var h="<div><img height='16' align='middle' src='../images/loading_small_white_bg.gif'/> loading tool info...</div>";m.append(h);g.form_html=h;i.append(m);var k=$("<div class='buttons' style='float: right;'></div>");k.append($("<img src='../images/delete_icon.png' />").click(function(b){g.destroy()}).hover(function(){$(this).attr("src","../ima!
ges/delete_icon_dark.png")},function(){$(this).attr("src","../images/d
elete_icon.png")}));i.appendTo("#canvas-container");var d=$("#canvas-container").position();var c=$("#canvas-container").parent();var a=i.width();var q=i.height();i.css({left:(-d.left)+(c.width()/2)-(a/2),top:(-d.top)+(c.height()/2)-(q/2)});k.prependTo(n);a+=(k.width()+10);i.css("width",a);$(i).bind("dragstart",function(){workflow.activate_node(g)}).bind("dragend",function(){workflow.node_changed(this);workflow.fit_canvas_to_nodes();canvas_manager.draw_overview()}).bind("dragclickonly",function(){workflow.activate_node(g)}).bind("drag",function(o){var f=$(this).offsetParent().offset(),b=o.offsetX-f.left,p=o.offsetY-f.top;$(this).css({left:b,top:p});$(this).find(".terminal").each(function(){this.terminal.redraw()})});return g}var ext_to_type=null;var type_to_type=null;function issubtype(b,a){b=ext_to_type[b];a=ext_to_type[a];return(type_to_type[b])&&(a in type_to_type[b])}function populate_datatype_info(a){ext_to_type=a.ext_to_class_name;type_to_type=a.class_to_classes}functi!
on ScrollPanel(a){this.panel=a}$.extend(ScrollPanel.prototype,{test:function(v,d){clearTimeout(this.timeout);var k=v.pageX,j=v.pageY,l=$(this.panel),c=l.position(),b=l.width(),i=l.height(),w=l.parent(),s=w.width(),a=w.height(),r=w.offset(),p=r.left,m=r.top,A=p+w.width(),u=m+w.height(),B=-(b-(s/2)),z=-(i-(a/2)),g=(s/2),f=(a/2),h=false,q=5,o=23;if(k-q<p){if(c.left<g){var n=Math.min(o,g-c.left);l.css("left",c.left+n);h=true}}else{if(k+q>A){if(c.left>B){var n=Math.min(o,c.left-B);l.css("left",c.left-n);h=true}}else{if(j-q<m){if(c.top<f){var n=Math.min(o,f-c.top);l.css("top",c.top+n);h=true}}else{if(j+q>u){if(c.top>z){var n=Math.min(o,c.top-B);l.css("top",(c.top-n)+"px");h=true}}}}}if(h){d();var l=this;this.timeout=setTimeout(function(){l.test(v,d)},50)}},stop:function(b,a){clearTimeout(this.timeout)}});function CanvasManager(b,a){this.cv=b;this.cc=this.cv.find("#canvas-container");this.oc=a.find("#overview-canvas");this.ov=a.find("#overview-viewport");this.init_drag()}$.extend(!
CanvasManager.prototype,{init_drag:function(){var b=this;var a=functio
n(f,g){f=Math.min(f,b.cv.width()/2);f=Math.max(f,-b.cc.width()+b.cv.width()/2);g=Math.min(g,b.cv.height()/2);g=Math.max(g,-b.cc.height()+b.cv.height()/2);b.cc.css({left:f,top:g});b.update_viewport_overlay()};this.cc.each(function(){this.scroll_panel=new ScrollPanel(this)});var d,c;this.cv.bind("dragstart",function(g){var h=$(this).offset();var f=b.cc.position();c=f.top-h.top;d=f.left-h.left}).bind("drag",function(f){a(f.offsetX+d,f.offsetY+c)}).bind("dragend",function(){workflow.fit_canvas_to_nodes();b.draw_overview()});this.ov.bind("drag",function(k){var j=b.cc.width(),g=b.cc.height(),f=b.oc.width(),h=b.oc.height(),i=$(this).offsetParent().offset(),m=k.offsetX-i.left,l=k.offsetY-i.top;a(-(m/f*j),-(l/h*g))}).bind("dragend",function(){workflow.fit_canvas_to_nodes();b.draw_overview()});$("#overview-border").bind("drag",function(g){var i=$(this).offsetParent();var h=i.offset();var f=Math.max(i.width()-(g.offsetX-h.left),i.height()-(g.offsetY-h.top));$(this).css({width:f,height:!
f});b.draw_overview()});$("#overview-border div").bind("drag",function(f){})},update_viewport_overlay:function(){var b=this.cc,f=this.cv,a=this.oc,c=this.ov,d=b.width(),j=b.height(),i=a.width(),g=a.height(),h=b.position();c.css({left:-(h.left/d*i),top:-(h.top/j*g),width:(f.width()/d*i)-2,height:(f.height()/j*g)-2})},draw_overview:function(){var j=$("#overview-canvas"),m=j.parent().parent().width(),i=j.get(0).getContext("2d"),d=$("#canvas-container").width(),l=$("#canvas-container").height();var g,a,k,f;var h=this.cv.width();var b=this.cv.height();if(d<h&&l<b){k=d/h*m;f=(m-k)/2;g=l/b*m;a=(m-g)/2}else{if(d<l){a=0;g=m;k=Math.ceil(g*d/l);f=(m-k)/2}else{k=m;f=0;g=Math.ceil(k*l/d);a=(m-g)/2}}j.parent().css({left:f,top:a,width:k,height:g});j.attr("width",k);j.attr("height",g);i.fillStyle="#D2C099";i.strokeStyle="#D8B365";i.lineWidth=1;$.each(workflow.nodes,function(t,q){var s=$(q.element),n=s.position(),c=n.left/d*k,r=n.top/l*g,o=s.width()/d*k,p=s.height()/l*g;i.fillRect(c,r,o,p);!
i.strokeRect(c,r,o,p)});this.update_viewport_overlay()}});
\ No newline at end of file
1
0
20 May '10
details: http://www.bx.psu.edu/hg/galaxy/rev/0c2b174f18e9
changeset: 3780:0c2b174f18e9
user: Dannon Baker <dannon.baker(a)emory.edu>
date: Thu May 13 12:03:17 2010 -0400
description:
Fix for issue where connecting to a Workflow Step that had been changed wasn't being saved
diffstat:
static/scripts/galaxy.workflow_editor.canvas.js | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diffs (11 lines):
diff -r 6dab2b0a9801 -r 0c2b174f18e9 static/scripts/galaxy.workflow_editor.canvas.js
--- a/static/scripts/galaxy.workflow_editor.canvas.js Thu May 13 09:35:57 2010 -0400
+++ b/static/scripts/galaxy.workflow_editor.canvas.js Thu May 13 12:03:17 2010 -0400
@@ -473,6 +473,7 @@
this.has_changes = true;
if ( this.active_node == node ) {
// Reactive with new form_html
+ this.check_changes_in_active_form(); //Force changes to be saved even on new connection (previously dumped)
parent.show_form_for_tool( node.form_html + node.tooltip, node );
}
},
1
0
20 May '10
details: http://www.bx.psu.edu/hg/galaxy/rev/6dab2b0a9801
changeset: 3779:6dab2b0a9801
user: Greg Von Kuster <greg(a)bx.psu.edu>
date: Thu May 13 09:35:57 2010 -0400
description:
Fix for changing a library dataset's data type ( resolves ticket # 333 ), add the library dataset's data type to the library dataset info page, and add <pre> tags to the tool description on the tool information page in the community space.
diffstat:
templates/library/common/ldda_edit_info.mako | 1 +
templates/library/common/ldda_info.mako | 5 +++++
templates/webapps/community/tool/edit_tool.mako | 2 +-
templates/webapps/community/tool/view_tool.mako | 2 +-
4 files changed, 8 insertions(+), 2 deletions(-)
diffs (50 lines):
diff -r eb91e90d3405 -r 6dab2b0a9801 templates/library/common/ldda_edit_info.mako
--- a/templates/library/common/ldda_edit_info.mako Wed May 12 17:43:29 2010 -0400
+++ b/templates/library/common/ldda_edit_info.mako Thu May 13 09:35:57 2010 -0400
@@ -101,6 +101,7 @@
%if ldda.datatype.allow_datatype_change:
<form name="change_datatype" action="${h.url_for( controller='library_common', action='ldda_edit_info', cntrller=cntrller, library_id=library_id, folder_id=trans.security.encode_id( ldda.library_dataset.folder.id ), use_panels=use_panels, show_deleted=show_deleted, )}" method="post">
<div class="form-row">
+ <input type="hidden" name="id" value="${trans.security.encode_id( ldda.id )}"/>
<label>New Type:</label>
${datatype( ldda, file_formats )}
<div class="toolParamHelp" style="clear: both;">
diff -r eb91e90d3405 -r 6dab2b0a9801 templates/library/common/ldda_info.mako
--- a/templates/library/common/ldda_info.mako Wed May 12 17:43:29 2010 -0400
+++ b/templates/library/common/ldda_info.mako Thu May 13 09:35:57 2010 -0400
@@ -80,6 +80,11 @@
<div style="clear: both"></div>
</div>
<div class="form-row">
+ <label>Data type:</label>
+ ${ldda.ext}
+ <div style="clear: both"></div>
+ </div>
+ <div class="form-row">
<label>Build:</label>
${ldda.dbkey}
<div style="clear: both"></div>
diff -r eb91e90d3405 -r 6dab2b0a9801 templates/webapps/community/tool/edit_tool.mako
--- a/templates/webapps/community/tool/edit_tool.mako Wed May 12 17:43:29 2010 -0400
+++ b/templates/webapps/community/tool/edit_tool.mako Thu May 13 09:35:57 2010 -0400
@@ -83,7 +83,7 @@
<div class="form-row">
<label>Description:</label>
%if tool.user_description:
- <div class="form-row-input"><textarea name="user_description" rows="5" cols="35">${tool.user_description}</textarea></div>
+ <div class="form-row-input"><pre><textarea name="user_description" rows="5" cols="35">${tool.user_description}</textarea></pre></div>
%else:
<div class="form-row-input"><textarea name="user_description" rows="5" cols="35"></textarea></div>
%endif
diff -r eb91e90d3405 -r 6dab2b0a9801 templates/webapps/community/tool/view_tool.mako
--- a/templates/webapps/community/tool/view_tool.mako Wed May 12 17:43:29 2010 -0400
+++ b/templates/webapps/community/tool/view_tool.mako Thu May 13 09:35:57 2010 -0400
@@ -119,7 +119,7 @@
<div class="form-row">
<label>Description:</label>
%if tool.user_description:
- ${tool.user_description}
+ <pre>${tool.user_description}</pre>
%endif
<div style="clear: both"></div>
</div>
1
0
details: http://www.bx.psu.edu/hg/galaxy/rev/eb91e90d3405
changeset: 3778:eb91e90d3405
user: Kanwei Li <kanwei(a)gmail.com>
date: Wed May 12 17:43:29 2010 -0400
description:
trackster:
- Prompt when leaving a viz with unsaved changes
- Can only add datatypes of the same dbkey
diffstat:
lib/galaxy/web/controllers/tracks.py | 8 ++++++++
static/scripts/packed/trackster.js | 2 +-
static/scripts/trackster.js | 28 ++++++++++++++++------------
templates/tracks/browser.mako | 20 ++++++++++++++------
4 files changed, 39 insertions(+), 19 deletions(-)
diffs (191 lines):
diff -r b762ea8e5508 -r eb91e90d3405 lib/galaxy/web/controllers/tracks.py
--- a/lib/galaxy/web/controllers/tracks.py Wed May 12 15:57:05 2010 -0400
+++ b/lib/galaxy/web/controllers/tracks.py Wed May 12 17:43:29 2010 -0400
@@ -48,6 +48,13 @@
}
class DatasetSelectionGrid( grids.Grid ):
+ class DbKeyColumn( grids.GridColumn ):
+ def filter( self, trans, user, query, dbkey ):
+ """ Filter by dbkey. """
+ # use raw SQL b/c metadata is a BLOB
+ dbkey = dbkey.replace("'", "\\'")
+ return query.filter( "metadata like '%%\"dbkey\": [\"%s\"]%%' OR metadata like '%%\"dbkey\": \"%s\"%%'" % (dbkey, dbkey) )
+
# Grid definition.
available_tracks = None
title = "Add Tracks"
@@ -61,6 +68,7 @@
columns = [
grids.TextColumn( "Name", key="name", model_class=model.HistoryDatasetAssociation ),
grids.GridColumn( "Filetype", key="extension" ),
+ DbKeyColumn( "Dbkey", key="dbkey", model_class=model.HistoryDatasetAssociation, visible=False )
]
def build_initial_query( self, session ):
diff -r b762ea8e5508 -r eb91e90d3405 static/scripts/packed/trackster.js
--- a/static/scripts/packed/trackster.js Wed May 12 15:57:05 2010 -0400
+++ b/static/scripts/packed/trackster.js Wed May 12 17:43:29 2010 -0400
@@ -1,1 +1,1 @@
-var DEBUG=false;var DENSITY=200,FEATURE_LEVELS=10,DATA_ERROR="There was an error in indexing this dataset. ",DATA_NOCONVERTER="A converter for this dataset is not installed. Please check your datatypes_conf.xml file.",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=5,CONTEXT=$("<canvas></canvas>").get(0).getContext("2d"),RIGHT_STRAND,LEFT_STRAND;var right_img=new Image();right_img.src="/static/images/visualization/strand_right.png";right_img.onload=function(){RIGHT_STRAND=CONTEXT.createPattern(right_img,"repeat")};var left_img=new Image();left_img.src="/static/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="/static/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="/static/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 Drawer=function(){};$.extend(Drawer.prototype,{intensity:function(b,a,c){},});drawer=new Drawer();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;t
his.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.tracks.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[this.tracks.indexOf(a)]},update_options:function(){var b=$("ul#sortable-ul").sortable("toArray");for(var c in b){var e=b[c].split("_li")[0].split("track_")[1];$("#viewport").append($("#track_"+e))}for(var d in view.tracks){var a=view.tracks[d];if(a&&a.update_options){a.update_options(d)}}},reset:function(){this.low=this.max_low;this.high=this.max_high;this.center=this.center=(this.max_high-this.max_low)/2;this.zoom_level=0;$(".yaxislabel").remove()},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)/200)/Math.LN10));this.zoom_res=Math.pow(FEATURE_LEVELS,Math.max(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++){if(this.tracks[c]&&this.tracks[c].enabled){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,b){if(this.max_high===0||this.high-this.low<30){return}if(a){this.center=a/b.width()*(this.high-this.lo!
w)+this.low}this.zoom_level+=1;this.redraw()},zoom_out:function(){if(t
his.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.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(c,b){var a=this;a.enabled=false;a.data_queue={};a.tile_cache.clear();a.data_cache.clear();a.content_div.css("height","30px");if(!a.content_div.text()){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"||d.kind==="error"){a.container_div.addClass("error");a.content_div.text(DATA_ERROR);if(d.message){var f=a.view.tracks.indexOf(a);var e=$("<a href='javascript:void(0!
);'></a>").attr("id",f+"_error");e.text("Click to view error");$("#"+f+"_error").live("click",function(){show_modal("Trackster Error","<pre>"+d.message+"</pre>",{Close:hide_modal})});a.content_div.append(e)}}else{if(d==="no converter"){a.container_div.addClass("error");a.content_div.text(DATA_NOCONVERTER)}else{if(d.data!==undefined&&(d.data===null||d.data.length===0)){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");a.enabled=true;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>"),l=this.content_div.width()/f,h;this.content_div.c
hildren(":first").remove();this.content_div.append(k),this.max_height=0;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());this.content_div.css("height",this.max_height+"px")}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.vi!
ew,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,b){this.track_type="LineTrack";Track.call(this,c,$("#viewport"));TiledTrack.call(this);this.height_px=100;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,mode:"Line"};if(b.min_value!==undefined){this.prefs.min_value=b.min_value}if(b.max_value!==undefined){this.prefs.max_value=b.max_value}if(b.mode!==undefined){this.prefs.mode=b.mode}};$.extend(LineTrack.prototype,TiledTrack.prototype,{init:function(){var a=this,b=a.view.tracks.indexOf(a);a.vertica!
l_range=undefined;this.init_each({stats:true,chrom:a.view.chrom,low:nu
ll,high:null,dataset_id:a.dataset_id},function(c){a.container_div.addClass("line-track");data=c.data;if(isNaN(parseFloat(a.prefs.min_value))||isNaN(parseFloat(a.prefs.max_value))){a.prefs.min_value=data.min;a.prefs.max_value=data.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;a.total_frequency=data.total_frequency;$("#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 d=$("<div></div>").addClass("yaxislabel").attr("id","linetrack_"+b+"_maxval").text(a.prefs.max_value);d.css({position:"relative",top:"25px",left:"10px"});d.prependTo(a.container_div);e.css({position:"relative",top:a.height_px+55+"px",left:"10px"});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.da!
ta_queue[e]=true;$.ajax({url:data_url,dataType:"json",data:{chrom:this.view.chrom,low:a,high:f,dataset_id:this.dataset_id,resolution:this.view.resolution},success:function(g){data=g.data;c.data_cache.set(e,data);delete c.data_queue[e];c.draw()},error:function(h,g,i){console.log(h,g,i)}})}},draw_tile:function(p,r,c,e){if(this.vertical_range===undefined){return}var s=r*DENSITY*p,a=DENSITY*p,b=$("<canvas class='tile'></canvas>"),v=p+"_"+r;if(this.data_cache.get(v)===undefined){this.get_data(p,r);return}var j=this.data_cache.get(v);if(j===null){return}b.css({position:"absolute",top:0,left:(s-this.view.low)*e});b.get(0).width=Math.ceil(a*e);b.get(0).height=this.height_px;var o=b.get(0).getContext("2d"),k=false,l=this.prefs.min_value,g=this.prefs.max_value,n=this.vertical_range,t=this.total_frequency,d=this.height_px,m=this.prefs.mode;o.beginPath();if(data.length>1){var f=Math.ceil((data[1][0]-data[0][0])*e)}else{var f=10}var u,h;for(var q=0;q<data.length;q++){u=(data[q][0]-s)*e;!
h=data[q][1];if(m=="Intensity"){if(h===null){continue}if(h<=l){h=l}els
e{if(h>=g){h=g}}h=255-Math.floor((h-l)/n*255);o.fillStyle="rgb("+h+","+h+","+h+")";o.fillRect(u,0,f,this.height_px)}else{if(h===null){if(k&&m==="Filled"){o.lineTo(u,d)}k=false;continue}else{if(h<=l){h=l}else{if(h>=g){h=g}}h=Math.round(d-(h-l)/n*d);if(k){o.lineTo(u,h)}else{k=true;if(m==="Filled"){o.moveTo(u,d);o.lineTo(u,h)}else{o.moveTo(u,h)}}}}}if(m==="Filled"){if(k){o.lineTo(u,d)}o.fill()}else{o.stroke()}c.append(b);return b},gen_options:function(n){var a=$("<div></div>").addClass("form-row");var h="track_"+n+"_minval",k="track_"+n+"_maxval",e="track_"+n+"_mode",l=$("<label></label>").attr("for",h).text("Min value:"),b=(this.prefs.min_value===undefined?"":this.prefs.min_value),m=$("<input></input>").attr("id",h).val(b),g=$("<label></label>").attr("for",k).text("Max value:"),j=(this.prefs.max_value===undefined?"":this.prefs.max_value),f=$("<input></input>").attr("id",k).val(j),d=$("<label></label>").attr("for",e).text("Display mode:"),i=(this.prefs.mode===undefined?"Line":t!
his.prefs.mode),c=$('<select id="'+e+'"><option value="Line" id="mode_Line">Line</option><option value="Filled" id="mode_Filled">Filled</option><option value="Intensity" id="mode_Intensity">Intensity</option></select>');c.children("#mode_"+i).attr("selected","selected");return a.append(l).append(m).append(g).append(f).append(d).append(c)},update_options:function(d){var a=$("#track_"+d+"_minval").val(),c=$("#track_"+d+"_maxval").val(),b=$("#track_"+d+"_mode option:selected").val();if(a!==this.prefs.min_value||c!==this.prefs.max_value||b!=this.prefs.mode){this.prefs.min_value=parseFloat(a);this.prefs.max_value=parseFloat(c);this.prefs.mode=b;this.vertical_range=this.prefs.max_value-this.prefs.min_value;$("#linetrack_"+d+"_minval").text(this.prefs.min_value);$("#linetrack_"+d+"_maxval").text(this.prefs.max_value);this.tile_cache.clear();this.draw()}}});var FeatureTrack=function(c,a,b){this.track_type="FeatureTrack";Track.call(this,c,$("#viewport"));TiledTrack.call(this);this.h!
eight_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_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",show_counts:false};if(b.block_color!==undefined){this.prefs.block_color=b.block_color}if(b.label_color!==undefined){this.prefs.label_color=b.label_color}if(b.show_counts!==undefined){this.prefs.show_counts=b.show_counts}};$.extend(FeatureTrack.prototype,TiledTrack.prototype,{init:function(){var a=this,b=a.view.max_low+"_"+a.view.max_high;this.init_each({low:a.view.max_low,high:a.view.max_high,dataset_id:a.dataset_id,chrom:a.view.chrom,resolution:this.view.resolution},function(c){a.data_cache.set(b,c);a.draw()})},get_data:function(a,d){var b=this,c=a+"_"+d;if(!b.data_queue[c]){b.data!
_queue[c]=true;$.getJSON(data_url,{chrom:b.view.chrom,low:a,high:d,dataset_id:b.dataset_id,resolution:this.view.resolution},function(e){b.data_cache.set(c,e);delete b.data_queue[c];b.draw()})}},incremental_slots:function(a,g,c){if(!this.inc_slots[a]){this.inc_slots[a]={};this.inc_slots[a].w_scale=1/a;this.s_e_by_tile[a]={}}var m=this.inc_slots[a].w_scale,v=[],h=0,b=$("<canvas></canvas>").get(0).getContext("2d"),n=this.view.max_low;var d,f,x=[];for(var s=0,t=g.length;s<t;s++){var e=g[s],l=e[0];if(this.inc_slots[a][l]!==undefined){h=Math.max(h,this.inc_slots[a][l]);x.push(this.inc_slots[a][l])}else{v.push(s)}}for(var s=0,t=v.length;s<t;s++){var e=g[v[s]];l=e[0],feature_start=e[1],feature_end=e[2],feature_name=e[3];d=Math.floor((feature_start-n)*m);f=Math.ceil((feature_end-n)*m);if(!c){var p=b.measureText(feature_name).width;if(d-p<0){f+=p}else{d-=p}}var r=0;while(true){var o=true;if(this.s_e_by_tile[a][r]!==undefined){for(var q=0,w=this.s_e_by_tile[a][r].length;q<w;q++){var u!
=this.s_e_by_tile[a][r][q];if(f>u[0]&&d<u[1]){o=false;break}}}if(o){if
(this.s_e_by_tile[a][r]===undefined){this.s_e_by_tile[a][r]=[]}this.s_e_by_tile[a][r].push([d,f]);this.inc_slots[a][l]=r;h=Math.max(h,r);break}r++}}return h},rect_or_text:function(n,o,g,f,m,b,d,k,e,i){n.textAlign="center";var j=Math.round(o/2);if(d!==undefined&&o>g){n.fillStyle="#555";n.fillRect(k,i+1,e,9);n.fillStyle="#eee";for(var h=0,l=d.length;h<l;h++){if(b+h>=f&&b+h<=m){var a=Math.floor(Math.max(0,(b+h-f)*o));n.fillText(d[h],a+this.left_offset+j,i+9)}}}else{n.fillStyle="#555";n.fillRect(k,i+4,e,3)}},draw_tile:function(W,h,m,ak){var D=h*DENSITY*W,ac=(h+1)*DENSITY*W,C=DENSITY*W;var aj,r;var ad=D+"_"+ac;var w=this.data_cache.get(ad);if(w===undefined){this.data_queue[[D,ac]]=true;this.get_data(D,ac);return}if(w.dataset_type==="summary_tree"){r=30}else{var U=(w.extra_info==="no_detail");var al=(U?this.vertical_nodetail_px:this.vertical_detail_px);r=this.incremental_slots(this.view.zoom_res,w.data,U)*al+15;m.parent().css("height",Math.max(this.height_px,r)+"px");aj=this.inc_s!
lots[this.view.zoom_res]}var a=Math.ceil(C*ak),K=$("<canvas class='tile'></canvas>"),Y=this.prefs.label_color,f=this.prefs.block_color,O=this.left_offset;K.css({position:"absolute",top:0,left:(D-this.view.low)*ak-O});K.get(0).width=a+O;K.get(0).height=r;var z=K.get(0).getContext("2d"),ah=z.measureText("A").width;z.fillStyle=this.prefs.block_color;z.font=this.default_font;z.textAlign="right";if(w.dataset_type=="summary_tree"){var J,G=55,ab=255-G,g=ab*2/3,Q=w.data,B=w.max,l=w.avg;if(Q.length>2){var b=Math.ceil((Q[1][0]-Q[0][0])*ak)}else{var b=50}for(var af=0,v=Q.length;af<v;af++){var S=Math.ceil((Q[af][0]-D)*ak);var R=Q[af][1];if(!R){continue}J=Math.floor(ab-(R/B)*ab);z.fillStyle="rgb("+J+","+J+","+J+")";z.fillRect(S+O,0,b,20);if(this.prefs.show_counts){if(J>g){z.fillStyle="black"}else{z.fillStyle="#ddd"}z.textAlign="center";z.fillText(Q[af][1],S+O+(b/2),12)}}m.append(K);return K}var ai=w.data;var ae=0;for(var af=0,v=ai.length;af<v;af++){var L=ai[af],I=L[0],ag=L[1],T=L[2],E=L!
[3];if(ag<=ac&&T>=D){var V=Math.floor(Math.max(0,(ag-D)*ak)),A=Math.ce
il(Math.min(a,Math.max(0,(T-D)*ak))),P=aj[I]*al;if(w.dataset_type==="bai"){z.fillStyle="#555";if(L[4] instanceof Array){var s=Math.floor(Math.max(0,(L[4][0]-D)*ak)),H=Math.ceil(Math.min(a,Math.max(0,(L[4][1]-D)*ak))),q=Math.floor(Math.max(0,(L[5][0]-D)*ak)),o=Math.ceil(Math.min(a,Math.max(0,(L[5][1]-D)*ak)));if(L[4][1]>=D&&L[4][0]<=ac){this.rect_or_text(z,ak,ah,D,ac,L[4][0],L[4][2],s+O,H-s,P)}if(L[5][1]>=D&&L[5][0]<=ac){this.rect_or_text(z,ak,ah,D,ac,L[5][0],L[5][2],q+O,o-q,P)}if(q>H){z.fillStyle="#999";z.fillRect(H+O,P+5,q-H,1)}}else{z.fillStyle="#555";this.rect_or_text(z,ak,ah,D,ac,ag,E,V+O,A-V,P)}if(!U&&ag>D){z.fillStyle=this.prefs.label_color;if(h===0&&V-z.measureText(E).width<0){z.textAlign="left";z.fillText(I,A+2+O,P+8)}else{z.textAlign="right";z.fillText(I,V-2+O,P+8)}z.fillStyle="#555"}}else{if(w.dataset_type==="interval_index"){if(U){z.fillRect(V+O,P+5,A-V,1)}else{var u=L[4],N=L[5],X=L[6],e=L[7];var t,Z,F=null,am=null;if(N&&X){F=Math.floor(Math.max(0,(N-D)*ak));am=Ma!
th.ceil(Math.min(a,Math.max(0,(X-D)*ak)))}if(E!==undefined&&ag>D){z.fillStyle=Y;if(h===0&&V-z.measureText(E).width<0){z.textAlign="left";z.fillText(E,A+2+O,P+8)}else{z.textAlign="right";z.fillText(E,V-2+O,P+8)}z.fillStyle=f}if(e){if(u){if(u=="+"){z.fillStyle=RIGHT_STRAND}else{if(u=="-"){z.fillStyle=LEFT_STRAND}}z.fillRect(V+O,P,A-V,10);z.fillStyle=f}for(var ad=0,d=e.length;ad<d;ad++){var n=e[ad],c=Math.floor(Math.max(0,(n[0]-D)*ak)),M=Math.ceil(Math.min(a,Math.max((n[1]-D)*ak)));if(c>M){continue}t=5;Z=3;z.fillRect(c+O,P+Z,M-c,t);if(F!==undefined&&!(c>am||M<F)){t=9;Z=1;var aa=Math.max(c,F),p=Math.min(M,am);z.fillRect(aa+O,P+Z,p-aa,t)}}}else{t=9;Z=1;z.fillRect(V+O,P+Z,A-V,t);if(L.strand){if(L.strand=="+"){z.fillStyle=RIGHT_STRAND_INV}else{if(L.strand=="-"){z.fillStyle=LEFT_STRAND_INV}}z.fillRect(V+O,P,A-V,10);z.fillStyle=prefs.block_color}}}}}ae++}}m.append(K);return K},gen_options:function(i){var a=$("<div></div>").addClass("form-row");var e="track_"+i+"_block_color",k=$("<l!
abel></label>").attr("for",e).text("Block color:"),l=$("<input></input
>").attr("id",e).attr("name",e).val(this.prefs.block_color),j="track_"+i+"_label_color",g=$("<label></label>").attr("for",j).text("Text color:"),h=$("<input></input>").attr("id",j).attr("name",j).val(this.prefs.label_color),f="track_"+i+"_show_count",c=$("<label></label>").attr("for",f).text("Show summary counts"),b=$('<input type="checkbox" style="float:left;"></input>').attr("id",f).attr("name",f).attr("checked",this.prefs.show_counts),d=$("<div></div>").append(b).append(c);return a.append(k).append(l).append(g).append(h).append(d)},update_options:function(d){var b=$("#track_"+d+"_block_color").val(),c=$("#track_"+d+"_label_color").val(),a=$("#track_"+d+"_show_count").attr("checked");if(b!==this.prefs.block_color||c!==this.prefs.label_color||a!=this.prefs.show_counts){this.prefs.block_color=b;this.prefs.label_color=c;this.prefs.show_counts=a;this.tile_cache.clear();this.draw()}}});var ReadTrack=function(c,a,b){FeatureTrack.call(this,c,a,b);this.track_type="ReadTrack";this.!
vertical_detail_px=10;this.vertical_nodetail_px=5};$.extend(ReadTrack.prototype,TiledTrack.prototype,FeatureTrack.prototype,{});
\ No newline at end of file
+var DEBUG=false;var DENSITY=200,FEATURE_LEVELS=10,DATA_ERROR="There was an error in indexing this dataset. ",DATA_NOCONVERTER="A converter for this dataset is not installed. Please check your datatypes_conf.xml file.",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=5,CONTEXT=$("<canvas></canvas>").get(0).getContext("2d"),RIGHT_STRAND,LEFT_STRAND;var right_img=new Image();right_img.src="/static/images/visualization/strand_right.png";right_img.onload=function(){RIGHT_STRAND=CONTEXT.createPattern(right_img,"repeat")};var left_img=new Image();left_img.src="/static/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="/static/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="/static/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 Drawer=function(){};$.extend(Drawer.prototype,{intensity:function(b,a,c){},});drawer=new Drawer();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;t
his.zoom_factor=3;this.zoom_level=0;this.track_id_counter=0;this.has_changes=false};$.extend(View.prototype,{add_track:function(a){a.view=this;a.track_id=this.track_id_counter;this.tracks.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){this.has_changes=true;a.container_div.fadeOut("slow",function(){$(this).remove()});delete this.tracks[this.tracks.indexOf(a)]},update_options:function(){this.has_changes=true;var b=$("ul#sortable-ul").sortable("toArray");for(var c in b){var e=b[c].split("_li")[0].split("track_")[1];$("#viewport").append($("#track_"+e))}for(var d in view.tracks){var a=view.tracks[d];if(a&&a.update_options){a.update_options(d)}}},reset:function(){this.low=this.max_low;this.high=this.max_high;this.center=this.center=(this.max_high-this.max_low)/2;this.zoom_level=0;$(".yaxislabel").remove()},redraw:function(f){this.span=t!
his.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)/200)/Math.LN10));this.zoom_res=Math.pow(FEATURE_LEVELS,Math.max(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++){if(this.tracks[c]&&this.tracks[c].enabled){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,b){if(this.max_high===0||this.high-t!
his.low<30){return}if(a){this.center=a/b.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.content_div=$("<div class='track-content'>");this.container_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.enabled=false;a.data_queue={};a.tile_cache.clear();a.data_cache.clear();a.content_div.css("height","30px");if(!a.content_div.text()){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"||d.kind==="error"){a.container_div.addClass("error");a.content_div.text(DATA_ERROR);if(d.message){var!
f=a.view.tracks.indexOf(a);var e=$("<a href='javascript:void(0);'></a>").attr("id",f+"_error");e.text("Click to view error");$("#"+f+"_error").live("click",function(){show_modal("Trackster Error","<pre>"+d.message+"</pre>",{Close:hide_modal})});a.content_div.append(e)}}else{if(d==="no converter"){a.container_div.addClass("error");a.content_div.text(DATA_NOCONVERTER)}else{if(d.data!==undefined&&(d.data===null||d.data.length===0)){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");a.enabled=true;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: relati
ve;'></div>"),l=this.content_div.width()/f,h;this.content_div.children(":first").remove();this.content_div.append(k),this.max_height=0;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());this.content_div.css("height",this.max_height+"px")}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(Labe!
lTrack.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,b){this.track_type="LineTrack";Track.call(this,c,$("#viewport"));TiledTrack.call(this);this.height_px=100;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,mode:"Line"};if(b.min_value!==undefined){this.prefs.min_value=b.min_value}if(b.max_value!==undefined){this.prefs.max_value=b.max_value}if(b.mode!==undefined){this.prefs.mode=b.mode}};$.extend(LineTrack.prototype,TiledTrack.prototype,{!
init:function(){var a=this,b=a.view.tracks.indexOf(a);a.vertical_range
=undefined;this.init_each({stats:true,chrom:a.view.chrom,low:null,high:null,dataset_id:a.dataset_id},function(c){a.container_div.addClass("line-track");data=c.data;if(isNaN(parseFloat(a.prefs.min_value))||isNaN(parseFloat(a.prefs.max_value))){a.prefs.min_value=data.min;a.prefs.max_value=data.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;a.total_frequency=data.total_frequency;$("#linetrack_"+b+"_minval").remove();$("#linetrack_"+b+"_maxval").remove();var e=$("<div />").addClass("yaxislabel").attr("id","linetrack_"+b+"_minval").text(a.prefs.min_value);var d=$("<div />").addClass("yaxislabel").attr("id","linetrack_"+b+"_maxval").text(a.prefs.max_value);d.css({position:"relative",top:"25px",left:"10px"});d.prependTo(a.container_div);e.css({position:"relative",top:a.height_px+55+"px",left:"10px"});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;$.ajax({url:data_url,dataType:"json",data:{chrom:this.view.chrom,low:a,high:f,dataset_id:this.dataset_id,resolution:this.view.resolution},success:function(g){data=g.data;c.data_cache.set(e,data);delete c.data_queue[e];c.draw()},error:function(h,g,i){console.log(h,g,i)}})}},draw_tile:function(p,r,c,e){if(this.vertical_range===undefined){return}var s=r*DENSITY*p,a=DENSITY*p,b=$("<canvas class='tile'></canvas>"),v=p+"_"+r;if(this.data_cache.get(v)===undefined){this.get_data(p,r);return}var j=this.data_cache.get(v);if(j===null){return}b.css({position:"absolute",top:0,left:(s-this.view.low)*e});b.get(0).width=Math.ceil(a*e);b.get(0).height=this.height_px;var o=b.get(0).getContext("2d"),k=false,l=this.prefs.min_value,g=this.prefs.max_value,n=this.vertical_range,t=this.total_frequency,d=this.height_px,m=this.prefs.mode;o.beginPath();if(data.length>1){var f=Math.ceil((data[1][0]-data[0][0])*e)}else{var f=10}var!
u,h;for(var q=0;q<data.length;q++){u=(data[q][0]-s)*e;h=data[q][1];if
(m=="Intensity"){if(h===null){continue}if(h<=l){h=l}else{if(h>=g){h=g}}h=255-Math.floor((h-l)/n*255);o.fillStyle="rgb("+h+","+h+","+h+")";o.fillRect(u,0,f,this.height_px)}else{if(h===null){if(k&&m==="Filled"){o.lineTo(u,d)}k=false;continue}else{if(h<=l){h=l}else{if(h>=g){h=g}}h=Math.round(d-(h-l)/n*d);if(k){o.lineTo(u,h)}else{k=true;if(m==="Filled"){o.moveTo(u,d);o.lineTo(u,h)}else{o.moveTo(u,h)}}}}}if(m==="Filled"){if(k){o.lineTo(u,d)}o.fill()}else{o.stroke()}c.append(b);return b},gen_options:function(n){var a=$("<div />").addClass("form-row");var h="track_"+n+"_minval",k="track_"+n+"_maxval",e="track_"+n+"_mode",l=$("<label></label>").attr("for",h).text("Min value:"),b=(this.prefs.min_value===undefined?"":this.prefs.min_value),m=$("<input></input>").attr("id",h).val(b),g=$("<label></label>").attr("for",k).text("Max value:"),j=(this.prefs.max_value===undefined?"":this.prefs.max_value),f=$("<input></input>").attr("id",k).val(j),d=$("<label></label>").attr("for",e).text("Disp!
lay mode:"),i=(this.prefs.mode===undefined?"Line":this.prefs.mode),c=$('<select id="'+e+'"><option value="Line" id="mode_Line">Line</option><option value="Filled" id="mode_Filled">Filled</option><option value="Intensity" id="mode_Intensity">Intensity</option></select>');c.children("#mode_"+i).attr("selected","selected");return a.append(l).append(m).append(g).append(f).append(d).append(c)},update_options:function(d){var a=$("#track_"+d+"_minval").val(),c=$("#track_"+d+"_maxval").val(),b=$("#track_"+d+"_mode option:selected").val();if(a!==this.prefs.min_value||c!==this.prefs.max_value||b!=this.prefs.mode){this.prefs.min_value=parseFloat(a);this.prefs.max_value=parseFloat(c);this.prefs.mode=b;this.vertical_range=this.prefs.max_value-this.prefs.min_value;$("#linetrack_"+d+"_minval").text(this.prefs.min_value);$("#linetrack_"+d+"_maxval").text(this.prefs.max_value);this.tile_cache.clear();this.draw()}}});var FeatureTrack=function(c,a,b){this.track_type="FeatureTrack";Track.call(!
this,c,$("#viewport"));TiledTrack.call(this);this.height_px=100;this.c
ontainer_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_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",show_counts:false};if(b.block_color!==undefined){this.prefs.block_color=b.block_color}if(b.label_color!==undefined){this.prefs.label_color=b.label_color}if(b.show_counts!==undefined){this.prefs.show_counts=b.show_counts}};$.extend(FeatureTrack.prototype,TiledTrack.prototype,{init:function(){var a=this,b=a.view.max_low+"_"+a.view.max_high;this.init_each({low:a.view.max_low,high:a.view.max_high,dataset_id:a.dataset_id,chrom:a.view.chrom,resolution:this.view.resolution},function(c){a.data_cache.set(b,c);a.draw()})},get_data:function(a,!
d){var b=this,c=a+"_"+d;if(!b.data_queue[c]){b.data_queue[c]=true;$.getJSON(data_url,{chrom:b.view.chrom,low:a,high:d,dataset_id:b.dataset_id,resolution:this.view.resolution},function(e){b.data_cache.set(c,e);delete b.data_queue[c];b.draw()})}},incremental_slots:function(a,g,c){if(!this.inc_slots[a]){this.inc_slots[a]={};this.inc_slots[a].w_scale=1/a;this.s_e_by_tile[a]={}}var m=this.inc_slots[a].w_scale,v=[],h=0,b=$("<canvas></canvas>").get(0).getContext("2d"),n=this.view.max_low;var d,f,x=[];for(var s=0,t=g.length;s<t;s++){var e=g[s],l=e[0];if(this.inc_slots[a][l]!==undefined){h=Math.max(h,this.inc_slots[a][l]);x.push(this.inc_slots[a][l])}else{v.push(s)}}for(var s=0,t=v.length;s<t;s++){var e=g[v[s]];l=e[0],feature_start=e[1],feature_end=e[2],feature_name=e[3];d=Math.floor((feature_start-n)*m);f=Math.ceil((feature_end-n)*m);if(!c){var p=b.measureText(feature_name).width;if(d-p<0){f+=p}else{d-=p}}var r=0;while(true){var o=true;if(this.s_e_by_tile[a][r]!==undefined){for(var!
q=0,w=this.s_e_by_tile[a][r].length;q<w;q++){var u=this.s_e_by_tile[a
][r][q];if(f>u[0]&&d<u[1]){o=false;break}}}if(o){if(this.s_e_by_tile[a][r]===undefined){this.s_e_by_tile[a][r]=[]}this.s_e_by_tile[a][r].push([d,f]);this.inc_slots[a][l]=r;h=Math.max(h,r);break}r++}}return h},rect_or_text:function(n,o,g,f,m,b,d,k,e,i){n.textAlign="center";var j=Math.round(o/2);if(d!==undefined&&o>g){n.fillStyle="#555";n.fillRect(k,i+1,e,9);n.fillStyle="#eee";for(var h=0,l=d.length;h<l;h++){if(b+h>=f&&b+h<=m){var a=Math.floor(Math.max(0,(b+h-f)*o));n.fillText(d[h],a+this.left_offset+j,i+9)}}}else{n.fillStyle="#555";n.fillRect(k,i+4,e,3)}},draw_tile:function(W,h,m,ak){var D=h*DENSITY*W,ac=(h+1)*DENSITY*W,C=DENSITY*W;var aj,r;var ad=D+"_"+ac;var w=this.data_cache.get(ad);if(w===undefined){this.data_queue[[D,ac]]=true;this.get_data(D,ac);return}if(w.dataset_type==="summary_tree"){r=30}else{var U=(w.extra_info==="no_detail");var al=(U?this.vertical_nodetail_px:this.vertical_detail_px);r=this.incremental_slots(this.view.zoom_res,w.data,U)*al+15;m.parent().css("hei!
ght",Math.max(this.height_px,r)+"px");aj=this.inc_slots[this.view.zoom_res]}var a=Math.ceil(C*ak),K=$("<canvas class='tile'></canvas>"),Y=this.prefs.label_color,f=this.prefs.block_color,O=this.left_offset;K.css({position:"absolute",top:0,left:(D-this.view.low)*ak-O});K.get(0).width=a+O;K.get(0).height=r;var z=K.get(0).getContext("2d"),ah=z.measureText("A").width;z.fillStyle=this.prefs.block_color;z.font=this.default_font;z.textAlign="right";if(w.dataset_type=="summary_tree"){var J,G=55,ab=255-G,g=ab*2/3,Q=w.data,B=w.max,l=w.avg;if(Q.length>2){var b=Math.ceil((Q[1][0]-Q[0][0])*ak)}else{var b=50}for(var af=0,v=Q.length;af<v;af++){var S=Math.ceil((Q[af][0]-D)*ak);var R=Q[af][1];if(!R){continue}J=Math.floor(ab-(R/B)*ab);z.fillStyle="rgb("+J+","+J+","+J+")";z.fillRect(S+O,0,b,20);if(this.prefs.show_counts){if(J>g){z.fillStyle="black"}else{z.fillStyle="#ddd"}z.textAlign="center";z.fillText(Q[af][1],S+O+(b/2),12)}}m.append(K);return K}var ai=w.data;var ae=0;for(var af=0,v=ai.lengt!
h;af<v;af++){var L=ai[af],I=L[0],ag=L[1],T=L[2],E=L[3];if(ag<=ac&&T>=D
){var V=Math.floor(Math.max(0,(ag-D)*ak)),A=Math.ceil(Math.min(a,Math.max(0,(T-D)*ak))),P=aj[I]*al;if(w.dataset_type==="bai"){z.fillStyle="#555";if(L[4] instanceof Array){var s=Math.floor(Math.max(0,(L[4][0]-D)*ak)),H=Math.ceil(Math.min(a,Math.max(0,(L[4][1]-D)*ak))),q=Math.floor(Math.max(0,(L[5][0]-D)*ak)),o=Math.ceil(Math.min(a,Math.max(0,(L[5][1]-D)*ak)));if(L[4][1]>=D&&L[4][0]<=ac){this.rect_or_text(z,ak,ah,D,ac,L[4][0],L[4][2],s+O,H-s,P)}if(L[5][1]>=D&&L[5][0]<=ac){this.rect_or_text(z,ak,ah,D,ac,L[5][0],L[5][2],q+O,o-q,P)}if(q>H){z.fillStyle="#999";z.fillRect(H+O,P+5,q-H,1)}}else{z.fillStyle="#555";this.rect_or_text(z,ak,ah,D,ac,ag,E,V+O,A-V,P)}if(!U&&ag>D){z.fillStyle=this.prefs.label_color;if(h===0&&V-z.measureText(E).width<0){z.textAlign="left";z.fillText(I,A+2+O,P+8)}else{z.textAlign="right";z.fillText(I,V-2+O,P+8)}z.fillStyle="#555"}}else{if(w.dataset_type==="interval_index"){if(U){z.fillRect(V+O,P+5,A-V,1)}else{var u=L[4],N=L[5],X=L[6],e=L[7];var t,Z,F=null,am=nul!
l;if(N&&X){F=Math.floor(Math.max(0,(N-D)*ak));am=Math.ceil(Math.min(a,Math.max(0,(X-D)*ak)))}if(E!==undefined&&ag>D){z.fillStyle=Y;if(h===0&&V-z.measureText(E).width<0){z.textAlign="left";z.fillText(E,A+2+O,P+8)}else{z.textAlign="right";z.fillText(E,V-2+O,P+8)}z.fillStyle=f}if(e){if(u){if(u=="+"){z.fillStyle=RIGHT_STRAND}else{if(u=="-"){z.fillStyle=LEFT_STRAND}}z.fillRect(V+O,P,A-V,10);z.fillStyle=f}for(var ad=0,d=e.length;ad<d;ad++){var n=e[ad],c=Math.floor(Math.max(0,(n[0]-D)*ak)),M=Math.ceil(Math.min(a,Math.max((n[1]-D)*ak)));if(c>M){continue}t=5;Z=3;z.fillRect(c+O,P+Z,M-c,t);if(F!==undefined&&!(c>am||M<F)){t=9;Z=1;var aa=Math.max(c,F),p=Math.min(M,am);z.fillRect(aa+O,P+Z,p-aa,t)}}}else{t=9;Z=1;z.fillRect(V+O,P+Z,A-V,t);if(L.strand){if(L.strand=="+"){z.fillStyle=RIGHT_STRAND_INV}else{if(L.strand=="-"){z.fillStyle=LEFT_STRAND_INV}}z.fillRect(V+O,P,A-V,10);z.fillStyle=prefs.block_color}}}}}ae++}}m.append(K);return K},gen_options:function(i){var a=$("<div />").addClass("for!
m-row");var e="track_"+i+"_block_color",k=$("<label />").attr("for",e)
.text("Block color:"),l=$("<input />").attr("id",e).attr("name",e).val(this.prefs.block_color),j="track_"+i+"_label_color",g=$("<label />").attr("for",j).text("Text color:"),h=$("<input />").attr("id",j).attr("name",j).val(this.prefs.label_color),f="track_"+i+"_show_count",c=$("<label />").attr("for",f).text("Show summary counts"),b=$('<input type="checkbox" style="float:left;"></input>').attr("id",f).attr("name",f).attr("checked",this.prefs.show_counts),d=$("<div />").append(b).append(c);return a.append(k).append(l).append(g).append(h).append(d)},update_options:function(d){var b=$("#track_"+d+"_block_color").val(),c=$("#track_"+d+"_label_color").val(),a=$("#track_"+d+"_show_count").attr("checked");if(b!==this.prefs.block_color||c!==this.prefs.label_color||a!=this.prefs.show_counts){this.prefs.block_color=b;this.prefs.label_color=c;this.prefs.show_counts=a;this.tile_cache.clear();this.draw()}}});var ReadTrack=function(c,a,b){FeatureTrack.call(this,c,a,b);this.track_type="Rea!
dTrack";this.vertical_detail_px=10;this.vertical_nodetail_px=5};$.extend(ReadTrack.prototype,TiledTrack.prototype,FeatureTrack.prototype,{});
\ No newline at end of file
diff -r b762ea8e5508 -r eb91e90d3405 static/scripts/trackster.js
--- a/static/scripts/trackster.js Wed May 12 15:57:05 2010 -0400
+++ b/static/scripts/trackster.js Wed May 12 17:43:29 2010 -0400
@@ -102,6 +102,7 @@
this.zoom_factor = 3;
this.zoom_level = 0;
this.track_id_counter = 0;
+ this.has_changes = false;
};
$.extend( View.prototype, {
add_track: function ( track ) {
@@ -117,10 +118,12 @@
this.label_tracks.push( label_track );
},
remove_track: function( track ) {
+ this.has_changes = true;
track.container_div.fadeOut('slow', function() { $(this).remove(); });
delete this.tracks[this.tracks.indexOf(track)];
},
update_options: function() {
+ this.has_changes = true;
var sorted = $("ul#sortable-ul").sortable('toArray');
for (var id_i in sorted) {
var id = sorted[id_i].split("_li")[0].split("track_")[1];
@@ -215,7 +218,7 @@
init_global: function () {
this.header_div = $("<div class='track-header'>").text( this.name );
this.content_div = $("<div class='track-content'>");
- this.container_div = $("<div></div>").addClass('track').append( this.header_div ).append( this.content_div );
+ this.container_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) {
@@ -392,8 +395,8 @@
$('#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);
+ var min_label = $("<div />").addClass('yaxislabel').attr("id", 'linetrack_' + track_id + '_minval').text(track.prefs.min_value);
+ var max_label = $("<div />").addClass('yaxislabel').attr("id", 'linetrack_' + track_id + '_maxval').text(track.prefs.max_value);
max_label.css({ position: "relative", top: "25px", left: "10px" });
max_label.prependTo(track.container_div);
@@ -537,7 +540,7 @@
parent_element.append( canvas );
return canvas;
}, gen_options: function(track_id) {
- var container = $("<div></div>").addClass("form-row");
+ var container = $("<div />").addClass("form-row");
var minval = 'track_' + track_id + '_minval',
maxval = 'track_' + track_id + '_maxval',
@@ -604,7 +607,8 @@
init: function() {
var track = this,
key = track.view.max_low + '_' + track.view.max_high;
- this.init_each({ low: track.view.max_low,
+
+ this.init_each({ low: track.view.max_low,
high: track.view.max_high, dataset_id: track.dataset_id,
chrom: track.view.chrom, resolution: this.view.resolution }, function (result) {
track.data_cache.set(key, result);
@@ -948,18 +952,18 @@
parent_element.append( new_canvas );
return new_canvas;
}, gen_options: function(track_id) {
- var container = $("<div></div>").addClass("form-row");
+ var container = $("<div />").addClass("form-row");
var block_color = 'track_' + track_id + '_block_color',
- block_color_label = $('<label></label>').attr("for", block_color).text("Block color:"),
- block_color_input = $('<input></input>').attr("id", block_color).attr("name", block_color).val(this.prefs.block_color),
+ block_color_label = $('<label />').attr("for", block_color).text("Block color:"),
+ block_color_input = $('<input />').attr("id", block_color).attr("name", block_color).val(this.prefs.block_color),
label_color = 'track_' + track_id + '_label_color',
- label_color_label = $('<label></label>').attr("for", label_color).text("Text color:"),
- label_color_input = $('<input></input>').attr("id", label_color).attr("name", label_color).val(this.prefs.label_color),
+ label_color_label = $('<label />').attr("for", label_color).text("Text color:"),
+ label_color_input = $('<input />').attr("id", label_color).attr("name", label_color).val(this.prefs.label_color),
show_count = 'track_' + track_id + '_show_count',
- show_count_label = $('<label></label>').attr("for", show_count).text("Show summary counts"),
+ show_count_label = $('<label />').attr("for", show_count).text("Show summary counts"),
show_count_input = $('<input type="checkbox" style="float:left;"></input>').attr("id", show_count).attr("name", show_count).attr("checked", this.prefs.show_counts),
- show_count_div = $('<div></div>').append(show_count_input).append(show_count_label);
+ show_count_div = $('<div />').append(show_count_input).append(show_count_label);
return container.append(block_color_label).append(block_color_input).append(label_color_label).append(label_color_input).append(show_count_div);
}, update_options: function(track_id) {
diff -r b762ea8e5508 -r eb91e90d3405 templates/tracks/browser.mako
--- a/templates/tracks/browser.mako Wed May 12 15:57:05 2010 -0400
+++ b/templates/tracks/browser.mako Wed May 12 17:43:29 2010 -0400
@@ -110,7 +110,7 @@
error: function() { alert( "Couldn't create new browser" ) },
success: function(form_html) {
show_modal("New Track Browser", form_html, {
- "Cancel": function() { window.location = "/"; },
+ "Cancel": function() { window.location = "${h.url_for( controller='visualization', action='list' )}"; },
"Continue": function() { $(document).trigger("convert_dbkeys"); continue_fn(); }
});
$("#new-title").focus();
@@ -119,6 +119,12 @@
});
%endif
+ window.onbeforeunload = function() {
+ if ( view.has_changes ) {
+ return "There are unsaved changes to your visualization which will be lost.";
+ }
+ };
+
// Execute this when everything is ready
function init() {
$("ul#sortable-ul").sortable({
@@ -192,7 +198,7 @@
$("#add-track").bind( "click", function(e) {
$.ajax({
url: "${h.url_for( action='list_datasets' )}",
- data: {},
+ data: { "f-dbkey": view.dbkey },
error: function() { alert( "Grid refresh failed" ); },
success: function(table_html) {
show_modal("Add Track — Select Dataset(s)", table_html, {
@@ -219,6 +225,7 @@
break;
}
view.add_track(new_track);
+ view.has_changes = true;
sidebar_box(new_track);
}
});
@@ -262,13 +269,15 @@
},
success: function(vis_id) {
view.vis_id = vis_id;
+ view.has_changes = false;
hide_modal();
- }
+ },
+ error: function() { alert("Could not save visualization"); }
});
});
- view.add_label_track( new LabelTrack( $("#top-labeltrack" ) ) );
- view.add_label_track( new LabelTrack( $("#nav-labeltrack" ) ) );
+ view.add_label_track( new LabelTrack( $("#top-labeltrack") ) );
+ view.add_label_track( new LabelTrack( $("#nav-labeltrack") ) );
$.ajax({
url: "${h.url_for( action='chroms' )}",
@@ -328,7 +337,6 @@
del_icon.bind("click", function() {
$("#track_" + track_id + "_li").fadeOut('slow', function() { $("#track_" + track_id + "_li").remove(); });
view.remove_track(track);
- view.update_options();
});
icon_div.append(edit_icon).append(del_icon);
title.append(label).prepend(icon_div);
1
0
20 May '10
details: http://www.bx.psu.edu/hg/galaxy/rev/b762ea8e5508
changeset: 3777:b762ea8e5508
user: Dan Blankenberg <dan(a)bx.psu.edu>
date: Wed May 12 15:57:05 2010 -0400
description:
Several Fixes for Uploading Composite datatypes. Revert changeset 3769:69e70e588a8e.
diffstat:
lib/galaxy/tools/actions/upload_common.py | 3 +--
lib/galaxy/tools/parameters/grouping.py | 23 +++++++++++++++--------
lib/galaxy/web/controllers/tool_runner.py | 2 +-
tools/data_source/upload.py | 2 +-
4 files changed, 18 insertions(+), 12 deletions(-)
diffs (101 lines):
diff -r 997d55c65f49 -r b762ea8e5508 lib/galaxy/tools/actions/upload_common.py
--- a/lib/galaxy/tools/actions/upload_common.py Wed May 12 15:18:40 2010 -0400
+++ b/lib/galaxy/tools/actions/upload_common.py Wed May 12 15:57:05 2010 -0400
@@ -102,8 +102,7 @@
for data in precreated_datasets:
log.info( 'Cleaned up unclaimed precreated dataset (%s).' % ( data.id ) )
data.state = data.states.ERROR
- data.info = 'Unused precreated dataset to be deleted.'
- data.deleted = True
+ data.info = 'No file contents were available.'
def new_history_upload( trans, uploaded_dataset, state=None ):
hda = trans.app.model.HistoryDatasetAssociation( name = uploaded_dataset.name,
diff -r 997d55c65f49 -r b762ea8e5508 lib/galaxy/tools/parameters/grouping.py
--- a/lib/galaxy/tools/parameters/grouping.py Wed May 12 15:18:40 2010 -0400
+++ b/lib/galaxy/tools/parameters/grouping.py Wed May 12 15:57:05 2010 -0400
@@ -99,6 +99,17 @@
self.default_file_type = 'txt'
self.file_type_to_ext = { 'auto':self.default_file_type }
self.metadata_ref = 'files_metadata'
+ def get_composite_dataset_name( self, context ):
+ #FIXME: HACK
+ #Special case of using 'base_name' metadata for use as Dataset name needs to be done in a General Fashion, as defined within a particular Datatype.
+
+ #We get two different types of contexts here, one straight from submitted parameters, the other after being parsed into tool inputs
+ dataset_name = context.get('files_metadata|base_name', None )
+ if dataset_name is None:
+ dataset_name = context.get('files_metadata', {} ).get( 'base_name', None )
+ if dataset_name is None:
+ dataset_name = 'Uploaded Composite Dataset (%s)' % self.get_file_type( context )
+ return dataset_name
def get_file_base_name( self, context ):
fd = context.get('files_metadata|base_name','Galaxy_Composite_file')
return fd
@@ -241,6 +252,7 @@
for file_bunch in get_url_paste_urls_or_filename( context, override_name = name, override_info = info ):
if file_bunch.path:
break
+ file_bunch.space_to_tab = space_to_tab
return file_bunch, warnings
def get_filenames( context ):
rval = []
@@ -287,24 +299,18 @@
if meta_spec.set_in_upload:
if meta_name in files_metadata:
dataset.metadata[ meta_name ] = files_metadata[ meta_name ]
- dataset_name = None
- dataset_info = None
+ dataset.precreated_name = dataset.name = self.get_composite_dataset_name( context )
if dataset.datatype.composite_type == 'auto_primary_file':
#replace sniff here with just creating an empty file
temp_name, is_multi_byte = sniff.stream_to_file( StringIO.StringIO( d_type.generate_primary_file( dataset ) ), prefix='upload_auto_primary_file' )
dataset.primary_file = temp_name
dataset.space_to_tab = False
- dsn = dataset.metadata.get('base_name','Uploaded Composite Dataset (%s)' % file_type)
- dataset.precreated_name = dataset.name = dsn
else:
file_bunch, warnings = get_one_filename( groups_incoming[ 0 ] )
writable_files_offset = 1
dataset.primary_file = file_bunch.path
dataset.space_to_tab = file_bunch.space_to_tab
- dsn = dataset.metadata.get('base_name',file_bunch.precreated_name)
- dataset.precreated_name = dsn
- dataset.name = dsn
- dataset.warnings.extend( file_bunch.warnings )
+ dataset.warnings.extend( warnings )
if dataset.primary_file is None:#remove this before finish, this should create an empty dataset
raise Exception( 'No primary dataset file was available for composite upload' )
keys = [ value.name for value in writable_files.values() ]
@@ -315,6 +321,7 @@
dataset.composite_files[ key ] = None
else:
file_bunch, warnings = get_one_filename( group_incoming )
+ dataset.warnings.extend( warnings )
if file_bunch.path:
dataset.composite_files[ key ] = file_bunch.__dict__
else:
diff -r 997d55c65f49 -r b762ea8e5508 lib/galaxy/web/controllers/tool_runner.py
--- a/lib/galaxy/web/controllers/tool_runner.py Wed May 12 15:18:40 2010 -0400
+++ b/lib/galaxy/web/controllers/tool_runner.py Wed May 12 15:57:05 2010 -0400
@@ -203,7 +203,7 @@
d_type = dataset_upload_input.get_datatype( trans, kwd )
if d_type.composite_type is not None:
- datasets.append( create_dataset( 'Uploaded Composite Dataset (%s)' % dataset_upload_input.get_datatype_ext( trans, kwd ) ) )
+ datasets.append( create_dataset( dataset_upload_input.get_composite_dataset_name( kwd ) ) )
else:
params = Bunch( ** tool_state.inputs[dataset_upload_input.name][0] )
if params.file_data not in [ None, "" ]:
diff -r 997d55c65f49 -r b762ea8e5508 tools/data_source/upload.py
--- a/tools/data_source/upload.py Wed May 12 15:18:40 2010 -0400
+++ b/tools/data_source/upload.py Wed May 12 15:57:05 2010 -0400
@@ -299,7 +299,7 @@
break
elif dataset.composite_file_paths[value.name] is not None:
if not value.is_binary:
- if uploaded_dataset.composite_files[ value.name ].space_to_tab:
+ if value.space_to_tab:
sniff.convert_newlines_sep2tabs( dataset.composite_file_paths[ value.name ][ 'path' ] )
else:
sniff.convert_newlines( dataset.composite_file_paths[ value.name ][ 'path' ] )
1
0
20 May '10
details: http://www.bx.psu.edu/hg/galaxy/rev/997d55c65f49
changeset: 3776:997d55c65f49
user: Greg Von Kuster <greg(a)bx.psu.edu>
date: Wed May 12 15:18:40 2010 -0400
description:
Remove the hack I just committed for changing modENCODE fly and worm dbkeys, and translate the values in the tool configs.
diffstat:
lib/galaxy/tools/__init__.py | 6 ------
tools/data_source/fly_modencode.xml | 5 +++++
tools/data_source/worm_modencode.xml | 5 +++++
3 files changed, 10 insertions(+), 6 deletions(-)
diffs (46 lines):
diff -r 70747a610c28 -r 997d55c65f49 lib/galaxy/tools/__init__.py
--- a/lib/galaxy/tools/__init__.py Wed May 12 14:50:25 2010 -0400
+++ b/lib/galaxy/tools/__init__.py Wed May 12 15:18:40 2010 -0400
@@ -1646,12 +1646,6 @@
data.name = param_dict.get( 'name', data.name )
data.info = param_dict.get( 'info', data.name )
data.dbkey = param_dict.get( 'dbkey', data.dbkey )
- # HACK to map modENCODEfly dbkey, which is always "fly" to be dm2
- # and modENCODEworm dbkey, which is always "worm" to be ce6
- if data.dbkey == 'fly':
- data.dbkey = 'dm2'
- elif data.dbkey == 'worm':
- data.dbkey = 'ce6'
data.extension = param_dict.get( 'data_type', data.extension )
#TODO: these should be possible as part of data_source.py and external set_meta, see the upload tool:
if data.extension in [ 'txt', 'tabular' ]:
diff -r 70747a610c28 -r 997d55c65f49 tools/data_source/fly_modencode.xml
--- a/tools/data_source/fly_modencode.xml Wed May 12 14:50:25 2010 -0400
+++ b/tools/data_source/fly_modencode.xml Wed May 12 15:18:40 2010 -0400
@@ -7,6 +7,11 @@
<param name="GALAXY_URL" type="baseurl" value="/tool_runner?tool_id=modENCODEfly" />
</inputs>
<request_param_translation>
+ <request_param galaxy_name="dbkey" remote_name="dbkey" missing="dm2" >
+ <value_translation>
+ <value galaxy_value="dm2" remote_value="fly" />
+ </value_translation>
+ </request_param>
<request_param galaxy_name="URL" remote_name="URL" missing="">
<append_param separator="&" first_separator="?" join="=">
<value name="d" missing="" />
diff -r 70747a610c28 -r 997d55c65f49 tools/data_source/worm_modencode.xml
--- a/tools/data_source/worm_modencode.xml Wed May 12 14:50:25 2010 -0400
+++ b/tools/data_source/worm_modencode.xml Wed May 12 15:18:40 2010 -0400
@@ -7,6 +7,11 @@
<param name="GALAXY_URL" type="baseurl" value="/tool_runner?tool_id=modENCODEworm" />
</inputs>
<request_param_translation>
+ <request_param galaxy_name="dbkey" remote_name="dbkey" missing="ce6" >
+ <value_translation>
+ <value galaxy_value="ce6" remote_value="worm" />
+ </value_translation>
+ </request_param>
<request_param galaxy_name="URL" remote_name="URL" missing="">
<append_param separator="&" first_separator="?" join="=">
<value name="d" missing="" />
1
0
20 May '10
details: http://www.bx.psu.edu/hg/galaxy/rev/70747a610c28
changeset: 3775:70747a610c28
user: Greg Von Kuster <greg(a)bx.psu.edu>
date: Wed May 12 14:50:25 2010 -0400
description:
Force modENCODE worm dbkey to be ce6 and modENCODE fly dbkey to be dm2.
diffstat:
lib/galaxy/tools/__init__.py | 6 ++++++
tools/data_source/fly_modencode.xml | 2 +-
tools/data_source/worm_modencode.xml | 2 +-
3 files changed, 8 insertions(+), 2 deletions(-)
diffs (40 lines):
diff -r 58500dfab084 -r 70747a610c28 lib/galaxy/tools/__init__.py
--- a/lib/galaxy/tools/__init__.py Wed May 12 14:37:00 2010 -0400
+++ b/lib/galaxy/tools/__init__.py Wed May 12 14:50:25 2010 -0400
@@ -1646,6 +1646,12 @@
data.name = param_dict.get( 'name', data.name )
data.info = param_dict.get( 'info', data.name )
data.dbkey = param_dict.get( 'dbkey', data.dbkey )
+ # HACK to map modENCODEfly dbkey, which is always "fly" to be dm2
+ # and modENCODEworm dbkey, which is always "worm" to be ce6
+ if data.dbkey == 'fly':
+ data.dbkey = 'dm2'
+ elif data.dbkey == 'worm':
+ data.dbkey = 'ce6'
data.extension = param_dict.get( 'data_type', data.extension )
#TODO: these should be possible as part of data_source.py and external set_meta, see the upload tool:
if data.extension in [ 'txt', 'tabular' ]:
diff -r 58500dfab084 -r 70747a610c28 tools/data_source/fly_modencode.xml
--- a/tools/data_source/fly_modencode.xml Wed May 12 14:37:00 2010 -0400
+++ b/tools/data_source/fly_modencode.xml Wed May 12 14:50:25 2010 -0400
@@ -10,7 +10,7 @@
<request_param galaxy_name="URL" remote_name="URL" missing="">
<append_param separator="&" first_separator="?" join="=">
<value name="d" missing="" />
- <value name="dbkey" missing="" />
+ <value name="dbkey" missing="dm2" />
<value name="q" missing="" />
<value name="s" missing="" />
<value name="t" missing="" />
diff -r 58500dfab084 -r 70747a610c28 tools/data_source/worm_modencode.xml
--- a/tools/data_source/worm_modencode.xml Wed May 12 14:37:00 2010 -0400
+++ b/tools/data_source/worm_modencode.xml Wed May 12 14:50:25 2010 -0400
@@ -10,7 +10,7 @@
<request_param galaxy_name="URL" remote_name="URL" missing="">
<append_param separator="&" first_separator="?" join="=">
<value name="d" missing="" />
- <value name="dbkey" missing="" />
+ <value name="dbkey" missing="ce6" />
<value name="q" missing="" />
<value name="s" missing="" />
<value name="t" missing="" />
1
0