galaxy-commits
Threads by month
- ----- 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
November 2011
- 1 participants
- 121 discussions
commit/galaxy-central: John Duddy: Fix copy/paste errors in histry contents API
by Bitbucket 09 Nov '11
by Bitbucket 09 Nov '11
09 Nov '11
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/fa97a5c307d2/
changeset: fa97a5c307d2
user: John Duddy
date: 2011-10-31 21:13:12
summary: Fix copy/paste errors in histry contents API
affected #: 2 files
diff -r 22d844537368bff2acb8eb50bce6561a673002ef -r fa97a5c307d228cd53673eca55fce0c9f12cfe4e lib/galaxy/web/api/history_contents.py
--- a/lib/galaxy/web/api/history_contents.py
+++ b/lib/galaxy/web/api/history_contents.py
@@ -50,7 +50,9 @@
"""
content_id = id
try:
- content = self.get_history_dataset_association( trans, content_id, check_ownership=True, check_accessible=True )
+ # get the history just for the access checks
+ history = self.get_history( trans, history_id, check_ownership=True, check_accessible=True, deleted=False )
+ content = self.get_history_dataset_association( trans, history, content_id, check_ownership=True, check_accessible=True )
except Exception, e:
return str( e )
try:
diff -r 22d844537368bff2acb8eb50bce6561a673002ef -r fa97a5c307d228cd53673eca55fce0c9f12cfe4e lib/galaxy/web/base/controller.py
--- a/lib/galaxy/web/base/controller.py
+++ b/lib/galaxy/web/base/controller.py
@@ -233,16 +233,18 @@
else:
error( "You are not allowed to access this dataset" )
return data
- def get_history_dataset_association( self, trans, dataset_id, check_ownership=True, check_accessible=False ):
+ def get_history_dataset_association( self, trans, history, dataset_id, check_ownership=True, check_accessible=False ):
"""Get a HistoryDatasetAssociation from the database by id, verifying ownership."""
- hda = self.get_object( trans, id, 'HistoryDatasetAssociation', check_ownership=check_ownership, check_accessible=check_accessible, deleted=deleted )
- self.security_check( trans, history, check_ownership=check_ownership, check_accessible=False ) # check accessibility here
+ self.security_check( trans, history, check_ownership=check_ownership, check_accessible=check_accessible )
+ hda = self.get_object( trans, dataset_id, 'HistoryDatasetAssociation', check_ownership=False, check_accessible=False, deleted=False )
+
if check_accessible:
if trans.app.security_agent.can_access_dataset( trans.get_current_user_roles(), hda.dataset ):
if hda.state == trans.model.Dataset.states.UPLOAD:
error( "Please wait until this dataset finishes uploading before attempting to view it." )
else:
error( "You are not allowed to access this dataset" )
+ return hda
def get_data( self, dataset, preview=True ):
""" Gets a dataset's data. """
# Get data from file, truncating if necessary.
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: dan: Remove "-targetNotSorted" argument from GATK indel realigner: vanished without warning or notice.
by Bitbucket 09 Nov '11
by Bitbucket 09 Nov '11
09 Nov '11
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/5f63ee75a786/
changeset: 5f63ee75a786
user: dan
date: 2011-11-09 15:41:12
summary: Remove "-targetNotSorted" argument from GATK indel realigner: vanished without warning or notice.
affected #: 1 file
diff -r a77cd7bbe375eb7884cfa5ff38d078033f89c1ab -r 5f63ee75a7862d1747a39c878849f9c04bd5a1d5 tools/gatk/indel_realigner.xml
--- a/tools/gatk/indel_realigner.xml
+++ b/tools/gatk/indel_realigner.xml
@@ -1,4 +1,4 @@
-<tool id="gatk_indel_realigner" name="Indel Realigner" version="0.0.3">
+<tool id="gatk_indel_realigner" name="Indel Realigner" version="0.0.4"><description>- perform local realignment</description><requirements><requirement type="package" version="1.2">gatk</requirement>
@@ -90,7 +90,6 @@
##start analysis specific options
-d "-targetIntervals" "${target_intervals}" "${target_intervals.ext}" "gatk_target_intervals"
-p '
- -targetNotSorted ##always resort input intervals
--disable_bam_indexing
'
#if $analysis_param_type.analysis_param_type_selector == "advanced":
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: dan: Update FASTQ Groomer tool help to indicate that Illumina 1.8+ is Sanger encoded.
by Bitbucket 08 Nov '11
by Bitbucket 08 Nov '11
08 Nov '11
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/a77cd7bbe375/
changeset: a77cd7bbe375
user: dan
date: 2011-11-08 22:53:19
summary: Update FASTQ Groomer tool help to indicate that Illumina 1.8+ is Sanger encoded.
affected #: 1 file
diff -r bc399a95e31ea30ef80893b3bc318f45cda3241a -r a77cd7bbe375eb7884cfa5ff38d078033f89c1ab tools/fastq/fastq_groomer.xml
--- a/tools/fastq/fastq_groomer.xml
+++ b/tools/fastq/fastq_groomer.xml
@@ -16,7 +16,7 @@
<param name="input_file" type="data" format="fastq" label="File to groom" /><param name="input_type" type="select" label="Input FASTQ quality scores type"><option value="solexa">Solexa</option>
- <option value="illumina">Illumina 1.3+</option>
+ <option value="illumina">Illumina 1.3-1.7</option><option value="sanger" selected="True">Sanger</option><option value="cssanger">Color Space Sanger</option></param>
@@ -358,6 +358,10 @@
Diagram adapted from http://en.wikipedia.org/wiki/FASTQ_format
+.. class:: infomark
+
+Output from Illumina 1.8+ pipelines are Sanger encoded.
+
------
**Citation**
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: greg: Add locale files for Chinese provided by hanfeisun.
by Bitbucket 08 Nov '11
by Bitbucket 08 Nov '11
08 Nov '11
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/bc399a95e31e/
changeset: bc399a95e31e
user: greg
date: 2011-11-08 22:35:48
summary: Add locale files for Chinese provided by hanfeisun.
affected #: 4 files
diff -r fa29a49205a226fa872601b4aac577973468e486 -r bc399a95e31ea30ef80893b3bc318f45cda3241a locale/zh/LC_MESSAGES/ginga.mo
Binary file locale/zh/LC_MESSAGES/ginga.mo has changed
diff -r fa29a49205a226fa872601b4aac577973468e486 -r bc399a95e31ea30ef80893b3bc318f45cda3241a locale/zh/LC_MESSAGES/ginga.po
--- /dev/null
+++ b/locale/zh/LC_MESSAGES/ginga.po
@@ -0,0 +1,597 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: yinhe 1.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-10-15 13:58+0800\n"
+"PO-Revision-Date: 2011-11-04 19:13+0900\n"
+"Last-Translator: Hanfei Sun <hfsun.tju(a)gmail.com> Juan Wang <jinling8(a)gmail.com>\n"
+"Language-Team: Chinese\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#:
+msgid "iso-8859-1"
+msgstr "utf-8"
+
+#:
+msgid "lang=\"en\""
+msgstr "lang=\"zh\""
+
+
+#: templates/base_panels.mako:5
+msgid "Galaxy"
+msgstr "Galaxy"
+
+#: templates/history/options.mako:24
+msgid "Are you sure you want to delete the current history?"
+msgstr "确认要删除当前的历史记录吗?"
+
+
+#: templates/root/history.mako:38
+msgid "collapse all"
+msgstr "全部收缩"
+
+
+#: templates/root/index.mako:5
+msgid "Tools"
+msgstr "工具"
+
+
+#: tools/**.xml
+msgid "Get Data"
+msgstr "获取数据"
+
+msgid "Get ENCODE Data"
+msgstr "获取ENCODE数据"
+
+msgid "ENCODE Tools"
+msgstr "ENCODE工具"
+
+msgid "Lift-Over"
+msgstr "版本转换"
+
+
+msgid "Text Manipulation"
+msgstr "文本操作"
+
+msgid "Filter and Sort"
+msgstr "过滤和排序"
+
+msgid "Join, Subtract and Group"
+msgstr "结合,差集与分组"
+
+msgid "Convert Formats"
+msgstr "格式转换"
+
+msgid "Extract Features"
+msgstr "特征提取"
+
+msgid "Fetch Sequences"
+msgstr "获取序列"
+
+msgid "Fetch Alignments"
+msgstr "获取比对上的序列"
+
+msgid "Get Genomic Scores"
+msgstr "获得基因组分数"
+
+msgid "Operate on Genomic Intervals"
+msgstr "基因组区间操作"
+
+msgid "Statistics"
+msgstr "统计量"
+
+msgid "Graph/Display Data"
+msgstr "图形/数据"
+
+msgid "Regional Variation"
+msgstr "区域多态性"
+
+msgid "Evolution: HyPhy"
+msgstr "进化: HyPhy"
+
+msgid "Taxonomy manipulation"
+msgstr "分类处理"
+
+msgid "Solexa tools"
+msgstr "Solexa工具"
+
+msgid "FASTA manipulation"
+msgstr "FASTA处理"
+
+msgid "Short Read QC and Manipulation"
+msgstr "短片段数据质量控制及处理"
+
+msgid "Short Read Mapping"
+msgstr "短片段回贴"
+
+
+#: templates/admin_main.mako:3 templates/admin_main.mako:8
+msgid "Galaxy Administration"
+msgstr "Galaxy 管理"
+
+#: templates/admin_main.mako:17
+msgid "Admin password: "
+msgstr "管理员密码: "
+
+#: templates/admin_main.mako:19
+msgid "Reload tool: "
+msgstr "重新载入工具"
+
+#: templates/admin_main.mako:35
+msgid "Reload"
+msgstr "重新载入"
+
+#: templates/dataset/edit_attributes.mako:2
+msgid "History Item Attributes"
+msgstr "历史项目属性"
+
+#: templates/dataset/edit_attributes.mako:19
+msgid "Edit Attributes"
+msgstr "编辑属性"
+
+#: templates/dataset/edit_attributes.mako:64
+msgid ""
+"This will inspect the dataset and attempt to correct the above column values "
+"if they are not accurate."
+msgstr "数据集检查,若有错误,更正上述栏中的值。"
+
+#: templates/dataset/edit_attributes.mako:68
+msgid ""
+"Required metadata values are missing. Some of these values may not be "
+"editable by the user. Selecting \"Auto-detect\" will attempt to fix these "
+"values."
+msgstr "所需元数据值缺失。其中一些值可能无法被用户编辑。选择“自动检测”将修正这些值。"
+
+#: templates/dataset/edit_attributes.mako:78
+msgid "Convert to new format"
+msgstr "转换成新格式"
+
+#: templates/dataset/edit_attributes.mako:84
+msgid "Convert to"
+msgstr "转换"
+
+#: templates/dataset/edit_attributes.mako:95
+msgid ""
+"This will create a new dataset with the contents of this dataset converted "
+"to a new format."
+msgstr "这将创建一个新的数据集,内容是转换后的数据集。"
+
+#: templates/dataset/edit_attributes.mako:111
+msgid "Change data type"
+msgstr "改变数据类型"
+
+#: templates/dataset/edit_attributes.mako:117
+msgid "New Type"
+msgstr "新类型"
+
+#: templates/dataset/edit_attributes.mako:124
+msgid ""
+"This will change the datatype of the existing dataset but <i>not</i> modify "
+"its contents. Use this if Galaxy has incorrectly guessed the type of your "
+"dataset."
+msgstr "这将改变已有数据集的数据类型,但是<i>不</i>改变其内容。当Galaxy不能正确判断你的数据类型时,设置该参数。"
+
+#: templates/dataset/edit_attributes.mako:137
+msgid "Copy History Item"
+msgstr "复制历史记录项"
+
+#: templates/history/list.mako:3
+msgid "Saved Histories"
+msgstr "保存的历史记录"
+
+#: templates/history/list.mako:19
+msgid "Stored Histories"
+msgstr "存储的历史记录"
+
+#: templates/history/list.mako:21 templates/root/history.mako:239
+msgid "hide deleted"
+msgstr "隐藏已删除"
+
+#: templates/history/list.mako:23
+msgid "show deleted"
+msgstr "显示已删除"
+
+#: templates/history/list.mako:27
+msgid "Name"
+msgstr "名称"
+
+#: templates/history/list.mako:27
+msgid "Size"
+msgstr "大小"
+
+#: templates/history/list.mako:27
+msgid "Last modified"
+msgstr "最后修改"
+
+#: templates/history/list.mako:27
+msgid "Actions"
+msgstr "操作"
+
+#: templates/history/list.mako:45
+msgid "rename"
+msgstr "重命名"
+
+#: templates/history/list.mako:46
+msgid "switch to"
+msgstr "切换到"
+
+#: templates/history/list.mako:47
+msgid "delete"
+msgstr "删除"
+
+#: templates/history/list.mako:49
+msgid "undelete"
+msgstr "取消删除"
+
+#: templates/history/list.mako:55
+msgid "Action"
+msgstr "操作"
+
+#: templates/history/list.mako:56 templates/history/options.mako:21
+msgid "Share"
+msgstr "共享"
+
+#: templates/history/list.mako:56 templates/history/options.mako:15
+msgid "Rename"
+msgstr "重命名"
+
+#: templates/history/list.mako:56 templates/history/options.mako:24
+msgid "Delete"
+msgstr "删除"
+
+#: templates/history/list.mako:58
+msgid "Undelete"
+msgstr "取消删除"
+
+#: templates/history/list.mako:65
+msgid "You have no stored histories"
+msgstr "没有存储的历史记录"
+
+#: templates/history/options.mako:5
+msgid "History Options"
+msgstr "历史记录选项"
+
+#: templates/history/options.mako:9
+msgid "You must be "
+msgstr "你必须"
+
+#: templates/history/options.mako:9
+msgid "logged in"
+msgstr "登录"
+
+#: templates/history/options.mako:9
+msgid " to store or switch histories."
+msgstr "以存储或切换历史记录"
+
+#: templates/history/options.mako:15
+#, python-format
+msgid " current history (stored as \"%s\")"
+msgstr " 当前历史(以\"%s\"形式存储)"
+
+#: templates/history/options.mako:16
+msgid "List"
+msgstr "列表"
+
+#: templates/history/options.mako:16
+msgid " previously stored histories"
+msgstr " 以前存储的历史记录"
+
+#: templates/history/options.mako:18
+msgid "Create"
+msgstr "创建"
+
+#: templates/history/options.mako:18
+msgid " a new empty history"
+msgstr " 一个新的空历史记录"
+
+#: templates/history/options.mako:20
+msgid "Construct workflow"
+msgstr "构建工作流程"
+
+#: templates/history/options.mako:20
+msgid " from the current history"
+msgstr " 来源于当前历史"
+
+#: templates/history/options.mako:21 templates/history/options.mako:24
+msgid " current history"
+msgstr " 当前历史"
+
+#: templates/history/options.mako:23
+msgid "Show deleted"
+msgstr "显示已删除"
+
+#: templates/history/options.mako:23
+msgid " datasets in history"
+msgstr " 历史中的数据集"
+
+#: templates/history/rename.mako:3 templates/history/rename.mako:6
+msgid "Rename History"
+msgstr "重命名历史"
+
+
+msgid "Rename Histories"
+msgstr "重命名历史记录"
+
+msgid "Perform Action"
+msgstr "运行操作"
+
+msgid "Submit"
+msgstr "提交"
+
+
+
+#: templates/history/rename.mako:10
+msgid "Current Name"
+msgstr "当前名称"
+
+#: templates/history/rename.mako:10
+msgid "New Name"
+msgstr "新名称"
+
+#: templates/history/share.mako:3
+msgid "Share histories"
+msgstr "共享历史记录"
+
+#: templates/history/share.mako:6
+msgid "Share Histories"
+msgstr "共享历史记录"
+
+#: templates/history/share.mako:9
+msgid "History Name:"
+msgstr "历史名称"
+
+#: templates/history/share.mako:9
+msgid "Number of Datasets:"
+msgstr "数据集数量"
+
+#: templates/history/share.mako:9
+msgid "Share Link"
+msgstr "共享链接"
+
+#: templates/history/share.mako:15
+msgid "This history contains no data."
+msgstr "这项历史中没有数据"
+
+#: templates/history/share.mako:21
+msgid "copy link to share"
+msgstr "复制链接以共享"
+
+#: templates/history/share.mako:24
+msgid "Email of User to share with:"
+msgstr "发送到这些Email地址进行分享"
+
+#: templates/root/history.mako:7
+msgid "Galaxy History"
+msgstr "Galaxy 历史"
+
+#: templates/root/history.mako:237
+msgid "refresh"
+msgstr "刷新"
+
+#: templates/root/history.mako:245
+msgid "You are currently viewing a deleted history!"
+msgstr "正在查看已删除的历史"
+
+#: templates/root/history.mako:289
+msgid "Your history is empty. Click 'Get Data' on the left pane to start"
+msgstr "历史已空,请单击左边窗格中‘获取数据’"
+
+#: templates/root/history_common.mako:41
+msgid "Job is waiting to run"
+msgstr "等待运行的进程"
+
+#: templates/root/history_common.mako:43
+msgid "Job is currently running"
+msgstr "正在运行的进程"
+
+#: templates/root/history_common.mako:46
+msgid "An error occurred running this job: "
+msgstr "进程运行时出错 "
+
+#: templates/root/history_common.mako:47
+msgid "report this error"
+msgstr "报告错误"
+
+#: templates/root/history_common.mako:54
+msgid "No data: "
+msgstr "没有数据: "
+
+#: templates/root/history_common.mako:58
+msgid "format: "
+msgstr "格式: "
+
+#: templates/root/history_common.mako:59
+msgid "database: "
+msgstr "数据库: "
+
+#: templates/root/history_common.mako:66 templates/root/masthead.mako:20
+msgid "Info: "
+msgstr "信息: "
+
+#: templates/root/history_common.mako:85
+#, python-format
+msgid "Error: unknown dataset state \"%s\"."
+msgstr "错误:未知的数据集状态 \"%s\"。"
+
+
+msgid "Options"
+msgstr "选项"
+
+msgid "History"
+msgstr "历史"
+
+#: templates/root/masthead.mako:20
+msgid "report bugs"
+msgstr "错误报告"
+
+#: templates/root/masthead.mako:21
+msgid "wiki"
+msgstr "wiki"
+
+#: templates/root/masthead.mako:22
+msgid "screencasts"
+msgstr "演示视频"
+
+
+#: templates/root/masthead.mako:23
+msgid "blog"
+msgstr "博客"
+
+#: templates/root/masthead.mako:31
+#, python-format
+msgid "Logged in as %s: "
+msgstr "以%s的身份登录: "
+
+#: templates/root/masthead.mako:31
+msgid "manage"
+msgstr "管理"
+
+#: templates/root/masthead.mako:32
+msgid "logout"
+msgstr "注销"
+
+#: templates/root/masthead.mako:34
+msgid "Account: "
+msgstr "帐户: "
+
+#: templates/root/masthead.mako:34
+msgid "create"
+msgstr "创建"
+
+#: templates/root/masthead.mako:35
+msgid "login"
+msgstr "登录"
+
+#: templates/root/tool_menu.mako:52
+msgid "Galaxy Tools"
+msgstr "Galaxy 工具"
+
+#: templates/root/tool_menu.mako:129
+msgid "Workflow"
+msgstr "工作流程"
+
+#: templates/root/tool_menu.mako:134
+msgid "Manage"
+msgstr "管理"
+
+#: templates/root/tool_menu.mako:134
+msgid "workflows"
+msgstr "工作流程"
+
+#: templates/user/index.mako:2 templates/user/index.mako:4
+msgid "Account settings"
+msgstr "帐户设置"
+
+#: templates/user/index.mako:7
+#, python-format
+msgid "You are currently logged in as %s."
+msgstr "当前以%s的身份登录"
+
+#: templates/user/index.mako:9
+msgid "Change your password"
+msgstr "修改密码"
+
+#: templates/user/index.mako:10
+msgid "Update your email address"
+msgstr "更新电子邮件地址"
+
+#: templates/user/index.mako:11
+msgid "Logout"
+msgstr "注销"
+
+#: templates/user/index.mako:16
+msgid "Login"
+msgstr "登录"
+
+#: templates/user/index.mako:17
+msgid "Create new account"
+msgstr "创建新帐户"
+
+msgid "Show Tool Search"
+msgstr "显示工具搜索"
+
+msgid "Analyze Data"
+msgstr "分析数据"
+
+msgid "analysis"
+msgstr "分析"
+
+msgid "History Lists"
+msgstr "历史记录清单"
+
+msgid "Histories Shared with Me"
+msgstr "共享的数据"
+
+msgid "Current History"
+msgstr "当前历史记录"
+
+msgid "Create New"
+msgstr "创建"
+
+msgid "Clone"
+msgstr "复制"
+
+msgid "Share or Publish"
+msgstr "共享或发布"
+
+msgid "Extract Workflow"
+msgstr "提取工作流程"
+
+msgid "Dataset Security"
+msgstr "数据安全性"
+
+
+msgid "Show Deleted Datasets"
+msgstr "显示已删除数据"
+
+msgid "Show Hidden Datasets"
+msgstr "显示隐藏数据"
+
+msgid "Show Structure"
+msgstr "显示结构"
+
+msgid "Export to File"
+msgstr "导出为文件"
+
+msgid "Other Actions"
+msgstr "其他"
+
+msgid "Import from File"
+msgstr "导入文件"
+
+msgid "Shared Data"
+msgstr "数据共享"
+
+msgid "Data Libraries"
+msgstr "数据仓库"
+
+msgid "Published Histories"
+msgstr "已发布的历史记录"
+
+msgid "Published Workflows"
+msgstr "已发布的工作流程"
+
+msgid "Published Pages"
+msgstr "已发布的页面"
+
+msgid "Help"
+msgstr "帮助"
+
+msgid "Email comments, bug reports, or suggestions"
+msgstr "发邮件进行意见反馈或错误报告"
+
+
+msgid "User"
+msgstr "用户"
+
+
+msgid "Register"
+msgstr "注册"
\ No newline at end of file
diff -r fa29a49205a226fa872601b4aac577973468e486 -r bc399a95e31ea30ef80893b3bc318f45cda3241a locale/zh/LC_MESSAGES/tools.mo
Binary file locale/zh/LC_MESSAGES/tools.mo has changed
diff -r fa29a49205a226fa872601b4aac577973468e486 -r bc399a95e31ea30ef80893b3bc318f45cda3241a locale/zh/LC_MESSAGES/tools.po
--- /dev/null
+++ b/locale/zh/LC_MESSAGES/tools.po
@@ -0,0 +1,84 @@
+# Japanese translations for PROJECT.
+# Copyright (C) 2009 ORGANIZATION
+# This file is distributed under the same license as the PROJECT project.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2009-03-17 04:06-0400\n"
+"PO-Revision-Date: 2009-03-17 04:06-0400\n"
+"Last-Translator: Hanfei Sun <hfsun.tju(a)gmail.com>\n"
+"Language-Team: zh <hfsun.tju(a)gmail.com>\n"
+"Plural-Forms: nplurals=1; plural=0\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: Babel 0.9.4\n"
+
+msgid "Get Data"
+msgstr "获取数据"
+
+msgid "Get ENCODE Data"
+msgstr ""
+
+msgid "ENCODE Tools"
+msgstr ""
+
+msgid "Lift-Over"
+msgstr ""
+
+msgid "Text Manipulation"
+msgstr ""
+
+msgid "Filter and Sort"
+msgstr ""
+
+msgid "Join, Subtract and Group"
+msgstr ""
+
+msgid "Convert Formats"
+msgstr ""
+
+msgid "Extract Features"
+msgstr ""
+
+msgid "Fetch Sequences"
+msgstr ""
+
+msgid "Fetch Alignments"
+msgstr ""
+
+msgid "Get Genomic Scores"
+msgstr ""
+
+msgid "Operate on Genomic Intervals"
+msgstr ""
+
+msgid "Statistics"
+msgstr ""
+
+msgid "Graph/Display Data"
+msgstr ""
+
+msgid "Regional Variation"
+msgstr ""
+
+msgid "Evolution: HyPhy"
+msgstr ""
+
+msgid "Taxonomy manipulation"
+msgstr ""
+
+msgid "Solexa tools"
+msgstr ""
+
+msgid "FASTA manipulation"
+msgstr ""
+
+msgid "Short Read QC and Manipulation"
+msgstr ""
+
+msgid "Short Read Mapping"
+msgstr ""
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: greg: Fix for generating metadata in tool shed repositories for a tool that does not use a tool_data_table entry for a dynamic SelectField input parameter.
by Bitbucket 08 Nov '11
by Bitbucket 08 Nov '11
08 Nov '11
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/fa29a49205a2/
changeset: fa29a49205a2
user: greg
date: 2011-11-08 21:18:24
summary: Fix for generating metadata in tool shed repositories for a tool that does not use a tool_data_table entry for a dynamic SelectField input parameter.
affected #: 2 files
diff -r 9ee23aa36ec3807092ce1b8f3031ba751f1368e6 -r fa29a49205a226fa872601b4aac577973468e486 lib/galaxy/web/controllers/admin.py
--- a/lib/galaxy/web/controllers/admin.py
+++ b/lib/galaxy/web/controllers/admin.py
@@ -1147,21 +1147,20 @@
def __get_repository_tools_and_sample_files( self, trans, tool_path, repo_files_dir ):
# The sample_files list contains all files whose name ends in .sample
sample_files = []
+ # Find all special .sample files first.
+ for root, dirs, files in os.walk( repo_files_dir ):
+ if root.find( '.hg' ) < 0:
+ for name in files:
+ if name.endswith( '.sample' ):
+ sample_files.append( os.path.abspath( os.path.join( root, name ) ) )
# The repository_tools_tups list contains tuples of ( relative_path_to_tool_config, tool ) pairs
repository_tools_tups = []
for root, dirs, files in os.walk( repo_files_dir ):
- if not root.find( '.hg' ) >= 0 and not root.find( 'hgrc' ) >= 0:
+ if root.find( '.hg' ) < 0 and root.find( 'hgrc' ) < 0:
if '.hg' in dirs:
- # Don't visit .hg directories - should be impossible since we don't
- # allow uploaded archives that contain .hg dirs, but just in case...
dirs.remove( '.hg' )
if 'hgrc' in files:
- # Don't include hgrc files in commit.
files.remove( 'hgrc' )
- # Find all special .sample files first.
- for name in files:
- if name.endswith( '.sample' ):
- sample_files.append( os.path.abspath( os.path.join( root, name ) ) )
for name in files:
# Find all tool configs.
if name.endswith( '.xml' ):
diff -r 9ee23aa36ec3807092ce1b8f3031ba751f1368e6 -r fa29a49205a226fa872601b4aac577973468e486 lib/galaxy/webapps/community/controllers/common.py
--- a/lib/galaxy/webapps/community/controllers/common.py
+++ b/lib/galaxy/webapps/community/controllers/common.py
@@ -214,7 +214,8 @@
copy_sample_loc_file( trans, sample_file )
options.index_file = index_tail
options.missing_index_file = None
- options.tool_data_table.missing_index_file = None
+ if options.tool_data_table:
+ options.tool_data_table.missing_index_file = None
sample_found = True
break
if not sample_found:
@@ -325,8 +326,14 @@
if ctx is not None:
metadata_dict = {}
if changeset_revision == repository.tip:
+ # Find all special .sample files first.
for root, dirs, files in os.walk( repo_dir ):
- if not root.find( '.hg' ) >= 0 and not root.find( 'hgrc' ) >= 0:
+ if root.find( '.hg' ) < 0:
+ for name in files:
+ if name.endswith( '.sample' ):
+ sample_files.append( os.path.abspath( os.path.join( root, name ) ) )
+ for root, dirs, files in os.walk( repo_dir ):
+ if root.find( '.hg' ) < 0 and root.find( 'hgrc' ) < 0:
if '.hg' in dirs:
# Don't visit .hg directories - should be impossible since we don't
# allow uploaded archives that contain .hg dirs, but just in case...
@@ -334,10 +341,6 @@
if 'hgrc' in files:
# Don't include hgrc files in commit.
files.remove( 'hgrc' )
- # Find all special .sample files first.
- for name in files:
- if name.endswith( '.sample' ):
- sample_files.append( os.path.abspath( os.path.join( root, name ) ) )
for name in files:
# Find all tool configs.
if name.endswith( '.xml' ):
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: greg: Fix importing library datasets into multiple histories - library datasets will now only be imported into those checked.
by Bitbucket 08 Nov '11
by Bitbucket 08 Nov '11
08 Nov '11
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/9ee23aa36ec3/
changeset: 9ee23aa36ec3
user: greg
date: 2011-11-08 17:59:36
summary: Fix importing library datasets into multiple histories - library datasets will now only be imported into those checked.
affected #: 3 files
diff -r 542aa2dab591d6df036096547c6f615a2a412dce -r 9ee23aa36ec3807092ce1b8f3031ba751f1368e6 lib/galaxy/web/controllers/library_common.py
--- a/lib/galaxy/web/controllers/library_common.py
+++ b/lib/galaxy/web/controllers/library_common.py
@@ -1855,7 +1855,7 @@
status=status )
@web.expose
- def import_datasets_to_histories( self, trans, cntrller, library_id='', folder_id='', ldda_ids='', target_history_ids='', new_history_name='', **kwd ):
+ def import_datasets_to_histories( self, trans, cntrller, library_id='', folder_id='', ldda_ids='', target_history_id='', target_history_ids='', new_history_name='', **kwd ):
# This method is called from one of the following places:
# - a menu option for a library dataset ( ldda_ids is a single ldda id )
# - a menu option for a library folder ( folder_id has a value )
@@ -1870,7 +1870,6 @@
action = params.get( 'do_action', None )
user = trans.get_user()
current_history = trans.get_history()
- selected_history_id = params.get( 'selected_history_id', trans.security.encode_id( current_history.id ) )
if library_id:
library = trans.sa_session.query( trans.model.Library ).get( trans.security.decode_id( library_id ) )
else:
@@ -1882,9 +1881,11 @@
ldda_ids = util.listify( ldda_ids )
if ldda_ids:
ldda_ids = map( trans.security.decode_id, ldda_ids )
- target_history_ids = util.listify( target_history_ids )
if target_history_ids:
- target_history_ids = [ trans.security.decode_id( target_history_id ) for target_history_id in target_history_ids if target_history_id ]
+ target_history_ids = util.listify( target_history_ids )
+ target_history_ids = set( [ trans.security.decode_id( target_history_id ) for target_history_id in target_history_ids if target_history_id ] )
+ elif target_history_id:
+ target_history_ids = [ trans.security.decode_id( target_history_id ) ]
if params.get( 'import_datasets_to_histories_button', False ):
invalid_datasets = 0
if not ldda_ids or not ( target_history_ids or new_history_name ):
@@ -1965,7 +1966,7 @@
library=library,
current_history=current_history,
ldda_ids=ldda_ids,
- selected_history_id=selected_history_id,
+ target_history_id=target_history_id,
target_history_ids=target_history_ids,
source_lddas=source_lddas,
target_histories=target_histories,
diff -r 542aa2dab591d6df036096547c6f615a2a412dce -r 9ee23aa36ec3807092ce1b8f3031ba751f1368e6 lib/galaxy/webapps/community/controllers/repository.py
--- a/lib/galaxy/webapps/community/controllers/repository.py
+++ b/lib/galaxy/webapps/community/controllers/repository.py
@@ -236,7 +236,7 @@
template='/webapps/community/repository/grid.mako'
default_sort_key = "Repository.name"
columns = [
- NameColumn( "Name",
+ NameColumn( "Repository name",
link=( lambda item: dict( operation="view_or_manage_repository",
id=item.id,
webapp="community" ) ),
@@ -588,17 +588,17 @@
match_tuples.append( ( repository_metadata.repository_id, repository_metadata.changeset_revision ) )
else:
ok = False
- if workflow_names:
+ elif workflow_names:
if 'workflows' in metadata:
workflows = metadata[ 'workflows' ]
else:
workflows = []
for workflow_dict in workflows:
for workflow_name in workflow_names:
- if self.__in_workflow_dict( workflow_dict, exact_matches_checked, workflow_name=workflow_name ):
+ if self.__in_workflow_dict( workflow_dict, exact_matches_checked, workflow_name ):
match_tuples.append( ( repository_metadata.repository_id, repository_metadata.changeset_revision ) )
return ok, match_tuples
- def __in_workflow_dict( self, workflow_dict, exact_matches_checked, workflow_name=None ):
+ def __in_workflow_dict( self, workflow_dict, exact_matches_checked, workflow_name ):
workflow_dict_workflow_name = workflow_dict[ 'name' ].lower()
return ( workflow_name == workflow_dict_workflow_name ) or \
( not exact_matches_checked and workflow_dict_workflow_name.find( workflow_name ) >= 0 )
diff -r 542aa2dab591d6df036096547c6f615a2a412dce -r 9ee23aa36ec3807092ce1b8f3031ba751f1368e6 templates/library/common/import_datasets_to_histories.mako
--- a/templates/library/common/import_datasets_to_histories.mako
+++ b/templates/library/common/import_datasets_to_histories.mako
@@ -49,12 +49,12 @@
<div class="toolFormTitle">Destination Histories:</div><div class="toolFormBody"><div class="form-row" id="single-destination">
- <select id="single-dest-select" name="target_history_ids">
+ <select id="single-dest-select" name="target_history_id">
%for i, target_history in enumerate( target_histories ):
<%
encoded_id = trans.security.encode_id( target_history.id )
- if encoded_id == selected_history_id:
- selected_text = " selected"
+ if encoded_id == target_history_id:
+ selected_text = " selected='selected'"
else:
selected_text = ""
if target_history == current_history:
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: james_taylor: Trackster: dense mode features are full height again, don't draw strand indicators when drawing squished features.
by Bitbucket 08 Nov '11
by Bitbucket 08 Nov '11
08 Nov '11
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/542aa2dab591/
changeset: 542aa2dab591
user: james_taylor
date: 2011-11-08 17:37:12
summary: Trackster: dense mode features are full height again, don't draw strand indicators when drawing squished features.
affected #: 1 file
diff -r 132798922d53213d6ca4e1596619f254bdd582d0 -r 542aa2dab591d6df036096547c6f615a2a412dce static/scripts/trackster.js
--- a/static/scripts/trackster.js
+++ b/static/scripts/trackster.js
@@ -4292,7 +4292,7 @@
SQUISH_TRACK_HEIGHT = 5,
PACK_TRACK_HEIGHT = 10,
NO_DETAIL_FEATURE_HEIGHT = 1,
- DENSE_FEATURE_HEIGHT = 3,
+ DENSE_FEATURE_HEIGHT = 9,
SQUISH_FEATURE_HEIGHT = 3,
PACK_FEATURE_HEIGHT = 9,
LABEL_SPACING = 2,
@@ -4365,7 +4365,9 @@
var feature_strand = feature[4],
feature_ts = feature[5],
feature_te = feature[6],
- feature_blocks = feature[7];
+ feature_blocks = feature[7],
+ // Whether we are drawing full height or squished features
+ full_height = true;
if (feature_ts && feature_te) {
thick_start = Math.floor( Math.max(0, (feature_ts - tile_low) * w_scale) );
@@ -4374,9 +4376,13 @@
// Set vars that depend on mode.
var thin_height, thick_height;
- if (mode === "Squish" || mode === "Dense" ) {
+ if (mode === "Squish" ) {
thin_height = 1;
thick_height = SQUISH_FEATURE_HEIGHT;
+ full_height = false;
+ } else if ( mode === "Dense" ) {
+ thin_height = 5;
+ thick_height = DENSE_FEATURE_HEIGHT;
} else { // mode === "Pack"
thin_height = 5;
thick_height = PACK_FEATURE_HEIGHT;
@@ -4388,7 +4394,7 @@
ctx.fillStyle = block_color;
ctx.fillRect(f_start, y_center + 1, f_end - f_start, thick_height);
// If strand is specified, draw arrows over feature
- if ( feature_strand ) {
+ if ( feature_strand && full_height ) {
if (feature_strand === "+") {
ctx.fillStyle = ctx.canvas.manager.get_pattern( 'right_strand_inv' );
} else if (feature_strand === "-") {
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
24 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/471c9a7d9ed2/
changeset: 471c9a7d9ed2
user: james_taylor
date: 2011-10-30 23:12:22
summary: Modal dialogs now dim the entire page, show_message can be used for the old behavior (but should only be used for messages that do not require interaction)
affected #: 6 files
diff -r 147f55e7161ceb4ea9fd3d08bd5dedd19fccbec0 -r 471c9a7d9ed2eca4110bf59961ce21307344a982 static/june_2007_style/blue/panel_layout.css
--- a/static/june_2007_style/blue/panel_layout.css
+++ b/static/june_2007_style/blue/panel_layout.css
@@ -23,9 +23,11 @@
.panel-header-button:hover{color:black;background-color:#ccc;}
.panel-header-button:active{color:white;background-color:#aaaaaa;}
#overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:20000;}
+#overlay.modal #overlay-background{background:rgba(0,0,0,0.5);}
.dialog-box-container{position:relative;margin-top:80px;margin-right:auto;margin-left:auto;}
.dialog-box-wrapper{position:relative;padding:1em;background-color:rgba(0,0,0,0.5);-moz-border-radius:1em;-webkit-border-radius:1em;}
.dialog-box{border:solid #999 1px;background:white;z-index:80000;}
+#overlay.modal .dialog-box .body{min-width:600px;}
.dialog-box .body{padding:5px;overflow:auto;max-height:500px;min-width:300px;}
.dialog-box .buttons{padding:5px;}
.panel-error-message,.panel-warning-message,.panel-done-message,.panel-info-message{height:24px;line-height:24px;color:#303030;padding:0px;padding-left:26px;background-color:#FFCCCC;background-image:url(error_small.png);background-repeat:no-repeat;background-position:6px 50%;}
diff -r 147f55e7161ceb4ea9fd3d08bd5dedd19fccbec0 -r 471c9a7d9ed2eca4110bf59961ce21307344a982 static/june_2007_style/blue/trackster.css
--- a/static/june_2007_style/blue/trackster.css
+++ b/static/june_2007_style/blue/trackster.css
@@ -3,30 +3,9 @@
.content{font:10px verdana;}
.nav-controls{text-align:center;padding:1px 0;}
.nav-controls input{margin:0 5px;}
-.menu-button{padding: 0px 4px 0px 4px;}
#zoom-in,#zoom-out{display:inline-block;height:16px;width:16px;margin-bottom:-3px;cursor:pointer;}
#zoom-out{background:transparent url(../images/fugue/magnifier-zoom-out.png) center center no-repeat;}
#zoom-in{margin-left:10px;background:transparent url(../images/fugue/magnifier-zoom.png) center center no-repeat;}
-.overview-icon{background:transparent url(../images/fugue/application-dock-270-bw.png) no-repeat;}
-.overview-icon:hover{background:transparent url(../images/fugue/application-dock-270.png) no-repeat;}
-.settings-icon{background:transparent url(../images/fugue/gear-bw.png) no-repeat;}
-.settings-icon:hover{background:transparent url(../images/fugue/gear.png) no-repeat;}
-.tools-icon{background:transparent url(../images/fugue/toolbox-bw.png) no-repeat;}
-.tools-icon:hover{background:transparent url(../images/fugue/toolbox.png) no-repeat;}
-.filters-icon{background:transparent url(../images/fugue/ui-slider-050-bw.png) no-repeat;}
-.filters-icon:hover{background:transparent url(../images/fugue/ui-slider-050.png) no-repeat;}
-.remove-icon,.overview-close{background:transparent url(../images/fugue/cross-small-bw.png) no-repeat;}
-.remove-icon:hover,.overview-close:hover{background:transparent url(../images/fugue/cross-circle.png) no-repeat;}
-#close-icon{background:transparent url(../images/fugue/cross-circle-bw.png) no-repeat;margin-right:0px;}
-#close-icon:hover{background:transparent url(../images/fugue/cross-circle.png) no-repeat;}
-#add-tracks-icon{background:transparent url(../images/fugue/plus-button-bw.png) no-repeat;}
-#add-tracks-icon:hover{background:transparent url(../images/fugue/plus-button.png) no-repeat;}
-#add-group-icon{background:transparent url(../images/fugue/block--plus-bw.png) no-repeat;}
-#add-group-icon:hover{background:transparent url(../images/fugue/block--plus.png) no-repeat;}
-#bookmarks-icon{background:transparent url(../images/fugue/bookmarks-bw.png) no-repeat;}
-#bookmarks-icon:hover{background:transparent url(../images/fugue/bookmarks.png) no-repeat;}
-#save-icon{background:transparent url(../images/fugue/disk--arrow-bw.png) no-repeat;}
-#save-icon:hover{background:transparent url(../images/fugue/disk--arrow.png) no-repeat;}
.nav-input{font-size:12px;width:30em;z-index:1000;}
.location{display:inline-block;width:15em;margin:0 10px;}
.draghandle{margin-top:2px;cursor:move;float:left;background:transparent url(../images/visualization/draggable_horizontal.png) center center no-repeat;width:10px;height:12px;}
@@ -65,16 +44,39 @@
input{font:10px verdana;}
.dynamic-tool,.filters{margin-left:0.25em;padding-bottom:0.5em;}
.dynamic-tool{width:410px;}
-.filters>.sliders,.display-controls{float:left;margin:1em;}
+.filters > .sliders,.display-controls{float:left;margin:1em;}
.sliders{width:410px;}
-.display-controls{border-left:solid 2px #DDDDDD;padding-left:1em}
-.filter-row{margin-top:0.4em;}
+.display-controls{border-left:solid 2px #DDDDDD;padding-left:1em
+}
+.filter-row {
+ margin-top:0.4em;}
.slider-row{margin-left:1em;}
.elt-label{float:left;font-weight:bold;margin-right:1em;}
.slider{float:right;width:200px;position:relative;}
.tool-name{font-size:110%;font-weight:bold;}
.param-row{margin-top:0.2em;margin-left:1em;}
.param-label{float:left;font-weight:bold;padding-top:0.2em;}
+.menu-button{padding:0px 4px 0px 4px;}
+.settings-icon{background:transparent url(../images/fugue/gear-bw.png) no-repeat;}
+.settings-icon:hover{background:transparent url(../images/fugue/gear.png) no-repeat;}
+.overview-icon{background:transparent url(../images/fugue/application-dock-270-bw.png) no-repeat;}
+.overview-icon:hover{background:transparent url(../images/fugue/application-dock-270.png) no-repeat;}
+.tools-icon{background:transparent url(../images/fugue/toolbox-bw.png) no-repeat;}
+.tools-icon:hover{background:transparent url(../images/fugue/toolbox.png) no-repeat;}
+.filters-icon{background:transparent url(../images/fugue/ui-slider-050-bw.png) no-repeat;}
+.filters-icon:hover{background:transparent url(../images/fugue/ui-slider-050.png) no-repeat;}
+.remove-icon,.overview-close{background:transparent url(../images/fugue/cross-small-bw.png) no-repeat;}
+.remove-icon:hover,.overview-close:hover{background:transparent url(../images/fugue/cross-circle.png) no-repeat;}
+#close-icon{background:transparent url(../images/fugue/cross-circle-bw.png) no-repeat;margin-right:0px;}
+#close-icon:hover{background:transparent url(../images/fugue/cross-circle.png) no-repeat;}
+#add-tracks-icon{background:transparent url(../images/fugue/plus-button-bw.png) no-repeat;}
+#add-tracks-icon:hover{background:transparent url(../images/fugue/plus-button.png) no-repeat;}
+#add-group-icon{background:transparent url(../images/fugue/block--plus-bw.png) no-repeat;}
+#add-group-icon:hover{background:transparent url(../images/fugue/block--plus.png) no-repeat;}
+#bookmarks-icon{background:transparent url(../images/fugue/bookmarks-bw.png) no-repeat;}
+#bookmarks-icon:hover{background:transparent url(../images/fugue/bookmarks.png) no-repeat;}
+#save-icon{background:transparent url(../images/fugue/disk--arrow-bw.png) no-repeat;}
+#save-icon:hover{background:transparent url(../images/fugue/disk--arrow.png) no-repeat;}
.child-track-icon{background:url('../images/fugue/arrow-000-small-bw.png') no-repeat;width:30px;cursor:move;}
.track-resize{background:white url('../images/visualization/draggable_vertical.png') no-repeat top center;position:absolute;right:3px;bottom:-4px;width:14px;height:7px;border:solid #999 1px;z-index:100;}
.bookmark{background:white;border:solid #999 1px;border-right:none;margin:0.5em;margin-right:0;padding:0.5em;}
@@ -85,4 +87,4 @@
.icon.more-across{background:url('../images/fugue/arrow-transition-bw.png') no-repeat 0px 0px;}
.intro{padding:1em;}
.intro > .action-button{background-color:#CCC;padding:1em;}
-.feature-popup{background-color:#DDD;position:absolute;z-index:1000}
+.feature-popup{background-color:#DDD;position:absolute;z-index:1000;}
diff -r 147f55e7161ceb4ea9fd3d08bd5dedd19fccbec0 -r 471c9a7d9ed2eca4110bf59961ce21307344a982 static/june_2007_style/panel_layout.css.tmpl
--- a/static/june_2007_style/panel_layout.css.tmpl
+++ b/static/june_2007_style/panel_layout.css.tmpl
@@ -161,6 +161,10 @@
z-index: 20000;
}
+#overlay.modal #overlay-background {
+ background: rgba(0,0,0,0.5);
+}
+
.dialog-box-container {
position: relative;
margin-top: 80px;
@@ -182,6 +186,10 @@
z-index: 80000;
}
+#overlay.modal .dialog-box .body {
+ min-width: 600px;
+}
+
.dialog-box .body {
padding: 5px;
overflow: auto;
diff -r 147f55e7161ceb4ea9fd3d08bd5dedd19fccbec0 -r 471c9a7d9ed2eca4110bf59961ce21307344a982 static/june_2007_style/trackster.css.tmpl
--- a/static/june_2007_style/trackster.css.tmpl
+++ b/static/june_2007_style/trackster.css.tmpl
@@ -405,8 +405,8 @@
background-color: #CCC;
padding: 1em;
}
-.feature-popup{
+.feature-popup {
background-color: #DDD;
position: absolute;
- z-index: 1000
+ z-index: 1000;
}
diff -r 147f55e7161ceb4ea9fd3d08bd5dedd19fccbec0 -r 471c9a7d9ed2eca4110bf59961ce21307344a982 static/scripts/galaxy.panels.js
--- a/static/scripts/galaxy.panels.js
+++ b/static/scripts/galaxy.panels.js
@@ -163,13 +163,23 @@
// Modal dialog boxes
function hide_modal() {
- $(".dialog-box-container" ).fadeOut( function() {
+ $(".dialog-box-container" ).hide( 0, function() {
$("#overlay").hide();
+ $("#overlay").removeClass( "modal" );
$( ".dialog-box" ).find( ".body" ).children().remove();
} );
};
-function show_modal( title, body, buttons, extra_buttons, init_fn ) {
+function show_modal() {
+ $("#overlay").addClass( "modal" );
+ _show_modal.apply( this, arguments );
+}
+
+function show_message() {
+ _show_modal.apply( this, arguments );
+}
+
+function _show_modal( title, body, buttons, extra_buttons, init_fn ) {
if ( title ) {
$( ".dialog-box" ).find( ".title" ).html( title );
$( ".dialog-box" ).find( ".unified-panel-header" ).show();
@@ -205,7 +215,7 @@
$( ".dialog-box" ).find( ".body" ).html( body );
if ( ! $(".dialog-box-container").is( ":visible" ) ) {
$("#overlay").show();
- $(".dialog-box-container").fadeIn();
+ $(".dialog-box-container").show();
}
// Fix min-width so that modal cannot shrink considerably if
// new content is loaded.
diff -r 147f55e7161ceb4ea9fd3d08bd5dedd19fccbec0 -r 471c9a7d9ed2eca4110bf59961ce21307344a982 templates/workflow/editor.mako
--- a/templates/workflow/editor.mako
+++ b/templates/workflow/editor.mako
@@ -213,7 +213,7 @@
show_workflow_parameters();
},
beforeSubmit: function( data ) {
- show_modal( "Loading workflow", "progress" );
+ show_message( "Loading workflow", "progress" );
}
});
}
@@ -650,7 +650,7 @@
};
var save_current_workflow = function ( eventObj, success_callback ) {
- show_modal( "Saving workflow", "progress" );
+ show_message( "Saving workflow", "progress" );
workflow.check_changes_in_active_form();
if (!workflow.has_changes) {
hide_modal();
https://bitbucket.org/galaxy/galaxy-central/changeset/f5961b41a0d4/
changeset: f5961b41a0d4
user: james_taylor
date: 2011-10-30 23:59:05
summary: Trackster: fixes for bigwig data -- updated bx-python
affected #: 5 files
diff -r 471c9a7d9ed2eca4110bf59961ce21307344a982 -r f5961b41a0d4a7c7b1f21dc8829644573c9e5448 eggs.ini
--- a/eggs.ini
+++ b/eggs.ini
@@ -12,7 +12,7 @@
no_auto = pbs_python DRMAA_python
[eggs:platform]
-bx_python = 0.7.0
+bx_python = 0.7.1
Cheetah = 2.2.2
ctypes = 1.0.2
DRMAA_python = 0.2
@@ -67,7 +67,7 @@
psycopg2 = _8.4.2_static
pysqlite = _3.6.17_static
MySQL_python = _5.1.41_static
-bx_python = _494c2d1d68b3_rebuild1
+; bx_python = _494c2d1d68b3_rebuild1
GeneTrack = _dev_48da9e998f0caf01c5be731e926f4b0481f658f0
SQLAlchemy = _dev_r6498
pysam = _kanwei_b10f6e722e9a
diff -r 471c9a7d9ed2eca4110bf59961ce21307344a982 -r f5961b41a0d4a7c7b1f21dc8829644573c9e5448 lib/galaxy/datatypes/converters/interval_to_summary_tree_converter.py
--- a/lib/galaxy/datatypes/converters/interval_to_summary_tree_converter.py
+++ b/lib/galaxy/datatypes/converters/interval_to_summary_tree_converter.py
@@ -50,4 +50,4 @@
st.write(out_fname)
if __name__ == "__main__":
- main()
\ No newline at end of file
+ main()
diff -r 471c9a7d9ed2eca4110bf59961ce21307344a982 -r f5961b41a0d4a7c7b1f21dc8829644573c9e5448 lib/galaxy/visualization/tracks/data_providers.py
--- a/lib/galaxy/visualization/tracks/data_providers.py
+++ b/lib/galaxy/visualization/tracks/data_providers.py
@@ -434,40 +434,55 @@
# Bigwig has the possibility of it being a standalone bigwig file, in which case we use
# original_dataset, or coming from wig->bigwig conversion in which we use converted_dataset
f, bbi = self._get_dataset()
-
+
+ # If the stats kwarg was provide, we compute overall summary data for the entire chromosome,
+ # but no reduced data -- currently only providing min/max which is used by trackster to
+ # determine the default range
if 'stats' in kwargs:
- all_dat = bbi.query(chrom, 0, 2147483647, 1)
+ # FIXME: use actual chromosome size
+ summary = bbi.summarize( chrom, 0, 214783647, 1 )
f.close()
- if all_dat is None:
+ if summary is None:
return None
-
- all_dat = all_dat[0] # only 1 summary
- return { 'data' : { 'max': float( all_dat['max'] ), \
- 'min': float( all_dat['min'] ), \
- 'total_frequency': float( all_dat['coverage'] ) } \
- }
-
+ else:
+ return dict( data=dict( min=summary.min_val[0], max=summary.max_val[0] ) )
+
start = int(start)
end = int(end)
+
+ # The following seems not to work very well, for example it will only return one
+ # data point if the tile is 1280px wide. Not sure what the intent is.
+
# The first zoom level for BBI files is 640. If too much is requested, it will look at each block instead
# of summaries. The calculation done is: zoom <> (end-start)/num_points/2.
# Thus, the optimal number of points is (end-start)/num_points/2 = 640
# num_points = (end-start) / 1280
- num_points = (end-start) / 1280
- if num_points < 1:
- num_points = end - start
- else:
- num_points = min(num_points, 500)
+ #num_points = (end-start) / 1280
+ #if num_points < 1:
+ # num_points = end - start
+ #else:
+ # num_points = min(num_points, 500)
- data = bbi.query(chrom, start, end, num_points)
+ # For now, we'll do 1000 data points by default However, the summaries
+ # don't seem to work when a summary pixel corresponds to less than one
+ # datapoint, so we prevent that.
+ # FIXME: need to switch over to using the full data at high levels of
+ # detail.
+ num_points = min( 1000, end - start )
+
+ summary = bbi.summarize( chrom, start, end, num_points )
f.close()
+
+ result = []
+
+ if summary:
+ mean = summary.sum_data / summary.valid_count
- pos = start
- step_size = (end - start) / num_points
- result = []
- if data:
- for dat_dict in data:
- result.append( (pos, float_nan(dat_dict['mean']) ) )
+ pos = start
+ step_size = (end - start) / num_points
+
+ for value in mean:
+ result.append( (pos, float_nan(value) ) )
pos += step_size
return { 'data': result }
diff -r 471c9a7d9ed2eca4110bf59961ce21307344a982 -r f5961b41a0d4a7c7b1f21dc8829644573c9e5448 lib/galaxy/web/controllers/tracks.py
--- a/lib/galaxy/web/controllers/tracks.py
+++ b/lib/galaxy/web/controllers/tracks.py
@@ -524,6 +524,7 @@
if not standalone_provider.has_data( chrom ):
return messages.NO_DATA
valid_chroms = standalone_provider.valid_chroms()
+
# Have data if we get here
return { "status": messages.DATA, "valid_chroms": valid_chroms }
@@ -990,4 +991,4 @@
return_message = message
elif return_message == None and message == messages.PENDING:
return_message = message
- return return_message
\ No newline at end of file
+ return return_message
diff -r 471c9a7d9ed2eca4110bf59961ce21307344a982 -r f5961b41a0d4a7c7b1f21dc8829644573c9e5448 static/scripts/trackster.js
--- a/static/scripts/trackster.js
+++ b/static/scripts/trackster.js
@@ -699,7 +699,7 @@
remove: function() {
this.container.remove_drawable(this);
- this.container_div.fadeOut('slow', function() {
+ this.container_div.hide(0, function() {
$(this).remove();
// HACK: is there a better way to update the view?
view.update_intro_div();
@@ -1253,7 +1253,7 @@
DrawableCollection.prototype.remove_drawable.call(this, drawable);
if (hide) {
var view = this;
- drawable.container_div.fadeOut('slow', function() {
+ drawable.container_div.hide(0, function() {
$(this).remove();
view.update_intro_div();
});
@@ -2699,7 +2699,7 @@
w_scale = width / range,
resolution = this.view.resolution,
parent_element = $("<div style='position: relative;'></div>");
-
+
// For overview, adjust high, low, resolution, and w_scale.
if (this.is_overview) {
low = this.view.max_low;
@@ -4759,4 +4759,4 @@
for ( key in modules.trackster ) {
target[key] = modules.trackster[key];
}
-})(window);
\ No newline at end of file
+})(window);
https://bitbucket.org/galaxy/galaxy-central/changeset/aa241b7e0138/
changeset: aa241b7e0138
user: james_taylor
date: 2011-10-31 23:06:30
summary: Trackster: for line tracks, compute default range using +/- two standard deviations around mean, for feature tracks, make feature popup look more like other tooltips
affected #: 4 files
diff -r f5961b41a0d4a7c7b1f21dc8829644573c9e5448 -r aa241b7e0138f5f107219666dc2e21daa76f3c87 lib/galaxy/visualization/tracks/data_providers.py
--- a/lib/galaxy/visualization/tracks/data_providers.py
+++ b/lib/galaxy/visualization/tracks/data_providers.py
@@ -2,8 +2,8 @@
Data providers for tracks visualizations.
"""
-import sys
-from math import ceil, log
+import sys, time
+from math import ceil, log, sqrt
import pkg_resources
pkg_resources.require( "bx-python" )
if sys.version_info[:2] == (2, 4):
@@ -435,9 +435,9 @@
# original_dataset, or coming from wig->bigwig conversion in which we use converted_dataset
f, bbi = self._get_dataset()
- # If the stats kwarg was provide, we compute overall summary data for the entire chromosome,
- # but no reduced data -- currently only providing min/max which is used by trackster to
- # determine the default range
+ # If the stats kwarg was provide, we compute overall summary data for
+ # the entire chromosome, but no reduced data -- currently only
+ # providing values used by trackster to determine the default range
if 'stats' in kwargs:
# FIXME: use actual chromosome size
summary = bbi.summarize( chrom, 0, 214783647, 1 )
@@ -445,7 +445,20 @@
if summary is None:
return None
else:
- return dict( data=dict( min=summary.min_val[0], max=summary.max_val[0] ) )
+ # Does the summary contain any defined values?
+ valid_count = summary.valid_count[0]
+ if summary.valid_count < 1:
+ return None
+
+ # Compute $\mu \pm 2\sigma$ to provide an estimate for upper and lower
+ # bounds that contain ~95% of the data.
+ mean = summary.sum_data[0] / valid_count
+ var = summary.sum_squares[0] - mean
+ if valid_count > 1:
+ var /= valid_count - 1
+ sd = sqrt( var )
+
+ return dict( data=dict( min=summary.min_val[0], max=summary.max_val[0], mean=mean, sd=sd ) )
start = int(start)
end = int(end)
diff -r f5961b41a0d4a7c7b1f21dc8829644573c9e5448 -r aa241b7e0138f5f107219666dc2e21daa76f3c87 static/june_2007_style/blue/trackster.css
--- a/static/june_2007_style/blue/trackster.css
+++ b/static/june_2007_style/blue/trackster.css
@@ -87,4 +87,5 @@
.icon.more-across{background:url('../images/fugue/arrow-transition-bw.png') no-repeat 0px 0px;}
.intro{padding:1em;}
.intro > .action-button{background-color:#CCC;padding:1em;}
-.feature-popup{background-color:#DDD;position:absolute;z-index:1000;}
+.feature-popup{position:absolute;z-index:1000;padding:5px;font-size:10px;filter:alpha(opacity=80);background-repeat:no-repeat;background-image:url(../images/tipsy.gif);background-position:top center;}
+.feature-popup-inner{padding:5px 8px 4px 8px;background-color:black;color:white;}
diff -r f5961b41a0d4a7c7b1f21dc8829644573c9e5448 -r aa241b7e0138f5f107219666dc2e21daa76f3c87 static/june_2007_style/trackster.css.tmpl
--- a/static/june_2007_style/trackster.css.tmpl
+++ b/static/june_2007_style/trackster.css.tmpl
@@ -405,8 +405,19 @@
background-color: #CCC;
padding: 1em;
}
-.feature-popup {
- background-color: #DDD;
+
+.feature-popup {
position: absolute;
z-index: 1000;
+ padding: 5px;
+ font-size: 10px;
+ filter: alpha(opacity=80);
+ background-repeat: no-repeat;
+ background-image: url(../images/tipsy.gif);
+ background-position: top center;
}
+.feature-popup-inner {
+ padding: 5px 8px 4px 8px;
+ background-color: black;
+ color: white;
+}
diff -r f5961b41a0d4a7c7b1f21dc8829644573c9e5448 -r aa241b7e0138f5f107219666dc2e21daa76f3c87 static/scripts/trackster.js
--- a/static/scripts/trackster.js
+++ b/static/scripts/trackster.js
@@ -2268,8 +2268,8 @@
// Build popup.
var popup = $("<div/>").attr("id", feature_uid).addClass("feature-popup"),
- key, value,
- table = $("<table/>").appendTo(popup), row;
+ table = $("<table/>"),
+ key, value, row;
for (key in feature_dict) {
value = feature_dict[key];
row = $("<tr/>").appendTo(table);
@@ -2277,6 +2277,7 @@
$("<td/>").attr("align", "left").appendTo(row)
.text(typeof(value) == 'number' ? round(value, 2) : value);
}
+ popup.append( $("<div class='feature-popup-inner'>").append( table ) );
popups[feature_uid] = popup;
}
@@ -2287,7 +2288,7 @@
// parseInt strips "px" from left, top measurements. +7 so that mouse pointer does not
// overlap popup.
var
- popupX = offsetX + parseInt( tile.canvas.css("left") ) + 7,
+ popupX = offsetX + parseInt( tile.canvas.css("left") ) - popup.width() / 2,
popupY = offsetY + parseInt( tile.canvas.css("top") ) + 7;
popup.css("left", popupX + "px").css("top", popupY + "px")
}
@@ -3080,9 +3081,20 @@
track.container_div.addClass( "line-track" );
var data = result.data;
if ( isNaN(parseFloat(track.prefs.min_value)) || isNaN(parseFloat(track.prefs.max_value)) ) {
- track.prefs.min_value = data.min;
- track.prefs.max_value = data.max;
+ // Compute default minimum and maximum values
+ var min_value = data.min
+ var max_value = data.max
+ // If mean and sd are present, use them to compute a ~95% window
+ // but only if it would shrink the range on one side
+ min_value = Math.floor( Math.min( 0, Math.max( min_value, data.mean - 2 * data.sd ) ) )
+ max_value = Math.ceil( Math.max( 0, Math.min( max_value, data.mean + 2 * data.sd ) ) )
+ // Update the prefs
+ track.prefs.min_value = min_value;
+ track.prefs.max_value = max_value;
// Update the config
+ // FIXME: we should probably only save this when the user explicately sets it
+ // since we lose the ability to compute it on the fly (when changing
+ // chromosomes for example).
$('#track_' + track.dataset_id + '_minval').val(track.prefs.min_value);
$('#track_' + track.dataset_id + '_maxval').val(track.prefs.max_value);
}
https://bitbucket.org/galaxy/galaxy-central/changeset/6db378a732b3/
changeset: 6db378a732b3
user: james_taylor
date: 2011-10-31 23:06:39
summary: Automated merge with https://bitbucket.org/galaxy/galaxy-central
affected #: 11 files
diff -r ef39a111210018fb50282a352182b298c23be8f7 -r 6db378a732b382143bf2c8992d298ab278ffc8f9 eggs.ini
--- a/eggs.ini
+++ b/eggs.ini
@@ -12,7 +12,7 @@
no_auto = pbs_python DRMAA_python
[eggs:platform]
-bx_python = 0.7.0
+bx_python = 0.7.1
Cheetah = 2.2.2
ctypes = 1.0.2
DRMAA_python = 0.2
@@ -67,7 +67,7 @@
psycopg2 = _8.4.2_static
pysqlite = _3.6.17_static
MySQL_python = _5.1.41_static
-bx_python = _494c2d1d68b3_rebuild1
+; bx_python = _494c2d1d68b3_rebuild1
GeneTrack = _dev_48da9e998f0caf01c5be731e926f4b0481f658f0
SQLAlchemy = _dev_r6498
pysam = _kanwei_b10f6e722e9a
diff -r ef39a111210018fb50282a352182b298c23be8f7 -r 6db378a732b382143bf2c8992d298ab278ffc8f9 lib/galaxy/datatypes/converters/interval_to_summary_tree_converter.py
--- a/lib/galaxy/datatypes/converters/interval_to_summary_tree_converter.py
+++ b/lib/galaxy/datatypes/converters/interval_to_summary_tree_converter.py
@@ -50,4 +50,4 @@
st.write(out_fname)
if __name__ == "__main__":
- main()
\ No newline at end of file
+ main()
diff -r ef39a111210018fb50282a352182b298c23be8f7 -r 6db378a732b382143bf2c8992d298ab278ffc8f9 lib/galaxy/visualization/tracks/data_providers.py
--- a/lib/galaxy/visualization/tracks/data_providers.py
+++ b/lib/galaxy/visualization/tracks/data_providers.py
@@ -2,8 +2,8 @@
Data providers for tracks visualizations.
"""
-import sys
-from math import ceil, log
+import sys, time
+from math import ceil, log, sqrt
import pkg_resources
pkg_resources.require( "bx-python" )
if sys.version_info[:2] == (2, 4):
@@ -434,40 +434,68 @@
# Bigwig has the possibility of it being a standalone bigwig file, in which case we use
# original_dataset, or coming from wig->bigwig conversion in which we use converted_dataset
f, bbi = self._get_dataset()
-
+
+ # If the stats kwarg was provide, we compute overall summary data for
+ # the entire chromosome, but no reduced data -- currently only
+ # providing values used by trackster to determine the default range
if 'stats' in kwargs:
- all_dat = bbi.query(chrom, 0, 2147483647, 1)
+ # FIXME: use actual chromosome size
+ summary = bbi.summarize( chrom, 0, 214783647, 1 )
f.close()
- if all_dat is None:
+ if summary is None:
return None
-
- all_dat = all_dat[0] # only 1 summary
- return { 'data' : { 'max': float( all_dat['max'] ), \
- 'min': float( all_dat['min'] ), \
- 'total_frequency': float( all_dat['coverage'] ) } \
- }
-
+ else:
+ # Does the summary contain any defined values?
+ valid_count = summary.valid_count[0]
+ if summary.valid_count < 1:
+ return None
+
+ # Compute $\mu \pm 2\sigma$ to provide an estimate for upper and lower
+ # bounds that contain ~95% of the data.
+ mean = summary.sum_data[0] / valid_count
+ var = summary.sum_squares[0] - mean
+ if valid_count > 1:
+ var /= valid_count - 1
+ sd = sqrt( var )
+
+ return dict( data=dict( min=summary.min_val[0], max=summary.max_val[0], mean=mean, sd=sd ) )
+
start = int(start)
end = int(end)
+
+ # The following seems not to work very well, for example it will only return one
+ # data point if the tile is 1280px wide. Not sure what the intent is.
+
# The first zoom level for BBI files is 640. If too much is requested, it will look at each block instead
# of summaries. The calculation done is: zoom <> (end-start)/num_points/2.
# Thus, the optimal number of points is (end-start)/num_points/2 = 640
# num_points = (end-start) / 1280
- num_points = (end-start) / 1280
- if num_points < 1:
- num_points = end - start
- else:
- num_points = min(num_points, 500)
+ #num_points = (end-start) / 1280
+ #if num_points < 1:
+ # num_points = end - start
+ #else:
+ # num_points = min(num_points, 500)
- data = bbi.query(chrom, start, end, num_points)
+ # For now, we'll do 1000 data points by default However, the summaries
+ # don't seem to work when a summary pixel corresponds to less than one
+ # datapoint, so we prevent that.
+ # FIXME: need to switch over to using the full data at high levels of
+ # detail.
+ num_points = min( 1000, end - start )
+
+ summary = bbi.summarize( chrom, start, end, num_points )
f.close()
+
+ result = []
+
+ if summary:
+ mean = summary.sum_data / summary.valid_count
- pos = start
- step_size = (end - start) / num_points
- result = []
- if data:
- for dat_dict in data:
- result.append( (pos, float_nan(dat_dict['mean']) ) )
+ pos = start
+ step_size = (end - start) / num_points
+
+ for value in mean:
+ result.append( (pos, float_nan(value) ) )
pos += step_size
return { 'data': result }
diff -r ef39a111210018fb50282a352182b298c23be8f7 -r 6db378a732b382143bf2c8992d298ab278ffc8f9 lib/galaxy/web/controllers/tracks.py
--- a/lib/galaxy/web/controllers/tracks.py
+++ b/lib/galaxy/web/controllers/tracks.py
@@ -524,6 +524,7 @@
if not standalone_provider.has_data( chrom ):
return messages.NO_DATA
valid_chroms = standalone_provider.valid_chroms()
+
# Have data if we get here
return { "status": messages.DATA, "valid_chroms": valid_chroms }
@@ -990,4 +991,4 @@
return_message = message
elif return_message == None and message == messages.PENDING:
return_message = message
- return return_message
\ No newline at end of file
+ return return_message
diff -r ef39a111210018fb50282a352182b298c23be8f7 -r 6db378a732b382143bf2c8992d298ab278ffc8f9 static/june_2007_style/blue/panel_layout.css
--- a/static/june_2007_style/blue/panel_layout.css
+++ b/static/june_2007_style/blue/panel_layout.css
@@ -23,9 +23,11 @@
.panel-header-button:hover{color:black;background-color:#ccc;}
.panel-header-button:active{color:white;background-color:#aaaaaa;}
#overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:20000;}
+#overlay.modal #overlay-background{background:rgba(0,0,0,0.5);}
.dialog-box-container{position:relative;margin-top:80px;margin-right:auto;margin-left:auto;}
.dialog-box-wrapper{position:relative;padding:1em;background-color:rgba(0,0,0,0.5);-moz-border-radius:1em;-webkit-border-radius:1em;}
.dialog-box{border:solid #999 1px;background:white;z-index:80000;}
+#overlay.modal .dialog-box .body{min-width:600px;}
.dialog-box .body{padding:5px;overflow:auto;max-height:500px;min-width:300px;}
.dialog-box .buttons{padding:5px;}
.panel-error-message,.panel-warning-message,.panel-done-message,.panel-info-message{height:24px;line-height:24px;color:#303030;padding:0px;padding-left:26px;background-color:#FFCCCC;background-image:url(error_small.png);background-repeat:no-repeat;background-position:6px 50%;}
diff -r ef39a111210018fb50282a352182b298c23be8f7 -r 6db378a732b382143bf2c8992d298ab278ffc8f9 static/june_2007_style/blue/trackster.css
--- a/static/june_2007_style/blue/trackster.css
+++ b/static/june_2007_style/blue/trackster.css
@@ -3,30 +3,9 @@
.content{font:10px verdana;}
.nav-controls{text-align:center;padding:1px 0;}
.nav-controls input{margin:0 5px;}
-.menu-button{padding: 0px 4px 0px 4px;}
#zoom-in,#zoom-out{display:inline-block;height:16px;width:16px;margin-bottom:-3px;cursor:pointer;}
#zoom-out{background:transparent url(../images/fugue/magnifier-zoom-out.png) center center no-repeat;}
#zoom-in{margin-left:10px;background:transparent url(../images/fugue/magnifier-zoom.png) center center no-repeat;}
-.overview-icon{background:transparent url(../images/fugue/application-dock-270-bw.png) no-repeat;}
-.overview-icon:hover{background:transparent url(../images/fugue/application-dock-270.png) no-repeat;}
-.settings-icon{background:transparent url(../images/fugue/gear-bw.png) no-repeat;}
-.settings-icon:hover{background:transparent url(../images/fugue/gear.png) no-repeat;}
-.tools-icon{background:transparent url(../images/fugue/toolbox-bw.png) no-repeat;}
-.tools-icon:hover{background:transparent url(../images/fugue/toolbox.png) no-repeat;}
-.filters-icon{background:transparent url(../images/fugue/ui-slider-050-bw.png) no-repeat;}
-.filters-icon:hover{background:transparent url(../images/fugue/ui-slider-050.png) no-repeat;}
-.remove-icon,.overview-close{background:transparent url(../images/fugue/cross-small-bw.png) no-repeat;}
-.remove-icon:hover,.overview-close:hover{background:transparent url(../images/fugue/cross-circle.png) no-repeat;}
-#close-icon{background:transparent url(../images/fugue/cross-circle-bw.png) no-repeat;margin-right:0px;}
-#close-icon:hover{background:transparent url(../images/fugue/cross-circle.png) no-repeat;}
-#add-tracks-icon{background:transparent url(../images/fugue/plus-button-bw.png) no-repeat;}
-#add-tracks-icon:hover{background:transparent url(../images/fugue/plus-button.png) no-repeat;}
-#add-group-icon{background:transparent url(../images/fugue/block--plus-bw.png) no-repeat;}
-#add-group-icon:hover{background:transparent url(../images/fugue/block--plus.png) no-repeat;}
-#bookmarks-icon{background:transparent url(../images/fugue/bookmarks-bw.png) no-repeat;}
-#bookmarks-icon:hover{background:transparent url(../images/fugue/bookmarks.png) no-repeat;}
-#save-icon{background:transparent url(../images/fugue/disk--arrow-bw.png) no-repeat;}
-#save-icon:hover{background:transparent url(../images/fugue/disk--arrow.png) no-repeat;}
.nav-input{font-size:12px;width:30em;z-index:1000;}
.location{display:inline-block;width:15em;margin:0 10px;}
.draghandle{margin-top:2px;cursor:move;float:left;background:transparent url(../images/visualization/draggable_horizontal.png) center center no-repeat;width:10px;height:12px;}
@@ -65,16 +44,39 @@
input{font:10px verdana;}
.dynamic-tool,.filters{margin-left:0.25em;padding-bottom:0.5em;}
.dynamic-tool{width:410px;}
-.filters>.sliders,.display-controls{float:left;margin:1em;}
+.filters > .sliders,.display-controls{float:left;margin:1em;}
.sliders{width:410px;}
-.display-controls{border-left:solid 2px #DDDDDD;padding-left:1em}
-.filter-row{margin-top:0.4em;}
+.display-controls{border-left:solid 2px #DDDDDD;padding-left:1em
+}
+.filter-row {
+ margin-top:0.4em;}
.slider-row{margin-left:1em;}
.elt-label{float:left;font-weight:bold;margin-right:1em;}
.slider{float:right;width:200px;position:relative;}
.tool-name{font-size:110%;font-weight:bold;}
.param-row{margin-top:0.2em;margin-left:1em;}
.param-label{float:left;font-weight:bold;padding-top:0.2em;}
+.menu-button{padding:0px 4px 0px 4px;}
+.settings-icon{background:transparent url(../images/fugue/gear-bw.png) no-repeat;}
+.settings-icon:hover{background:transparent url(../images/fugue/gear.png) no-repeat;}
+.overview-icon{background:transparent url(../images/fugue/application-dock-270-bw.png) no-repeat;}
+.overview-icon:hover{background:transparent url(../images/fugue/application-dock-270.png) no-repeat;}
+.tools-icon{background:transparent url(../images/fugue/toolbox-bw.png) no-repeat;}
+.tools-icon:hover{background:transparent url(../images/fugue/toolbox.png) no-repeat;}
+.filters-icon{background:transparent url(../images/fugue/ui-slider-050-bw.png) no-repeat;}
+.filters-icon:hover{background:transparent url(../images/fugue/ui-slider-050.png) no-repeat;}
+.remove-icon,.overview-close{background:transparent url(../images/fugue/cross-small-bw.png) no-repeat;}
+.remove-icon:hover,.overview-close:hover{background:transparent url(../images/fugue/cross-circle.png) no-repeat;}
+#close-icon{background:transparent url(../images/fugue/cross-circle-bw.png) no-repeat;margin-right:0px;}
+#close-icon:hover{background:transparent url(../images/fugue/cross-circle.png) no-repeat;}
+#add-tracks-icon{background:transparent url(../images/fugue/plus-button-bw.png) no-repeat;}
+#add-tracks-icon:hover{background:transparent url(../images/fugue/plus-button.png) no-repeat;}
+#add-group-icon{background:transparent url(../images/fugue/block--plus-bw.png) no-repeat;}
+#add-group-icon:hover{background:transparent url(../images/fugue/block--plus.png) no-repeat;}
+#bookmarks-icon{background:transparent url(../images/fugue/bookmarks-bw.png) no-repeat;}
+#bookmarks-icon:hover{background:transparent url(../images/fugue/bookmarks.png) no-repeat;}
+#save-icon{background:transparent url(../images/fugue/disk--arrow-bw.png) no-repeat;}
+#save-icon:hover{background:transparent url(../images/fugue/disk--arrow.png) no-repeat;}
.child-track-icon{background:url('../images/fugue/arrow-000-small-bw.png') no-repeat;width:30px;cursor:move;}
.track-resize{background:white url('../images/visualization/draggable_vertical.png') no-repeat top center;position:absolute;right:3px;bottom:-4px;width:14px;height:7px;border:solid #999 1px;z-index:100;}
.bookmark{background:white;border:solid #999 1px;border-right:none;margin:0.5em;margin-right:0;padding:0.5em;}
@@ -85,4 +87,5 @@
.icon.more-across{background:url('../images/fugue/arrow-transition-bw.png') no-repeat 0px 0px;}
.intro{padding:1em;}
.intro > .action-button{background-color:#CCC;padding:1em;}
-.feature-popup{background-color:#DDD;position:absolute;z-index:1000}
+.feature-popup{position:absolute;z-index:1000;padding:5px;font-size:10px;filter:alpha(opacity=80);background-repeat:no-repeat;background-image:url(../images/tipsy.gif);background-position:top center;}
+.feature-popup-inner{padding:5px 8px 4px 8px;background-color:black;color:white;}
diff -r ef39a111210018fb50282a352182b298c23be8f7 -r 6db378a732b382143bf2c8992d298ab278ffc8f9 static/june_2007_style/panel_layout.css.tmpl
--- a/static/june_2007_style/panel_layout.css.tmpl
+++ b/static/june_2007_style/panel_layout.css.tmpl
@@ -161,6 +161,10 @@
z-index: 20000;
}
+#overlay.modal #overlay-background {
+ background: rgba(0,0,0,0.5);
+}
+
.dialog-box-container {
position: relative;
margin-top: 80px;
@@ -182,6 +186,10 @@
z-index: 80000;
}
+#overlay.modal .dialog-box .body {
+ min-width: 600px;
+}
+
.dialog-box .body {
padding: 5px;
overflow: auto;
diff -r ef39a111210018fb50282a352182b298c23be8f7 -r 6db378a732b382143bf2c8992d298ab278ffc8f9 static/june_2007_style/trackster.css.tmpl
--- a/static/june_2007_style/trackster.css.tmpl
+++ b/static/june_2007_style/trackster.css.tmpl
@@ -405,8 +405,19 @@
background-color: #CCC;
padding: 1em;
}
-.feature-popup{
- background-color: #DDD;
+
+.feature-popup {
position: absolute;
- z-index: 1000
+ z-index: 1000;
+ padding: 5px;
+ font-size: 10px;
+ filter: alpha(opacity=80);
+ background-repeat: no-repeat;
+ background-image: url(../images/tipsy.gif);
+ background-position: top center;
}
+.feature-popup-inner {
+ padding: 5px 8px 4px 8px;
+ background-color: black;
+ color: white;
+}
diff -r ef39a111210018fb50282a352182b298c23be8f7 -r 6db378a732b382143bf2c8992d298ab278ffc8f9 static/scripts/galaxy.panels.js
--- a/static/scripts/galaxy.panels.js
+++ b/static/scripts/galaxy.panels.js
@@ -163,13 +163,23 @@
// Modal dialog boxes
function hide_modal() {
- $(".dialog-box-container" ).fadeOut( function() {
+ $(".dialog-box-container" ).hide( 0, function() {
$("#overlay").hide();
+ $("#overlay").removeClass( "modal" );
$( ".dialog-box" ).find( ".body" ).children().remove();
} );
};
-function show_modal( title, body, buttons, extra_buttons, init_fn ) {
+function show_modal() {
+ $("#overlay").addClass( "modal" );
+ _show_modal.apply( this, arguments );
+}
+
+function show_message() {
+ _show_modal.apply( this, arguments );
+}
+
+function _show_modal( title, body, buttons, extra_buttons, init_fn ) {
if ( title ) {
$( ".dialog-box" ).find( ".title" ).html( title );
$( ".dialog-box" ).find( ".unified-panel-header" ).show();
@@ -205,7 +215,7 @@
$( ".dialog-box" ).find( ".body" ).html( body );
if ( ! $(".dialog-box-container").is( ":visible" ) ) {
$("#overlay").show();
- $(".dialog-box-container").fadeIn();
+ $(".dialog-box-container").show();
}
// Fix min-width so that modal cannot shrink considerably if
// new content is loaded.
diff -r ef39a111210018fb50282a352182b298c23be8f7 -r 6db378a732b382143bf2c8992d298ab278ffc8f9 static/scripts/trackster.js
--- a/static/scripts/trackster.js
+++ b/static/scripts/trackster.js
@@ -699,7 +699,7 @@
remove: function() {
this.container.remove_drawable(this);
- this.container_div.fadeOut('slow', function() {
+ this.container_div.hide(0, function() {
$(this).remove();
// HACK: is there a better way to update the view?
view.update_intro_div();
@@ -1253,7 +1253,7 @@
DrawableCollection.prototype.remove_drawable.call(this, drawable);
if (hide) {
var view = this;
- drawable.container_div.fadeOut('slow', function() {
+ drawable.container_div.hide(0, function() {
$(this).remove();
view.update_intro_div();
});
@@ -2268,8 +2268,8 @@
// Build popup.
var popup = $("<div/>").attr("id", feature_uid).addClass("feature-popup"),
- key, value,
- table = $("<table/>").appendTo(popup), row;
+ table = $("<table/>"),
+ key, value, row;
for (key in feature_dict) {
value = feature_dict[key];
row = $("<tr/>").appendTo(table);
@@ -2277,6 +2277,7 @@
$("<td/>").attr("align", "left").appendTo(row)
.text(typeof(value) == 'number' ? round(value, 2) : value);
}
+ popup.append( $("<div class='feature-popup-inner'>").append( table ) );
popups[feature_uid] = popup;
}
@@ -2287,7 +2288,7 @@
// parseInt strips "px" from left, top measurements. +7 so that mouse pointer does not
// overlap popup.
var
- popupX = offsetX + parseInt( tile.canvas.css("left") ) + 7,
+ popupX = offsetX + parseInt( tile.canvas.css("left") ) - popup.width() / 2,
popupY = offsetY + parseInt( tile.canvas.css("top") ) + 7;
popup.css("left", popupX + "px").css("top", popupY + "px")
}
@@ -2699,7 +2700,7 @@
w_scale = width / range,
resolution = this.view.resolution,
parent_element = $("<div style='position: relative;'></div>");
-
+
// For overview, adjust high, low, resolution, and w_scale.
if (this.is_overview) {
low = this.view.max_low;
@@ -3080,9 +3081,20 @@
track.container_div.addClass( "line-track" );
var data = result.data;
if ( isNaN(parseFloat(track.prefs.min_value)) || isNaN(parseFloat(track.prefs.max_value)) ) {
- track.prefs.min_value = data.min;
- track.prefs.max_value = data.max;
+ // Compute default minimum and maximum values
+ var min_value = data.min
+ var max_value = data.max
+ // If mean and sd are present, use them to compute a ~95% window
+ // but only if it would shrink the range on one side
+ min_value = Math.floor( Math.min( 0, Math.max( min_value, data.mean - 2 * data.sd ) ) )
+ max_value = Math.ceil( Math.max( 0, Math.min( max_value, data.mean + 2 * data.sd ) ) )
+ // Update the prefs
+ track.prefs.min_value = min_value;
+ track.prefs.max_value = max_value;
// Update the config
+ // FIXME: we should probably only save this when the user explicately sets it
+ // since we lose the ability to compute it on the fly (when changing
+ // chromosomes for example).
$('#track_' + track.dataset_id + '_minval').val(track.prefs.min_value);
$('#track_' + track.dataset_id + '_maxval').val(track.prefs.max_value);
}
@@ -4721,4 +4733,4 @@
for ( key in modules.trackster ) {
target[key] = modules.trackster[key];
}
-})(window);
\ No newline at end of file
+})(window);
diff -r ef39a111210018fb50282a352182b298c23be8f7 -r 6db378a732b382143bf2c8992d298ab278ffc8f9 templates/workflow/editor.mako
--- a/templates/workflow/editor.mako
+++ b/templates/workflow/editor.mako
@@ -213,7 +213,7 @@
show_workflow_parameters();
},
beforeSubmit: function( data ) {
- show_modal( "Loading workflow", "progress" );
+ show_message( "Loading workflow", "progress" );
}
});
}
@@ -650,7 +650,7 @@
};
var save_current_workflow = function ( eventObj, success_callback ) {
- show_modal( "Saving workflow", "progress" );
+ show_message( "Saving workflow", "progress" );
workflow.check_changes_in_active_form();
if (!workflow.has_changes) {
hide_modal();
https://bitbucket.org/galaxy/galaxy-central/changeset/19fd9fccebb9/
changeset: 19fd9fccebb9
user: james_taylor
date: 2011-10-31 23:31:15
summary: Trackster: faster x axis drag/wheel scrolling, seems to work across browsers, but hard to tell across platforms, report your experiences
affected #: 1 file
diff -r 6db378a732b382143bf2c8992d298ab278ffc8f9 -r 19fd9fccebb9af1150ab409da94f74bdf2246fb6 static/scripts/trackster.js
--- a/static/scripts/trackster.js
+++ b/static/scripts/trackster.js
@@ -1024,6 +1024,7 @@
// Only act on x axis scrolling if we see if, y will be i
// handled by the browser when the event bubbles up
if ( dx ) {
+ dx *= 50;
var delta_chrom = Math.round( - dx / view.viewport_container.width() * (view.high - view.low) );
view.move_delta( delta_chrom );
}
https://bitbucket.org/galaxy/galaxy-central/changeset/89b2abe925ba/
changeset: 89b2abe925ba
user: james_taylor
date: 2011-11-01 19:54:11
summary: Trackster: set min/max values for wiggle tracks using standard deviation. Add a new FeaturePainter that uses Arcs to connect blocks. Allow FeaturePainters to provide (computed) top and bottom padding around the rows where features are drawn.
affected #: 2 files
diff -r 19fd9fccebb9af1150ab409da94f74bdf2246fb6 -r 89b2abe925baa41872656df183125d5185004111 lib/galaxy/visualization/tracks/data_providers.py
--- a/lib/galaxy/visualization/tracks/data_providers.py
+++ b/lib/galaxy/visualization/tracks/data_providers.py
@@ -10,6 +10,7 @@
pkg_resources.require( "ctypes" )
pkg_resources.require( "pysam" )
pkg_resources.require( "numpy" )
+from numpy import *
from galaxy.datatypes.util.gff_util import *
from galaxy.util.json import from_json_string
from bx.interval_index_file import Indexes
@@ -490,12 +491,17 @@
if summary:
mean = summary.sum_data / summary.valid_count
+
+ ## Standard deviation by bin, not yet used
+ ## var = summary.sum_squares - mean
+ ## var /= minimum( valid_count - 1, 1 )
+ ## sd = sqrt( var )
pos = start
step_size = (end - start) / num_points
- for value in mean:
- result.append( (pos, float_nan(value) ) )
+ for i in range( num_points ):
+ result.append( (pos, float_nan( mean[i] ) ) )
pos += step_size
return { 'data': result }
diff -r 19fd9fccebb9af1150ab409da94f74bdf2246fb6 -r 89b2abe925baa41872656df183125d5185004111 static/scripts/trackster.js
--- a/static/scripts/trackster.js
+++ b/static/scripts/trackster.js
@@ -3512,7 +3512,7 @@
var filter_height_scaler = (this.filters_manager.height_filter ? new FilterScaler(this.filters_manager.height_filter) : null);
// HACK: ref_seq will only be defined for ReadTracks, and only the ReadPainter accepts that argument
var painter = new (this.painter)(filtered, tile_low, tile_high, this.prefs, mode, filter_alpha_scaler, filter_height_scaler, ref_seq);
- var required_height = Math.max(MIN_TRACK_HEIGHT, painter.get_required_height(slots_required));
+ var required_height = Math.max(MIN_TRACK_HEIGHT, painter.get_required_height(slots_required,width));
var canvas = this.view.canvas_manager.new_canvas();
var feature_mapper = null;
@@ -4078,6 +4078,7 @@
this.feature_positions = {};
this.slot_height = slot_height;
this.translation = 0;
+ this.y_translation = 0;
};
/**
@@ -4099,7 +4100,7 @@
*/
FeaturePositionMapper.prototype.get_feature_data = function(x, y) {
// Find slot using Y.
- var slot = Math.floor( y/this.slot_height ),
+ var slot = Math.floor( (y-this.y_translation)/this.slot_height ),
feature_dict;
// May not be over a slot due to padding, margin, etc.
@@ -4129,15 +4130,23 @@
FeaturePainter.prototype.default_prefs = { block_color: "#FFF", connector_color: "#FFF" };
extend(FeaturePainter.prototype, {
- get_required_height: function(rows_required) {
+ get_required_height: function(rows_required, width) {
// y_scale is the height per row
var required_height = y_scale = this.get_row_height(), mode = this.mode;
// If using a packing mode, need to multiply by the number of slots used
if (mode === "no_detail" || mode === "Squish" || mode === "Pack") {
required_height = rows_required * y_scale;
}
+ return required_height + this.get_top_padding(width) + this.get_bottom_padding(width);
+ },
+ /** Extra padding before first row of features */
+ get_top_padding: function(width) {
+ return 0;
+ },
+ /** Extra padding after last row of features */
+ get_bottom_padding: function(width) {
// Pad bottom by half a row, at least 5 px
- return required_height + Math.max( Math.round( y_scale / 2 ), 5 );
+ return Math.max( Math.round( this.get_row_height() / 2 ), 5 )
},
/**
* Draw data on ctx using slots and within the rectangle defined by width and height. Returns
@@ -4174,6 +4183,7 @@
}
ctx.restore();
+ feature_mapper.y_translation = this.get_top_padding(width);
return feature_mapper;
},
/**
@@ -4200,6 +4210,10 @@
var LinkedFeaturePainter = function(data, view_start, view_end, prefs, mode, alpha_scaler, height_scaler) {
FeaturePainter.call(this, data, view_start, view_end, prefs, mode, alpha_scaler, height_scaler);
+ // Whether to draw a single connector in the background that spans the entire feature (the intron fishbone)
+ this.draw_background_connector = true;
+ // Whether to call draw_connector for every pair of blocks
+ this.draw_individual_connectors = false;
};
extend(LinkedFeaturePainter.prototype, FeaturePainter.prototype, {
@@ -4237,7 +4251,7 @@
f_end = Math.ceil( Math.min(width, Math.max(0, (feature_end - tile_low) * w_scale)) ),
draw_start = f_start,
draw_end = f_end,
- y_center = (mode === "Dense" ? 0 : (0 + slot)) * y_scale,
+ y_center = (mode === "Dense" ? 0 : (0 + slot)) * y_scale + this.get_top_padding(width),
thickness, y_start, thick_start = null, thick_end = null,
// TODO: is there any reason why block, label color cannot be set at the Painter level?
block_color = this.prefs.block_color,
@@ -4300,38 +4314,51 @@
// needed. This ensures that whole feature, regardless of whether it starts with
// a block, is visible.
//
-
- // Draw whole feature as connector/intron.
+
+ // Compute y axis center position and height
var cur_y_center, cur_height;
if (mode === "Squish" || mode === "Dense") {
- ctx.fillStyle = CONNECTOR_COLOR;
cur_y_center = y_center + Math.floor(SQUISH_FEATURE_HEIGHT/2) + 1;
cur_height = 1;
}
else { // mode === "Pack"
if (feature_strand) {
- var cur_y_center = y_center;
- var cur_height = thick_height;
- if (feature_strand === "+") {
- ctx.fillStyle = ctx.canvas.manager.get_pattern( 'right_strand' );
- } else if (feature_strand === "-") {
- ctx.fillStyle = ctx.canvas.manager.get_pattern( 'left_strand' );
- }
+ cur_y_center = y_center;
+ cur_height = thick_height;
}
else {
- ctx.fillStyle = CONNECTOR_COLOR;
cur_y_center += (SQUISH_FEATURE_HEIGHT/2) + 1;
cur_height = 1;
}
}
- ctx.fillRect(f_start, cur_y_center, f_end - f_start, cur_height);
+
+ // Draw whole feature as connector/intron.
+ if ( this.draw_background_connector ) {
+ if (mode === "Squish" || mode === "Dense") {
+ ctx.fillStyle = CONNECTOR_COLOR;
+ }
+ else { // mode === "Pack"
+ if (feature_strand) {
+ if (feature_strand === "+") {
+ ctx.fillStyle = ctx.canvas.manager.get_pattern( 'right_strand' );
+ } else if (feature_strand === "-") {
+ ctx.fillStyle = ctx.canvas.manager.get_pattern( 'left_strand' );
+ }
+ }
+ else {
+ ctx.fillStyle = CONNECTOR_COLOR;
+ }
+ }
+ ctx.fillRect(f_start, cur_y_center, f_end - f_start, cur_height);
+ }
// Draw blocks.
var start_and_height;
for (var k = 0, k_len = feature_blocks.length; k < k_len; k++) {
var block = feature_blocks[k],
block_start = Math.floor( Math.max(0, (block[0] - tile_low) * w_scale) ),
- block_end = Math.ceil( Math.min(width, Math.max((block[1] - tile_low) * w_scale)) );
+ block_end = Math.ceil( Math.min(width, Math.max((block[1] - tile_low) * w_scale)) ),
+ last_block_start, last_block_end;
// Skip drawing if block not on tile.
if (block_start > block_end) { continue; }
@@ -4362,6 +4389,12 @@
ctx.fillRect(block_thick_start, y_center + 1, block_thick_end - block_thick_start, thick_height );
}
}
+ // Draw individual connectors if required
+ if ( this.draw_individual_connectors && last_block_start ) {
+ this.draw_connector( ctx, last_block_start, last_block_end, block_start, block_end, y_center );
+ }
+ last_block_start = block_start;
+ last_block_end = block_end;
}
// FIXME: Height scaling only works in Pack mode right now.
@@ -4699,11 +4732,54 @@
}
});
+var ArcLinkedFeaturePainter = function(data, view_start, view_end, prefs, mode, alpha_scaler, height_scaler) {
+ LinkedFeaturePainter.call(this, data, view_start, view_end, prefs, mode, alpha_scaler, height_scaler);
+ // Need to know the longest feature length for adding spacing
+ this.longest_feature_length = this.calculate_longest_feature_length();
+ this.draw_background_connector = false;
+ this.draw_individual_connectors = true;
+};
+
+extend(ArcLinkedFeaturePainter.prototype, FeaturePainter.prototype, LinkedFeaturePainter.prototype, {
+
+ calculate_longest_feature_length: function () {
+ var longest_feature_length = 0;
+ for (var i = 0, len = this.data.length; i < len; i++) {
+ var feature = this.data[i], feature_start = feature[1], feature_end = feature[2];
+ longest_feature_length = Math.max( longest_feature_length, feature_end - feature_start );
+ }
+ return longest_feature_length;
+ },
+
+ get_top_padding: function( width ) {
+ var view_range = this.view_end - this.view_start,
+ w_scale = width / view_range;
+ return Math.min( 128, Math.ceil( ( this.longest_feature_length / 2 ) * w_scale ) );
+ },
+
+ draw_connector: function( ctx, block1_start, block1_end, block2_start, block2_end, y_center ) {
+ // Arc drawing -- from closest endpoints
+ var x_center = ( block1_end + block2_start ) / 2,
+ radius = block2_start - x_center;
+ // For full half circles
+ var angle1 = Math.PI, angle2 = 0;
+ if ( radius > 0 ) {
+ ctx.beginPath();
+ ctx.arc( x_center, y_center, block2_start - x_center, Math.PI, 0 );
+ ctx.stroke();
+ }
+ }
+});
+
+
+
+
exports.Scaler = Scaler;
exports.SummaryTreePainter = SummaryTreePainter;
exports.LinePainter = LinePainter;
exports.LinkedFeaturePainter = LinkedFeaturePainter;
exports.ReadPainter = ReadPainter;
+exports.ArcLinkedFeaturePainter = ArcLinkedFeaturePainter;
// End painters_module encapsulation
};
https://bitbucket.org/galaxy/galaxy-central/changeset/0f5d6b2b13f7/
changeset: 0f5d6b2b13f7
user: james_taylor
date: 2011-11-01 19:54:25
summary: Automated merge with https://bitbucket.org/galaxy/galaxy-central
affected #: 11 files
diff -r 33e2ae31dddd0f494841aaa7f408aac9312b031b -r 0f5d6b2b13f78e164550420d620e569e681ed8bc eggs.ini
--- a/eggs.ini
+++ b/eggs.ini
@@ -12,7 +12,7 @@
no_auto = pbs_python DRMAA_python
[eggs:platform]
-bx_python = 0.7.0
+bx_python = 0.7.1
Cheetah = 2.2.2
ctypes = 1.0.2
DRMAA_python = 0.2
@@ -67,7 +67,7 @@
psycopg2 = _8.4.2_static
pysqlite = _3.6.17_static
MySQL_python = _5.1.41_static
-bx_python = _494c2d1d68b3_rebuild1
+; bx_python = _494c2d1d68b3_rebuild1
GeneTrack = _dev_48da9e998f0caf01c5be731e926f4b0481f658f0
SQLAlchemy = _dev_r6498
pysam = _kanwei_b10f6e722e9a
diff -r 33e2ae31dddd0f494841aaa7f408aac9312b031b -r 0f5d6b2b13f78e164550420d620e569e681ed8bc lib/galaxy/datatypes/converters/interval_to_summary_tree_converter.py
--- a/lib/galaxy/datatypes/converters/interval_to_summary_tree_converter.py
+++ b/lib/galaxy/datatypes/converters/interval_to_summary_tree_converter.py
@@ -50,4 +50,4 @@
st.write(out_fname)
if __name__ == "__main__":
- main()
\ No newline at end of file
+ main()
diff -r 33e2ae31dddd0f494841aaa7f408aac9312b031b -r 0f5d6b2b13f78e164550420d620e569e681ed8bc lib/galaxy/visualization/tracks/data_providers.py
--- a/lib/galaxy/visualization/tracks/data_providers.py
+++ b/lib/galaxy/visualization/tracks/data_providers.py
@@ -2,14 +2,15 @@
Data providers for tracks visualizations.
"""
-import sys
-from math import ceil, log
+import sys, time
+from math import ceil, log, sqrt
import pkg_resources
pkg_resources.require( "bx-python" )
if sys.version_info[:2] == (2, 4):
pkg_resources.require( "ctypes" )
pkg_resources.require( "pysam" )
pkg_resources.require( "numpy" )
+from numpy import *
from galaxy.datatypes.util.gff_util import *
from galaxy.util.json import from_json_string
from bx.interval_index_file import Indexes
@@ -720,40 +721,73 @@
# Bigwig has the possibility of it being a standalone bigwig file, in which case we use
# original_dataset, or coming from wig->bigwig conversion in which we use converted_dataset
f, bbi = self._get_dataset()
-
+
+ # If the stats kwarg was provide, we compute overall summary data for
+ # the entire chromosome, but no reduced data -- currently only
+ # providing values used by trackster to determine the default range
if 'stats' in kwargs:
- all_dat = bbi.query(chrom, 0, 2147483647, 1)
+ # FIXME: use actual chromosome size
+ summary = bbi.summarize( chrom, 0, 214783647, 1 )
f.close()
- if all_dat is None:
+ if summary is None:
return None
-
- all_dat = all_dat[0] # only 1 summary
- return { 'data' : { 'max': float( all_dat['max'] ), \
- 'min': float( all_dat['min'] ), \
- 'total_frequency': float( all_dat['coverage'] ) } \
- }
-
+ else:
+ # Does the summary contain any defined values?
+ valid_count = summary.valid_count[0]
+ if summary.valid_count < 1:
+ return None
+
+ # Compute $\mu \pm 2\sigma$ to provide an estimate for upper and lower
+ # bounds that contain ~95% of the data.
+ mean = summary.sum_data[0] / valid_count
+ var = summary.sum_squares[0] - mean
+ if valid_count > 1:
+ var /= valid_count - 1
+ sd = sqrt( var )
+
+ return dict( data=dict( min=summary.min_val[0], max=summary.max_val[0], mean=mean, sd=sd ) )
+
start = int(start)
end = int(end)
+
+ # The following seems not to work very well, for example it will only return one
+ # data point if the tile is 1280px wide. Not sure what the intent is.
+
# The first zoom level for BBI files is 640. If too much is requested, it will look at each block instead
# of summaries. The calculation done is: zoom <> (end-start)/num_points/2.
# Thus, the optimal number of points is (end-start)/num_points/2 = 640
# num_points = (end-start) / 1280
- num_points = (end-start) / 1280
- if num_points < 1:
- num_points = end - start
- else:
- num_points = min(num_points, 500)
+ #num_points = (end-start) / 1280
+ #if num_points < 1:
+ # num_points = end - start
+ #else:
+ # num_points = min(num_points, 500)
- data = bbi.query(chrom, start, end, num_points)
+ # For now, we'll do 1000 data points by default However, the summaries
+ # don't seem to work when a summary pixel corresponds to less than one
+ # datapoint, so we prevent that.
+ # FIXME: need to switch over to using the full data at high levels of
+ # detail.
+ num_points = min( 1000, end - start )
+
+ summary = bbi.summarize( chrom, start, end, num_points )
f.close()
+
+ result = []
+
+ if summary:
+ mean = summary.sum_data / summary.valid_count
+
+ ## Standard deviation by bin, not yet used
+ ## var = summary.sum_squares - mean
+ ## var /= minimum( valid_count - 1, 1 )
+ ## sd = sqrt( var )
- pos = start
- step_size = (end - start) / num_points
- result = []
- if data:
- for dat_dict in data:
- result.append( (pos, float_nan(dat_dict['mean']) ) )
+ pos = start
+ step_size = (end - start) / num_points
+
+ for i in range( num_points ):
+ result.append( (pos, float_nan( mean[i] ) ) )
pos += step_size
return { 'data': result }
diff -r 33e2ae31dddd0f494841aaa7f408aac9312b031b -r 0f5d6b2b13f78e164550420d620e569e681ed8bc lib/galaxy/web/controllers/tracks.py
--- a/lib/galaxy/web/controllers/tracks.py
+++ b/lib/galaxy/web/controllers/tracks.py
@@ -528,6 +528,7 @@
if not standalone_provider.has_data( chrom ):
return messages.NO_DATA
valid_chroms = standalone_provider.valid_chroms()
+
# Have data if we get here
return { "status": messages.DATA, "valid_chroms": valid_chroms }
@@ -1041,4 +1042,4 @@
return_message = message
elif return_message == None and message == messages.PENDING:
return_message = message
- return return_message
\ No newline at end of file
+ return return_message
diff -r 33e2ae31dddd0f494841aaa7f408aac9312b031b -r 0f5d6b2b13f78e164550420d620e569e681ed8bc static/june_2007_style/blue/panel_layout.css
--- a/static/june_2007_style/blue/panel_layout.css
+++ b/static/june_2007_style/blue/panel_layout.css
@@ -23,9 +23,11 @@
.panel-header-button:hover{color:black;background-color:#ccc;}
.panel-header-button:active{color:white;background-color:#aaaaaa;}
#overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:20000;}
+#overlay.modal #overlay-background{background:rgba(0,0,0,0.5);}
.dialog-box-container{position:relative;margin-top:80px;margin-right:auto;margin-left:auto;}
.dialog-box-wrapper{position:relative;padding:1em;background-color:rgba(0,0,0,0.5);-moz-border-radius:1em;-webkit-border-radius:1em;}
.dialog-box{border:solid #999 1px;background:white;z-index:80000;}
+#overlay.modal .dialog-box .body{min-width:600px;}
.dialog-box .body{padding:5px;overflow:auto;max-height:500px;min-width:300px;}
.dialog-box .buttons{padding:5px;}
.panel-error-message,.panel-warning-message,.panel-done-message,.panel-info-message{height:24px;line-height:24px;color:#303030;padding:0px;padding-left:26px;background-color:#FFCCCC;background-image:url(error_small.png);background-repeat:no-repeat;background-position:6px 50%;}
diff -r 33e2ae31dddd0f494841aaa7f408aac9312b031b -r 0f5d6b2b13f78e164550420d620e569e681ed8bc static/june_2007_style/blue/trackster.css
--- a/static/june_2007_style/blue/trackster.css
+++ b/static/june_2007_style/blue/trackster.css
@@ -3,30 +3,9 @@
.content{font:10px verdana;}
.nav-controls{text-align:center;padding:1px 0;}
.nav-controls input{margin:0 5px;}
-.menu-button{padding: 0px 4px 0px 4px;}
#zoom-in,#zoom-out{display:inline-block;height:16px;width:16px;margin-bottom:-3px;cursor:pointer;}
#zoom-out{background:transparent url(../images/fugue/magnifier-zoom-out.png) center center no-repeat;}
#zoom-in{margin-left:10px;background:transparent url(../images/fugue/magnifier-zoom.png) center center no-repeat;}
-.overview-icon{background:transparent url(../images/fugue/application-dock-270-bw.png) no-repeat;}
-.overview-icon:hover{background:transparent url(../images/fugue/application-dock-270.png) no-repeat;}
-.settings-icon{background:transparent url(../images/fugue/gear-bw.png) no-repeat;}
-.settings-icon:hover{background:transparent url(../images/fugue/gear.png) no-repeat;}
-.tools-icon{background:transparent url(../images/fugue/toolbox-bw.png) no-repeat;}
-.tools-icon:hover{background:transparent url(../images/fugue/toolbox.png) no-repeat;}
-.filters-icon{background:transparent url(../images/fugue/ui-slider-050-bw.png) no-repeat;}
-.filters-icon:hover{background:transparent url(../images/fugue/ui-slider-050.png) no-repeat;}
-.remove-icon,.overview-close{background:transparent url(../images/fugue/cross-small-bw.png) no-repeat;}
-.remove-icon:hover,.overview-close:hover{background:transparent url(../images/fugue/cross-circle.png) no-repeat;}
-#close-icon{background:transparent url(../images/fugue/cross-circle-bw.png) no-repeat;margin-right:0px;}
-#close-icon:hover{background:transparent url(../images/fugue/cross-circle.png) no-repeat;}
-#add-tracks-icon{background:transparent url(../images/fugue/plus-button-bw.png) no-repeat;}
-#add-tracks-icon:hover{background:transparent url(../images/fugue/plus-button.png) no-repeat;}
-#add-group-icon{background:transparent url(../images/fugue/block--plus-bw.png) no-repeat;}
-#add-group-icon:hover{background:transparent url(../images/fugue/block--plus.png) no-repeat;}
-#bookmarks-icon{background:transparent url(../images/fugue/bookmarks-bw.png) no-repeat;}
-#bookmarks-icon:hover{background:transparent url(../images/fugue/bookmarks.png) no-repeat;}
-#save-icon{background:transparent url(../images/fugue/disk--arrow-bw.png) no-repeat;}
-#save-icon:hover{background:transparent url(../images/fugue/disk--arrow.png) no-repeat;}
.nav-input{font-size:12px;width:30em;z-index:1000;}
.location{display:inline-block;width:15em;margin:0 10px;}
.draghandle{margin-top:2px;cursor:move;float:left;background:transparent url(../images/visualization/draggable_horizontal.png) center center no-repeat;width:10px;height:12px;}
@@ -65,16 +44,39 @@
input{font:10px verdana;}
.dynamic-tool,.filters{margin-left:0.25em;padding-bottom:0.5em;}
.dynamic-tool{width:410px;}
-.filters>.sliders,.display-controls{float:left;margin:1em;}
+.filters > .sliders,.display-controls{float:left;margin:1em;}
.sliders{width:410px;}
-.display-controls{border-left:solid 2px #DDDDDD;padding-left:1em}
-.filter-row{margin-top:0.4em;}
+.display-controls{border-left:solid 2px #DDDDDD;padding-left:1em
+}
+.filter-row {
+ margin-top:0.4em;}
.slider-row{margin-left:1em;}
.elt-label{float:left;font-weight:bold;margin-right:1em;}
.slider{float:right;width:200px;position:relative;}
.tool-name{font-size:110%;font-weight:bold;}
.param-row{margin-top:0.2em;margin-left:1em;}
.param-label{float:left;font-weight:bold;padding-top:0.2em;}
+.menu-button{padding:0px 4px 0px 4px;}
+.settings-icon{background:transparent url(../images/fugue/gear-bw.png) no-repeat;}
+.settings-icon:hover{background:transparent url(../images/fugue/gear.png) no-repeat;}
+.overview-icon{background:transparent url(../images/fugue/application-dock-270-bw.png) no-repeat;}
+.overview-icon:hover{background:transparent url(../images/fugue/application-dock-270.png) no-repeat;}
+.tools-icon{background:transparent url(../images/fugue/toolbox-bw.png) no-repeat;}
+.tools-icon:hover{background:transparent url(../images/fugue/toolbox.png) no-repeat;}
+.filters-icon{background:transparent url(../images/fugue/ui-slider-050-bw.png) no-repeat;}
+.filters-icon:hover{background:transparent url(../images/fugue/ui-slider-050.png) no-repeat;}
+.remove-icon,.overview-close{background:transparent url(../images/fugue/cross-small-bw.png) no-repeat;}
+.remove-icon:hover,.overview-close:hover{background:transparent url(../images/fugue/cross-circle.png) no-repeat;}
+#close-icon{background:transparent url(../images/fugue/cross-circle-bw.png) no-repeat;margin-right:0px;}
+#close-icon:hover{background:transparent url(../images/fugue/cross-circle.png) no-repeat;}
+#add-tracks-icon{background:transparent url(../images/fugue/plus-button-bw.png) no-repeat;}
+#add-tracks-icon:hover{background:transparent url(../images/fugue/plus-button.png) no-repeat;}
+#add-group-icon{background:transparent url(../images/fugue/block--plus-bw.png) no-repeat;}
+#add-group-icon:hover{background:transparent url(../images/fugue/block--plus.png) no-repeat;}
+#bookmarks-icon{background:transparent url(../images/fugue/bookmarks-bw.png) no-repeat;}
+#bookmarks-icon:hover{background:transparent url(../images/fugue/bookmarks.png) no-repeat;}
+#save-icon{background:transparent url(../images/fugue/disk--arrow-bw.png) no-repeat;}
+#save-icon:hover{background:transparent url(../images/fugue/disk--arrow.png) no-repeat;}
.child-track-icon{background:url('../images/fugue/arrow-000-small-bw.png') no-repeat;width:30px;cursor:move;}
.track-resize{background:white url('../images/visualization/draggable_vertical.png') no-repeat top center;position:absolute;right:3px;bottom:-4px;width:14px;height:7px;border:solid #999 1px;z-index:100;}
.bookmark{background:white;border:solid #999 1px;border-right:none;margin:0.5em;margin-right:0;padding:0.5em;}
@@ -85,4 +87,5 @@
.icon.more-across{background:url('../images/fugue/arrow-transition-bw.png') no-repeat 0px 0px;}
.intro{padding:1em;}
.intro > .action-button{background-color:#CCC;padding:1em;}
-.feature-popup{background-color:#DDD;position:absolute;z-index:1000}
+.feature-popup{position:absolute;z-index:1000;padding:5px;font-size:10px;filter:alpha(opacity=80);background-repeat:no-repeat;background-image:url(../images/tipsy.gif);background-position:top center;}
+.feature-popup-inner{padding:5px 8px 4px 8px;background-color:black;color:white;}
diff -r 33e2ae31dddd0f494841aaa7f408aac9312b031b -r 0f5d6b2b13f78e164550420d620e569e681ed8bc static/june_2007_style/panel_layout.css.tmpl
--- a/static/june_2007_style/panel_layout.css.tmpl
+++ b/static/june_2007_style/panel_layout.css.tmpl
@@ -161,6 +161,10 @@
z-index: 20000;
}
+#overlay.modal #overlay-background {
+ background: rgba(0,0,0,0.5);
+}
+
.dialog-box-container {
position: relative;
margin-top: 80px;
@@ -182,6 +186,10 @@
z-index: 80000;
}
+#overlay.modal .dialog-box .body {
+ min-width: 600px;
+}
+
.dialog-box .body {
padding: 5px;
overflow: auto;
diff -r 33e2ae31dddd0f494841aaa7f408aac9312b031b -r 0f5d6b2b13f78e164550420d620e569e681ed8bc static/june_2007_style/trackster.css.tmpl
--- a/static/june_2007_style/trackster.css.tmpl
+++ b/static/june_2007_style/trackster.css.tmpl
@@ -405,8 +405,19 @@
background-color: #CCC;
padding: 1em;
}
-.feature-popup{
- background-color: #DDD;
+
+.feature-popup {
position: absolute;
- z-index: 1000
+ z-index: 1000;
+ padding: 5px;
+ font-size: 10px;
+ filter: alpha(opacity=80);
+ background-repeat: no-repeat;
+ background-image: url(../images/tipsy.gif);
+ background-position: top center;
}
+.feature-popup-inner {
+ padding: 5px 8px 4px 8px;
+ background-color: black;
+ color: white;
+}
diff -r 33e2ae31dddd0f494841aaa7f408aac9312b031b -r 0f5d6b2b13f78e164550420d620e569e681ed8bc static/scripts/galaxy.panels.js
--- a/static/scripts/galaxy.panels.js
+++ b/static/scripts/galaxy.panels.js
@@ -163,13 +163,23 @@
// Modal dialog boxes
function hide_modal() {
- $(".dialog-box-container" ).fadeOut( function() {
+ $(".dialog-box-container" ).hide( 0, function() {
$("#overlay").hide();
+ $("#overlay").removeClass( "modal" );
$( ".dialog-box" ).find( ".body" ).children().remove();
} );
};
-function show_modal( title, body, buttons, extra_buttons, init_fn ) {
+function show_modal() {
+ $("#overlay").addClass( "modal" );
+ _show_modal.apply( this, arguments );
+}
+
+function show_message() {
+ _show_modal.apply( this, arguments );
+}
+
+function _show_modal( title, body, buttons, extra_buttons, init_fn ) {
if ( title ) {
$( ".dialog-box" ).find( ".title" ).html( title );
$( ".dialog-box" ).find( ".unified-panel-header" ).show();
@@ -205,7 +215,7 @@
$( ".dialog-box" ).find( ".body" ).html( body );
if ( ! $(".dialog-box-container").is( ":visible" ) ) {
$("#overlay").show();
- $(".dialog-box-container").fadeIn();
+ $(".dialog-box-container").show();
}
// Fix min-width so that modal cannot shrink considerably if
// new content is loaded.
diff -r 33e2ae31dddd0f494841aaa7f408aac9312b031b -r 0f5d6b2b13f78e164550420d620e569e681ed8bc static/scripts/trackster.js
--- a/static/scripts/trackster.js
+++ b/static/scripts/trackster.js
@@ -699,7 +699,7 @@
remove: function() {
this.container.remove_drawable(this);
- this.container_div.fadeOut('slow', function() {
+ this.container_div.hide(0, function() {
$(this).remove();
// HACK: is there a better way to update the view?
view.update_intro_div();
@@ -1024,6 +1024,7 @@
// Only act on x axis scrolling if we see if, y will be i
// handled by the browser when the event bubbles up
if ( dx ) {
+ dx *= 50;
var delta_chrom = Math.round( - dx / view.viewport_container.width() * (view.high - view.low) );
view.move_delta( delta_chrom );
}
@@ -1253,7 +1254,7 @@
DrawableCollection.prototype.remove_drawable.call(this, drawable);
if (hide) {
var view = this;
- drawable.container_div.fadeOut('slow', function() {
+ drawable.container_div.hide(0, function() {
$(this).remove();
view.update_intro_div();
});
@@ -2268,8 +2269,8 @@
// Build popup.
var popup = $("<div/>").attr("id", feature_uid).addClass("feature-popup"),
- key, value,
- table = $("<table/>").appendTo(popup), row;
+ table = $("<table/>"),
+ key, value, row;
for (key in feature_dict) {
value = feature_dict[key];
row = $("<tr/>").appendTo(table);
@@ -2277,6 +2278,7 @@
$("<td/>").attr("align", "left").appendTo(row)
.text(typeof(value) == 'number' ? round(value, 2) : value);
}
+ popup.append( $("<div class='feature-popup-inner'>").append( table ) );
popups[feature_uid] = popup;
}
@@ -2287,7 +2289,7 @@
// parseInt strips "px" from left, top measurements. +7 so that mouse pointer does not
// overlap popup.
var
- popupX = offsetX + parseInt( tile.canvas.css("left") ) + 7,
+ popupX = offsetX + parseInt( tile.canvas.css("left") ) - popup.width() / 2,
popupY = offsetY + parseInt( tile.canvas.css("top") ) + 7;
popup.css("left", popupX + "px").css("top", popupY + "px")
}
@@ -2695,7 +2697,7 @@
w_scale = width / range,
resolution = this.view.resolution,
parent_element = $("<div style='position: relative;'></div>");
-
+
// For overview, adjust high, low, resolution, and w_scale.
if (this.is_overview) {
low = this.view.max_low;
@@ -3109,9 +3111,20 @@
track.container_div.addClass( "line-track" );
var data = result.data;
if ( isNaN(parseFloat(track.prefs.min_value)) || isNaN(parseFloat(track.prefs.max_value)) ) {
- track.prefs.min_value = data.min;
- track.prefs.max_value = data.max;
+ // Compute default minimum and maximum values
+ var min_value = data.min
+ var max_value = data.max
+ // If mean and sd are present, use them to compute a ~95% window
+ // but only if it would shrink the range on one side
+ min_value = Math.floor( Math.min( 0, Math.max( min_value, data.mean - 2 * data.sd ) ) )
+ max_value = Math.ceil( Math.max( 0, Math.min( max_value, data.mean + 2 * data.sd ) ) )
+ // Update the prefs
+ track.prefs.min_value = min_value;
+ track.prefs.max_value = max_value;
// Update the config
+ // FIXME: we should probably only save this when the user explicately sets it
+ // since we lose the ability to compute it on the fly (when changing
+ // chromosomes for example).
$('#track_' + track.dataset_id + '_minval').val(track.prefs.min_value);
$('#track_' + track.dataset_id + '_maxval').val(track.prefs.max_value);
}
@@ -3528,7 +3541,7 @@
var filter_height_scaler = (this.filters_manager.height_filter ? new FilterScaler(this.filters_manager.height_filter) : null);
// HACK: ref_seq will only be defined for ReadTracks, and only the ReadPainter accepts that argument
var painter = new (this.painter)(filtered, tile_low, tile_high, this.prefs, mode, filter_alpha_scaler, filter_height_scaler, ref_seq);
- var required_height = Math.max(MIN_TRACK_HEIGHT, painter.get_required_height(slots_required));
+ var required_height = Math.max(MIN_TRACK_HEIGHT, painter.get_required_height(slots_required,width));
var canvas = this.view.canvas_manager.new_canvas();
var feature_mapper = null;
@@ -4054,6 +4067,7 @@
this.feature_positions = {};
this.slot_height = slot_height;
this.translation = 0;
+ this.y_translation = 0;
};
/**
@@ -4075,7 +4089,7 @@
*/
FeaturePositionMapper.prototype.get_feature_data = function(x, y) {
// Find slot using Y.
- var slot = Math.floor( y/this.slot_height ),
+ var slot = Math.floor( (y-this.y_translation)/this.slot_height ),
feature_dict;
// May not be over a slot due to padding, margin, etc.
@@ -4105,15 +4119,23 @@
FeaturePainter.prototype.default_prefs = { block_color: "#FFF", connector_color: "#FFF" };
extend(FeaturePainter.prototype, {
- get_required_height: function(rows_required) {
+ get_required_height: function(rows_required, width) {
// y_scale is the height per row
var required_height = y_scale = this.get_row_height(), mode = this.mode;
// If using a packing mode, need to multiply by the number of slots used
if (mode === "no_detail" || mode === "Squish" || mode === "Pack") {
required_height = rows_required * y_scale;
}
+ return required_height + this.get_top_padding(width) + this.get_bottom_padding(width);
+ },
+ /** Extra padding before first row of features */
+ get_top_padding: function(width) {
+ return 0;
+ },
+ /** Extra padding after last row of features */
+ get_bottom_padding: function(width) {
// Pad bottom by half a row, at least 5 px
- return required_height + Math.max( Math.round( y_scale / 2 ), 5 );
+ return Math.max( Math.round( this.get_row_height() / 2 ), 5 )
},
/**
* Draw data on ctx using slots and within the rectangle defined by width and height. Returns
@@ -4150,6 +4172,7 @@
}
ctx.restore();
+ feature_mapper.y_translation = this.get_top_padding(width);
return feature_mapper;
},
/**
@@ -4176,6 +4199,10 @@
var LinkedFeaturePainter = function(data, view_start, view_end, prefs, mode, alpha_scaler, height_scaler) {
FeaturePainter.call(this, data, view_start, view_end, prefs, mode, alpha_scaler, height_scaler);
+ // Whether to draw a single connector in the background that spans the entire feature (the intron fishbone)
+ this.draw_background_connector = true;
+ // Whether to call draw_connector for every pair of blocks
+ this.draw_individual_connectors = false;
};
extend(LinkedFeaturePainter.prototype, FeaturePainter.prototype, {
@@ -4213,7 +4240,7 @@
f_end = Math.ceil( Math.min(width, Math.max(0, (feature_end - tile_low) * w_scale)) ),
draw_start = f_start,
draw_end = f_end,
- y_center = (mode === "Dense" ? 0 : (0 + slot)) * y_scale,
+ y_center = (mode === "Dense" ? 0 : (0 + slot)) * y_scale + this.get_top_padding(width),
thickness, y_start, thick_start = null, thick_end = null,
// TODO: is there any reason why block, label color cannot be set at the Painter level?
block_color = this.prefs.block_color,
@@ -4276,38 +4303,51 @@
// needed. This ensures that whole feature, regardless of whether it starts with
// a block, is visible.
//
-
- // Draw whole feature as connector/intron.
+
+ // Compute y axis center position and height
var cur_y_center, cur_height;
if (mode === "Squish" || mode === "Dense") {
- ctx.fillStyle = CONNECTOR_COLOR;
cur_y_center = y_center + Math.floor(SQUISH_FEATURE_HEIGHT/2) + 1;
cur_height = 1;
}
else { // mode === "Pack"
if (feature_strand) {
- var cur_y_center = y_center;
- var cur_height = thick_height;
- if (feature_strand === "+") {
- ctx.fillStyle = ctx.canvas.manager.get_pattern( 'right_strand' );
- } else if (feature_strand === "-") {
- ctx.fillStyle = ctx.canvas.manager.get_pattern( 'left_strand' );
- }
+ cur_y_center = y_center;
+ cur_height = thick_height;
}
else {
- ctx.fillStyle = CONNECTOR_COLOR;
cur_y_center += (SQUISH_FEATURE_HEIGHT/2) + 1;
cur_height = 1;
}
}
- ctx.fillRect(f_start, cur_y_center, f_end - f_start, cur_height);
+
+ // Draw whole feature as connector/intron.
+ if ( this.draw_background_connector ) {
+ if (mode === "Squish" || mode === "Dense") {
+ ctx.fillStyle = CONNECTOR_COLOR;
+ }
+ else { // mode === "Pack"
+ if (feature_strand) {
+ if (feature_strand === "+") {
+ ctx.fillStyle = ctx.canvas.manager.get_pattern( 'right_strand' );
+ } else if (feature_strand === "-") {
+ ctx.fillStyle = ctx.canvas.manager.get_pattern( 'left_strand' );
+ }
+ }
+ else {
+ ctx.fillStyle = CONNECTOR_COLOR;
+ }
+ }
+ ctx.fillRect(f_start, cur_y_center, f_end - f_start, cur_height);
+ }
// Draw blocks.
var start_and_height;
for (var k = 0, k_len = feature_blocks.length; k < k_len; k++) {
var block = feature_blocks[k],
block_start = Math.floor( Math.max(0, (block[0] - tile_low) * w_scale) ),
- block_end = Math.ceil( Math.min(width, Math.max((block[1] - tile_low) * w_scale)) );
+ block_end = Math.ceil( Math.min(width, Math.max((block[1] - tile_low) * w_scale)) ),
+ last_block_start, last_block_end;
// Skip drawing if block not on tile.
if (block_start > block_end) { continue; }
@@ -4338,6 +4378,12 @@
ctx.fillRect(block_thick_start, y_center + 1, block_thick_end - block_thick_start, thick_height );
}
}
+ // Draw individual connectors if required
+ if ( this.draw_individual_connectors && last_block_start ) {
+ this.draw_connector( ctx, last_block_start, last_block_end, block_start, block_end, y_center );
+ }
+ last_block_start = block_start;
+ last_block_end = block_end;
}
// FIXME: Height scaling only works in Pack mode right now.
@@ -4675,11 +4721,54 @@
}
});
+var ArcLinkedFeaturePainter = function(data, view_start, view_end, prefs, mode, alpha_scaler, height_scaler) {
+ LinkedFeaturePainter.call(this, data, view_start, view_end, prefs, mode, alpha_scaler, height_scaler);
+ // Need to know the longest feature length for adding spacing
+ this.longest_feature_length = this.calculate_longest_feature_length();
+ this.draw_background_connector = false;
+ this.draw_individual_connectors = true;
+};
+
+extend(ArcLinkedFeaturePainter.prototype, FeaturePainter.prototype, LinkedFeaturePainter.prototype, {
+
+ calculate_longest_feature_length: function () {
+ var longest_feature_length = 0;
+ for (var i = 0, len = this.data.length; i < len; i++) {
+ var feature = this.data[i], feature_start = feature[1], feature_end = feature[2];
+ longest_feature_length = Math.max( longest_feature_length, feature_end - feature_start );
+ }
+ return longest_feature_length;
+ },
+
+ get_top_padding: function( width ) {
+ var view_range = this.view_end - this.view_start,
+ w_scale = width / view_range;
+ return Math.min( 128, Math.ceil( ( this.longest_feature_length / 2 ) * w_scale ) );
+ },
+
+ draw_connector: function( ctx, block1_start, block1_end, block2_start, block2_end, y_center ) {
+ // Arc drawing -- from closest endpoints
+ var x_center = ( block1_end + block2_start ) / 2,
+ radius = block2_start - x_center;
+ // For full half circles
+ var angle1 = Math.PI, angle2 = 0;
+ if ( radius > 0 ) {
+ ctx.beginPath();
+ ctx.arc( x_center, y_center, block2_start - x_center, Math.PI, 0 );
+ ctx.stroke();
+ }
+ }
+});
+
+
+
+
exports.Scaler = Scaler;
exports.SummaryTreePainter = SummaryTreePainter;
exports.LinePainter = LinePainter;
exports.LinkedFeaturePainter = LinkedFeaturePainter;
exports.ReadPainter = ReadPainter;
+exports.ArcLinkedFeaturePainter = ArcLinkedFeaturePainter;
// End painters_module encapsulation
};
@@ -4710,4 +4799,4 @@
for ( key in modules.trackster ) {
target[key] = modules.trackster[key];
}
-})(window);
\ No newline at end of file
+})(window);
diff -r 33e2ae31dddd0f494841aaa7f408aac9312b031b -r 0f5d6b2b13f78e164550420d620e569e681ed8bc templates/workflow/editor.mako
--- a/templates/workflow/editor.mako
+++ b/templates/workflow/editor.mako
@@ -213,7 +213,7 @@
show_workflow_parameters();
},
beforeSubmit: function( data ) {
- show_modal( "Loading workflow", "progress" );
+ show_message( "Loading workflow", "progress" );
}
});
}
@@ -650,7 +650,7 @@
};
var save_current_workflow = function ( eventObj, success_callback ) {
- show_modal( "Saving workflow", "progress" );
+ show_message( "Saving workflow", "progress" );
workflow.check_changes_in_active_form();
if (!workflow.has_changes) {
hide_modal();
https://bitbucket.org/galaxy/galaxy-central/changeset/ebbf0f5e259c/
changeset: ebbf0f5e259c
user: james_taylor
date: 2011-11-01 23:56:34
summary: Make default height for LineTracks smaller, 32px seems more reasonable. Possibly it should be larger if there is both positive and negative data?
affected #: 1 file
diff -r 0f5d6b2b13f78e164550420d620e569e681ed8bc -r ebbf0f5e259cae099fcdcd6ac92697869b3b4bca static/scripts/trackster.js
--- a/static/scripts/trackster.js
+++ b/static/scripts/trackster.js
@@ -3031,7 +3031,8 @@
this.min_height_px = 16;
this.max_height_px = 400;
- this.height_px = 80;
+ // Default height for new tracks, should be a defined constant?
+ this.height_px = 32;
this.hda_ldda = hda_ldda;
this.dataset_id = dataset_id;
this.original_dataset_id = dataset_id;
https://bitbucket.org/galaxy/galaxy-central/changeset/ee0b898a2604/
changeset: ee0b898a2604
user: james_taylor
date: 2011-11-02 18:29:26
summary: Trackster: don't import all of numpy in data provider (problem with numpy's log un summary tree handling)
affected #: 1 file
diff -r ebbf0f5e259cae099fcdcd6ac92697869b3b4bca -r ee0b898a2604ce4c1896059fb56147be3ea2a674 lib/galaxy/visualization/tracks/data_providers.py
--- a/lib/galaxy/visualization/tracks/data_providers.py
+++ b/lib/galaxy/visualization/tracks/data_providers.py
@@ -10,7 +10,7 @@
pkg_resources.require( "ctypes" )
pkg_resources.require( "pysam" )
pkg_resources.require( "numpy" )
-from numpy import *
+import numpy
from galaxy.datatypes.util.gff_util import *
from galaxy.util.json import from_json_string
from bx.interval_index_file import Indexes
@@ -743,7 +743,7 @@
var = summary.sum_squares[0] - mean
if valid_count > 1:
var /= valid_count - 1
- sd = sqrt( var )
+ sd = numpy.sqrt( var )
return dict( data=dict( min=summary.min_val[0], max=summary.max_val[0], mean=mean, sd=sd ) )
https://bitbucket.org/galaxy/galaxy-central/changeset/5d3b2955f12e/
changeset: 5d3b2955f12e
user: james_taylor
date: 2011-11-02 18:37:24
summary: Trackster: allow configuration elements to have help text
affected #: 3 files
diff -r ee0b898a2604ce4c1896059fb56147be3ea2a674 -r 5d3b2955f12e08067d9a1ecd3f110777c7a83caf static/june_2007_style/base.css.tmpl
--- a/static/june_2007_style/base.css.tmpl
+++ b/static/june_2007_style/base.css.tmpl
@@ -231,6 +231,10 @@
padding: 3px 0 0 1em;
}
+.form-row .help {
+ color: #666;
+}
+
select, input, textarea {
font: inherit;
}
diff -r ee0b898a2604ce4c1896059fb56147be3ea2a674 -r 5d3b2955f12e08067d9a1ecd3f110777c7a83caf static/june_2007_style/blue/base.css
--- a/static/june_2007_style/blue/base.css
+++ b/static/june_2007_style/blue/base.css
@@ -43,6 +43,7 @@
div.form-row-input{float:left;}
div.form-row-input label{font-weight:normal;display:inline;}
div.form-row-error-message{width:300px;float:left;color:red;font-weight:bold;padding:3px 0 0 1em;}
+.form-row .help{color:#666;}
select,input,textarea{font:inherit;}
select,textarea,input[type="text"],input[type="file"],input[type="password"]{-webkit-box-sizing:border-box;max-width:300px;}
.errormessagelarge,.warningmessagelarge,.donemessagelarge,.infomessagelarge{padding:10px;padding-left:52px;min-height:32px;border:1px solid #AA6666;background-color:#FFCCCC;background-image:url(error_message_icon.png);background-repeat:no-repeat;background-position:10px 10px;}
diff -r ee0b898a2604ce4c1896059fb56147be3ea2a674 -r 5d3b2955f12e08067d9a1ecd3f110777c7a83caf static/scripts/trackster.js
--- a/static/scripts/trackster.js
+++ b/static/scripts/trackster.js
@@ -2149,6 +2149,10 @@
else {
row.append( $('<input />').attr("id", id ).attr("name", id ).val( value ) );
}
+ // Help text
+ if ( param.help ) {
+ row.append( $("<div class='help'/>").text( param.help ) );
+ }
}
});
return container;
@@ -3194,7 +3198,8 @@
{ key: 'name', label: 'Name', type: 'text', default_value: name },
{ key: 'block_color', label: 'Block color', type: 'color', default_value: get_random_color() },
{ key: 'label_color', label: 'Label color', type: 'color', default_value: 'black' },
- { key: 'show_counts', label: 'Show summary counts', type: 'bool', default_value: true },
+ { key: 'show_counts', label: 'Show summary counts', type: 'bool', default_value: true,
+ help: 'Show the number of items in each bin when drawing summary histogram' },
{ key: 'mode', type: 'string', default_value: this.mode, hidden: true },
],
saved_values: prefs,
https://bitbucket.org/galaxy/galaxy-central/changeset/5027d6f9ca30/
changeset: 5027d6f9ca30
user: james_taylor
date: 2011-11-02 22:53:00
summary: Trackster: allow track contents to be hidden without removing track. Hidden tracks are condensed and not drawn. TODO: whether a track is hidden is not currently saved. No easy way to inherit prefs right now.
affected #: 1 file
diff -r 5d3b2955f12e08067d9a1ecd3f110777c7a83caf -r 5027d6f9ca30432d0dc09d8e7598c1679d75aaed static/scripts/trackster.js
--- a/static/scripts/trackster.js
+++ b/static/scripts/trackster.js
@@ -2335,6 +2335,8 @@
this.data_url_extra_params = {}
this.data_query_wait = (data_query_wait ? data_query_wait : DEFAULT_DATA_QUERY_WAIT);
this.dataset_check_url = converted_datasets_state_url;
+ // FIXME: this should be a saved setting
+ this.content_visible = true;
if (!Track.id_counter) { Track.id_counter = 0; }
this.id = Track.id_counter++;
@@ -2353,6 +2355,9 @@
this.icons_div = $("<div/>").css("float", "left").appendTo(this.header_div).hide();
// Track icons.
+ this.toggle_icon = $("<a/>").attr("href", "javascript:void(0);").attr("title", "Hide/show track content")
+ .addClass("icon-button toggle").tipsy( {gravity: 's'} )
+ .appendTo(this.icons_div);
this.settings_icon = $("<a/>").attr("href", "javascript:void(0);").attr("title", "Edit settings")
.addClass("icon-button settings-icon").tipsy( {gravity: 's'} )
.appendTo(this.icons_div);
@@ -2372,6 +2377,21 @@
// Suppress double clicks in header so that they do not impact viz.
this.header_div.dblclick( function(e) { e.stopPropagation(); } );
+
+ // Toggle icon hides or shows the track content
+ this.toggle_icon.click( function() {
+ if ( track.content_visible ) {
+ track.toggle_icon.addClass("toggle-expand").removeClass("toggle");
+ track.hide_contents();
+ track.mode_div.hide();
+ track.content_visible = false;
+ } else {
+ track.toggle_icon.addClass("toggle").removeClass("toggle-expand");
+ track.content_visible = true;
+ track.mode_div.show();
+ track.show_contents();
+ }
+ });
// Clicking on settings icon opens track config.
this.settings_icon.click( function() {
@@ -2559,6 +2579,26 @@
this.update_track_icons();
},
/**
+ * Hide any elements that are part of the tracks contents area. Should
+ * remove as approprite, the track will be redrawn by show_contents.
+ */
+ hide_contents : function () {
+ // Clear contents by removing any elements that are contained in
+ // the tracks content_div
+ this.content_div.children().remove();
+ // Hide the content div
+ this.content_div.hide();
+ // And any y axis labels (common to several track types)
+ this.container_div.find(".yaxislabel, .track-resize").hide()
+ },
+ show_contents : function() {
+ // Show the contents div and labels (if present)
+ this.content_div.show();
+ this.container_div.find(".yaxislabel, .track-resize").show()
+ // Request a redraw of the content
+ this.request_draw();
+ },
+ /**
* Additional initialization required before drawing track for the first time.
*/
predraw_init: function() {}
@@ -2689,6 +2729,11 @@
*/
_draw: function(force, clear_after) {
if (!this.enabled) { return; }
+
+ // TODO: There should probably be a general way to disable content drawing
+ // for all drawables. However the button to toggle this is currently
+ // only present for Track instances.
+ if (!this.content_visible) { return; }
// HACK: ReferenceTrack can draw without dataset ID, but other tracks cannot.
if ( !(this instanceof ReferenceTrack) && (!this.dataset_id) ) { return; }
@@ -3084,8 +3129,10 @@
var drag_control = $( "<div class='track-resize'>" )
// Control shows on hover over track, stays while dragging
$(track.container_div).hover( function() {
- in_handle = true;
- drag_control.show();
+ if ( track.content_visible ) {
+ in_handle = true;
+ drag_control.show();
+ }
}, function() {
in_handle = false;
if ( ! in_drag ) { drag_control.hide(); }
https://bitbucket.org/galaxy/galaxy-central/changeset/b3900db4f77c/
changeset: b3900db4f77c
user: james_taylor
date: 2011-11-02 23:07:28
summary: Trackster: show color pickers to left of input rather than underneath
affected #: 1 file
diff -r 5027d6f9ca30432d0dc09d8e7598c1679d75aaed -r b3900db4f77c46687ae8aa2eb81a7aeaf7bfa751 static/scripts/trackster.js
--- a/static/scripts/trackster.js
+++ b/static/scripts/trackster.js
@@ -2126,7 +2126,7 @@
} else if ( param.type === 'color' ) {
var input = $('<input />').attr("id", id ).attr("name", id ).val( value );
// Color picker in tool tip style float
- var tip = $( "<div class='tipsy tipsy-north' style='position: absolute;' />" ).hide();
+ var tip = $( "<div class='tipsy tipsy-west' style='position: absolute;' />" ).hide();
// Inner div for padding purposes
var tip_inner = $("<div style='background-color: black; padding: 10px;'></div>").appendTo(tip);
var farb_container = $("<div/>")
@@ -2136,8 +2136,10 @@
// Outer div container input and tip for hover to work
$("<div />").append( input ).append( tip ).appendTo( row ).bind( "click", function ( e ) {
tip.css( {
- left: $(this).position().left + ( $(input).width() / 2 ) - 60,
- top: $(this).position().top + $(this.height)
+ // left: $(this).position().left + ( $(input).width() / 2 ) - 60,
+ // top: $(this).position().top + $(this.height)
+ left: $(this).position().left + $(input).width() + 5,
+ top: $(this).position().top - ( $(tip).height() / 2 ) + ( $(input).height() / 2 )
} ).show();
$(document).bind( "click.color-picker", function() {
tip.hide();
https://bitbucket.org/galaxy/galaxy-central/changeset/62b7482496c2/
changeset: 62b7482496c2
user: james_taylor
date: 2011-11-05 19:55:11
summary: Trackster: making config form generation for parameters a function so it can be used recursively (for conditional configuration, not yet implemented)
affected #: 1 file
diff -r b3900db4f77c46687ae8aa2eb81a7aeaf7bfa751 -r 62b7482496c231f3ba0ea6f5682692ccc242fa14 static/scripts/trackster.js
--- a/static/scripts/trackster.js
+++ b/static/scripts/trackster.js
@@ -2113,8 +2113,14 @@
build_form: function() {
var track_config = this;
var container = $("<div />");
- $.each( this.params, function( index, param ) {
- if ( ! param.hidden ) {
+ var param;
+ // Function to process parameters recursively
+ function handle_params( params, container ) {
+ for ( var index = 0; index < params.length; index++ ) {
+ param = params[index];
+ // Hidden params have no representation in the form
+ if ( param.hidden ) { continue; }
+ // Build row for param
var id = 'param_' + index;
var value = track_config.values[ param.key ];
var row = $("<div class='form-row' />").appendTo( container );
@@ -2132,7 +2138,6 @@
var farb_container = $("<div/>")
.appendTo(tip_inner)
.farbtastic( { width: 100, height: 100, callback: input, color: value });
-
// Outer div container input and tip for hover to work
$("<div />").append( input ).append( tip ).appendTo( row ).bind( "click", function ( e ) {
tip.css( {
@@ -2156,7 +2161,10 @@
row.append( $("<div class='help'/>").text( param.help ) );
}
}
- });
+ }
+ // Handle top level parameters in order
+ handle_params( this.params, container );
+ // Return element containing constructed form
return container;
},
update_from_form: function( container ) {
https://bitbucket.org/galaxy/galaxy-central/changeset/4db2b2230f7e/
changeset: 4db2b2230f7e
user: james_taylor
date: 2011-11-07 16:21:17
summary: Trackster: use hover event for feature track popups
affected #: 3 files
diff -r 62b7482496c231f3ba0ea6f5682692ccc242fa14 -r 4db2b2230f7e1dc075f696a4c6083956da02a4c4 eggs.ini
--- a/eggs.ini
+++ b/eggs.ini
@@ -12,7 +12,7 @@
no_auto = pbs_python DRMAA_python
[eggs:platform]
-bx_python = 0.7.1
+bx_python = 0.7.0
Cheetah = 2.2.2
ctypes = 1.0.2
DRMAA_python = 0.2
@@ -67,7 +67,7 @@
psycopg2 = _8.4.2_static
pysqlite = _3.6.17_static
MySQL_python = _5.1.41_static
-; bx_python = _494c2d1d68b3_rebuild1
+bx_python = _494c2d1d68b3_rebuild1
GeneTrack = _dev_48da9e998f0caf01c5be731e926f4b0481f658f0
SQLAlchemy = _dev_r6498
pysam = _kanwei_b10f6e722e9a
diff -r 62b7482496c231f3ba0ea6f5682692ccc242fa14 -r 4db2b2230f7e1dc075f696a4c6083956da02a4c4 static/scripts/trackster.js
--- a/static/scripts/trackster.js
+++ b/static/scripts/trackster.js
@@ -2242,7 +2242,16 @@
// Only show popups in Pack mode.
if (tile.mode !== "Pack") { return; }
- $(this.canvas).mousemove(function (e) {
+ $(this.canvas).hover( function() {
+ this.hovered = true;
+ $(this).mousemove();
+ }, function() {
+ this.hovered = false;
+ // Clear popup if it is still hanging around (this is probably not needed)
+ $(this).siblings(".feature-popup").remove();
+ } ).mousemove(function (e) {
+ // Use the hover plugin to get a delay before showing popup
+ if ( !this.hovered ) { return; }
// Get feature data for position.
var
this_offset = $(this).offset(),
diff -r 62b7482496c231f3ba0ea6f5682692ccc242fa14 -r 4db2b2230f7e1dc075f696a4c6083956da02a4c4 templates/tracks/browser.mako
--- a/templates/tracks/browser.mako
+++ b/templates/tracks/browser.mako
@@ -42,7 +42,7 @@
<script type='text/javascript' src="${h.url_for('/static/scripts/excanvas.js')}"></script><![endif]-->
-${h.js( "galaxy.base", "galaxy.panels", "json2", "jquery", "jstorage", "jquery.event.drag", "jquery.mousewheel", "jquery.autocomplete", "trackster", "trackster_ui", "jquery.ui.sortable.slider", "jquery.scrollTo", "farbtastic", "jquery.tipsy" )}
+${h.js( "galaxy.base", "galaxy.panels", "json2", "jquery", "jstorage", "jquery.event.drag", "jquery.event.hover", "jquery.event.hover", "jquery.mousewheel", "jquery.autocomplete", "trackster", "trackster_ui", "jquery.ui.sortable.slider", "jquery.scrollTo", "farbtastic", "jquery.tipsy" )}
<script type="text/javascript">
//
https://bitbucket.org/galaxy/galaxy-central/changeset/4e9db728d9ea/
changeset: 4e9db728d9ea
user: james_taylor
date: 2011-11-07 16:27:50
summary: merge
affected #: 14 files
diff -r 545288e40ee10ed48d422eb772b734ace1422451 -r 4e9db728d9ea2553f387b53e6d25230b69a2789a lib/galaxy/datatypes/converters/interval_to_summary_tree_converter.py
--- a/lib/galaxy/datatypes/converters/interval_to_summary_tree_converter.py
+++ b/lib/galaxy/datatypes/converters/interval_to_summary_tree_converter.py
@@ -50,4 +50,4 @@
st.write(out_fname)
if __name__ == "__main__":
- main()
\ No newline at end of file
+ main()
diff -r 545288e40ee10ed48d422eb772b734ace1422451 -r 4e9db728d9ea2553f387b53e6d25230b69a2789a lib/galaxy/visualization/tracks/data_providers.py
--- a/lib/galaxy/visualization/tracks/data_providers.py
+++ b/lib/galaxy/visualization/tracks/data_providers.py
@@ -2,14 +2,15 @@
Data providers for tracks visualizations.
"""
-import sys
-from math import ceil, log
+import sys, time
+from math import ceil, log, sqrt
import pkg_resources
pkg_resources.require( "bx-python" )
if sys.version_info[:2] == (2, 4):
pkg_resources.require( "ctypes" )
pkg_resources.require( "pysam" )
pkg_resources.require( "numpy" )
+import numpy
from galaxy.datatypes.util.gff_util import *
from galaxy.util.json import from_json_string
from bx.interval_index_file import Indexes
@@ -740,40 +741,73 @@
# Bigwig has the possibility of it being a standalone bigwig file, in which case we use
# original_dataset, or coming from wig->bigwig conversion in which we use converted_dataset
f, bbi = self._get_dataset()
-
+
+ # If the stats kwarg was provide, we compute overall summary data for
+ # the entire chromosome, but no reduced data -- currently only
+ # providing values used by trackster to determine the default range
if 'stats' in kwargs:
- all_dat = bbi.query(chrom, 0, 2147483647, 1)
+ # FIXME: use actual chromosome size
+ summary = bbi.summarize( chrom, 0, 214783647, 1 )
f.close()
- if all_dat is None:
+ if summary is None:
return None
-
- all_dat = all_dat[0] # only 1 summary
- return { 'data' : { 'max': float( all_dat['max'] ), \
- 'min': float( all_dat['min'] ), \
- 'total_frequency': float( all_dat['coverage'] ) } \
- }
-
+ else:
+ # Does the summary contain any defined values?
+ valid_count = summary.valid_count[0]
+ if summary.valid_count < 1:
+ return None
+
+ # Compute $\mu \pm 2\sigma$ to provide an estimate for upper and lower
+ # bounds that contain ~95% of the data.
+ mean = summary.sum_data[0] / valid_count
+ var = summary.sum_squares[0] - mean
+ if valid_count > 1:
+ var /= valid_count - 1
+ sd = numpy.sqrt( var )
+
+ return dict( data=dict( min=summary.min_val[0], max=summary.max_val[0], mean=mean, sd=sd ) )
+
start = int(start)
end = int(end)
+
+ # The following seems not to work very well, for example it will only return one
+ # data point if the tile is 1280px wide. Not sure what the intent is.
+
# The first zoom level for BBI files is 640. If too much is requested, it will look at each block instead
# of summaries. The calculation done is: zoom <> (end-start)/num_points/2.
# Thus, the optimal number of points is (end-start)/num_points/2 = 640
# num_points = (end-start) / 1280
- num_points = (end-start) / 1280
- if num_points < 1:
- num_points = end - start
- else:
- num_points = min(num_points, 500)
+ #num_points = (end-start) / 1280
+ #if num_points < 1:
+ # num_points = end - start
+ #else:
+ # num_points = min(num_points, 500)
- data = bbi.query(chrom, start, end, num_points)
+ # For now, we'll do 1000 data points by default However, the summaries
+ # don't seem to work when a summary pixel corresponds to less than one
+ # datapoint, so we prevent that.
+ # FIXME: need to switch over to using the full data at high levels of
+ # detail.
+ num_points = min( 1000, end - start )
+
+ summary = bbi.summarize( chrom, start, end, num_points )
f.close()
+
+ result = []
+
+ if summary:
+ mean = summary.sum_data / summary.valid_count
+
+ ## Standard deviation by bin, not yet used
+ ## var = summary.sum_squares - mean
+ ## var /= minimum( valid_count - 1, 1 )
+ ## sd = sqrt( var )
- pos = start
- step_size = (end - start) / num_points
- result = []
- if data:
- for dat_dict in data:
- result.append( (pos, float_nan(dat_dict['mean']) ) )
+ pos = start
+ step_size = (end - start) / num_points
+
+ for i in range( num_points ):
+ result.append( (pos, float_nan( mean[i] ) ) )
pos += step_size
return { 'data': result }
diff -r 545288e40ee10ed48d422eb772b734ace1422451 -r 4e9db728d9ea2553f387b53e6d25230b69a2789a lib/galaxy/web/controllers/tracks.py
--- a/lib/galaxy/web/controllers/tracks.py
+++ b/lib/galaxy/web/controllers/tracks.py
@@ -528,6 +528,7 @@
if not standalone_provider.has_data( chrom ):
return messages.NO_DATA
valid_chroms = standalone_provider.valid_chroms()
+
# Have data if we get here
return { "status": messages.DATA, "valid_chroms": valid_chroms }
@@ -1041,4 +1042,4 @@
return_message = message
elif return_message == None and message == messages.PENDING:
return_message = message
- return return_message
\ No newline at end of file
+ return return_message
diff -r 545288e40ee10ed48d422eb772b734ace1422451 -r 4e9db728d9ea2553f387b53e6d25230b69a2789a static/june_2007_style/base.css.tmpl
--- a/static/june_2007_style/base.css.tmpl
+++ b/static/june_2007_style/base.css.tmpl
@@ -231,6 +231,10 @@
padding: 3px 0 0 1em;
}
+.form-row .help {
+ color: #666;
+}
+
select, input, textarea {
font: inherit;
}
diff -r 545288e40ee10ed48d422eb772b734ace1422451 -r 4e9db728d9ea2553f387b53e6d25230b69a2789a static/june_2007_style/blue/base.css
--- a/static/june_2007_style/blue/base.css
+++ b/static/june_2007_style/blue/base.css
@@ -43,6 +43,7 @@
div.form-row-input{float:left;}
div.form-row-input label{font-weight:normal;display:inline;}
div.form-row-error-message{width:300px;float:left;color:red;font-weight:bold;padding:3px 0 0 1em;}
+.form-row .help{color:#666;}
select,input,textarea{font:inherit;}
select,textarea,input[type="text"],input[type="file"],input[type="password"]{-webkit-box-sizing:border-box;max-width:300px;}
.errormessagelarge,.warningmessagelarge,.donemessagelarge,.infomessagelarge{padding:10px;padding-left:52px;min-height:32px;border:1px solid #AA6666;background-color:#FFCCCC;background-image:url(error_message_icon.png);background-repeat:no-repeat;background-position:10px 10px;}
diff -r 545288e40ee10ed48d422eb772b734ace1422451 -r 4e9db728d9ea2553f387b53e6d25230b69a2789a static/june_2007_style/blue/panel_layout.css
--- a/static/june_2007_style/blue/panel_layout.css
+++ b/static/june_2007_style/blue/panel_layout.css
@@ -23,9 +23,11 @@
.panel-header-button:hover{color:black;background-color:#ccc;}
.panel-header-button:active{color:white;background-color:#aaaaaa;}
#overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:20000;}
+#overlay.modal #overlay-background{background:rgba(0,0,0,0.5);}
.dialog-box-container{position:relative;margin-top:80px;margin-right:auto;margin-left:auto;}
.dialog-box-wrapper{position:relative;padding:1em;background-color:rgba(0,0,0,0.5);-moz-border-radius:1em;-webkit-border-radius:1em;}
.dialog-box{border:solid #999 1px;background:white;z-index:80000;}
+#overlay.modal .dialog-box .body{min-width:600px;}
.dialog-box .body{padding:5px;overflow:auto;max-height:500px;min-width:300px;}
.dialog-box .buttons{padding:5px;}
.panel-error-message,.panel-warning-message,.panel-done-message,.panel-info-message{height:24px;line-height:24px;color:#303030;padding:0px;padding-left:26px;background-color:#FFCCCC;background-image:url(error_small.png);background-repeat:no-repeat;background-position:6px 50%;}
diff -r 545288e40ee10ed48d422eb772b734ace1422451 -r 4e9db728d9ea2553f387b53e6d25230b69a2789a static/june_2007_style/blue/trackster.css
--- a/static/june_2007_style/blue/trackster.css
+++ b/static/june_2007_style/blue/trackster.css
@@ -3,30 +3,9 @@
.content{font:10px verdana;}
.nav-controls{text-align:center;padding:1px 0;}
.nav-controls input{margin:0 5px;}
-.menu-button{padding: 0px 4px 0px 4px;}
#zoom-in,#zoom-out{display:inline-block;height:16px;width:16px;margin-bottom:-3px;cursor:pointer;}
#zoom-out{background:transparent url(../images/fugue/magnifier-zoom-out.png) center center no-repeat;}
#zoom-in{margin-left:10px;background:transparent url(../images/fugue/magnifier-zoom.png) center center no-repeat;}
-.overview-icon{background:transparent url(../images/fugue/application-dock-270-bw.png) no-repeat;}
-.overview-icon:hover{background:transparent url(../images/fugue/application-dock-270.png) no-repeat;}
-.settings-icon{background:transparent url(../images/fugue/gear-bw.png) no-repeat;}
-.settings-icon:hover{background:transparent url(../images/fugue/gear.png) no-repeat;}
-.tools-icon{background:transparent url(../images/fugue/toolbox-bw.png) no-repeat;}
-.tools-icon:hover{background:transparent url(../images/fugue/toolbox.png) no-repeat;}
-.filters-icon{background:transparent url(../images/fugue/ui-slider-050-bw.png) no-repeat;}
-.filters-icon:hover{background:transparent url(../images/fugue/ui-slider-050.png) no-repeat;}
-.remove-icon,.overview-close{background:transparent url(../images/fugue/cross-small-bw.png) no-repeat;}
-.remove-icon:hover,.overview-close:hover{background:transparent url(../images/fugue/cross-circle.png) no-repeat;}
-#close-icon{background:transparent url(../images/fugue/cross-circle-bw.png) no-repeat;margin-right:0px;}
-#close-icon:hover{background:transparent url(../images/fugue/cross-circle.png) no-repeat;}
-#add-tracks-icon{background:transparent url(../images/fugue/plus-button-bw.png) no-repeat;}
-#add-tracks-icon:hover{background:transparent url(../images/fugue/plus-button.png) no-repeat;}
-#add-group-icon{background:transparent url(../images/fugue/block--plus-bw.png) no-repeat;}
-#add-group-icon:hover{background:transparent url(../images/fugue/block--plus.png) no-repeat;}
-#bookmarks-icon{background:transparent url(../images/fugue/bookmarks-bw.png) no-repeat;}
-#bookmarks-icon:hover{background:transparent url(../images/fugue/bookmarks.png) no-repeat;}
-#save-icon{background:transparent url(../images/fugue/disk--arrow-bw.png) no-repeat;}
-#save-icon:hover{background:transparent url(../images/fugue/disk--arrow.png) no-repeat;}
.nav-input{font-size:12px;width:30em;z-index:1000;}
.location{display:inline-block;width:15em;margin:0 10px;}
.draghandle{margin-top:2px;cursor:move;float:left;background:transparent url(../images/visualization/draggable_horizontal.png) center center no-repeat;width:10px;height:12px;}
@@ -65,16 +44,39 @@
input{font:10px verdana;}
.dynamic-tool,.filters{margin-left:0.25em;padding-bottom:0.5em;}
.dynamic-tool{width:410px;}
-.filters>.sliders,.display-controls{float:left;margin:1em;}
+.filters > .sliders,.display-controls{float:left;margin:1em;}
.sliders{width:410px;}
-.display-controls{border-left:solid 2px #DDDDDD;padding-left:1em}
-.filter-row{margin-top:0.4em;}
+.display-controls{border-left:solid 2px #DDDDDD;padding-left:1em
+}
+.filter-row {
+ margin-top:0.4em;}
.slider-row{margin-left:1em;}
.elt-label{float:left;font-weight:bold;margin-right:1em;}
.slider{float:right;width:200px;position:relative;}
.tool-name{font-size:110%;font-weight:bold;}
.param-row{margin-top:0.2em;margin-left:1em;}
.param-label{float:left;font-weight:bold;padding-top:0.2em;}
+.menu-button{padding:0px 4px 0px 4px;}
+.settings-icon{background:transparent url(../images/fugue/gear-bw.png) no-repeat;}
+.settings-icon:hover{background:transparent url(../images/fugue/gear.png) no-repeat;}
+.overview-icon{background:transparent url(../images/fugue/application-dock-270-bw.png) no-repeat;}
+.overview-icon:hover{background:transparent url(../images/fugue/application-dock-270.png) no-repeat;}
+.tools-icon{background:transparent url(../images/fugue/toolbox-bw.png) no-repeat;}
+.tools-icon:hover{background:transparent url(../images/fugue/toolbox.png) no-repeat;}
+.filters-icon{background:transparent url(../images/fugue/ui-slider-050-bw.png) no-repeat;}
+.filters-icon:hover{background:transparent url(../images/fugue/ui-slider-050.png) no-repeat;}
+.remove-icon,.overview-close{background:transparent url(../images/fugue/cross-small-bw.png) no-repeat;}
+.remove-icon:hover,.overview-close:hover{background:transparent url(../images/fugue/cross-circle.png) no-repeat;}
+#close-icon{background:transparent url(../images/fugue/cross-circle-bw.png) no-repeat;margin-right:0px;}
+#close-icon:hover{background:transparent url(../images/fugue/cross-circle.png) no-repeat;}
+#add-tracks-icon{background:transparent url(../images/fugue/plus-button-bw.png) no-repeat;}
+#add-tracks-icon:hover{background:transparent url(../images/fugue/plus-button.png) no-repeat;}
+#add-group-icon{background:transparent url(../images/fugue/block--plus-bw.png) no-repeat;}
+#add-group-icon:hover{background:transparent url(../images/fugue/block--plus.png) no-repeat;}
+#bookmarks-icon{background:transparent url(../images/fugue/bookmarks-bw.png) no-repeat;}
+#bookmarks-icon:hover{background:transparent url(../images/fugue/bookmarks.png) no-repeat;}
+#save-icon{background:transparent url(../images/fugue/disk--arrow-bw.png) no-repeat;}
+#save-icon:hover{background:transparent url(../images/fugue/disk--arrow.png) no-repeat;}
.child-track-icon{background:url('../images/fugue/arrow-000-small-bw.png') no-repeat;width:30px;cursor:move;}
.track-resize{background:white url('../images/visualization/draggable_vertical.png') no-repeat top center;position:absolute;right:3px;bottom:-4px;width:14px;height:7px;border:solid #999 1px;z-index:100;}
.bookmark{background:white;border:solid #999 1px;border-right:none;margin:0.5em;margin-right:0;padding:0.5em;}
@@ -85,4 +87,5 @@
.icon.more-across{background:url('../images/fugue/arrow-transition-bw.png') no-repeat 0px 0px;}
.intro{padding:1em;}
.intro > .action-button{background-color:#CCC;padding:1em;}
-.feature-popup{background-color:#DDD;position:absolute;z-index:1000}
+.feature-popup{position:absolute;z-index:1000;padding:5px;font-size:10px;filter:alpha(opacity=80);background-repeat:no-repeat;background-image:url(../images/tipsy.gif);background-position:top center;}
+.feature-popup-inner{padding:5px 8px 4px 8px;background-color:black;color:white;}
diff -r 545288e40ee10ed48d422eb772b734ace1422451 -r 4e9db728d9ea2553f387b53e6d25230b69a2789a static/june_2007_style/panel_layout.css.tmpl
--- a/static/june_2007_style/panel_layout.css.tmpl
+++ b/static/june_2007_style/panel_layout.css.tmpl
@@ -161,6 +161,10 @@
z-index: 20000;
}
+#overlay.modal #overlay-background {
+ background: rgba(0,0,0,0.5);
+}
+
.dialog-box-container {
position: relative;
margin-top: 80px;
@@ -182,6 +186,10 @@
z-index: 80000;
}
+#overlay.modal .dialog-box .body {
+ min-width: 600px;
+}
+
.dialog-box .body {
padding: 5px;
overflow: auto;
diff -r 545288e40ee10ed48d422eb772b734ace1422451 -r 4e9db728d9ea2553f387b53e6d25230b69a2789a static/june_2007_style/trackster.css.tmpl
--- a/static/june_2007_style/trackster.css.tmpl
+++ b/static/june_2007_style/trackster.css.tmpl
@@ -405,8 +405,19 @@
background-color: #CCC;
padding: 1em;
}
-.feature-popup{
- background-color: #DDD;
+
+.feature-popup {
position: absolute;
- z-index: 1000
+ z-index: 1000;
+ padding: 5px;
+ font-size: 10px;
+ filter: alpha(opacity=80);
+ background-repeat: no-repeat;
+ background-image: url(../images/tipsy.gif);
+ background-position: top center;
}
+.feature-popup-inner {
+ padding: 5px 8px 4px 8px;
+ background-color: black;
+ color: white;
+}
diff -r 545288e40ee10ed48d422eb772b734ace1422451 -r 4e9db728d9ea2553f387b53e6d25230b69a2789a static/scripts/galaxy.panels.js
--- a/static/scripts/galaxy.panels.js
+++ b/static/scripts/galaxy.panels.js
@@ -163,13 +163,23 @@
// Modal dialog boxes
function hide_modal() {
- $(".dialog-box-container" ).fadeOut( function() {
+ $(".dialog-box-container" ).hide( 0, function() {
$("#overlay").hide();
+ $("#overlay").removeClass( "modal" );
$( ".dialog-box" ).find( ".body" ).children().remove();
} );
};
-function show_modal( title, body, buttons, extra_buttons, init_fn ) {
+function show_modal() {
+ $("#overlay").addClass( "modal" );
+ _show_modal.apply( this, arguments );
+}
+
+function show_message() {
+ _show_modal.apply( this, arguments );
+}
+
+function _show_modal( title, body, buttons, extra_buttons, init_fn ) {
if ( title ) {
$( ".dialog-box" ).find( ".title" ).html( title );
$( ".dialog-box" ).find( ".unified-panel-header" ).show();
@@ -205,7 +215,7 @@
$( ".dialog-box" ).find( ".body" ).html( body );
if ( ! $(".dialog-box-container").is( ":visible" ) ) {
$("#overlay").show();
- $(".dialog-box-container").fadeIn();
+ $(".dialog-box-container").show();
}
// Fix min-width so that modal cannot shrink considerably if
// new content is loaded.
diff -r 545288e40ee10ed48d422eb772b734ace1422451 -r 4e9db728d9ea2553f387b53e6d25230b69a2789a static/scripts/trackster.js
--- a/static/scripts/trackster.js
+++ b/static/scripts/trackster.js
@@ -701,7 +701,7 @@
remove: function() {
this.container.remove_drawable(this);
- this.container_div.fadeOut('slow', function() {
+ this.container_div.hide(0, function() {
$(this).remove();
// HACK: is there a better way to update the view?
view.update_intro_div();
@@ -1027,6 +1027,7 @@
// Only act on x axis scrolling if we see if, y will be i
// handled by the browser when the event bubbles up
if ( dx ) {
+ dx *= 50;
var delta_chrom = Math.round( - dx / view.viewport_container.width() * (view.high - view.low) );
view.move_delta( delta_chrom );
}
@@ -1255,7 +1256,7 @@
DrawableCollection.prototype.remove_drawable.call(this, drawable);
if (hide) {
var view = this;
- drawable.container_div.fadeOut('slow', function() {
+ drawable.container_div.hide(0, function() {
$(this).remove();
view.update_intro_div();
});
@@ -2114,8 +2115,14 @@
build_form: function() {
var track_config = this;
var container = $("<div />");
- $.each( this.params, function( index, param ) {
- if ( ! param.hidden ) {
+ var param;
+ // Function to process parameters recursively
+ function handle_params( params, container ) {
+ for ( var index = 0; index < params.length; index++ ) {
+ param = params[index];
+ // Hidden params have no representation in the form
+ if ( param.hidden ) { continue; }
+ // Build row for param
var id = 'param_' + index;
var value = track_config.values[ param.key ];
var row = $("<div class='form-row' />").appendTo( container );
@@ -2127,18 +2134,19 @@
} else if ( param.type === 'color' ) {
var input = $('<input />').attr("id", id ).attr("name", id ).val( value );
// Color picker in tool tip style float
- var tip = $( "<div class='tipsy tipsy-north' style='position: absolute;' />" ).hide();
+ var tip = $( "<div class='tipsy tipsy-west' style='position: absolute;' />" ).hide();
// Inner div for padding purposes
var tip_inner = $("<div style='background-color: black; padding: 10px;'></div>").appendTo(tip);
var farb_container = $("<div/>")
.appendTo(tip_inner)
.farbtastic( { width: 100, height: 100, callback: input, color: value });
-
// Outer div container input and tip for hover to work
$("<div />").append( input ).append( tip ).appendTo( row ).bind( "click", function ( e ) {
tip.css( {
- left: $(this).position().left + ( $(input).width() / 2 ) - 60,
- top: $(this).position().top + $(this.height)
+ // left: $(this).position().left + ( $(input).width() / 2 ) - 60,
+ // top: $(this).position().top + $(this.height)
+ left: $(this).position().left + $(input).width() + 5,
+ top: $(this).position().top - ( $(tip).height() / 2 ) + ( $(input).height() / 2 )
} ).show();
$(document).bind( "click.color-picker", function() {
tip.hide();
@@ -2150,8 +2158,15 @@
else {
row.append( $('<input />').attr("id", id ).attr("name", id ).val( value ) );
}
+ // Help text
+ if ( param.help ) {
+ row.append( $("<div class='help'/>").text( param.help ) );
+ }
}
- });
+ }
+ // Handle top level parameters in order
+ handle_params( this.params, container );
+ // Return element containing constructed form
return container;
},
update_from_form: function( container ) {
@@ -2229,7 +2244,16 @@
// Only show popups in Pack mode.
if (tile.mode !== "Pack") { return; }
- $(this.canvas).mousemove(function (e) {
+ $(this.canvas).hover( function() {
+ this.hovered = true;
+ $(this).mousemove();
+ }, function() {
+ this.hovered = false;
+ // Clear popup if it is still hanging around (this is probably not needed)
+ $(this).siblings(".feature-popup").remove();
+ } ).mousemove(function (e) {
+ // Use the hover plugin to get a delay before showing popup
+ if ( !this.hovered ) { return; }
// Get feature data for position.
var
this_offset = $(this).offset(),
@@ -2270,8 +2294,8 @@
// Build popup.
var popup = $("<div/>").attr("id", feature_uid).addClass("feature-popup"),
- key, value,
- table = $("<table/>").appendTo(popup), row;
+ table = $("<table/>"),
+ key, value, row;
for (key in feature_dict) {
value = feature_dict[key];
row = $("<tr/>").appendTo(table);
@@ -2279,6 +2303,7 @@
$("<td/>").attr("align", "left").appendTo(row)
.text(typeof(value) == 'number' ? round(value, 2) : value);
}
+ popup.append( $("<div class='feature-popup-inner'>").append( table ) );
popups[feature_uid] = popup;
}
@@ -2289,7 +2314,7 @@
// parseInt strips "px" from left, top measurements. +7 so that mouse pointer does not
// overlap popup.
var
- popupX = offsetX + parseInt( tile.canvas.css("left") ) + 7,
+ popupX = offsetX + parseInt( tile.canvas.css("left") ) - popup.width() / 2,
popupY = offsetY + parseInt( tile.canvas.css("top") ) + 7;
popup.css("left", popupX + "px").css("top", popupY + "px")
}
@@ -2331,6 +2356,12 @@
this.data_url_extra_params = {}
this.data_query_wait = (data_query_wait ? data_query_wait : DEFAULT_DATA_QUERY_WAIT);
this.dataset_check_url = converted_datasets_state_url;
+
+ // FIXME: this should be a saved setting
+ this.content_visible = true;
+
+ if (!Track.id_counter) { Track.id_counter = 0; }
+ this.id = Track.id_counter++;
//
// Create HTML element structure for track.
@@ -2346,6 +2377,9 @@
this.icons_div = $("<div/>").css("float", "left").appendTo(this.header_div).hide();
// Track icons.
+ this.toggle_icon = $("<a/>").attr("href", "javascript:void(0);").attr("title", "Hide/show track content")
+ .addClass("icon-button toggle").tipsy( {gravity: 's'} )
+ .appendTo(this.icons_div);
this.settings_icon = $("<a/>").attr("href", "javascript:void(0);").attr("title", "Edit settings")
.addClass("icon-button settings-icon").tipsy( {gravity: 's'} )
.appendTo(this.icons_div);
@@ -2365,6 +2399,21 @@
// Suppress double clicks in header so that they do not impact viz.
this.header_div.dblclick( function(e) { e.stopPropagation(); } );
+
+ // Toggle icon hides or shows the track content
+ this.toggle_icon.click( function() {
+ if ( track.content_visible ) {
+ track.toggle_icon.addClass("toggle-expand").removeClass("toggle");
+ track.hide_contents();
+ track.mode_div.hide();
+ track.content_visible = false;
+ } else {
+ track.toggle_icon.addClass("toggle").removeClass("toggle-expand");
+ track.content_visible = true;
+ track.mode_div.show();
+ track.show_contents();
+ }
+ });
// Clicking on settings icon opens track config.
this.settings_icon.click( function() {
@@ -2552,6 +2601,26 @@
this.update_icons();
},
/**
+ * Hide any elements that are part of the tracks contents area. Should
+ * remove as approprite, the track will be redrawn by show_contents.
+ */
+ hide_contents : function () {
+ // Clear contents by removing any elements that are contained in
+ // the tracks content_div
+ this.content_div.children().remove();
+ // Hide the content div
+ this.content_div.hide();
+ // And any y axis labels (common to several track types)
+ this.container_div.find(".yaxislabel, .track-resize").hide()
+ },
+ show_contents : function() {
+ // Show the contents div and labels (if present)
+ this.content_div.show();
+ this.container_div.find(".yaxislabel, .track-resize").show()
+ // Request a redraw of the content
+ this.request_draw();
+ },
+ /**
* Additional initialization required before drawing track for the first time.
*/
predraw_init: function() {}
@@ -2682,6 +2751,11 @@
*/
_draw: function(force, clear_after) {
if (!this.enabled) { return; }
+
+ // TODO: There should probably be a general way to disable content drawing
+ // for all drawables. However the button to toggle this is currently
+ // only present for Track instances.
+ if (!this.content_visible) { return; }
// HACK: ReferenceTrack can draw without dataset ID, but other tracks cannot.
if ( !(this instanceof ReferenceTrack) && (!this.dataset_id) ) { return; }
@@ -2694,7 +2768,7 @@
w_scale = width / range,
resolution = this.view.resolution,
parent_element = $("<div style='position: relative;'></div>");
-
+
// For overview, adjust high, low, resolution, and w_scale.
if (this.is_overview) {
low = this.view.max_low;
@@ -3028,7 +3102,8 @@
this.min_height_px = 16;
this.max_height_px = 400;
- this.height_px = 80;
+ // Default height for new tracks, should be a defined constant?
+ this.height_px = 32;
this.hda_ldda = hda_ldda;
this.dataset_id = dataset_id;
this.original_dataset_id = dataset_id;
@@ -3076,8 +3151,10 @@
var drag_control = $( "<div class='track-resize'>" )
// Control shows on hover over track, stays while dragging
$(track.container_div).hover( function() {
- in_handle = true;
- drag_control.show();
+ if ( track.content_visible ) {
+ in_handle = true;
+ drag_control.show();
+ }
}, function() {
in_handle = false;
if ( ! in_drag ) { drag_control.hide(); }
@@ -3108,9 +3185,20 @@
track.container_div.addClass( "line-track" );
var data = result.data;
if ( isNaN(parseFloat(track.prefs.min_value)) || isNaN(parseFloat(track.prefs.max_value)) ) {
- track.prefs.min_value = data.min;
- track.prefs.max_value = data.max;
+ // Compute default minimum and maximum values
+ var min_value = data.min
+ var max_value = data.max
+ // If mean and sd are present, use them to compute a ~95% window
+ // but only if it would shrink the range on one side
+ min_value = Math.floor( Math.min( 0, Math.max( min_value, data.mean - 2 * data.sd ) ) )
+ max_value = Math.ceil( Math.max( 0, Math.min( max_value, data.mean + 2 * data.sd ) ) )
+ // Update the prefs
+ track.prefs.min_value = min_value;
+ track.prefs.max_value = max_value;
// Update the config
+ // FIXME: we should probably only save this when the user explicately sets it
+ // since we lose the ability to compute it on the fly (when changing
+ // chromosomes for example).
$('#track_' + track.dataset_id + '_minval').val(track.prefs.min_value);
$('#track_' + track.dataset_id + '_maxval').val(track.prefs.max_value);
}
@@ -3179,7 +3267,8 @@
{ key: 'name', label: 'Name', type: 'text', default_value: name },
{ key: 'block_color', label: 'Block color', type: 'color', default_value: get_random_color() },
{ key: 'label_color', label: 'Label color', type: 'color', default_value: 'black' },
- { key: 'show_counts', label: 'Show summary counts', type: 'bool', default_value: true },
+ { key: 'show_counts', label: 'Show summary counts', type: 'bool', default_value: true,
+ help: 'Show the number of items in each bin when drawing summary histogram' },
{ key: 'mode', type: 'string', default_value: this.mode, hidden: true },
],
saved_values: prefs,
@@ -3527,7 +3616,7 @@
var filter_height_scaler = (this.filters_manager.height_filter ? new FilterScaler(this.filters_manager.height_filter) : null);
// HACK: ref_seq will only be defined for ReadTracks, and only the ReadPainter accepts that argument
var painter = new (this.painter)(filtered, tile_low, tile_high, this.prefs, mode, filter_alpha_scaler, filter_height_scaler, ref_seq);
- var required_height = Math.max(MIN_TRACK_HEIGHT, painter.get_required_height(slots_required));
+ var required_height = Math.max(MIN_TRACK_HEIGHT, painter.get_required_height(slots_required,width));
var canvas = this.view.canvas_manager.new_canvas();
var feature_mapper = null;
@@ -4057,6 +4146,7 @@
this.feature_positions = {};
this.slot_height = slot_height;
this.translation = 0;
+ this.y_translation = 0;
};
/**
@@ -4078,7 +4168,7 @@
*/
FeaturePositionMapper.prototype.get_feature_data = function(x, y) {
// Find slot using Y.
- var slot = Math.floor( y/this.slot_height ),
+ var slot = Math.floor( (y-this.y_translation)/this.slot_height ),
feature_dict;
// May not be over a slot due to padding, margin, etc.
@@ -4108,15 +4198,23 @@
FeaturePainter.prototype.default_prefs = { block_color: "#FFF", connector_color: "#FFF" };
extend(FeaturePainter.prototype, {
- get_required_height: function(rows_required) {
+ get_required_height: function(rows_required, width) {
// y_scale is the height per row
var required_height = y_scale = this.get_row_height(), mode = this.mode;
// If using a packing mode, need to multiply by the number of slots used
if (mode === "no_detail" || mode === "Squish" || mode === "Pack") {
required_height = rows_required * y_scale;
}
+ return required_height + this.get_top_padding(width) + this.get_bottom_padding(width);
+ },
+ /** Extra padding before first row of features */
+ get_top_padding: function(width) {
+ return 0;
+ },
+ /** Extra padding after last row of features */
+ get_bottom_padding: function(width) {
// Pad bottom by half a row, at least 5 px
- return required_height + Math.max( Math.round( y_scale / 2 ), 5 );
+ return Math.max( Math.round( this.get_row_height() / 2 ), 5 )
},
/**
* Draw data on ctx using slots and within the rectangle defined by width and height. Returns
@@ -4153,6 +4251,7 @@
}
ctx.restore();
+ feature_mapper.y_translation = this.get_top_padding(width);
return feature_mapper;
},
/**
@@ -4179,6 +4278,10 @@
var LinkedFeaturePainter = function(data, view_start, view_end, prefs, mode, alpha_scaler, height_scaler) {
FeaturePainter.call(this, data, view_start, view_end, prefs, mode, alpha_scaler, height_scaler);
+ // Whether to draw a single connector in the background that spans the entire feature (the intron fishbone)
+ this.draw_background_connector = true;
+ // Whether to call draw_connector for every pair of blocks
+ this.draw_individual_connectors = false;
};
extend(LinkedFeaturePainter.prototype, FeaturePainter.prototype, {
@@ -4216,7 +4319,7 @@
f_end = Math.ceil( Math.min(width, Math.max(0, (feature_end - tile_low) * w_scale)) ),
draw_start = f_start,
draw_end = f_end,
- y_center = (mode === "Dense" ? 0 : (0 + slot)) * y_scale,
+ y_center = (mode === "Dense" ? 0 : (0 + slot)) * y_scale + this.get_top_padding(width),
thickness, y_start, thick_start = null, thick_end = null,
// TODO: is there any reason why block, label color cannot be set at the Painter level?
block_color = this.prefs.block_color,
@@ -4279,38 +4382,51 @@
// needed. This ensures that whole feature, regardless of whether it starts with
// a block, is visible.
//
-
- // Draw whole feature as connector/intron.
+
+ // Compute y axis center position and height
var cur_y_center, cur_height;
if (mode === "Squish" || mode === "Dense") {
- ctx.fillStyle = CONNECTOR_COLOR;
cur_y_center = y_center + Math.floor(SQUISH_FEATURE_HEIGHT/2) + 1;
cur_height = 1;
}
else { // mode === "Pack"
if (feature_strand) {
- var cur_y_center = y_center;
- var cur_height = thick_height;
- if (feature_strand === "+") {
- ctx.fillStyle = ctx.canvas.manager.get_pattern( 'right_strand' );
- } else if (feature_strand === "-") {
- ctx.fillStyle = ctx.canvas.manager.get_pattern( 'left_strand' );
- }
+ cur_y_center = y_center;
+ cur_height = thick_height;
}
else {
- ctx.fillStyle = CONNECTOR_COLOR;
cur_y_center += (SQUISH_FEATURE_HEIGHT/2) + 1;
cur_height = 1;
}
}
- ctx.fillRect(f_start, cur_y_center, f_end - f_start, cur_height);
+
+ // Draw whole feature as connector/intron.
+ if ( this.draw_background_connector ) {
+ if (mode === "Squish" || mode === "Dense") {
+ ctx.fillStyle = CONNECTOR_COLOR;
+ }
+ else { // mode === "Pack"
+ if (feature_strand) {
+ if (feature_strand === "+") {
+ ctx.fillStyle = ctx.canvas.manager.get_pattern( 'right_strand' );
+ } else if (feature_strand === "-") {
+ ctx.fillStyle = ctx.canvas.manager.get_pattern( 'left_strand' );
+ }
+ }
+ else {
+ ctx.fillStyle = CONNECTOR_COLOR;
+ }
+ }
+ ctx.fillRect(f_start, cur_y_center, f_end - f_start, cur_height);
+ }
// Draw blocks.
var start_and_height;
for (var k = 0, k_len = feature_blocks.length; k < k_len; k++) {
var block = feature_blocks[k],
block_start = Math.floor( Math.max(0, (block[0] - tile_low) * w_scale) ),
- block_end = Math.ceil( Math.min(width, Math.max((block[1] - tile_low) * w_scale)) );
+ block_end = Math.ceil( Math.min(width, Math.max((block[1] - tile_low) * w_scale)) ),
+ last_block_start, last_block_end;
// Skip drawing if block not on tile.
if (block_start > block_end) { continue; }
@@ -4341,6 +4457,12 @@
ctx.fillRect(block_thick_start, y_center + 1, block_thick_end - block_thick_start, thick_height );
}
}
+ // Draw individual connectors if required
+ if ( this.draw_individual_connectors && last_block_start ) {
+ this.draw_connector( ctx, last_block_start, last_block_end, block_start, block_end, y_center );
+ }
+ last_block_start = block_start;
+ last_block_end = block_end;
}
// FIXME: Height scaling only works in Pack mode right now.
@@ -4673,11 +4795,54 @@
}
});
+var ArcLinkedFeaturePainter = function(data, view_start, view_end, prefs, mode, alpha_scaler, height_scaler) {
+ LinkedFeaturePainter.call(this, data, view_start, view_end, prefs, mode, alpha_scaler, height_scaler);
+ // Need to know the longest feature length for adding spacing
+ this.longest_feature_length = this.calculate_longest_feature_length();
+ this.draw_background_connector = false;
+ this.draw_individual_connectors = true;
+};
+
+extend(ArcLinkedFeaturePainter.prototype, FeaturePainter.prototype, LinkedFeaturePainter.prototype, {
+
+ calculate_longest_feature_length: function () {
+ var longest_feature_length = 0;
+ for (var i = 0, len = this.data.length; i < len; i++) {
+ var feature = this.data[i], feature_start = feature[1], feature_end = feature[2];
+ longest_feature_length = Math.max( longest_feature_length, feature_end - feature_start );
+ }
+ return longest_feature_length;
+ },
+
+ get_top_padding: function( width ) {
+ var view_range = this.view_end - this.view_start,
+ w_scale = width / view_range;
+ return Math.min( 128, Math.ceil( ( this.longest_feature_length / 2 ) * w_scale ) );
+ },
+
+ draw_connector: function( ctx, block1_start, block1_end, block2_start, block2_end, y_center ) {
+ // Arc drawing -- from closest endpoints
+ var x_center = ( block1_end + block2_start ) / 2,
+ radius = block2_start - x_center;
+ // For full half circles
+ var angle1 = Math.PI, angle2 = 0;
+ if ( radius > 0 ) {
+ ctx.beginPath();
+ ctx.arc( x_center, y_center, block2_start - x_center, Math.PI, 0 );
+ ctx.stroke();
+ }
+ }
+});
+
+
+
+
exports.Scaler = Scaler;
exports.SummaryTreePainter = SummaryTreePainter;
exports.LinePainter = LinePainter;
exports.LinkedFeaturePainter = LinkedFeaturePainter;
exports.ReadPainter = ReadPainter;
+exports.ArcLinkedFeaturePainter = ArcLinkedFeaturePainter;
// End painters_module encapsulation
};
@@ -4708,4 +4873,4 @@
for ( key in modules.trackster ) {
target[key] = modules.trackster[key];
}
-})(window);
\ No newline at end of file
+})(window);
diff -r 545288e40ee10ed48d422eb772b734ace1422451 -r 4e9db728d9ea2553f387b53e6d25230b69a2789a templates/tracks/browser.mako
--- a/templates/tracks/browser.mako
+++ b/templates/tracks/browser.mako
@@ -42,7 +42,7 @@
<script type='text/javascript' src="${h.url_for('/static/scripts/excanvas.js')}"></script><![endif]-->
-${h.js( "galaxy.base", "galaxy.panels", "json2", "jquery", "jstorage", "jquery.event.drag", "jquery.mousewheel", "jquery.autocomplete", "trackster", "trackster_ui", "jquery.ui.sortable.slider", "farbtastic", "jquery.tipsy" )}
+${h.js( "galaxy.base", "galaxy.panels", "json2", "jquery", "jstorage", "jquery.event.drag", "jquery.event.hover","jquery.mousewheel", "jquery.autocomplete", "trackster", "trackster_ui", "jquery.ui.sortable.slider", "farbtastic", "jquery.tipsy" )}
<script type="text/javascript">
//
diff -r 545288e40ee10ed48d422eb772b734ace1422451 -r 4e9db728d9ea2553f387b53e6d25230b69a2789a templates/workflow/editor.mako
--- a/templates/workflow/editor.mako
+++ b/templates/workflow/editor.mako
@@ -213,7 +213,7 @@
show_workflow_parameters();
},
beforeSubmit: function( data ) {
- show_modal( "Loading workflow", "progress" );
+ show_message( "Loading workflow", "progress" );
}
});
}
@@ -650,7 +650,7 @@
};
var save_current_workflow = function ( eventObj, success_callback ) {
- show_modal( "Saving workflow", "progress" );
+ show_message( "Saving workflow", "progress" );
workflow.check_changes_in_active_form();
if (!workflow.has_changes) {
hide_modal();
https://bitbucket.org/galaxy/galaxy-central/changeset/9c80e9985d71/
changeset: 9c80e9985d71
user: james_taylor
date: 2011-11-07 16:32:18
summary: Move bx-python version to 0.7.1 (again)
affected #: 1 file
diff -r 4db2b2230f7e1dc075f696a4c6083956da02a4c4 -r 9c80e9985d71939dfcda96a1c21c9be85983620f eggs.ini
--- a/eggs.ini
+++ b/eggs.ini
@@ -12,7 +12,7 @@
no_auto = pbs_python DRMAA_python
[eggs:platform]
-bx_python = 0.7.0
+bx_python = 0.7.1
Cheetah = 2.2.2
ctypes = 1.0.2
DRMAA_python = 0.2
@@ -67,7 +67,7 @@
psycopg2 = _8.4.2_static
pysqlite = _3.6.17_static
MySQL_python = _5.1.41_static
-bx_python = _494c2d1d68b3_rebuild1
+; bx_python = _494c2d1d68b3_rebuild1
GeneTrack = _dev_48da9e998f0caf01c5be731e926f4b0481f658f0
SQLAlchemy = _dev_r6498
pysam = _kanwei_b10f6e722e9a
https://bitbucket.org/galaxy/galaxy-central/changeset/7e45efd017bd/
changeset: 7e45efd017bd
user: james_taylor
date: 2011-11-07 16:32:53
summary: Automated merge with ssh://bitbucket.org/james_taylor/galaxy-central
affected #: 1 file
diff -r 4e9db728d9ea2553f387b53e6d25230b69a2789a -r 7e45efd017bdb4d6ea0af86e80b3ae9d2a029c67 eggs.ini
--- a/eggs.ini
+++ b/eggs.ini
@@ -12,7 +12,7 @@
no_auto = pbs_python DRMAA_python
[eggs:platform]
-bx_python = 0.7.0
+bx_python = 0.7.1
Cheetah = 2.2.2
ctypes = 1.0.2
DRMAA_python = 0.2
@@ -67,7 +67,7 @@
psycopg2 = _8.4.2_static
pysqlite = _3.6.17_static
MySQL_python = _5.1.41_static
-bx_python = _494c2d1d68b3_rebuild1
+; bx_python = _494c2d1d68b3_rebuild1
GeneTrack = _dev_48da9e998f0caf01c5be731e926f4b0481f658f0
SQLAlchemy = _dev_r6498
pysam = _kanwei_b10f6e722e9a
https://bitbucket.org/galaxy/galaxy-central/changeset/54f19d6736c0/
changeset: 54f19d6736c0
user: james_taylor
date: 2011-11-07 21:31:32
summary: Eggs: add revision string for new bx-python
affected #: 1 file
diff -r 7e45efd017bdb4d6ea0af86e80b3ae9d2a029c67 -r 54f19d6736c0d5f55a841b76f4a72e32e490df38 eggs.ini
--- a/eggs.ini
+++ b/eggs.ini
@@ -67,7 +67,7 @@
psycopg2 = _8.4.2_static
pysqlite = _3.6.17_static
MySQL_python = _5.1.41_static
-; bx_python = _494c2d1d68b3_rebuild1
+bx_python = _7b95ff194725
GeneTrack = _dev_48da9e998f0caf01c5be731e926f4b0481f658f0
SQLAlchemy = _dev_r6498
pysam = _kanwei_b10f6e722e9a
https://bitbucket.org/galaxy/galaxy-central/changeset/de594b3589e5/
changeset: de594b3589e5
user: james_taylor
date: 2011-11-07 21:31:41
summary: Automated merge with https://bitbucket.org/galaxy/galaxy-central
affected #: 14 files
diff -r ba739e96c1a14d649c37655cecfc5b835ab343d2 -r de594b3589e575e3347c75a2d3fad33b01db35dd eggs.ini
--- a/eggs.ini
+++ b/eggs.ini
@@ -12,7 +12,7 @@
no_auto = pbs_python DRMAA_python
[eggs:platform]
-bx_python = 0.7.0
+bx_python = 0.7.1
Cheetah = 2.2.2
ctypes = 1.0.2
DRMAA_python = 0.2
@@ -67,7 +67,7 @@
psycopg2 = _8.4.2_static
pysqlite = _3.6.17_static
MySQL_python = _5.1.41_static
-bx_python = _494c2d1d68b3_rebuild1
+bx_python = _7b95ff194725
GeneTrack = _dev_48da9e998f0caf01c5be731e926f4b0481f658f0
SQLAlchemy = _dev_r6498
pysam = _kanwei_b10f6e722e9a
diff -r ba739e96c1a14d649c37655cecfc5b835ab343d2 -r de594b3589e575e3347c75a2d3fad33b01db35dd lib/galaxy/datatypes/converters/interval_to_summary_tree_converter.py
--- a/lib/galaxy/datatypes/converters/interval_to_summary_tree_converter.py
+++ b/lib/galaxy/datatypes/converters/interval_to_summary_tree_converter.py
@@ -50,4 +50,4 @@
st.write(out_fname)
if __name__ == "__main__":
- main()
\ No newline at end of file
+ main()
diff -r ba739e96c1a14d649c37655cecfc5b835ab343d2 -r de594b3589e575e3347c75a2d3fad33b01db35dd lib/galaxy/visualization/tracks/data_providers.py
--- a/lib/galaxy/visualization/tracks/data_providers.py
+++ b/lib/galaxy/visualization/tracks/data_providers.py
@@ -2,14 +2,15 @@
Data providers for tracks visualizations.
"""
-import sys
-from math import ceil, log
+import sys, time
+from math import ceil, log, sqrt
import pkg_resources
pkg_resources.require( "bx-python" )
if sys.version_info[:2] == (2, 4):
pkg_resources.require( "ctypes" )
pkg_resources.require( "pysam" )
pkg_resources.require( "numpy" )
+import numpy
from galaxy.datatypes.util.gff_util import *
from galaxy.util.json import from_json_string
from bx.interval_index_file import Indexes
@@ -740,40 +741,73 @@
# Bigwig has the possibility of it being a standalone bigwig file, in which case we use
# original_dataset, or coming from wig->bigwig conversion in which we use converted_dataset
f, bbi = self._get_dataset()
-
+
+ # If the stats kwarg was provide, we compute overall summary data for
+ # the entire chromosome, but no reduced data -- currently only
+ # providing values used by trackster to determine the default range
if 'stats' in kwargs:
- all_dat = bbi.query(chrom, 0, 2147483647, 1)
+ # FIXME: use actual chromosome size
+ summary = bbi.summarize( chrom, 0, 214783647, 1 )
f.close()
- if all_dat is None:
+ if summary is None:
return None
-
- all_dat = all_dat[0] # only 1 summary
- return { 'data' : { 'max': float( all_dat['max'] ), \
- 'min': float( all_dat['min'] ), \
- 'total_frequency': float( all_dat['coverage'] ) } \
- }
-
+ else:
+ # Does the summary contain any defined values?
+ valid_count = summary.valid_count[0]
+ if summary.valid_count < 1:
+ return None
+
+ # Compute $\mu \pm 2\sigma$ to provide an estimate for upper and lower
+ # bounds that contain ~95% of the data.
+ mean = summary.sum_data[0] / valid_count
+ var = summary.sum_squares[0] - mean
+ if valid_count > 1:
+ var /= valid_count - 1
+ sd = numpy.sqrt( var )
+
+ return dict( data=dict( min=summary.min_val[0], max=summary.max_val[0], mean=mean, sd=sd ) )
+
start = int(start)
end = int(end)
+
+ # The following seems not to work very well, for example it will only return one
+ # data point if the tile is 1280px wide. Not sure what the intent is.
+
# The first zoom level for BBI files is 640. If too much is requested, it will look at each block instead
# of summaries. The calculation done is: zoom <> (end-start)/num_points/2.
# Thus, the optimal number of points is (end-start)/num_points/2 = 640
# num_points = (end-start) / 1280
- num_points = (end-start) / 1280
- if num_points < 1:
- num_points = end - start
- else:
- num_points = min(num_points, 500)
+ #num_points = (end-start) / 1280
+ #if num_points < 1:
+ # num_points = end - start
+ #else:
+ # num_points = min(num_points, 500)
- data = bbi.query(chrom, start, end, num_points)
+ # For now, we'll do 1000 data points by default However, the summaries
+ # don't seem to work when a summary pixel corresponds to less than one
+ # datapoint, so we prevent that.
+ # FIXME: need to switch over to using the full data at high levels of
+ # detail.
+ num_points = min( 1000, end - start )
+
+ summary = bbi.summarize( chrom, start, end, num_points )
f.close()
+
+ result = []
+
+ if summary:
+ mean = summary.sum_data / summary.valid_count
+
+ ## Standard deviation by bin, not yet used
+ ## var = summary.sum_squares - mean
+ ## var /= minimum( valid_count - 1, 1 )
+ ## sd = sqrt( var )
- pos = start
- step_size = (end - start) / num_points
- result = []
- if data:
- for dat_dict in data:
- result.append( (pos, float_nan(dat_dict['mean']) ) )
+ pos = start
+ step_size = (end - start) / num_points
+
+ for i in range( num_points ):
+ result.append( (pos, float_nan( mean[i] ) ) )
pos += step_size
return { 'data': result }
diff -r ba739e96c1a14d649c37655cecfc5b835ab343d2 -r de594b3589e575e3347c75a2d3fad33b01db35dd lib/galaxy/web/controllers/tracks.py
--- a/lib/galaxy/web/controllers/tracks.py
+++ b/lib/galaxy/web/controllers/tracks.py
@@ -528,6 +528,7 @@
if not standalone_provider.has_data( chrom ):
return messages.NO_DATA
valid_chroms = standalone_provider.valid_chroms()
+
# Have data if we get here
return { "status": messages.DATA, "valid_chroms": valid_chroms }
@@ -1041,4 +1042,4 @@
return_message = message
elif return_message == None and message == messages.PENDING:
return_message = message
- return return_message
\ No newline at end of file
+ return return_message
diff -r ba739e96c1a14d649c37655cecfc5b835ab343d2 -r de594b3589e575e3347c75a2d3fad33b01db35dd static/june_2007_style/base.css.tmpl
--- a/static/june_2007_style/base.css.tmpl
+++ b/static/june_2007_style/base.css.tmpl
@@ -231,6 +231,10 @@
padding: 3px 0 0 1em;
}
+.form-row .help {
+ color: #666;
+}
+
select, input, textarea {
font: inherit;
}
diff -r ba739e96c1a14d649c37655cecfc5b835ab343d2 -r de594b3589e575e3347c75a2d3fad33b01db35dd static/june_2007_style/blue/base.css
--- a/static/june_2007_style/blue/base.css
+++ b/static/june_2007_style/blue/base.css
@@ -43,6 +43,7 @@
div.form-row-input{float:left;}
div.form-row-input label{font-weight:normal;display:inline;}
div.form-row-error-message{width:300px;float:left;color:red;font-weight:bold;padding:3px 0 0 1em;}
+.form-row .help{color:#666;}
select,input,textarea{font:inherit;}
select,textarea,input[type="text"],input[type="file"],input[type="password"]{-webkit-box-sizing:border-box;max-width:300px;}
.errormessagelarge,.warningmessagelarge,.donemessagelarge,.infomessagelarge{padding:10px;padding-left:52px;min-height:32px;border:1px solid #AA6666;background-color:#FFCCCC;background-image:url(error_message_icon.png);background-repeat:no-repeat;background-position:10px 10px;}
diff -r ba739e96c1a14d649c37655cecfc5b835ab343d2 -r de594b3589e575e3347c75a2d3fad33b01db35dd static/june_2007_style/blue/panel_layout.css
--- a/static/june_2007_style/blue/panel_layout.css
+++ b/static/june_2007_style/blue/panel_layout.css
@@ -23,9 +23,11 @@
.panel-header-button:hover{color:black;background-color:#ccc;}
.panel-header-button:active{color:white;background-color:#aaaaaa;}
#overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:20000;}
+#overlay.modal #overlay-background{background:rgba(0,0,0,0.5);}
.dialog-box-container{position:relative;margin-top:80px;margin-right:auto;margin-left:auto;}
.dialog-box-wrapper{position:relative;padding:1em;background-color:rgba(0,0,0,0.5);-moz-border-radius:1em;-webkit-border-radius:1em;}
.dialog-box{border:solid #999 1px;background:white;z-index:80000;}
+#overlay.modal .dialog-box .body{min-width:600px;}
.dialog-box .body{padding:5px;overflow:auto;max-height:500px;min-width:300px;}
.dialog-box .buttons{padding:5px;}
.panel-error-message,.panel-warning-message,.panel-done-message,.panel-info-message{height:24px;line-height:24px;color:#303030;padding:0px;padding-left:26px;background-color:#FFCCCC;background-image:url(error_small.png);background-repeat:no-repeat;background-position:6px 50%;}
diff -r ba739e96c1a14d649c37655cecfc5b835ab343d2 -r de594b3589e575e3347c75a2d3fad33b01db35dd static/june_2007_style/blue/trackster.css
--- a/static/june_2007_style/blue/trackster.css
+++ b/static/june_2007_style/blue/trackster.css
@@ -3,30 +3,9 @@
.content{font:10px verdana;}
.nav-controls{text-align:center;padding:1px 0;}
.nav-controls input{margin:0 5px;}
-.menu-button{padding: 0px 4px 0px 4px;}
#zoom-in,#zoom-out{display:inline-block;height:16px;width:16px;margin-bottom:-3px;cursor:pointer;}
#zoom-out{background:transparent url(../images/fugue/magnifier-zoom-out.png) center center no-repeat;}
#zoom-in{margin-left:10px;background:transparent url(../images/fugue/magnifier-zoom.png) center center no-repeat;}
-.overview-icon{background:transparent url(../images/fugue/application-dock-270-bw.png) no-repeat;}
-.overview-icon:hover{background:transparent url(../images/fugue/application-dock-270.png) no-repeat;}
-.settings-icon{background:transparent url(../images/fugue/gear-bw.png) no-repeat;}
-.settings-icon:hover{background:transparent url(../images/fugue/gear.png) no-repeat;}
-.tools-icon{background:transparent url(../images/fugue/toolbox-bw.png) no-repeat;}
-.tools-icon:hover{background:transparent url(../images/fugue/toolbox.png) no-repeat;}
-.filters-icon{background:transparent url(../images/fugue/ui-slider-050-bw.png) no-repeat;}
-.filters-icon:hover{background:transparent url(../images/fugue/ui-slider-050.png) no-repeat;}
-.remove-icon,.overview-close{background:transparent url(../images/fugue/cross-small-bw.png) no-repeat;}
-.remove-icon:hover,.overview-close:hover{background:transparent url(../images/fugue/cross-circle.png) no-repeat;}
-#close-icon{background:transparent url(../images/fugue/cross-circle-bw.png) no-repeat;margin-right:0px;}
-#close-icon:hover{background:transparent url(../images/fugue/cross-circle.png) no-repeat;}
-#add-tracks-icon{background:transparent url(../images/fugue/plus-button-bw.png) no-repeat;}
-#add-tracks-icon:hover{background:transparent url(../images/fugue/plus-button.png) no-repeat;}
-#add-group-icon{background:transparent url(../images/fugue/block--plus-bw.png) no-repeat;}
-#add-group-icon:hover{background:transparent url(../images/fugue/block--plus.png) no-repeat;}
-#bookmarks-icon{background:transparent url(../images/fugue/bookmarks-bw.png) no-repeat;}
-#bookmarks-icon:hover{background:transparent url(../images/fugue/bookmarks.png) no-repeat;}
-#save-icon{background:transparent url(../images/fugue/disk--arrow-bw.png) no-repeat;}
-#save-icon:hover{background:transparent url(../images/fugue/disk--arrow.png) no-repeat;}
.nav-input{font-size:12px;width:30em;z-index:1000;}
.location{display:inline-block;width:15em;margin:0 10px;}
.draghandle{margin-top:2px;cursor:move;float:left;background:transparent url(../images/visualization/draggable_horizontal.png) center center no-repeat;width:10px;height:12px;}
@@ -65,16 +44,39 @@
input{font:10px verdana;}
.dynamic-tool,.filters{margin-left:0.25em;padding-bottom:0.5em;}
.dynamic-tool{width:410px;}
-.filters>.sliders,.display-controls{float:left;margin:1em;}
+.filters > .sliders,.display-controls{float:left;margin:1em;}
.sliders{width:410px;}
-.display-controls{border-left:solid 2px #DDDDDD;padding-left:1em}
-.filter-row{margin-top:0.4em;}
+.display-controls{border-left:solid 2px #DDDDDD;padding-left:1em
+}
+.filter-row {
+ margin-top:0.4em;}
.slider-row{margin-left:1em;}
.elt-label{float:left;font-weight:bold;margin-right:1em;}
.slider{float:right;width:200px;position:relative;}
.tool-name{font-size:110%;font-weight:bold;}
.param-row{margin-top:0.2em;margin-left:1em;}
.param-label{float:left;font-weight:bold;padding-top:0.2em;}
+.menu-button{padding:0px 4px 0px 4px;}
+.settings-icon{background:transparent url(../images/fugue/gear-bw.png) no-repeat;}
+.settings-icon:hover{background:transparent url(../images/fugue/gear.png) no-repeat;}
+.overview-icon{background:transparent url(../images/fugue/application-dock-270-bw.png) no-repeat;}
+.overview-icon:hover{background:transparent url(../images/fugue/application-dock-270.png) no-repeat;}
+.tools-icon{background:transparent url(../images/fugue/toolbox-bw.png) no-repeat;}
+.tools-icon:hover{background:transparent url(../images/fugue/toolbox.png) no-repeat;}
+.filters-icon{background:transparent url(../images/fugue/ui-slider-050-bw.png) no-repeat;}
+.filters-icon:hover{background:transparent url(../images/fugue/ui-slider-050.png) no-repeat;}
+.remove-icon,.overview-close{background:transparent url(../images/fugue/cross-small-bw.png) no-repeat;}
+.remove-icon:hover,.overview-close:hover{background:transparent url(../images/fugue/cross-circle.png) no-repeat;}
+#close-icon{background:transparent url(../images/fugue/cross-circle-bw.png) no-repeat;margin-right:0px;}
+#close-icon:hover{background:transparent url(../images/fugue/cross-circle.png) no-repeat;}
+#add-tracks-icon{background:transparent url(../images/fugue/plus-button-bw.png) no-repeat;}
+#add-tracks-icon:hover{background:transparent url(../images/fugue/plus-button.png) no-repeat;}
+#add-group-icon{background:transparent url(../images/fugue/block--plus-bw.png) no-repeat;}
+#add-group-icon:hover{background:transparent url(../images/fugue/block--plus.png) no-repeat;}
+#bookmarks-icon{background:transparent url(../images/fugue/bookmarks-bw.png) no-repeat;}
+#bookmarks-icon:hover{background:transparent url(../images/fugue/bookmarks.png) no-repeat;}
+#save-icon{background:transparent url(../images/fugue/disk--arrow-bw.png) no-repeat;}
+#save-icon:hover{background:transparent url(../images/fugue/disk--arrow.png) no-repeat;}
.child-track-icon{background:url('../images/fugue/arrow-000-small-bw.png') no-repeat;width:30px;cursor:move;}
.track-resize{background:white url('../images/visualization/draggable_vertical.png') no-repeat top center;position:absolute;right:3px;bottom:-4px;width:14px;height:7px;border:solid #999 1px;z-index:100;}
.bookmark{background:white;border:solid #999 1px;border-right:none;margin:0.5em;margin-right:0;padding:0.5em;}
@@ -85,4 +87,5 @@
.icon.more-across{background:url('../images/fugue/arrow-transition-bw.png') no-repeat 0px 0px;}
.intro{padding:1em;}
.intro > .action-button{background-color:#CCC;padding:1em;}
-.feature-popup{background-color:#DDD;position:absolute;z-index:1000}
+.feature-popup{position:absolute;z-index:1000;padding:5px;font-size:10px;filter:alpha(opacity=80);background-repeat:no-repeat;background-image:url(../images/tipsy.gif);background-position:top center;}
+.feature-popup-inner{padding:5px 8px 4px 8px;background-color:black;color:white;}
diff -r ba739e96c1a14d649c37655cecfc5b835ab343d2 -r de594b3589e575e3347c75a2d3fad33b01db35dd static/june_2007_style/panel_layout.css.tmpl
--- a/static/june_2007_style/panel_layout.css.tmpl
+++ b/static/june_2007_style/panel_layout.css.tmpl
@@ -161,6 +161,10 @@
z-index: 20000;
}
+#overlay.modal #overlay-background {
+ background: rgba(0,0,0,0.5);
+}
+
.dialog-box-container {
position: relative;
margin-top: 80px;
@@ -182,6 +186,10 @@
z-index: 80000;
}
+#overlay.modal .dialog-box .body {
+ min-width: 600px;
+}
+
.dialog-box .body {
padding: 5px;
overflow: auto;
diff -r ba739e96c1a14d649c37655cecfc5b835ab343d2 -r de594b3589e575e3347c75a2d3fad33b01db35dd static/june_2007_style/trackster.css.tmpl
--- a/static/june_2007_style/trackster.css.tmpl
+++ b/static/june_2007_style/trackster.css.tmpl
@@ -405,8 +405,19 @@
background-color: #CCC;
padding: 1em;
}
-.feature-popup{
- background-color: #DDD;
+
+.feature-popup {
position: absolute;
- z-index: 1000
+ z-index: 1000;
+ padding: 5px;
+ font-size: 10px;
+ filter: alpha(opacity=80);
+ background-repeat: no-repeat;
+ background-image: url(../images/tipsy.gif);
+ background-position: top center;
}
+.feature-popup-inner {
+ padding: 5px 8px 4px 8px;
+ background-color: black;
+ color: white;
+}
diff -r ba739e96c1a14d649c37655cecfc5b835ab343d2 -r de594b3589e575e3347c75a2d3fad33b01db35dd static/scripts/galaxy.panels.js
--- a/static/scripts/galaxy.panels.js
+++ b/static/scripts/galaxy.panels.js
@@ -163,13 +163,23 @@
// Modal dialog boxes
function hide_modal() {
- $(".dialog-box-container" ).fadeOut( function() {
+ $(".dialog-box-container" ).hide( 0, function() {
$("#overlay").hide();
+ $("#overlay").removeClass( "modal" );
$( ".dialog-box" ).find( ".body" ).children().remove();
} );
};
-function show_modal( title, body, buttons, extra_buttons, init_fn ) {
+function show_modal() {
+ $("#overlay").addClass( "modal" );
+ _show_modal.apply( this, arguments );
+}
+
+function show_message() {
+ _show_modal.apply( this, arguments );
+}
+
+function _show_modal( title, body, buttons, extra_buttons, init_fn ) {
if ( title ) {
$( ".dialog-box" ).find( ".title" ).html( title );
$( ".dialog-box" ).find( ".unified-panel-header" ).show();
@@ -205,7 +215,7 @@
$( ".dialog-box" ).find( ".body" ).html( body );
if ( ! $(".dialog-box-container").is( ":visible" ) ) {
$("#overlay").show();
- $(".dialog-box-container").fadeIn();
+ $(".dialog-box-container").show();
}
// Fix min-width so that modal cannot shrink considerably if
// new content is loaded.
diff -r ba739e96c1a14d649c37655cecfc5b835ab343d2 -r de594b3589e575e3347c75a2d3fad33b01db35dd static/scripts/trackster.js
--- a/static/scripts/trackster.js
+++ b/static/scripts/trackster.js
@@ -701,7 +701,7 @@
remove: function() {
this.container.remove_drawable(this);
- this.container_div.fadeOut('slow', function() {
+ this.container_div.hide(0, function() {
$(this).remove();
// HACK: is there a better way to update the view?
view.update_intro_div();
@@ -1027,6 +1027,7 @@
// Only act on x axis scrolling if we see if, y will be i
// handled by the browser when the event bubbles up
if ( dx ) {
+ dx *= 50;
var delta_chrom = Math.round( - dx / view.viewport_container.width() * (view.high - view.low) );
view.move_delta( delta_chrom );
}
@@ -1255,7 +1256,7 @@
DrawableCollection.prototype.remove_drawable.call(this, drawable);
if (hide) {
var view = this;
- drawable.container_div.fadeOut('slow', function() {
+ drawable.container_div.hide(0, function() {
$(this).remove();
view.update_intro_div();
});
@@ -2114,8 +2115,14 @@
build_form: function() {
var track_config = this;
var container = $("<div />");
- $.each( this.params, function( index, param ) {
- if ( ! param.hidden ) {
+ var param;
+ // Function to process parameters recursively
+ function handle_params( params, container ) {
+ for ( var index = 0; index < params.length; index++ ) {
+ param = params[index];
+ // Hidden params have no representation in the form
+ if ( param.hidden ) { continue; }
+ // Build row for param
var id = 'param_' + index;
var value = track_config.values[ param.key ];
var row = $("<div class='form-row' />").appendTo( container );
@@ -2127,18 +2134,19 @@
} else if ( param.type === 'color' ) {
var input = $('<input />').attr("id", id ).attr("name", id ).val( value );
// Color picker in tool tip style float
- var tip = $( "<div class='tipsy tipsy-north' style='position: absolute;' />" ).hide();
+ var tip = $( "<div class='tipsy tipsy-west' style='position: absolute;' />" ).hide();
// Inner div for padding purposes
var tip_inner = $("<div style='background-color: black; padding: 10px;'></div>").appendTo(tip);
var farb_container = $("<div/>")
.appendTo(tip_inner)
.farbtastic( { width: 100, height: 100, callback: input, color: value });
-
// Outer div container input and tip for hover to work
$("<div />").append( input ).append( tip ).appendTo( row ).bind( "click", function ( e ) {
tip.css( {
- left: $(this).position().left + ( $(input).width() / 2 ) - 60,
- top: $(this).position().top + $(this.height)
+ // left: $(this).position().left + ( $(input).width() / 2 ) - 60,
+ // top: $(this).position().top + $(this.height)
+ left: $(this).position().left + $(input).width() + 5,
+ top: $(this).position().top - ( $(tip).height() / 2 ) + ( $(input).height() / 2 )
} ).show();
$(document).bind( "click.color-picker", function() {
tip.hide();
@@ -2150,8 +2158,15 @@
else {
row.append( $('<input />').attr("id", id ).attr("name", id ).val( value ) );
}
+ // Help text
+ if ( param.help ) {
+ row.append( $("<div class='help'/>").text( param.help ) );
+ }
}
- });
+ }
+ // Handle top level parameters in order
+ handle_params( this.params, container );
+ // Return element containing constructed form
return container;
},
update_from_form: function( container ) {
@@ -2229,7 +2244,16 @@
// Only show popups in Pack mode.
if (tile.mode !== "Pack") { return; }
- $(this.canvas).mousemove(function (e) {
+ $(this.canvas).hover( function() {
+ this.hovered = true;
+ $(this).mousemove();
+ }, function() {
+ this.hovered = false;
+ // Clear popup if it is still hanging around (this is probably not needed)
+ $(this).siblings(".feature-popup").remove();
+ } ).mousemove(function (e) {
+ // Use the hover plugin to get a delay before showing popup
+ if ( !this.hovered ) { return; }
// Get feature data for position.
var
this_offset = $(this).offset(),
@@ -2270,8 +2294,8 @@
// Build popup.
var popup = $("<div/>").attr("id", feature_uid).addClass("feature-popup"),
- key, value,
- table = $("<table/>").appendTo(popup), row;
+ table = $("<table/>"),
+ key, value, row;
for (key in feature_dict) {
value = feature_dict[key];
row = $("<tr/>").appendTo(table);
@@ -2279,6 +2303,7 @@
$("<td/>").attr("align", "left").appendTo(row)
.text(typeof(value) == 'number' ? round(value, 2) : value);
}
+ popup.append( $("<div class='feature-popup-inner'>").append( table ) );
popups[feature_uid] = popup;
}
@@ -2289,7 +2314,7 @@
// parseInt strips "px" from left, top measurements. +7 so that mouse pointer does not
// overlap popup.
var
- popupX = offsetX + parseInt( tile.canvas.css("left") ) + 7,
+ popupX = offsetX + parseInt( tile.canvas.css("left") ) - popup.width() / 2,
popupY = offsetY + parseInt( tile.canvas.css("top") ) + 7;
popup.css("left", popupX + "px").css("top", popupY + "px")
}
@@ -2331,6 +2356,12 @@
this.data_url_extra_params = {}
this.data_query_wait = (data_query_wait ? data_query_wait : DEFAULT_DATA_QUERY_WAIT);
this.dataset_check_url = converted_datasets_state_url;
+
+ // FIXME: this should be a saved setting
+ this.content_visible = true;
+
+ if (!Track.id_counter) { Track.id_counter = 0; }
+ this.id = Track.id_counter++;
//
// Create HTML element structure for track.
@@ -2346,6 +2377,9 @@
this.icons_div = $("<div/>").css("float", "left").appendTo(this.header_div).hide();
// Track icons.
+ this.toggle_icon = $("<a/>").attr("href", "javascript:void(0);").attr("title", "Hide/show track content")
+ .addClass("icon-button toggle").tipsy( {gravity: 's'} )
+ .appendTo(this.icons_div);
this.settings_icon = $("<a/>").attr("href", "javascript:void(0);").attr("title", "Edit settings")
.addClass("icon-button settings-icon").tipsy( {gravity: 's'} )
.appendTo(this.icons_div);
@@ -2365,6 +2399,21 @@
// Suppress double clicks in header so that they do not impact viz.
this.header_div.dblclick( function(e) { e.stopPropagation(); } );
+
+ // Toggle icon hides or shows the track content
+ this.toggle_icon.click( function() {
+ if ( track.content_visible ) {
+ track.toggle_icon.addClass("toggle-expand").removeClass("toggle");
+ track.hide_contents();
+ track.mode_div.hide();
+ track.content_visible = false;
+ } else {
+ track.toggle_icon.addClass("toggle").removeClass("toggle-expand");
+ track.content_visible = true;
+ track.mode_div.show();
+ track.show_contents();
+ }
+ });
// Clicking on settings icon opens track config.
this.settings_icon.click( function() {
@@ -2552,6 +2601,26 @@
this.update_icons();
},
/**
+ * Hide any elements that are part of the tracks contents area. Should
+ * remove as approprite, the track will be redrawn by show_contents.
+ */
+ hide_contents : function () {
+ // Clear contents by removing any elements that are contained in
+ // the tracks content_div
+ this.content_div.children().remove();
+ // Hide the content div
+ this.content_div.hide();
+ // And any y axis labels (common to several track types)
+ this.container_div.find(".yaxislabel, .track-resize").hide()
+ },
+ show_contents : function() {
+ // Show the contents div and labels (if present)
+ this.content_div.show();
+ this.container_div.find(".yaxislabel, .track-resize").show()
+ // Request a redraw of the content
+ this.request_draw();
+ },
+ /**
* Additional initialization required before drawing track for the first time.
*/
predraw_init: function() {}
@@ -2682,6 +2751,11 @@
*/
_draw: function(force, clear_after) {
if (!this.enabled) { return; }
+
+ // TODO: There should probably be a general way to disable content drawing
+ // for all drawables. However the button to toggle this is currently
+ // only present for Track instances.
+ if (!this.content_visible) { return; }
// HACK: ReferenceTrack can draw without dataset ID, but other tracks cannot.
if ( !(this instanceof ReferenceTrack) && (!this.dataset_id) ) { return; }
@@ -2694,7 +2768,7 @@
w_scale = width / range,
resolution = this.view.resolution,
parent_element = $("<div style='position: relative;'></div>");
-
+
// For overview, adjust high, low, resolution, and w_scale.
if (this.is_overview) {
low = this.view.max_low;
@@ -3028,7 +3102,8 @@
this.min_height_px = 16;
this.max_height_px = 400;
- this.height_px = 80;
+ // Default height for new tracks, should be a defined constant?
+ this.height_px = 32;
this.hda_ldda = hda_ldda;
this.dataset_id = dataset_id;
this.original_dataset_id = dataset_id;
@@ -3076,8 +3151,10 @@
var drag_control = $( "<div class='track-resize'>" )
// Control shows on hover over track, stays while dragging
$(track.container_div).hover( function() {
- in_handle = true;
- drag_control.show();
+ if ( track.content_visible ) {
+ in_handle = true;
+ drag_control.show();
+ }
}, function() {
in_handle = false;
if ( ! in_drag ) { drag_control.hide(); }
@@ -3108,9 +3185,20 @@
track.container_div.addClass( "line-track" );
var data = result.data;
if ( isNaN(parseFloat(track.prefs.min_value)) || isNaN(parseFloat(track.prefs.max_value)) ) {
- track.prefs.min_value = data.min;
- track.prefs.max_value = data.max;
+ // Compute default minimum and maximum values
+ var min_value = data.min
+ var max_value = data.max
+ // If mean and sd are present, use them to compute a ~95% window
+ // but only if it would shrink the range on one side
+ min_value = Math.floor( Math.min( 0, Math.max( min_value, data.mean - 2 * data.sd ) ) )
+ max_value = Math.ceil( Math.max( 0, Math.min( max_value, data.mean + 2 * data.sd ) ) )
+ // Update the prefs
+ track.prefs.min_value = min_value;
+ track.prefs.max_value = max_value;
// Update the config
+ // FIXME: we should probably only save this when the user explicately sets it
+ // since we lose the ability to compute it on the fly (when changing
+ // chromosomes for example).
$('#track_' + track.dataset_id + '_minval').val(track.prefs.min_value);
$('#track_' + track.dataset_id + '_maxval').val(track.prefs.max_value);
}
@@ -3179,7 +3267,8 @@
{ key: 'name', label: 'Name', type: 'text', default_value: name },
{ key: 'block_color', label: 'Block color', type: 'color', default_value: get_random_color() },
{ key: 'label_color', label: 'Label color', type: 'color', default_value: 'black' },
- { key: 'show_counts', label: 'Show summary counts', type: 'bool', default_value: true },
+ { key: 'show_counts', label: 'Show summary counts', type: 'bool', default_value: true,
+ help: 'Show the number of items in each bin when drawing summary histogram' },
{ key: 'mode', type: 'string', default_value: this.mode, hidden: true },
],
saved_values: prefs,
@@ -3527,7 +3616,7 @@
var filter_height_scaler = (this.filters_manager.height_filter ? new FilterScaler(this.filters_manager.height_filter) : null);
// HACK: ref_seq will only be defined for ReadTracks, and only the ReadPainter accepts that argument
var painter = new (this.painter)(filtered, tile_low, tile_high, this.prefs, mode, filter_alpha_scaler, filter_height_scaler, ref_seq);
- var required_height = Math.max(MIN_TRACK_HEIGHT, painter.get_required_height(slots_required));
+ var required_height = Math.max(MIN_TRACK_HEIGHT, painter.get_required_height(slots_required,width));
var canvas = this.view.canvas_manager.new_canvas();
var feature_mapper = null;
@@ -4057,6 +4146,7 @@
this.feature_positions = {};
this.slot_height = slot_height;
this.translation = 0;
+ this.y_translation = 0;
};
/**
@@ -4078,7 +4168,7 @@
*/
FeaturePositionMapper.prototype.get_feature_data = function(x, y) {
// Find slot using Y.
- var slot = Math.floor( y/this.slot_height ),
+ var slot = Math.floor( (y-this.y_translation)/this.slot_height ),
feature_dict;
// May not be over a slot due to padding, margin, etc.
@@ -4108,15 +4198,23 @@
FeaturePainter.prototype.default_prefs = { block_color: "#FFF", connector_color: "#FFF" };
extend(FeaturePainter.prototype, {
- get_required_height: function(rows_required) {
+ get_required_height: function(rows_required, width) {
// y_scale is the height per row
var required_height = y_scale = this.get_row_height(), mode = this.mode;
// If using a packing mode, need to multiply by the number of slots used
if (mode === "no_detail" || mode === "Squish" || mode === "Pack") {
required_height = rows_required * y_scale;
}
+ return required_height + this.get_top_padding(width) + this.get_bottom_padding(width);
+ },
+ /** Extra padding before first row of features */
+ get_top_padding: function(width) {
+ return 0;
+ },
+ /** Extra padding after last row of features */
+ get_bottom_padding: function(width) {
// Pad bottom by half a row, at least 5 px
- return required_height + Math.max( Math.round( y_scale / 2 ), 5 );
+ return Math.max( Math.round( this.get_row_height() / 2 ), 5 )
},
/**
* Draw data on ctx using slots and within the rectangle defined by width and height. Returns
@@ -4153,6 +4251,7 @@
}
ctx.restore();
+ feature_mapper.y_translation = this.get_top_padding(width);
return feature_mapper;
},
/**
@@ -4179,6 +4278,10 @@
var LinkedFeaturePainter = function(data, view_start, view_end, prefs, mode, alpha_scaler, height_scaler) {
FeaturePainter.call(this, data, view_start, view_end, prefs, mode, alpha_scaler, height_scaler);
+ // Whether to draw a single connector in the background that spans the entire feature (the intron fishbone)
+ this.draw_background_connector = true;
+ // Whether to call draw_connector for every pair of blocks
+ this.draw_individual_connectors = false;
};
extend(LinkedFeaturePainter.prototype, FeaturePainter.prototype, {
@@ -4216,7 +4319,7 @@
f_end = Math.ceil( Math.min(width, Math.max(0, (feature_end - tile_low) * w_scale)) ),
draw_start = f_start,
draw_end = f_end,
- y_center = (mode === "Dense" ? 0 : (0 + slot)) * y_scale,
+ y_center = (mode === "Dense" ? 0 : (0 + slot)) * y_scale + this.get_top_padding(width),
thickness, y_start, thick_start = null, thick_end = null,
// TODO: is there any reason why block, label color cannot be set at the Painter level?
block_color = this.prefs.block_color,
@@ -4279,38 +4382,51 @@
// needed. This ensures that whole feature, regardless of whether it starts with
// a block, is visible.
//
-
- // Draw whole feature as connector/intron.
+
+ // Compute y axis center position and height
var cur_y_center, cur_height;
if (mode === "Squish" || mode === "Dense") {
- ctx.fillStyle = CONNECTOR_COLOR;
cur_y_center = y_center + Math.floor(SQUISH_FEATURE_HEIGHT/2) + 1;
cur_height = 1;
}
else { // mode === "Pack"
if (feature_strand) {
- var cur_y_center = y_center;
- var cur_height = thick_height;
- if (feature_strand === "+") {
- ctx.fillStyle = ctx.canvas.manager.get_pattern( 'right_strand' );
- } else if (feature_strand === "-") {
- ctx.fillStyle = ctx.canvas.manager.get_pattern( 'left_strand' );
- }
+ cur_y_center = y_center;
+ cur_height = thick_height;
}
else {
- ctx.fillStyle = CONNECTOR_COLOR;
cur_y_center += (SQUISH_FEATURE_HEIGHT/2) + 1;
cur_height = 1;
}
}
- ctx.fillRect(f_start, cur_y_center, f_end - f_start, cur_height);
+
+ // Draw whole feature as connector/intron.
+ if ( this.draw_background_connector ) {
+ if (mode === "Squish" || mode === "Dense") {
+ ctx.fillStyle = CONNECTOR_COLOR;
+ }
+ else { // mode === "Pack"
+ if (feature_strand) {
+ if (feature_strand === "+") {
+ ctx.fillStyle = ctx.canvas.manager.get_pattern( 'right_strand' );
+ } else if (feature_strand === "-") {
+ ctx.fillStyle = ctx.canvas.manager.get_pattern( 'left_strand' );
+ }
+ }
+ else {
+ ctx.fillStyle = CONNECTOR_COLOR;
+ }
+ }
+ ctx.fillRect(f_start, cur_y_center, f_end - f_start, cur_height);
+ }
// Draw blocks.
var start_and_height;
for (var k = 0, k_len = feature_blocks.length; k < k_len; k++) {
var block = feature_blocks[k],
block_start = Math.floor( Math.max(0, (block[0] - tile_low) * w_scale) ),
- block_end = Math.ceil( Math.min(width, Math.max((block[1] - tile_low) * w_scale)) );
+ block_end = Math.ceil( Math.min(width, Math.max((block[1] - tile_low) * w_scale)) ),
+ last_block_start, last_block_end;
// Skip drawing if block not on tile.
if (block_start > block_end) { continue; }
@@ -4341,6 +4457,12 @@
ctx.fillRect(block_thick_start, y_center + 1, block_thick_end - block_thick_start, thick_height );
}
}
+ // Draw individual connectors if required
+ if ( this.draw_individual_connectors && last_block_start ) {
+ this.draw_connector( ctx, last_block_start, last_block_end, block_start, block_end, y_center );
+ }
+ last_block_start = block_start;
+ last_block_end = block_end;
}
// FIXME: Height scaling only works in Pack mode right now.
@@ -4673,11 +4795,54 @@
}
});
+var ArcLinkedFeaturePainter = function(data, view_start, view_end, prefs, mode, alpha_scaler, height_scaler) {
+ LinkedFeaturePainter.call(this, data, view_start, view_end, prefs, mode, alpha_scaler, height_scaler);
+ // Need to know the longest feature length for adding spacing
+ this.longest_feature_length = this.calculate_longest_feature_length();
+ this.draw_background_connector = false;
+ this.draw_individual_connectors = true;
+};
+
+extend(ArcLinkedFeaturePainter.prototype, FeaturePainter.prototype, LinkedFeaturePainter.prototype, {
+
+ calculate_longest_feature_length: function () {
+ var longest_feature_length = 0;
+ for (var i = 0, len = this.data.length; i < len; i++) {
+ var feature = this.data[i], feature_start = feature[1], feature_end = feature[2];
+ longest_feature_length = Math.max( longest_feature_length, feature_end - feature_start );
+ }
+ return longest_feature_length;
+ },
+
+ get_top_padding: function( width ) {
+ var view_range = this.view_end - this.view_start,
+ w_scale = width / view_range;
+ return Math.min( 128, Math.ceil( ( this.longest_feature_length / 2 ) * w_scale ) );
+ },
+
+ draw_connector: function( ctx, block1_start, block1_end, block2_start, block2_end, y_center ) {
+ // Arc drawing -- from closest endpoints
+ var x_center = ( block1_end + block2_start ) / 2,
+ radius = block2_start - x_center;
+ // For full half circles
+ var angle1 = Math.PI, angle2 = 0;
+ if ( radius > 0 ) {
+ ctx.beginPath();
+ ctx.arc( x_center, y_center, block2_start - x_center, Math.PI, 0 );
+ ctx.stroke();
+ }
+ }
+});
+
+
+
+
exports.Scaler = Scaler;
exports.SummaryTreePainter = SummaryTreePainter;
exports.LinePainter = LinePainter;
exports.LinkedFeaturePainter = LinkedFeaturePainter;
exports.ReadPainter = ReadPainter;
+exports.ArcLinkedFeaturePainter = ArcLinkedFeaturePainter;
// End painters_module encapsulation
};
@@ -4708,4 +4873,4 @@
for ( key in modules.trackster ) {
target[key] = modules.trackster[key];
}
-})(window);
\ No newline at end of file
+})(window);
diff -r ba739e96c1a14d649c37655cecfc5b835ab343d2 -r de594b3589e575e3347c75a2d3fad33b01db35dd templates/tracks/browser.mako
--- a/templates/tracks/browser.mako
+++ b/templates/tracks/browser.mako
@@ -42,7 +42,7 @@
<script type='text/javascript' src="${h.url_for('/static/scripts/excanvas.js')}"></script><![endif]-->
-${h.js( "galaxy.base", "galaxy.panels", "json2", "jquery", "jstorage", "jquery.event.drag", "jquery.mousewheel", "jquery.autocomplete", "trackster", "trackster_ui", "jquery.ui.sortable.slider", "farbtastic", "jquery.tipsy" )}
+${h.js( "galaxy.base", "galaxy.panels", "json2", "jquery", "jstorage", "jquery.event.drag", "jquery.event.hover","jquery.mousewheel", "jquery.autocomplete", "trackster", "trackster_ui", "jquery.ui.sortable.slider", "farbtastic", "jquery.tipsy" )}
<script type="text/javascript">
//
diff -r ba739e96c1a14d649c37655cecfc5b835ab343d2 -r de594b3589e575e3347c75a2d3fad33b01db35dd templates/workflow/editor.mako
--- a/templates/workflow/editor.mako
+++ b/templates/workflow/editor.mako
@@ -213,7 +213,7 @@
show_workflow_parameters();
},
beforeSubmit: function( data ) {
- show_modal( "Loading workflow", "progress" );
+ show_message( "Loading workflow", "progress" );
}
});
}
@@ -650,7 +650,7 @@
};
var save_current_workflow = function ( eventObj, success_callback ) {
- show_modal( "Saving workflow", "progress" );
+ show_message( "Saving workflow", "progress" );
workflow.check_changes_in_active_form();
if (!workflow.has_changes) {
hide_modal();
https://bitbucket.org/galaxy/galaxy-central/changeset/a9f7d94aedb5/
changeset: a9f7d94aedb5
user: james_taylor
date: 2011-11-07 18:34:23
summary: Trackster: allow selecting the arc connector style for feature tracks, add support for select config parameter type
affected #: 1 file
diff -r de594b3589e575e3347c75a2d3fad33b01db35dd -r a9f7d94aedb5ec5a7fe6e9f832b98c45a4c473d3 static/scripts/trackster.js
--- a/static/scripts/trackster.js
+++ b/static/scripts/trackster.js
@@ -2127,10 +2127,21 @@
var value = track_config.values[ param.key ];
var row = $("<div class='form-row' />").appendTo( container );
row.append( $('<label />').attr("for", id ).text( param.label + ":" ) );
+ // Draw parameter as checkbox
if ( param.type === 'bool' ) {
row.append( $('<input type="checkbox" />').attr("id", id ).attr("name", id ).attr( 'checked', value ) );
+ // Draw parameter as textbox
} else if ( param.type === 'text' ) {
row.append( $('<input type="text"/>').attr("id", id ).val(value).click( function() { $(this).select() }));
+ // Draw paramter as select area
+ } else if ( param.type == 'select' ) {
+ var select = $('<select />').attr("id", id);
+ for ( var i = 0; i < param.options.length; i++ ) {
+ $("<option/>").text( param.options[i].label ).attr( "value", param.options[i].value ).appendTo( select );
+ }
+ select.val( value );
+ row.append( select );
+ // Draw parameter as color picker
} else if ( param.type === 'color' ) {
var input = $('<input />').attr("id", id ).attr("name", id ).val( value );
// Color picker in tool tip style float
@@ -3269,12 +3280,15 @@
{ key: 'label_color', label: 'Label color', type: 'color', default_value: 'black' },
{ key: 'show_counts', label: 'Show summary counts', type: 'bool', default_value: true,
help: 'Show the number of items in each bin when drawing summary histogram' },
+ { key: 'connector_style', label: 'Connector style', type: 'select', default_value: 'fishbones',
+ options: [ { label: 'Line with arrows', value: 'fishbone' }, { label: 'Arcs', value: 'arcs' } ] },
{ key: 'mode', type: 'string', default_value: this.mode, hidden: true },
],
saved_values: prefs,
onchange: function() {
track.set_name(track.prefs.name);
track.tile_cache.clear();
+ track.set_painter_from_config();
track.request_draw();
}
});
@@ -3297,6 +3311,14 @@
this.painter = painters.LinkedFeaturePainter;
};
extend(FeatureTrack.prototype, Drawable.prototype, TiledTrack.prototype, {
+ set_painter_from_config: function() {
+ console.log( this, this.config );
+ if ( this.config.values['connector_style'] == 'arcs' ) {
+ this.painter = painters.ArcLinkedFeaturePainter;
+ } else {
+ this.painter = painters.LinkedFeaturePainter;
+ }
+ },
/**
* Actions to be taken after draw has been completed. Draw is completed when all tiles have been
* drawn/fetched and shown.
https://bitbucket.org/galaxy/galaxy-central/changeset/0f5ab41da4bd/
changeset: 0f5ab41da4bd
user: james_taylor
date: 2011-11-07 21:36:46
summary: Trackster: fix loading of track connector style when initializing from saved
affected #: 1 file
diff -r a9f7d94aedb5ec5a7fe6e9f832b98c45a4c473d3 -r 0f5ab41da4bd2e605b9f0785a1e35a7a0d5983d6 static/scripts/trackster.js
--- a/static/scripts/trackster.js
+++ b/static/scripts/trackster.js
@@ -3308,7 +3308,8 @@
this.data_manager = new DataManager(20, this);
this.left_offset = 200;
- this.painter = painters.LinkedFeaturePainter;
+ // this.painter = painters.LinkedFeaturePainter;
+ this.set_painter_from_config();
};
extend(FeatureTrack.prototype, Drawable.prototype, TiledTrack.prototype, {
set_painter_from_config: function() {
https://bitbucket.org/galaxy/galaxy-central/changeset/0c65c410ccc4/
changeset: 0c65c410ccc4
user: james_taylor
date: 2011-11-07 22:59:15
summary: Trackster: code for adding multiple bookmarks from a dataset. Currently the button is commented out until this can be made more usable
affected #: 7 files
diff -r 0f5ab41da4bd2e605b9f0785a1e35a7a0d5983d6 -r 0c65c410ccc4b15c72fcb50a5c3c3e982f0b446b lib/galaxy/visualization/tracks/data_providers.py
--- a/lib/galaxy/visualization/tracks/data_providers.py
+++ b/lib/galaxy/visualization/tracks/data_providers.py
@@ -363,14 +363,18 @@
for large datasets.
"""
- def get_iterator( self, chrom, start, end ):
+ def get_iterator( self, chrom=None, start=None, end=None ):
def line_filter_iter():
for line in open( self.original_dataset.file_name ):
+ if line.startswith( "track" ) or line.startswith( "browser" ):
+ continue
feature = line.split()
feature_chrom = feature[0]
feature_start = int( feature[1] )
feature_end = int( feature[2] )
- if feature_chrom != chrom or feature_start > int( end ) or feature_end < int( start ):
+ if ( chrom is not None and feature_chrom != chrom ) \
+ or ( start is not None and feature_start > int( end ) ) \
+ or ( end is not None and feature_end < int( start ) ):
continue
yield line
return line_filter_iter()
diff -r 0f5ab41da4bd2e605b9f0785a1e35a7a0d5983d6 -r 0c65c410ccc4b15c72fcb50a5c3c3e982f0b446b lib/galaxy/web/controllers/tracks.py
--- a/lib/galaxy/web/controllers/tracks.py
+++ b/lib/galaxy/web/controllers/tracks.py
@@ -13,7 +13,7 @@
from galaxy.web.framework import simplejson
from galaxy.web.framework.helpers import time_ago, grids
from galaxy.util.bunch import Bunch
-from galaxy.datatypes.interval import Gff
+from galaxy.datatypes.interval import Gff, Bed
from galaxy.model import NoConverterException, ConverterDependencyException
from galaxy.visualization.tracks.data_providers import *
from galaxy.visualization.tracks.visual_analytics import get_tool_def, get_dataset_job
@@ -246,6 +246,27 @@
"tool": get_tool_def( trans, dataset )
}
return track
+
+ @web.json
+ def bookmarks_from_dataset( self, trans, hda_id=None, ldda_id=None ):
+ if hda_id:
+ hda_ldda = "hda"
+ dataset = self.get_dataset( trans, hda_id, check_ownership=False, check_accessible=True )
+ elif ldda_id:
+ hda_ldda = "ldda"
+ dataset = trans.sa_session.query( trans.app.model.LibraryDatasetDatasetAssociation ).get( trans.security.decode_id( ldda_id ) )
+ rows = []
+ if isinstance( dataset.datatype, Bed ):
+ data = RawBedDataProvider( original_dataset=dataset ).get_iterator()
+ for i, line in enumerate( data ):
+ if ( i > 500 ): break
+ fields = line.split()
+ location = name = "%s:%s-%s" % ( fields[0], fields[1], fields[2] )
+ if len( fields ) > 3:
+ name = fields[4]
+ rows.append( [location, name] )
+ return { 'data': rows }
+
@web.expose
@web.require_login()
diff -r 0f5ab41da4bd2e605b9f0785a1e35a7a0d5983d6 -r 0c65c410ccc4b15c72fcb50a5c3c3e982f0b446b static/june_2007_style/base.css.tmpl
--- a/static/june_2007_style/base.css.tmpl
+++ b/static/june_2007_style/base.css.tmpl
@@ -909,6 +909,14 @@
-sprite-group: fugue;
-sprite-image: fugue/plus-circle.png;
}
+.icon-button.plus-button {
+ -sprite-group: fugue;
+ -sprite-image: fugue/plus-button.png;
+}
+.icon-button.gear {
+ -sprite-group: fugue;
+ -sprite-image: fugue/gear.png;
+}
.tipsy {
padding: 5px;
diff -r 0f5ab41da4bd2e605b9f0785a1e35a7a0d5983d6 -r 0c65c410ccc4b15c72fcb50a5c3c3e982f0b446b static/june_2007_style/blue/base.css
--- a/static/june_2007_style/blue/base.css
+++ b/static/june_2007_style/blue/base.css
@@ -163,6 +163,8 @@
.icon-button.vis-chart{background:url(fugue.png) no-repeat 0px -286px;}
.icon-button.go-to-full-screen{background:url(fugue.png) no-repeat 0px -312px;}
.icon-button.import{background:url(fugue.png) no-repeat 0px -338px;}
+.icon-button.plus-button{background:url(fugue.png) no-repeat 0px -364px;}
+.icon-button.gear{background:url(fugue.png) no-repeat 0px -390px;}
.tipsy{padding:5px;font-size:10px;filter:alpha(opacity=80);background-repeat:no-repeat;background-image:url(../images/tipsy.gif);}
.tipsy-inner{padding:5px 8px 4px 8px;background-color:black;color:white;max-width:200px;text-align:center;}
.tipsy-north{background-position:top center;}
@@ -171,7 +173,7 @@
.tipsy-west{background-position:left center;}
.editable-text{cursor:pointer;}
.editable-text:hover{cursor:text;border:dotted #999999 1px;}
-.text-and-autocomplete-select{background:url(fugue.png) no-repeat right -364px;}
+.text-and-autocomplete-select{background:url(fugue.png) no-repeat right -416px;}
.icon-button.multiinput{background:url(../images/documents-stack.png) no-repeat;cursor:pointer;float:none;display:inline-block;margin-left:10px;}
.icon-button.multiinput.disabled{background:url(../images/documents-stack-faded.png) no-repeat;cursor:auto;}
.workflow-invocation-complete{border:solid 1px #6A6;border-left-width:5px;margin:10px 0;padding-left:5px;}
diff -r 0f5ab41da4bd2e605b9f0785a1e35a7a0d5983d6 -r 0c65c410ccc4b15c72fcb50a5c3c3e982f0b446b static/june_2007_style/blue/fugue.png
Binary file static/june_2007_style/blue/fugue.png has changed
diff -r 0f5ab41da4bd2e605b9f0785a1e35a7a0d5983d6 -r 0c65c410ccc4b15c72fcb50a5c3c3e982f0b446b static/scripts/trackster.js
--- a/static/scripts/trackster.js
+++ b/static/scripts/trackster.js
@@ -3313,7 +3313,6 @@
};
extend(FeatureTrack.prototype, Drawable.prototype, TiledTrack.prototype, {
set_painter_from_config: function() {
- console.log( this, this.config );
if ( this.config.values['connector_style'] == 'arcs' ) {
this.painter = painters.ArcLinkedFeaturePainter;
} else {
diff -r 0f5ab41da4bd2e605b9f0785a1e35a7a0d5983d6 -r 0c65c410ccc4b15c72fcb50a5c3c3e982f0b446b templates/tracks/browser.mako
--- a/templates/tracks/browser.mako
+++ b/templates/tracks/browser.mako
@@ -110,6 +110,52 @@
}
});
};
+
+ /**
+ * Use a popup grid to bookmarks from a dataset.
+ */
+ var add_bookmarks = function() {
+ show_modal( "Select dataset for new bookmarks", "progress" );
+ $.ajax({
+ url: "${h.url_for( action='list_histories' )}",
+ data: { "f-dbkey": view.dbkey },
+ error: function() { alert( "Grid failed" ); },
+ success: function(table_html) {
+ show_modal(
+ "Select dataset for new bookmarks",
+ table_html, {
+ "Cancel": function() {
+ hide_modal();
+ },
+ "Insert": function() {
+ // Just use the first selected
+ $('input[name=id]:checked,input[name=ldda_ids]:checked').first().each(function(){
+ var data, id = $(this).val();
+ if ($(this).attr("name") === "id") {
+ data = { hda_id: id };
+ } else {
+ data = { ldda_id: id};
+ }
+
+ $.ajax({
+ url: "${h.url_for( action='bookmarks_from_dataset' )}",
+ data: data,
+ dataType: "json",
+ }).then( function(data) {
+ for( i = 0; i < data.data.length; i++ ) {
+ var row = data.data[i];
+ console.log( row[0], row[1] );
+ add_bookmark( row[0], row[1] );
+ }
+ });
+ });
+ hide_modal();
+ }
+ }
+ );
+ }
+ });
+ };
$(function() {
// Manual tipsy config because default gravity is S and cannot be changed.
@@ -240,7 +286,13 @@
annotation = "Bookmark description";
return add_bookmark(position, annotation);
});
-
+
+ // make_popupmenu( $("#bookmarks-more-button"), {
+ // "Add from BED dataset": function() {
+ // add_bookmarks();
+ // }
+ // });
+
init_keyboard_nav(view);
};
@@ -271,14 +323,15 @@
<div class="unified-panel-header" unselectable="on"><div class="unified-panel-header-inner">
+ <div style="float: right">
+ <a id="add-bookmark-button" class='icon-button menu-button plus-button' href="javascript:void(0);" title="Add bookmark"></a>
+ ## <a id="bookmarks-more-button" class='icon-button menu-button gear popup' href="javascript:void(0);" title="More actions"></a>
+ </div>
Bookmarks
</div></div><div class="unified-panel-body" style="overflow: auto;"><div id="bookmarks-container"></div>
- <div>
- <a class="icon-button import" style="margin-left: .5em; width: 100%" original-title="Add Bookmark" id="add-bookmark-button" href="javascript:void(0);">Add Bookmark</a>
- </div></div></%def>
https://bitbucket.org/galaxy/galaxy-central/changeset/8b91dd6872df/
changeset: 8b91dd6872df
user: james_taylor
date: 2011-11-08 00:22:47
summary: Trackster: fix strand drawing for single blocks with no thin/thick part
affected #: 1 file
diff -r 0c65c410ccc4b15c72fcb50a5c3c3e982f0b446b -r 8b91dd6872df54ef7d479b8c814241e2aabf12f4 static/scripts/trackster.js
--- a/static/scripts/trackster.js
+++ b/static/scripts/trackster.js
@@ -4385,17 +4385,17 @@
// Draw feature/feature blocks + connectors.
if (!feature_blocks) {
// If there are no blocks, treat the feature as one big exon.
- if ( feature.strand ) {
- if (feature.strand === "+") {
+ ctx.fillStyle = block_color;
+ ctx.fillRect(f_start, y_center + 1, f_end - f_start, thick_height);
+ // If strand is specified, draw arrows over feature
+ if ( feature_strand ) {
+ if (feature_strand === "+") {
ctx.fillStyle = ctx.canvas.manager.get_pattern( 'right_strand_inv' );
- } else if (feature.strand === "-") {
+ } else if (feature_strand === "-") {
ctx.fillStyle = ctx.canvas.manager.get_pattern( 'left_strand_inv' );
}
+ ctx.fillRect(f_start, y_center + 1, f_end - f_start, thick_height);
}
- else { // No strand.
- ctx.fillStyle = block_color;
- }
- ctx.fillRect(f_start, y_center, f_end - f_start, thick_height);
} else {
//
// There are feature blocks and mode is either Squish or Pack.
https://bitbucket.org/galaxy/galaxy-central/changeset/132798922d53/
changeset: 132798922d53
user: james_taylor
date: 2011-11-08 17:18:24
summary: Automated merge with ssh://bitbucket.org/galaxy/galaxy-central
affected #: 15 files
diff -r d161bb98374369c0cc3aa77eed4e162273e64bb3 -r 132798922d53213d6ca4e1596619f254bdd582d0 eggs.ini
--- a/eggs.ini
+++ b/eggs.ini
@@ -12,7 +12,7 @@
no_auto = pbs_python DRMAA_python
[eggs:platform]
-bx_python = 0.7.0
+bx_python = 0.7.1
Cheetah = 2.2.2
ctypes = 1.0.2
DRMAA_python = 0.2
@@ -67,7 +67,7 @@
psycopg2 = _8.4.2_static
pysqlite = _3.6.17_static
MySQL_python = _5.1.41_static
-bx_python = _494c2d1d68b3_rebuild1
+bx_python = _7b95ff194725
GeneTrack = _dev_48da9e998f0caf01c5be731e926f4b0481f658f0
SQLAlchemy = _dev_r6498
pysam = _kanwei_b10f6e722e9a
diff -r d161bb98374369c0cc3aa77eed4e162273e64bb3 -r 132798922d53213d6ca4e1596619f254bdd582d0 lib/galaxy/datatypes/converters/interval_to_summary_tree_converter.py
--- a/lib/galaxy/datatypes/converters/interval_to_summary_tree_converter.py
+++ b/lib/galaxy/datatypes/converters/interval_to_summary_tree_converter.py
@@ -50,4 +50,4 @@
st.write(out_fname)
if __name__ == "__main__":
- main()
\ No newline at end of file
+ main()
diff -r d161bb98374369c0cc3aa77eed4e162273e64bb3 -r 132798922d53213d6ca4e1596619f254bdd582d0 lib/galaxy/visualization/tracks/data_providers.py
--- a/lib/galaxy/visualization/tracks/data_providers.py
+++ b/lib/galaxy/visualization/tracks/data_providers.py
@@ -2,14 +2,15 @@
Data providers for tracks visualizations.
"""
-import sys
-from math import ceil, log
+import sys, time
+from math import ceil, log, sqrt
import pkg_resources
pkg_resources.require( "bx-python" )
if sys.version_info[:2] == (2, 4):
pkg_resources.require( "ctypes" )
pkg_resources.require( "pysam" )
pkg_resources.require( "numpy" )
+import numpy
from galaxy.datatypes.util.gff_util import *
from galaxy.util.json import from_json_string
from bx.interval_index_file import Indexes
@@ -362,14 +363,18 @@
for large datasets.
"""
- def get_iterator( self, chrom, start, end ):
+ def get_iterator( self, chrom=None, start=None, end=None ):
def line_filter_iter():
for line in open( self.original_dataset.file_name ):
+ if line.startswith( "track" ) or line.startswith( "browser" ):
+ continue
feature = line.split()
feature_chrom = feature[0]
feature_start = int( feature[1] )
feature_end = int( feature[2] )
- if feature_chrom != chrom or feature_start > int( end ) or feature_end < int( start ):
+ if ( chrom is not None and feature_chrom != chrom ) \
+ or ( start is not None and feature_start > int( end ) ) \
+ or ( end is not None and feature_end < int( start ) ):
continue
yield line
return line_filter_iter()
@@ -740,40 +745,73 @@
# Bigwig has the possibility of it being a standalone bigwig file, in which case we use
# original_dataset, or coming from wig->bigwig conversion in which we use converted_dataset
f, bbi = self._get_dataset()
-
+
+ # If the stats kwarg was provide, we compute overall summary data for
+ # the entire chromosome, but no reduced data -- currently only
+ # providing values used by trackster to determine the default range
if 'stats' in kwargs:
- all_dat = bbi.query(chrom, 0, 2147483647, 1)
+ # FIXME: use actual chromosome size
+ summary = bbi.summarize( chrom, 0, 214783647, 1 )
f.close()
- if all_dat is None:
+ if summary is None:
return None
-
- all_dat = all_dat[0] # only 1 summary
- return { 'data' : { 'max': float( all_dat['max'] ), \
- 'min': float( all_dat['min'] ), \
- 'total_frequency': float( all_dat['coverage'] ) } \
- }
-
+ else:
+ # Does the summary contain any defined values?
+ valid_count = summary.valid_count[0]
+ if summary.valid_count < 1:
+ return None
+
+ # Compute $\mu \pm 2\sigma$ to provide an estimate for upper and lower
+ # bounds that contain ~95% of the data.
+ mean = summary.sum_data[0] / valid_count
+ var = summary.sum_squares[0] - mean
+ if valid_count > 1:
+ var /= valid_count - 1
+ sd = numpy.sqrt( var )
+
+ return dict( data=dict( min=summary.min_val[0], max=summary.max_val[0], mean=mean, sd=sd ) )
+
start = int(start)
end = int(end)
+
+ # The following seems not to work very well, for example it will only return one
+ # data point if the tile is 1280px wide. Not sure what the intent is.
+
# The first zoom level for BBI files is 640. If too much is requested, it will look at each block instead
# of summaries. The calculation done is: zoom <> (end-start)/num_points/2.
# Thus, the optimal number of points is (end-start)/num_points/2 = 640
# num_points = (end-start) / 1280
- num_points = (end-start) / 1280
- if num_points < 1:
- num_points = end - start
- else:
- num_points = min(num_points, 500)
+ #num_points = (end-start) / 1280
+ #if num_points < 1:
+ # num_points = end - start
+ #else:
+ # num_points = min(num_points, 500)
- data = bbi.query(chrom, start, end, num_points)
+ # For now, we'll do 1000 data points by default However, the summaries
+ # don't seem to work when a summary pixel corresponds to less than one
+ # datapoint, so we prevent that.
+ # FIXME: need to switch over to using the full data at high levels of
+ # detail.
+ num_points = min( 1000, end - start )
+
+ summary = bbi.summarize( chrom, start, end, num_points )
f.close()
+
+ result = []
+
+ if summary:
+ mean = summary.sum_data / summary.valid_count
+
+ ## Standard deviation by bin, not yet used
+ ## var = summary.sum_squares - mean
+ ## var /= minimum( valid_count - 1, 1 )
+ ## sd = sqrt( var )
- pos = start
- step_size = (end - start) / num_points
- result = []
- if data:
- for dat_dict in data:
- result.append( (pos, float_nan(dat_dict['mean']) ) )
+ pos = start
+ step_size = (end - start) / num_points
+
+ for i in range( num_points ):
+ result.append( (pos, float_nan( mean[i] ) ) )
pos += step_size
return { 'data': result }
diff -r d161bb98374369c0cc3aa77eed4e162273e64bb3 -r 132798922d53213d6ca4e1596619f254bdd582d0 lib/galaxy/web/controllers/tracks.py
--- a/lib/galaxy/web/controllers/tracks.py
+++ b/lib/galaxy/web/controllers/tracks.py
@@ -13,7 +13,7 @@
from galaxy.web.framework import simplejson
from galaxy.web.framework.helpers import time_ago, grids
from galaxy.util.bunch import Bunch
-from galaxy.datatypes.interval import Gff
+from galaxy.datatypes.interval import Gff, Bed
from galaxy.model import NoConverterException, ConverterDependencyException
from galaxy.visualization.tracks.data_providers import *
from galaxy.visualization.tracks.visual_analytics import get_tool_def, get_dataset_job
@@ -246,6 +246,27 @@
"tool": get_tool_def( trans, dataset )
}
return track
+
+ @web.json
+ def bookmarks_from_dataset( self, trans, hda_id=None, ldda_id=None ):
+ if hda_id:
+ hda_ldda = "hda"
+ dataset = self.get_dataset( trans, hda_id, check_ownership=False, check_accessible=True )
+ elif ldda_id:
+ hda_ldda = "ldda"
+ dataset = trans.sa_session.query( trans.app.model.LibraryDatasetDatasetAssociation ).get( trans.security.decode_id( ldda_id ) )
+ rows = []
+ if isinstance( dataset.datatype, Bed ):
+ data = RawBedDataProvider( original_dataset=dataset ).get_iterator()
+ for i, line in enumerate( data ):
+ if ( i > 500 ): break
+ fields = line.split()
+ location = name = "%s:%s-%s" % ( fields[0], fields[1], fields[2] )
+ if len( fields ) > 3:
+ name = fields[4]
+ rows.append( [location, name] )
+ return { 'data': rows }
+
@web.expose
@web.require_login()
@@ -528,6 +549,7 @@
if not standalone_provider.has_data( chrom ):
return messages.NO_DATA
valid_chroms = standalone_provider.valid_chroms()
+
# Have data if we get here
return { "status": messages.DATA, "valid_chroms": valid_chroms }
@@ -1041,4 +1063,4 @@
return_message = message
elif return_message == None and message == messages.PENDING:
return_message = message
- return return_message
\ No newline at end of file
+ return return_message
diff -r d161bb98374369c0cc3aa77eed4e162273e64bb3 -r 132798922d53213d6ca4e1596619f254bdd582d0 static/june_2007_style/base.css.tmpl
--- a/static/june_2007_style/base.css.tmpl
+++ b/static/june_2007_style/base.css.tmpl
@@ -231,6 +231,10 @@
padding: 3px 0 0 1em;
}
+.form-row .help {
+ color: #666;
+}
+
select, input, textarea {
font: inherit;
}
@@ -905,6 +909,14 @@
-sprite-group: fugue;
-sprite-image: fugue/plus-circle.png;
}
+.icon-button.plus-button {
+ -sprite-group: fugue;
+ -sprite-image: fugue/plus-button.png;
+}
+.icon-button.gear {
+ -sprite-group: fugue;
+ -sprite-image: fugue/gear.png;
+}
.tipsy {
padding: 5px;
diff -r d161bb98374369c0cc3aa77eed4e162273e64bb3 -r 132798922d53213d6ca4e1596619f254bdd582d0 static/june_2007_style/blue/base.css
--- a/static/june_2007_style/blue/base.css
+++ b/static/june_2007_style/blue/base.css
@@ -43,6 +43,7 @@
div.form-row-input{float:left;}
div.form-row-input label{font-weight:normal;display:inline;}
div.form-row-error-message{width:300px;float:left;color:red;font-weight:bold;padding:3px 0 0 1em;}
+.form-row .help{color:#666;}
select,input,textarea{font:inherit;}
select,textarea,input[type="text"],input[type="file"],input[type="password"]{-webkit-box-sizing:border-box;max-width:300px;}
.errormessagelarge,.warningmessagelarge,.donemessagelarge,.infomessagelarge{padding:10px;padding-left:52px;min-height:32px;border:1px solid #AA6666;background-color:#FFCCCC;background-image:url(error_message_icon.png);background-repeat:no-repeat;background-position:10px 10px;}
@@ -162,6 +163,8 @@
.icon-button.vis-chart{background:url(fugue.png) no-repeat 0px -286px;}
.icon-button.go-to-full-screen{background:url(fugue.png) no-repeat 0px -312px;}
.icon-button.import{background:url(fugue.png) no-repeat 0px -338px;}
+.icon-button.plus-button{background:url(fugue.png) no-repeat 0px -364px;}
+.icon-button.gear{background:url(fugue.png) no-repeat 0px -390px;}
.tipsy{padding:5px;font-size:10px;filter:alpha(opacity=80);background-repeat:no-repeat;background-image:url(../images/tipsy.gif);}
.tipsy-inner{padding:5px 8px 4px 8px;background-color:black;color:white;max-width:200px;text-align:center;}
.tipsy-north{background-position:top center;}
@@ -170,7 +173,7 @@
.tipsy-west{background-position:left center;}
.editable-text{cursor:pointer;}
.editable-text:hover{cursor:text;border:dotted #999999 1px;}
-.text-and-autocomplete-select{background:url(fugue.png) no-repeat right -364px;}
+.text-and-autocomplete-select{background:url(fugue.png) no-repeat right -416px;}
.icon-button.multiinput{background:url(../images/documents-stack.png) no-repeat;cursor:pointer;float:none;display:inline-block;margin-left:10px;}
.icon-button.multiinput.disabled{background:url(../images/documents-stack-faded.png) no-repeat;cursor:auto;}
.workflow-invocation-complete{border:solid 1px #6A6;border-left-width:5px;margin:10px 0;padding-left:5px;}
diff -r d161bb98374369c0cc3aa77eed4e162273e64bb3 -r 132798922d53213d6ca4e1596619f254bdd582d0 static/june_2007_style/blue/fugue.png
Binary file static/june_2007_style/blue/fugue.png has changed
diff -r d161bb98374369c0cc3aa77eed4e162273e64bb3 -r 132798922d53213d6ca4e1596619f254bdd582d0 static/june_2007_style/blue/panel_layout.css
--- a/static/june_2007_style/blue/panel_layout.css
+++ b/static/june_2007_style/blue/panel_layout.css
@@ -23,9 +23,11 @@
.panel-header-button:hover{color:black;background-color:#ccc;}
.panel-header-button:active{color:white;background-color:#aaaaaa;}
#overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:20000;}
+#overlay.modal #overlay-background{background:rgba(0,0,0,0.5);}
.dialog-box-container{position:relative;margin-top:80px;margin-right:auto;margin-left:auto;}
.dialog-box-wrapper{position:relative;padding:1em;background-color:rgba(0,0,0,0.5);-moz-border-radius:1em;-webkit-border-radius:1em;}
.dialog-box{border:solid #999 1px;background:white;z-index:80000;}
+#overlay.modal .dialog-box .body{min-width:600px;}
.dialog-box .body{padding:5px;overflow:auto;max-height:500px;min-width:300px;}
.dialog-box .buttons{padding:5px;}
.panel-error-message,.panel-warning-message,.panel-done-message,.panel-info-message{height:24px;line-height:24px;color:#303030;padding:0px;padding-left:26px;background-color:#FFCCCC;background-image:url(error_small.png);background-repeat:no-repeat;background-position:6px 50%;}
diff -r d161bb98374369c0cc3aa77eed4e162273e64bb3 -r 132798922d53213d6ca4e1596619f254bdd582d0 static/june_2007_style/blue/trackster.css
--- a/static/june_2007_style/blue/trackster.css
+++ b/static/june_2007_style/blue/trackster.css
@@ -3,30 +3,9 @@
.content{font:10px verdana;}
.nav-controls{text-align:center;padding:1px 0;}
.nav-controls input{margin:0 5px;}
-.menu-button{padding: 0px 4px 0px 4px;}
#zoom-in,#zoom-out{display:inline-block;height:16px;width:16px;margin-bottom:-3px;cursor:pointer;}
#zoom-out{background:transparent url(../images/fugue/magnifier-zoom-out.png) center center no-repeat;}
#zoom-in{margin-left:10px;background:transparent url(../images/fugue/magnifier-zoom.png) center center no-repeat;}
-.overview-icon{background:transparent url(../images/fugue/application-dock-270-bw.png) no-repeat;}
-.overview-icon:hover{background:transparent url(../images/fugue/application-dock-270.png) no-repeat;}
-.settings-icon{background:transparent url(../images/fugue/gear-bw.png) no-repeat;}
-.settings-icon:hover{background:transparent url(../images/fugue/gear.png) no-repeat;}
-.tools-icon{background:transparent url(../images/fugue/toolbox-bw.png) no-repeat;}
-.tools-icon:hover{background:transparent url(../images/fugue/toolbox.png) no-repeat;}
-.filters-icon{background:transparent url(../images/fugue/ui-slider-050-bw.png) no-repeat;}
-.filters-icon:hover{background:transparent url(../images/fugue/ui-slider-050.png) no-repeat;}
-.remove-icon,.overview-close{background:transparent url(../images/fugue/cross-small-bw.png) no-repeat;}
-.remove-icon:hover,.overview-close:hover{background:transparent url(../images/fugue/cross-circle.png) no-repeat;}
-#close-icon{background:transparent url(../images/fugue/cross-circle-bw.png) no-repeat;margin-right:0px;}
-#close-icon:hover{background:transparent url(../images/fugue/cross-circle.png) no-repeat;}
-#add-tracks-icon{background:transparent url(../images/fugue/plus-button-bw.png) no-repeat;}
-#add-tracks-icon:hover{background:transparent url(../images/fugue/plus-button.png) no-repeat;}
-#add-group-icon{background:transparent url(../images/fugue/block--plus-bw.png) no-repeat;}
-#add-group-icon:hover{background:transparent url(../images/fugue/block--plus.png) no-repeat;}
-#bookmarks-icon{background:transparent url(../images/fugue/bookmarks-bw.png) no-repeat;}
-#bookmarks-icon:hover{background:transparent url(../images/fugue/bookmarks.png) no-repeat;}
-#save-icon{background:transparent url(../images/fugue/disk--arrow-bw.png) no-repeat;}
-#save-icon:hover{background:transparent url(../images/fugue/disk--arrow.png) no-repeat;}
.nav-input{font-size:12px;width:30em;z-index:1000;}
.location{display:inline-block;width:15em;margin:0 10px;}
.draghandle{margin-top:2px;cursor:move;float:left;background:transparent url(../images/visualization/draggable_horizontal.png) center center no-repeat;width:10px;height:12px;}
@@ -65,16 +44,39 @@
input{font:10px verdana;}
.dynamic-tool,.filters{margin-left:0.25em;padding-bottom:0.5em;}
.dynamic-tool{width:410px;}
-.filters>.sliders,.display-controls{float:left;margin:1em;}
+.filters > .sliders,.display-controls{float:left;margin:1em;}
.sliders{width:410px;}
-.display-controls{border-left:solid 2px #DDDDDD;padding-left:1em}
-.filter-row{margin-top:0.4em;}
+.display-controls{border-left:solid 2px #DDDDDD;padding-left:1em
+}
+.filter-row {
+ margin-top:0.4em;}
.slider-row{margin-left:1em;}
.elt-label{float:left;font-weight:bold;margin-right:1em;}
.slider{float:right;width:200px;position:relative;}
.tool-name{font-size:110%;font-weight:bold;}
.param-row{margin-top:0.2em;margin-left:1em;}
.param-label{float:left;font-weight:bold;padding-top:0.2em;}
+.menu-button{padding:0px 4px 0px 4px;}
+.settings-icon{background:transparent url(../images/fugue/gear-bw.png) no-repeat;}
+.settings-icon:hover{background:transparent url(../images/fugue/gear.png) no-repeat;}
+.overview-icon{background:transparent url(../images/fugue/application-dock-270-bw.png) no-repeat;}
+.overview-icon:hover{background:transparent url(../images/fugue/application-dock-270.png) no-repeat;}
+.tools-icon{background:transparent url(../images/fugue/toolbox-bw.png) no-repeat;}
+.tools-icon:hover{background:transparent url(../images/fugue/toolbox.png) no-repeat;}
+.filters-icon{background:transparent url(../images/fugue/ui-slider-050-bw.png) no-repeat;}
+.filters-icon:hover{background:transparent url(../images/fugue/ui-slider-050.png) no-repeat;}
+.remove-icon,.overview-close{background:transparent url(../images/fugue/cross-small-bw.png) no-repeat;}
+.remove-icon:hover,.overview-close:hover{background:transparent url(../images/fugue/cross-circle.png) no-repeat;}
+#close-icon{background:transparent url(../images/fugue/cross-circle-bw.png) no-repeat;margin-right:0px;}
+#close-icon:hover{background:transparent url(../images/fugue/cross-circle.png) no-repeat;}
+#add-tracks-icon{background:transparent url(../images/fugue/plus-button-bw.png) no-repeat;}
+#add-tracks-icon:hover{background:transparent url(../images/fugue/plus-button.png) no-repeat;}
+#add-group-icon{background:transparent url(../images/fugue/block--plus-bw.png) no-repeat;}
+#add-group-icon:hover{background:transparent url(../images/fugue/block--plus.png) no-repeat;}
+#bookmarks-icon{background:transparent url(../images/fugue/bookmarks-bw.png) no-repeat;}
+#bookmarks-icon:hover{background:transparent url(../images/fugue/bookmarks.png) no-repeat;}
+#save-icon{background:transparent url(../images/fugue/disk--arrow-bw.png) no-repeat;}
+#save-icon:hover{background:transparent url(../images/fugue/disk--arrow.png) no-repeat;}
.child-track-icon{background:url('../images/fugue/arrow-000-small-bw.png') no-repeat;width:30px;cursor:move;}
.track-resize{background:white url('../images/visualization/draggable_vertical.png') no-repeat top center;position:absolute;right:3px;bottom:-4px;width:14px;height:7px;border:solid #999 1px;z-index:100;}
.bookmark{background:white;border:solid #999 1px;border-right:none;margin:0.5em;margin-right:0;padding:0.5em;}
@@ -85,4 +87,5 @@
.icon.more-across{background:url('../images/fugue/arrow-transition-bw.png') no-repeat 0px 0px;}
.intro{padding:1em;}
.intro > .action-button{background-color:#CCC;padding:1em;}
-.feature-popup{background-color:#DDD;position:absolute;z-index:1000}
+.feature-popup{position:absolute;z-index:1000;padding:5px;font-size:10px;filter:alpha(opacity=80);background-repeat:no-repeat;background-image:url(../images/tipsy.gif);background-position:top center;}
+.feature-popup-inner{padding:5px 8px 4px 8px;background-color:black;color:white;}
diff -r d161bb98374369c0cc3aa77eed4e162273e64bb3 -r 132798922d53213d6ca4e1596619f254bdd582d0 static/june_2007_style/panel_layout.css.tmpl
--- a/static/june_2007_style/panel_layout.css.tmpl
+++ b/static/june_2007_style/panel_layout.css.tmpl
@@ -161,6 +161,10 @@
z-index: 20000;
}
+#overlay.modal #overlay-background {
+ background: rgba(0,0,0,0.5);
+}
+
.dialog-box-container {
position: relative;
margin-top: 80px;
@@ -182,6 +186,10 @@
z-index: 80000;
}
+#overlay.modal .dialog-box .body {
+ min-width: 600px;
+}
+
.dialog-box .body {
padding: 5px;
overflow: auto;
diff -r d161bb98374369c0cc3aa77eed4e162273e64bb3 -r 132798922d53213d6ca4e1596619f254bdd582d0 static/june_2007_style/trackster.css.tmpl
--- a/static/june_2007_style/trackster.css.tmpl
+++ b/static/june_2007_style/trackster.css.tmpl
@@ -405,8 +405,19 @@
background-color: #CCC;
padding: 1em;
}
-.feature-popup{
- background-color: #DDD;
+
+.feature-popup {
position: absolute;
- z-index: 1000
+ z-index: 1000;
+ padding: 5px;
+ font-size: 10px;
+ filter: alpha(opacity=80);
+ background-repeat: no-repeat;
+ background-image: url(../images/tipsy.gif);
+ background-position: top center;
}
+.feature-popup-inner {
+ padding: 5px 8px 4px 8px;
+ background-color: black;
+ color: white;
+}
diff -r d161bb98374369c0cc3aa77eed4e162273e64bb3 -r 132798922d53213d6ca4e1596619f254bdd582d0 static/scripts/galaxy.panels.js
--- a/static/scripts/galaxy.panels.js
+++ b/static/scripts/galaxy.panels.js
@@ -163,13 +163,23 @@
// Modal dialog boxes
function hide_modal() {
- $(".dialog-box-container" ).fadeOut( function() {
+ $(".dialog-box-container" ).hide( 0, function() {
$("#overlay").hide();
+ $("#overlay").removeClass( "modal" );
$( ".dialog-box" ).find( ".body" ).children().remove();
} );
};
-function show_modal( title, body, buttons, extra_buttons, init_fn ) {
+function show_modal() {
+ $("#overlay").addClass( "modal" );
+ _show_modal.apply( this, arguments );
+}
+
+function show_message() {
+ _show_modal.apply( this, arguments );
+}
+
+function _show_modal( title, body, buttons, extra_buttons, init_fn ) {
if ( title ) {
$( ".dialog-box" ).find( ".title" ).html( title );
$( ".dialog-box" ).find( ".unified-panel-header" ).show();
@@ -205,7 +215,7 @@
$( ".dialog-box" ).find( ".body" ).html( body );
if ( ! $(".dialog-box-container").is( ":visible" ) ) {
$("#overlay").show();
- $(".dialog-box-container").fadeIn();
+ $(".dialog-box-container").show();
}
// Fix min-width so that modal cannot shrink considerably if
// new content is loaded.
diff -r d161bb98374369c0cc3aa77eed4e162273e64bb3 -r 132798922d53213d6ca4e1596619f254bdd582d0 static/scripts/trackster.js
--- a/static/scripts/trackster.js
+++ b/static/scripts/trackster.js
@@ -701,7 +701,7 @@
remove: function() {
this.container.remove_drawable(this);
- this.container_div.fadeOut('slow', function() {
+ this.container_div.hide(0, function() {
$(this).remove();
// HACK: is there a better way to update the view?
view.update_intro_div();
@@ -1027,6 +1027,7 @@
// Only act on x axis scrolling if we see if, y will be i
// handled by the browser when the event bubbles up
if ( dx ) {
+ dx *= 50;
var delta_chrom = Math.round( - dx / view.viewport_container.width() * (view.high - view.low) );
view.move_delta( delta_chrom );
}
@@ -1255,7 +1256,7 @@
DrawableCollection.prototype.remove_drawable.call(this, drawable);
if (hide) {
var view = this;
- drawable.container_div.fadeOut('slow', function() {
+ drawable.container_div.hide(0, function() {
$(this).remove();
view.update_intro_div();
});
@@ -2114,31 +2115,49 @@
build_form: function() {
var track_config = this;
var container = $("<div />");
- $.each( this.params, function( index, param ) {
- if ( ! param.hidden ) {
+ var param;
+ // Function to process parameters recursively
+ function handle_params( params, container ) {
+ for ( var index = 0; index < params.length; index++ ) {
+ param = params[index];
+ // Hidden params have no representation in the form
+ if ( param.hidden ) { continue; }
+ // Build row for param
var id = 'param_' + index;
var value = track_config.values[ param.key ];
var row = $("<div class='form-row' />").appendTo( container );
row.append( $('<label />').attr("for", id ).text( param.label + ":" ) );
+ // Draw parameter as checkbox
if ( param.type === 'bool' ) {
row.append( $('<input type="checkbox" />').attr("id", id ).attr("name", id ).attr( 'checked', value ) );
+ // Draw parameter as textbox
} else if ( param.type === 'text' ) {
row.append( $('<input type="text"/>').attr("id", id ).val(value).click( function() { $(this).select() }));
+ // Draw paramter as select area
+ } else if ( param.type == 'select' ) {
+ var select = $('<select />').attr("id", id);
+ for ( var i = 0; i < param.options.length; i++ ) {
+ $("<option/>").text( param.options[i].label ).attr( "value", param.options[i].value ).appendTo( select );
+ }
+ select.val( value );
+ row.append( select );
+ // Draw parameter as color picker
} else if ( param.type === 'color' ) {
var input = $('<input />').attr("id", id ).attr("name", id ).val( value );
// Color picker in tool tip style float
- var tip = $( "<div class='tipsy tipsy-north' style='position: absolute;' />" ).hide();
+ var tip = $( "<div class='tipsy tipsy-west' style='position: absolute;' />" ).hide();
// Inner div for padding purposes
var tip_inner = $("<div style='background-color: black; padding: 10px;'></div>").appendTo(tip);
var farb_container = $("<div/>")
.appendTo(tip_inner)
.farbtastic( { width: 100, height: 100, callback: input, color: value });
-
// Outer div container input and tip for hover to work
$("<div />").append( input ).append( tip ).appendTo( row ).bind( "click", function ( e ) {
tip.css( {
- left: $(this).position().left + ( $(input).width() / 2 ) - 60,
- top: $(this).position().top + $(this.height)
+ // left: $(this).position().left + ( $(input).width() / 2 ) - 60,
+ // top: $(this).position().top + $(this.height)
+ left: $(this).position().left + $(input).width() + 5,
+ top: $(this).position().top - ( $(tip).height() / 2 ) + ( $(input).height() / 2 )
} ).show();
$(document).bind( "click.color-picker", function() {
tip.hide();
@@ -2150,8 +2169,15 @@
else {
row.append( $('<input />').attr("id", id ).attr("name", id ).val( value ) );
}
+ // Help text
+ if ( param.help ) {
+ row.append( $("<div class='help'/>").text( param.help ) );
+ }
}
- });
+ }
+ // Handle top level parameters in order
+ handle_params( this.params, container );
+ // Return element containing constructed form
return container;
},
update_from_form: function( container ) {
@@ -2229,7 +2255,16 @@
// Only show popups in Pack mode.
if (tile.mode !== "Pack") { return; }
- $(this.canvas).mousemove(function (e) {
+ $(this.canvas).hover( function() {
+ this.hovered = true;
+ $(this).mousemove();
+ }, function() {
+ this.hovered = false;
+ // Clear popup if it is still hanging around (this is probably not needed)
+ $(this).siblings(".feature-popup").remove();
+ } ).mousemove(function (e) {
+ // Use the hover plugin to get a delay before showing popup
+ if ( !this.hovered ) { return; }
// Get feature data for position.
var
this_offset = $(this).offset(),
@@ -2270,8 +2305,8 @@
// Build popup.
var popup = $("<div/>").attr("id", feature_uid).addClass("feature-popup"),
- key, value,
- table = $("<table/>").appendTo(popup), row;
+ table = $("<table/>"),
+ key, value, row;
for (key in feature_dict) {
value = feature_dict[key];
row = $("<tr/>").appendTo(table);
@@ -2279,6 +2314,7 @@
$("<td/>").attr("align", "left").appendTo(row)
.text(typeof(value) == 'number' ? round(value, 2) : value);
}
+ popup.append( $("<div class='feature-popup-inner'>").append( table ) );
popups[feature_uid] = popup;
}
@@ -2289,7 +2325,7 @@
// parseInt strips "px" from left, top measurements. +7 so that mouse pointer does not
// overlap popup.
var
- popupX = offsetX + parseInt( tile.canvas.css("left") ) + 7,
+ popupX = offsetX + parseInt( tile.canvas.css("left") ) - popup.width() / 2,
popupY = offsetY + parseInt( tile.canvas.css("top") ) + 7;
popup.css("left", popupX + "px").css("top", popupY + "px")
}
@@ -2331,6 +2367,12 @@
this.data_url_extra_params = {}
this.data_query_wait = (data_query_wait ? data_query_wait : DEFAULT_DATA_QUERY_WAIT);
this.dataset_check_url = converted_datasets_state_url;
+
+ // FIXME: this should be a saved setting
+ this.content_visible = true;
+
+ if (!Track.id_counter) { Track.id_counter = 0; }
+ this.id = Track.id_counter++;
//
// Create HTML element structure for track.
@@ -2346,6 +2388,9 @@
this.icons_div = $("<div/>").css("float", "left").appendTo(this.header_div).hide();
// Track icons.
+ this.toggle_icon = $("<a/>").attr("href", "javascript:void(0);").attr("title", "Hide/show track content")
+ .addClass("icon-button toggle").tipsy( {gravity: 's'} )
+ .appendTo(this.icons_div);
this.settings_icon = $("<a/>").attr("href", "javascript:void(0);").attr("title", "Edit settings")
.addClass("icon-button settings-icon").tipsy( {gravity: 's'} )
.appendTo(this.icons_div);
@@ -2365,6 +2410,21 @@
// Suppress double clicks in header so that they do not impact viz.
this.header_div.dblclick( function(e) { e.stopPropagation(); } );
+
+ // Toggle icon hides or shows the track content
+ this.toggle_icon.click( function() {
+ if ( track.content_visible ) {
+ track.toggle_icon.addClass("toggle-expand").removeClass("toggle");
+ track.hide_contents();
+ track.mode_div.hide();
+ track.content_visible = false;
+ } else {
+ track.toggle_icon.addClass("toggle").removeClass("toggle-expand");
+ track.content_visible = true;
+ track.mode_div.show();
+ track.show_contents();
+ }
+ });
// Clicking on settings icon opens track config.
this.settings_icon.click( function() {
@@ -2552,6 +2612,26 @@
this.update_icons();
},
/**
+ * Hide any elements that are part of the tracks contents area. Should
+ * remove as approprite, the track will be redrawn by show_contents.
+ */
+ hide_contents : function () {
+ // Clear contents by removing any elements that are contained in
+ // the tracks content_div
+ this.content_div.children().remove();
+ // Hide the content div
+ this.content_div.hide();
+ // And any y axis labels (common to several track types)
+ this.container_div.find(".yaxislabel, .track-resize").hide()
+ },
+ show_contents : function() {
+ // Show the contents div and labels (if present)
+ this.content_div.show();
+ this.container_div.find(".yaxislabel, .track-resize").show()
+ // Request a redraw of the content
+ this.request_draw();
+ },
+ /**
* Additional initialization required before drawing track for the first time.
*/
predraw_init: function() {}
@@ -2682,6 +2762,11 @@
*/
_draw: function(force, clear_after) {
if (!this.enabled) { return; }
+
+ // TODO: There should probably be a general way to disable content drawing
+ // for all drawables. However the button to toggle this is currently
+ // only present for Track instances.
+ if (!this.content_visible) { return; }
// HACK: ReferenceTrack can draw without dataset ID, but other tracks cannot.
if ( !(this instanceof ReferenceTrack) && (!this.dataset_id) ) { return; }
@@ -2694,7 +2779,7 @@
w_scale = width / range,
resolution = this.view.resolution,
parent_element = $("<div style='position: relative;'></div>");
-
+
// For overview, adjust high, low, resolution, and w_scale.
if (this.is_overview) {
low = this.view.max_low;
@@ -3028,7 +3113,8 @@
this.min_height_px = 16;
this.max_height_px = 400;
- this.height_px = 80;
+ // Default height for new tracks, should be a defined constant?
+ this.height_px = 32;
this.hda_ldda = hda_ldda;
this.dataset_id = dataset_id;
this.original_dataset_id = dataset_id;
@@ -3076,8 +3162,10 @@
var drag_control = $( "<div class='track-resize'>" )
// Control shows on hover over track, stays while dragging
$(track.container_div).hover( function() {
- in_handle = true;
- drag_control.show();
+ if ( track.content_visible ) {
+ in_handle = true;
+ drag_control.show();
+ }
}, function() {
in_handle = false;
if ( ! in_drag ) { drag_control.hide(); }
@@ -3108,9 +3196,20 @@
track.container_div.addClass( "line-track" );
var data = result.data;
if ( isNaN(parseFloat(track.prefs.min_value)) || isNaN(parseFloat(track.prefs.max_value)) ) {
- track.prefs.min_value = data.min;
- track.prefs.max_value = data.max;
+ // Compute default minimum and maximum values
+ var min_value = data.min
+ var max_value = data.max
+ // If mean and sd are present, use them to compute a ~95% window
+ // but only if it would shrink the range on one side
+ min_value = Math.floor( Math.min( 0, Math.max( min_value, data.mean - 2 * data.sd ) ) )
+ max_value = Math.ceil( Math.max( 0, Math.min( max_value, data.mean + 2 * data.sd ) ) )
+ // Update the prefs
+ track.prefs.min_value = min_value;
+ track.prefs.max_value = max_value;
// Update the config
+ // FIXME: we should probably only save this when the user explicately sets it
+ // since we lose the ability to compute it on the fly (when changing
+ // chromosomes for example).
$('#track_' + track.dataset_id + '_minval').val(track.prefs.min_value);
$('#track_' + track.dataset_id + '_maxval').val(track.prefs.max_value);
}
@@ -3179,13 +3278,17 @@
{ key: 'name', label: 'Name', type: 'text', default_value: name },
{ key: 'block_color', label: 'Block color', type: 'color', default_value: get_random_color() },
{ key: 'label_color', label: 'Label color', type: 'color', default_value: 'black' },
- { key: 'show_counts', label: 'Show summary counts', type: 'bool', default_value: true },
+ { key: 'show_counts', label: 'Show summary counts', type: 'bool', default_value: true,
+ help: 'Show the number of items in each bin when drawing summary histogram' },
+ { key: 'connector_style', label: 'Connector style', type: 'select', default_value: 'fishbones',
+ options: [ { label: 'Line with arrows', value: 'fishbone' }, { label: 'Arcs', value: 'arcs' } ] },
{ key: 'mode', type: 'string', default_value: this.mode, hidden: true },
],
saved_values: prefs,
onchange: function() {
track.set_name(track.prefs.name);
track.tile_cache.clear();
+ track.set_painter_from_config();
track.request_draw();
}
});
@@ -3205,9 +3308,17 @@
this.data_manager = new DataManager(20, this);
this.left_offset = 200;
- this.painter = painters.LinkedFeaturePainter;
+ // this.painter = painters.LinkedFeaturePainter;
+ this.set_painter_from_config();
};
extend(FeatureTrack.prototype, Drawable.prototype, TiledTrack.prototype, {
+ set_painter_from_config: function() {
+ if ( this.config.values['connector_style'] == 'arcs' ) {
+ this.painter = painters.ArcLinkedFeaturePainter;
+ } else {
+ this.painter = painters.LinkedFeaturePainter;
+ }
+ },
/**
* Actions to be taken after draw has been completed. Draw is completed when all tiles have been
* drawn/fetched and shown.
@@ -3527,7 +3638,7 @@
var filter_height_scaler = (this.filters_manager.height_filter ? new FilterScaler(this.filters_manager.height_filter) : null);
// HACK: ref_seq will only be defined for ReadTracks, and only the ReadPainter accepts that argument
var painter = new (this.painter)(filtered, tile_low, tile_high, this.prefs, mode, filter_alpha_scaler, filter_height_scaler, ref_seq);
- var required_height = Math.max(MIN_TRACK_HEIGHT, painter.get_required_height(slots_required));
+ var required_height = Math.max(MIN_TRACK_HEIGHT, painter.get_required_height(slots_required,width));
var canvas = this.view.canvas_manager.new_canvas();
var feature_mapper = null;
@@ -4057,6 +4168,7 @@
this.feature_positions = {};
this.slot_height = slot_height;
this.translation = 0;
+ this.y_translation = 0;
};
/**
@@ -4078,7 +4190,7 @@
*/
FeaturePositionMapper.prototype.get_feature_data = function(x, y) {
// Find slot using Y.
- var slot = Math.floor( y/this.slot_height ),
+ var slot = Math.floor( (y-this.y_translation)/this.slot_height ),
feature_dict;
// May not be over a slot due to padding, margin, etc.
@@ -4108,15 +4220,23 @@
FeaturePainter.prototype.default_prefs = { block_color: "#FFF", connector_color: "#FFF" };
extend(FeaturePainter.prototype, {
- get_required_height: function(rows_required) {
+ get_required_height: function(rows_required, width) {
// y_scale is the height per row
var required_height = y_scale = this.get_row_height(), mode = this.mode;
// If using a packing mode, need to multiply by the number of slots used
if (mode === "no_detail" || mode === "Squish" || mode === "Pack") {
required_height = rows_required * y_scale;
}
+ return required_height + this.get_top_padding(width) + this.get_bottom_padding(width);
+ },
+ /** Extra padding before first row of features */
+ get_top_padding: function(width) {
+ return 0;
+ },
+ /** Extra padding after last row of features */
+ get_bottom_padding: function(width) {
// Pad bottom by half a row, at least 5 px
- return required_height + Math.max( Math.round( y_scale / 2 ), 5 );
+ return Math.max( Math.round( this.get_row_height() / 2 ), 5 )
},
/**
* Draw data on ctx using slots and within the rectangle defined by width and height. Returns
@@ -4153,6 +4273,7 @@
}
ctx.restore();
+ feature_mapper.y_translation = this.get_top_padding(width);
return feature_mapper;
},
/**
@@ -4179,6 +4300,10 @@
var LinkedFeaturePainter = function(data, view_start, view_end, prefs, mode, alpha_scaler, height_scaler) {
FeaturePainter.call(this, data, view_start, view_end, prefs, mode, alpha_scaler, height_scaler);
+ // Whether to draw a single connector in the background that spans the entire feature (the intron fishbone)
+ this.draw_background_connector = true;
+ // Whether to call draw_connector for every pair of blocks
+ this.draw_individual_connectors = false;
};
extend(LinkedFeaturePainter.prototype, FeaturePainter.prototype, {
@@ -4216,7 +4341,7 @@
f_end = Math.ceil( Math.min(width, Math.max(0, (feature_end - tile_low) * w_scale)) ),
draw_start = f_start,
draw_end = f_end,
- y_center = (mode === "Dense" ? 0 : (0 + slot)) * y_scale,
+ y_center = (mode === "Dense" ? 0 : (0 + slot)) * y_scale + this.get_top_padding(width),
thickness, y_start, thick_start = null, thick_end = null,
// TODO: is there any reason why block, label color cannot be set at the Painter level?
block_color = this.prefs.block_color,
@@ -4260,17 +4385,17 @@
// Draw feature/feature blocks + connectors.
if (!feature_blocks) {
// If there are no blocks, treat the feature as one big exon.
- if ( feature.strand ) {
- if (feature.strand === "+") {
+ ctx.fillStyle = block_color;
+ ctx.fillRect(f_start, y_center + 1, f_end - f_start, thick_height);
+ // If strand is specified, draw arrows over feature
+ if ( feature_strand ) {
+ if (feature_strand === "+") {
ctx.fillStyle = ctx.canvas.manager.get_pattern( 'right_strand_inv' );
- } else if (feature.strand === "-") {
+ } else if (feature_strand === "-") {
ctx.fillStyle = ctx.canvas.manager.get_pattern( 'left_strand_inv' );
}
+ ctx.fillRect(f_start, y_center + 1, f_end - f_start, thick_height);
}
- else { // No strand.
- ctx.fillStyle = block_color;
- }
- ctx.fillRect(f_start, y_center, f_end - f_start, thick_height);
} else {
//
// There are feature blocks and mode is either Squish or Pack.
@@ -4279,38 +4404,51 @@
// needed. This ensures that whole feature, regardless of whether it starts with
// a block, is visible.
//
-
- // Draw whole feature as connector/intron.
+
+ // Compute y axis center position and height
var cur_y_center, cur_height;
if (mode === "Squish" || mode === "Dense") {
- ctx.fillStyle = CONNECTOR_COLOR;
cur_y_center = y_center + Math.floor(SQUISH_FEATURE_HEIGHT/2) + 1;
cur_height = 1;
}
else { // mode === "Pack"
if (feature_strand) {
- var cur_y_center = y_center;
- var cur_height = thick_height;
- if (feature_strand === "+") {
- ctx.fillStyle = ctx.canvas.manager.get_pattern( 'right_strand' );
- } else if (feature_strand === "-") {
- ctx.fillStyle = ctx.canvas.manager.get_pattern( 'left_strand' );
- }
+ cur_y_center = y_center;
+ cur_height = thick_height;
}
else {
- ctx.fillStyle = CONNECTOR_COLOR;
cur_y_center += (SQUISH_FEATURE_HEIGHT/2) + 1;
cur_height = 1;
}
}
- ctx.fillRect(f_start, cur_y_center, f_end - f_start, cur_height);
+
+ // Draw whole feature as connector/intron.
+ if ( this.draw_background_connector ) {
+ if (mode === "Squish" || mode === "Dense") {
+ ctx.fillStyle = CONNECTOR_COLOR;
+ }
+ else { // mode === "Pack"
+ if (feature_strand) {
+ if (feature_strand === "+") {
+ ctx.fillStyle = ctx.canvas.manager.get_pattern( 'right_strand' );
+ } else if (feature_strand === "-") {
+ ctx.fillStyle = ctx.canvas.manager.get_pattern( 'left_strand' );
+ }
+ }
+ else {
+ ctx.fillStyle = CONNECTOR_COLOR;
+ }
+ }
+ ctx.fillRect(f_start, cur_y_center, f_end - f_start, cur_height);
+ }
// Draw blocks.
var start_and_height;
for (var k = 0, k_len = feature_blocks.length; k < k_len; k++) {
var block = feature_blocks[k],
block_start = Math.floor( Math.max(0, (block[0] - tile_low) * w_scale) ),
- block_end = Math.ceil( Math.min(width, Math.max((block[1] - tile_low) * w_scale)) );
+ block_end = Math.ceil( Math.min(width, Math.max((block[1] - tile_low) * w_scale)) ),
+ last_block_start, last_block_end;
// Skip drawing if block not on tile.
if (block_start > block_end) { continue; }
@@ -4341,6 +4479,12 @@
ctx.fillRect(block_thick_start, y_center + 1, block_thick_end - block_thick_start, thick_height );
}
}
+ // Draw individual connectors if required
+ if ( this.draw_individual_connectors && last_block_start ) {
+ this.draw_connector( ctx, last_block_start, last_block_end, block_start, block_end, y_center );
+ }
+ last_block_start = block_start;
+ last_block_end = block_end;
}
// FIXME: Height scaling only works in Pack mode right now.
@@ -4673,11 +4817,54 @@
}
});
+var ArcLinkedFeaturePainter = function(data, view_start, view_end, prefs, mode, alpha_scaler, height_scaler) {
+ LinkedFeaturePainter.call(this, data, view_start, view_end, prefs, mode, alpha_scaler, height_scaler);
+ // Need to know the longest feature length for adding spacing
+ this.longest_feature_length = this.calculate_longest_feature_length();
+ this.draw_background_connector = false;
+ this.draw_individual_connectors = true;
+};
+
+extend(ArcLinkedFeaturePainter.prototype, FeaturePainter.prototype, LinkedFeaturePainter.prototype, {
+
+ calculate_longest_feature_length: function () {
+ var longest_feature_length = 0;
+ for (var i = 0, len = this.data.length; i < len; i++) {
+ var feature = this.data[i], feature_start = feature[1], feature_end = feature[2];
+ longest_feature_length = Math.max( longest_feature_length, feature_end - feature_start );
+ }
+ return longest_feature_length;
+ },
+
+ get_top_padding: function( width ) {
+ var view_range = this.view_end - this.view_start,
+ w_scale = width / view_range;
+ return Math.min( 128, Math.ceil( ( this.longest_feature_length / 2 ) * w_scale ) );
+ },
+
+ draw_connector: function( ctx, block1_start, block1_end, block2_start, block2_end, y_center ) {
+ // Arc drawing -- from closest endpoints
+ var x_center = ( block1_end + block2_start ) / 2,
+ radius = block2_start - x_center;
+ // For full half circles
+ var angle1 = Math.PI, angle2 = 0;
+ if ( radius > 0 ) {
+ ctx.beginPath();
+ ctx.arc( x_center, y_center, block2_start - x_center, Math.PI, 0 );
+ ctx.stroke();
+ }
+ }
+});
+
+
+
+
exports.Scaler = Scaler;
exports.SummaryTreePainter = SummaryTreePainter;
exports.LinePainter = LinePainter;
exports.LinkedFeaturePainter = LinkedFeaturePainter;
exports.ReadPainter = ReadPainter;
+exports.ArcLinkedFeaturePainter = ArcLinkedFeaturePainter;
// End painters_module encapsulation
};
@@ -4708,4 +4895,4 @@
for ( key in modules.trackster ) {
target[key] = modules.trackster[key];
}
-})(window);
\ No newline at end of file
+})(window);
diff -r d161bb98374369c0cc3aa77eed4e162273e64bb3 -r 132798922d53213d6ca4e1596619f254bdd582d0 templates/tracks/browser.mako
--- a/templates/tracks/browser.mako
+++ b/templates/tracks/browser.mako
@@ -42,7 +42,7 @@
<script type='text/javascript' src="${h.url_for('/static/scripts/excanvas.js')}"></script><![endif]-->
-${h.js( "galaxy.base", "galaxy.panels", "json2", "jquery", "jstorage", "jquery.event.drag", "jquery.mousewheel", "jquery.autocomplete", "trackster", "trackster_ui", "jquery.ui.sortable.slider", "farbtastic", "jquery.tipsy" )}
+${h.js( "galaxy.base", "galaxy.panels", "json2", "jquery", "jstorage", "jquery.event.drag", "jquery.event.hover","jquery.mousewheel", "jquery.autocomplete", "trackster", "trackster_ui", "jquery.ui.sortable.slider", "farbtastic", "jquery.tipsy" )}
<script type="text/javascript">
//
@@ -110,6 +110,52 @@
}
});
};
+
+ /**
+ * Use a popup grid to bookmarks from a dataset.
+ */
+ var add_bookmarks = function() {
+ show_modal( "Select dataset for new bookmarks", "progress" );
+ $.ajax({
+ url: "${h.url_for( action='list_histories' )}",
+ data: { "f-dbkey": view.dbkey },
+ error: function() { alert( "Grid failed" ); },
+ success: function(table_html) {
+ show_modal(
+ "Select dataset for new bookmarks",
+ table_html, {
+ "Cancel": function() {
+ hide_modal();
+ },
+ "Insert": function() {
+ // Just use the first selected
+ $('input[name=id]:checked,input[name=ldda_ids]:checked').first().each(function(){
+ var data, id = $(this).val();
+ if ($(this).attr("name") === "id") {
+ data = { hda_id: id };
+ } else {
+ data = { ldda_id: id};
+ }
+
+ $.ajax({
+ url: "${h.url_for( action='bookmarks_from_dataset' )}",
+ data: data,
+ dataType: "json",
+ }).then( function(data) {
+ for( i = 0; i < data.data.length; i++ ) {
+ var row = data.data[i];
+ console.log( row[0], row[1] );
+ add_bookmark( row[0], row[1] );
+ }
+ });
+ });
+ hide_modal();
+ }
+ }
+ );
+ }
+ });
+ };
$(function() {
// Manual tipsy config because default gravity is S and cannot be changed.
@@ -240,7 +286,13 @@
annotation = "Bookmark description";
return add_bookmark(position, annotation);
});
-
+
+ // make_popupmenu( $("#bookmarks-more-button"), {
+ // "Add from BED dataset": function() {
+ // add_bookmarks();
+ // }
+ // });
+
init_keyboard_nav(view);
};
@@ -271,14 +323,15 @@
<div class="unified-panel-header" unselectable="on"><div class="unified-panel-header-inner">
+ <div style="float: right">
+ <a id="add-bookmark-button" class='icon-button menu-button plus-button' href="javascript:void(0);" title="Add bookmark"></a>
+ ## <a id="bookmarks-more-button" class='icon-button menu-button gear popup' href="javascript:void(0);" title="More actions"></a>
+ </div>
Bookmarks
</div></div><div class="unified-panel-body" style="overflow: auto;"><div id="bookmarks-container"></div>
- <div>
- <a class="icon-button import" style="margin-left: .5em; width: 100%" original-title="Add Bookmark" id="add-bookmark-button" href="javascript:void(0);">Add Bookmark</a>
- </div></div></%def>
diff -r d161bb98374369c0cc3aa77eed4e162273e64bb3 -r 132798922d53213d6ca4e1596619f254bdd582d0 templates/workflow/editor.mako
--- a/templates/workflow/editor.mako
+++ b/templates/workflow/editor.mako
@@ -213,7 +213,7 @@
show_workflow_parameters();
},
beforeSubmit: function( data ) {
- show_modal( "Loading workflow", "progress" );
+ show_message( "Loading workflow", "progress" );
}
});
}
@@ -650,7 +650,7 @@
};
var save_current_workflow = function ( eventObj, success_callback ) {
- show_modal( "Saving workflow", "progress" );
+ show_message( "Saving workflow", "progress" );
workflow.check_changes_in_active_form();
if (!workflow.has_changes) {
hide_modal();
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: dan: Squash SAMTools stderr chatter when using FreeBayes which would cause error state. FreeBayes should be updated to e.g. have access to built-in reference genomes, etc.
by Bitbucket 08 Nov '11
by Bitbucket 08 Nov '11
08 Nov '11
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/d161bb983743/
changeset: d161bb983743
user: dan
date: 2011-11-08 16:59:27
summary: Squash SAMTools stderr chatter when using FreeBayes which would cause error state. FreeBayes should be updated to e.g. have access to built-in reference genomes, etc.
affected #: 1 file
diff -r d09e2505fc105eaf9e04c4c973df613f873f6dca -r d161bb98374369c0cc3aa77eed4e162273e64bb3 tools/human_genome_variation/freebayes.xml
--- a/tools/human_genome_variation/freebayes.xml
+++ b/tools/human_genome_variation/freebayes.xml
@@ -5,11 +5,11 @@
</requirements><description>Bayesian genetic variant detector</description><command>
- ln -s $reference localref.fa;
- ln -s $bamfile localbam.bam;
- samtools faidx localref.fa;
- samtools sort localbam.bam localbam.bam;
- samtools index localbam.bam;
+ ln -s $reference localref.fa &&
+ ln -s $bamfile localbam.bam &&
+ samtools faidx localref.fa 2>&1 || echo "Error running samtools faidx for FreeBayes" >&2 &&
+ samtools sort localbam.bam localbam.bam 2>&1 || echo "Error running samtools sort for FreeBayes" >&2 &&
+ samtools index localbam.bam 2>&1 || echo "Error running samtools index for FreeBayes" >&2 &&
freebayes --fasta-reference localref.fa localbam.bam --vcf $output
#if $params.source_select == "full":
$params.showRefRepeats
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: natefoo: Invalidate other Galaxy sessions upon password change. Thanks Bob Harris!
by Bitbucket 08 Nov '11
by Bitbucket 08 Nov '11
08 Nov '11
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/d09e2505fc10/
changeset: d09e2505fc10
user: natefoo
date: 2011-11-08 16:23:52
summary: Invalidate other Galaxy sessions upon password change. Thanks Bob Harris!
affected #: 1 file
diff -r ba739e96c1a14d649c37655cecfc5b835ab343d2 -r d09e2505fc105eaf9e04c4c973df613f873f6dca lib/galaxy/web/controllers/user.py
--- a/lib/galaxy/web/controllers/user.py
+++ b/lib/galaxy/web/controllers/user.py
@@ -753,7 +753,7 @@
password = kwd.get( 'password', '' )
confirm = kwd.get( 'confirm', '' )
ok = True
- if not webapp == 'galaxy' and not is_admin:
+ if not is_admin:
# If the current user is changing their own password, validate their current password
current = kwd.get( 'current', '' )
if not trans.user.check_password( current ):
@@ -768,10 +768,17 @@
else:
# Save new password
user.set_password_cleartext( password )
+ # Invalidate all other sessions
+ for other_galaxy_session in trans.sa_session.query( trans.app.model.GalaxySession ) \
+ .filter( and_( trans.app.model.GalaxySession.table.c.user_id==trans.user.id,
+ trans.app.model.GalaxySession.table.c.is_valid==True,
+ trans.app.model.GalaxySession.table.c.id!=trans.galaxy_session.id ) ):
+ other_galaxy_session.is_valid = False
+ trans.sa_session.add( other_galaxy_session )
trans.sa_session.add( user )
trans.sa_session.flush()
trans.log_event( "User change password" )
- message = 'The password has been changed.'
+ message = 'The password has been changed and any other existing Galaxy sessions have been logged out (but jobs in histories in those sessions will not be interrupted).'
elif user and params.get( 'edit_user_info_button', False ):
# Edit user information - webapp MUST BE 'galaxy'
user_type_fd_id = params.get( 'user_type_fd_id', 'none' )
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0