From 6bc61bfae612c9593718dd55f6927f5c44fd06bf Mon Sep 17 00:00:00 2001
From: Yuta Yamate <11874627+yutayamate@users.noreply.github.com>
Date: Sat, 1 Jun 2019 14:43:12 +0900
Subject: [PATCH 1/3] Update author information
---
functree/templates/about.html | 22 +++++++++++-----------
package.json | 5 ++---
2 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/functree/templates/about.html b/functree/templates/about.html
index f91ba99..3727372 100644
--- a/functree/templates/about.html
+++ b/functree/templates/about.html
@@ -6,8 +6,8 @@
Change log
@@ -68,7 +68,7 @@ Version 0.8.0.0 (2019-02-28)
Streamlining of the controls layout and the UI.
Bug fix: selection of leaf nodes with value > 0 only.
- Addition of bar plots to "Module undefined" nodes to highlight the amount of pathway KO not assigned to a module.
+ Addition of bar plots to "Module undefined" nodes to highlight the amount of pathway KO not assigned to a module.
Version 0.7.6.3 (2019-02-25)
@@ -79,7 +79,7 @@ Version 0.7.6.2 (2019-02-15)
- Addition of a toggle action to show/hide node labels.
- Addition of a description to the database selection.
- Upgrade of Flask.
-
+
Version 0.7.6.1 (2019-01-18)
- Addition of a help section on the Functree explorer page, and improvement of the main documentation.
@@ -87,7 +87,7 @@
Version 0.7.6.1 (2019-01-18)
Version 0.7.6 (2019-01-15)
- Addition of a zoom control widget.
-
- Replacement of D3 categorical20 color palette by the color blind friendly palette tableau10.
+
- Replacement of D3 categorical20 color palette by the color blind friendly palette tableau10.
Version 0.7.5 (2018-08-10)
@@ -95,11 +95,11 @@ Version 0.7.5 (2018-08-10)
Version 0.7.4 (2018-06-20)
- - Performance improvement: mapping time is reduced to around 15 seconds on dev machine using the example profile.tsv.
+
- Performance improvement: mapping time is reduced to around 15 seconds on dev machine using the example profile.tsv.
Version 0.7.3 (2018-06-19)
- - Performance improvement: mapping time is reduced from 3 minutes to 1 minute and 20 seconds. Module coverage computation time is lowered from 80 seconds to 5 seconds.
+
- Performance improvement: mapping time is reduced from 3 minutes to 1 minute and 20 seconds. Module coverage computation time is lowered from 80 seconds to 5 seconds.
{% endblock %}
diff --git a/package.json b/package.json
index 19d2c8b..ca1d096 100644
--- a/package.json
+++ b/package.json
@@ -1,10 +1,9 @@
{
"name": "functree-ng",
- "description": "Visualization and analysis tool for omics data based on biological functional tree",
+ "description": "FuncTree2: an interactive radial tree for functional hierarchies and omics data visualization",
"author": {
"name": "Yuta Yamate",
- "email": "yyamate@bio.titech.ac.jp",
- "url": "https://yyuuta88.github.io"
+ "url": "https://github.com/yutayamate"
},
"repository": {
"type": "git",
From 0830ffffff96778be3a932d94f5e5d5167f7bf3a Mon Sep 17 00:00:00 2001
From: omixer
Date: Mon, 17 Jun 2019 23:27:02 +0900
Subject: [PATCH 2/3] Fix layer mapping of custom tree upload
---
functree/tree.py | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/functree/tree.py b/functree/tree.py
index b387331..dcdc34e 100755
--- a/functree/tree.py
+++ b/functree/tree.py
@@ -136,7 +136,7 @@ def from_tsv(path, name):
'''
root = Node(entry=name, name=name, layer='root')
- # process annoatation if available
+ # process annotation if available
entry_label = {}
line = path.readline()
@@ -149,8 +149,14 @@ def from_tsv(path, name):
entry, label = line.split('\t')
entry_label[entry] = label
line = path.readline()
+ # set header to current line
+ header = line
+ # if file has annotation
+ if len(entry_label) > 0 :
+ # read header from next line
+ header = path.readline()
- levels = path.readline().strip().decode().split('\t')
+ levels = header.strip().decode().split('\t')
levels.insert(0, 'root')
nodes_layer = {key: {} for key in levels}
nodes_layer['root'] = {'root': root}
From 5d3ef4e2b9edfe433565a17e9154f6c751070491 Mon Sep 17 00:00:00 2001
From: omixer
Date: Thu, 18 Mar 2021 13:23:56 +0900
Subject: [PATCH 3/3] Upgrade dependencies
---
functree/analysis/__init__.py | 47 +++++++++++++++++-----------------
functree/favicon.ico | Bin 0 -> 1150 bytes
functree/templates/about.html | 6 +++++
package.json | 4 +--
requirements.txt | 8 +++---
5 files changed, 35 insertions(+), 30 deletions(-)
create mode 100644 functree/favicon.ico
diff --git a/functree/analysis/__init__.py b/functree/analysis/__init__.py
index 61bcad8..cb695dc 100644
--- a/functree/analysis/__init__.py
+++ b/functree/analysis/__init__.py
@@ -64,30 +64,29 @@ def calc_abundances(df, nodes, method, results):
df_dict = {}
for node in nodes:
entry_profile = None
- # Skip nodes which was already in df_out
- if node['entry'] in df_dict:
- continue
-
- if 'children' not in node:
- try:
- # If node in abundace matrix, input as is
- entry_profile = df.loc[node['entry']]
- except KeyError:
- pass
- else:
- # get leaf ids of the current node
- targets = [child_node['entry'] for child_node in tree.get_nodes(node) if 'children' not in child_node]
- try:
- # loc is row names of data frame
- loc = df.loc[targets]
- # sample abundance for a biological entry
- # Calculated for children of nodes that are not in the input abundance matrix
- entry_profile = eval('loc.{}()'.format(method))
- except KeyError:
- pass
- # the entry on the tree is not in the submitted profile
- if entry_profile is not None:
- df_dict[node['entry']] = entry_profile.to_dict().values()
+ # Compute value for nodes not in df_out
+ if node['entry'] not in df_dict:
+ # if leaf is reached
+ if 'children' not in node:
+ try:
+ # If node in abundance matrix, input as is
+ entry_profile = df.loc[node['entry']]
+ except KeyError:
+ pass
+ else:
+ # get leaf ids of the current node
+ targets = [child_node['entry'] for child_node in tree.get_nodes(node) if 'children' not in child_node]
+ try:
+ # loc is row names of data frame
+ loc = df.loc[targets]
+ # sample abundance for a biological entry
+ # Calculated for children of nodes that are not in the input abundance matrix
+ entry_profile = eval('loc.{}()'.format(method))
+ except KeyError:
+ pass
+ # the entry on the tree is not in the submitted profile
+ if entry_profile is not None:
+ df_dict[node['entry']] = entry_profile.to_dict().values()
df_out = pd.DataFrame.from_dict(df_dict, "index")
if not df_out.empty:
diff --git a/functree/favicon.ico b/functree/favicon.ico
new file mode 100644
index 0000000000000000000000000000000000000000..a001af111e26677e771e16fe44e98ccb667ab052
GIT binary patch
literal 1150
zcmbu8zi*OZ5XT>g0|bZ0fsr_h3$Q>FscnNz>SF6;!$M*gH?XmP03@&&-3VQnWFR3C
zcKc5t5H=D_nA8`9^6P!!{d#vVZ-YqV;6v`cd+zS@{JKLa2mN+-6n!76H}{nCDy1Hg
zkc&K)pOjJ*d*HD|=JYvzd5Y2zA`cDs#Yu_(4~=y&q(KYl=W#dD2P7Z<{`S}j~%6)c`=xVgV6
z5m5eH98f(nnGC#MFMK{9ve_)c;V^Q!oMdr5H~AHgX0wTC^a(s358Q4yTrL;xlYMmb
z44qC#((byy-5;F9eH07^5sSryvHP3-oAq1oAMQ`CBaeJOj}p~`2m3h2EX#WTL?RK%
zF{pp+KGj$KYR_#g{Y_`^ul4V{%S+)o#^+?Ak7(Y@w%IRp%07R6F1`Ee>jsF_I0d#8^LI3~&
literal 0
HcmV?d00001
diff --git a/functree/templates/about.html b/functree/templates/about.html
index 3727372..05d3412 100644
--- a/functree/templates/about.html
+++ b/functree/templates/about.html
@@ -34,6 +34,12 @@ Publications
Change log
+ Version 0.8.4.0 (2021-03-18)
+
+ - Fix layer mapping of custom tree upload.
+
- Fix potential security vulnerabilities.
+
- Update author info.
+
Version 0.8.3.0 (2019-05-08)
- Update citation.
diff --git a/package.json b/package.json
index ca1d096..3d3508a 100644
--- a/package.json
+++ b/package.json
@@ -14,7 +14,7 @@
},
"license": "MIT",
"dependencies": {
- "axios": "^0.17.1",
+ "axios": "^0.21.1",
"bootstrap": "^3.3.7",
"bootstrap-menu": "^1.0.14",
"corejs-typeahead": "^1.2.1",
@@ -23,7 +23,7 @@
"datatables.net-bs": "^1.10.19",
"datatables.net-buttons": "^1.3.1",
"font-awesome": "^4.7.0",
- "highcharts": "^6.0.4",
+ "highcharts": "^9.0.1",
"jquery": "^3.2.1",
"particles.js": "^2.0.0",
"vue": "^2.4.2",
diff --git a/requirements.txt b/requirements.txt
index de4bcf5..2eac6da 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,6 +1,6 @@
blinker==1.4
cairocffi==0.8.0
-CairoSVG==2.0.3
+CairoSVG==2.5.1
cffi==1.10.0
click==6.7
cssselect==1.0.1
@@ -12,14 +12,14 @@ flask-mongoengine==0.9.3
Flask-WTF==0.14.2
itsdangerous==0.24
Jinja2==2.10.1
-lxml==3.8.0
+lxml==4.6.2
MarkupSafe==1.0
mongoengine==0.13.0
networkx==2.1
numpy==1.13.1
olefile==0.44
pandas==0.20.3
-Pillow==4.2.1
+Pillow==7.1.0
pycparser==2.18
pymongo==3.4.0
python-dateutil==2.6.1
@@ -30,5 +30,5 @@ setuptools-scm==1.15.6
six==1.10.0
tinycss==0.4
uWSGI==2.0.15
-Werkzeug==0.12.2
+Werkzeug==0.15.3
WTForms==2.1