diff --git a/HISTORY.md b/HISTORY.md
index 5c55e70..7d4071c 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -1,14 +1,17 @@
## Changelog
+### 1.1.2
+* FIX: Correct the bug with MS2 intensity prediction using deep learning.
+* FIX: Correct the hover information/color for the MS2 spectrum for the predicted ion intensities.
+* FIX: Fix the behaviour of the "Previous/Next frame" & "Overlay frames" buttons for DDA data analyzed by MaxQuant.
+
### 1.1.0
* FEAT: Integrate the AlphaPeptDeep package into AlphaViz to predict the peptide properties, such as the MS2 intensity prediction for DDA data and retention time/ion mobility prediction for DIA data.
* FEAT: Update the Quality Control tab to make it lighter than the previous version. Variables for plots (m/z, im, rt, length, etc. distributions) can now be selected.
* FEAT: Reorganize the Settings panel and add more customization options.
* DOCS: Extend Jupyter notebooks for manual visual inspection of timsTOF DDA and DIA data analyzed by MaxQuant and DIA-NN, respectively.
-
### 1.0.5
-
* FEAT: Enable the possibility to read DIA data analysed by the DIA-NN software analysis tool.
* FEAT: Extend the "Quality Control" tab with a summary statistics table and additional plots.
* FEAT: Add a "Targeted Mode" tab to work with raw data only.
@@ -17,6 +20,5 @@
* FIX: Correct the error when reading the MQ output files (missing columns).
### 0.0.1
-
* FEAT: Initial creation of alphaviz.
* FEAT: Read DDA Bruker data processed with MaxQuant software.
diff --git a/alphaviz/__init__.py b/alphaviz/__init__.py
index 54307de..022fac8 100644
--- a/alphaviz/__init__.py
+++ b/alphaviz/__init__.py
@@ -1,7 +1,7 @@
#!python
__project__ = "alphaviz"
-__version__ = "1.1.1"
+__version__ = "1.1.2"
__license__ = "Apache"
__description__ = "A interactive Dashboard to explore mass spectrometry data."
__author__ = "Eugenia Voytik"
diff --git a/alphaviz/docs/alphaviz_tutorial.docx b/alphaviz/docs/alphaviz_tutorial.docx
index f2cbd24..84e10a2 100644
Binary files a/alphaviz/docs/alphaviz_tutorial.docx and b/alphaviz/docs/alphaviz_tutorial.docx differ
diff --git a/alphaviz/docs/alphaviz_tutorial.pdf b/alphaviz/docs/alphaviz_tutorial.pdf
index 5f0f734..67bcd2b 100644
Binary files a/alphaviz/docs/alphaviz_tutorial.pdf and b/alphaviz/docs/alphaviz_tutorial.pdf differ
diff --git a/alphaviz/gui.py b/alphaviz/gui.py
index 4ed040b..45fa481 100644
--- a/alphaviz/gui.py
+++ b/alphaviz/gui.py
@@ -2,7 +2,9 @@
import logging
import platform
import json
+import warnings
import pandas as pd
+from pandas.core.common import SettingWithCopyWarning
from io import StringIO
import alphatims.bruker
@@ -21,6 +23,8 @@
import alphaviz.preprocessing
import alphaviz.plotting
+warnings.simplefilter(action="ignore", category=SettingWithCopyWarning)
+
def get_css_style(
file_name="dashboard_style.css",
@@ -506,6 +510,7 @@ def load_data(self, *args):
self.psm_df['nce'] = 30
self.psm_df['instrument'] = 'timsTOF' # trained on more Lumos files therefore should work better than 'timsTOF'
+ self.psm_df['spec_idx'] += 1
self.trigger_dependancy()
self.upload_progress.active = False
@@ -886,12 +891,14 @@ def __init__(self, data, options):
button_type='default',
width=250,
align='center',
+ disabled=True,
margin=(25, 0, 0, 10),
)
self.export_svg_ms2_button = pn.widgets.Button(
name='Export as .svg',
button_type='default',
align='center',
+ disabled=True,
width=250,
margin=(25, 0, 0, 10),
)
@@ -899,6 +906,7 @@ def __init__(self, data, options):
name='Export as .svg',
button_type='default',
align='center',
+ disabled=True,
width=250,
margin=(25, 0, 0, 10),
)
@@ -1443,10 +1451,9 @@ def display_heatmap_spectrum(self, *args):
ms2_frame = self.ms2_frame
mz = self.peptide['mz']
im = self.peptide['im']
- data_ms1 = self.data.raw_data[ms1_frame].copy()
try:
self.heatmap_ms1_plot = alphaviz.plotting.plot_heatmap(
- data_ms1,
+ self.data.raw_data[ms1_frame],
mz=mz,
im=im,
x_axis_label=self.heatmap_x_axis.value,
@@ -1460,9 +1467,8 @@ def display_heatmap_spectrum(self, *args):
height=450,
margin=(0, 10, 10, 0),
)
- data_ms2 = self.data.raw_data[ms2_frame].copy()
self.heatmap_ms2_plot = alphaviz.plotting.plot_heatmap(
- data_ms2,
+ self.data.raw_data[ms2_frame],
x_axis_label=self.heatmap_x_axis.value,
y_axis_label=self.heatmap_y_axis.value,
title=f'MS2 frame(s) #{ms2_frame}',
@@ -1472,7 +1478,12 @@ def display_heatmap_spectrum(self, *args):
height=450,
margin=(0, 10, 10, 0),
)
-
+ self.layout[10] = pn.Row(
+ None,
+ None,
+ align='center',
+ sizing_mode='stretch_width'
+ )
self.layout[10][0] = pn.Column(
pn.pane.HoloViews(
self.heatmap_ms1_plot,
@@ -1495,13 +1506,21 @@ def display_heatmap_spectrum(self, *args):
)
except ValueError:
print('The x- and y-axis of the heatmaps should be different.')
+ except BaseException as x:
+ print('The heatmaps cannot be displayed.')
if self.analysis_software == 'diann':
if self.x_axis_label_diann.value == 'RT/IM dimension':
self.display_elution_profile_plots()
if self.analysis_software == 'maxquant':
- self.layout[9][0] = self.previous_frame
- self.layout[9][1] = self.next_frame
- self.layout[11] = self.plot_overlapped_frames
+ for each in [self.previous_frame, self.next_frame, self.plot_overlapped_frames]:
+ if len(self.ms1_ms2_frames.keys()) < 2:
+ each.disabled = True
+ else:
+ each.disabled = False
+ if type(self.layout[9][0]) == pn.pane.markup.Str:
+ self.layout[9][0] = self.previous_frame
+ self.layout[9][1] = self.next_frame
+ self.layout[11] = self.plot_overlapped_frames
self.display_mass_spectrum()
def display_mass_spectrum(self, *args):
@@ -1527,7 +1546,6 @@ def display_mass_spectrum(self, *args):
predicted_df['FragmentMz'] = mz_ions.b_z1.values.tolist() + mz_ions.y_z1.values.tolist()[::-1]
predicted_df['RelativeIntensity'] = intensities_ions.b_z1.values.tolist() + intensities_ions.y_z1.values.tolist()[::-1]
predicted_df['ions'] = [f"b{i}" for i in range(1, len(mz_ions.b_z1)+1)] + [f"y{i}" for i in range(1, len(mz_ions.y_z1)+1)]
-
self.ms_spectra_plot = alphaviz.plotting.plot_complex_ms_plot(
data_ions,
title=f'MS2 spectrum for Precursor: {self.ms1_ms2_frames[self.current_frame][1]}',
@@ -1551,15 +1569,15 @@ def display_previous_frame(self, *args):
self.layout[12].loading = True
except IndexError:
pass
- self.plot_overlapped_frames.value = False
current_frame_index = list(self.ms1_ms2_frames.keys()).index(self.current_frame)
if current_frame_index == 0:
self.current_frame = list(self.ms1_ms2_frames.keys())[-1]
else:
self.current_frame = list(self.ms1_ms2_frames.keys())[current_frame_index - 1]
- if self.x_axis_label_mq.value == 'm/z':
- self.display_line_spectra_plots()
- self.display_heatmap_spectrum()
+ if self.plot_overlapped_frames.value == True:
+ self.plot_overlapped_frames.value = False
+ else:
+ self.display_heatmap_spectrum()
def display_next_frame(self, *args):
try:
@@ -1568,15 +1586,15 @@ def display_next_frame(self, *args):
self.layout[12].loading = True
except IndexError:
pass
- self.plot_overlapped_frames.value = False
current_frame_index = list(self.ms1_ms2_frames.keys()).index(self.current_frame)
if current_frame_index == len(self.ms1_ms2_frames.keys())-1:
self.current_frame = list(self.ms1_ms2_frames.keys())[0]
else:
self.current_frame = list(self.ms1_ms2_frames.keys())[current_frame_index + 1]
- if self.x_axis_label_mq.value == 'm/z':
- self.display_line_spectra_plots()
- self.display_heatmap_spectrum()
+ if self.plot_overlapped_frames.value == True:
+ self.plot_overlapped_frames.value = False
+ else:
+ self.display_heatmap_spectrum()
def display_overlapped_frames(self, *args):
try:
@@ -1586,6 +1604,8 @@ def display_overlapped_frames(self, *args):
except IndexError:
pass
if self.plot_overlapped_frames.value is True:
+ self.layout[12] = None
+ self.layout[13] = None
mz = float(self.peptides_table.value.iloc[self.peptides_table.selection[0]]['m/z'])
im = float(self.peptides_table.value.iloc[self.peptides_table.selection[0]]['1/K0'])
try:
@@ -1613,6 +1633,12 @@ def display_overlapped_frames(self, *args):
height=450,
margin=(0, 10, 10, 0),
)
+ self.layout[10] = pn.Row(
+ None,
+ None,
+ align='center',
+ sizing_mode='stretch_width'
+ )
self.layout[10][0] = pn.Column(
pn.pane.HoloViews(
self.heatmap_ms1_plot,
@@ -1633,10 +1659,10 @@ def display_overlapped_frames(self, *args):
self.export_svg_ms2_button,
align='center',
)
-
except ValueError:
print('The x- and y-axis of the heatmaps should be different.')
- self.layout[12] = None
+ except BaseException as x:
+ print('The heatmaps cannot be displayed.')
else:
self.display_heatmap_spectrum()
@@ -1981,6 +2007,7 @@ def __init__(self, data, options):
name='Export as .svg',
button_type='default',
align='center',
+ disabled=True,
width=250,
margin=(25, 0, 0, 10),
)
@@ -1988,6 +2015,7 @@ def __init__(self, data, options):
name='Export as .svg',
button_type='default',
align='center',
+ disabled=True,
width=250,
margin=(25, 0, 0, 10),
)
diff --git a/alphaviz/plotting.py b/alphaviz/plotting.py
index 7ee1784..2e43021 100644
--- a/alphaviz/plotting.py
+++ b/alphaviz/plotting.py
@@ -318,6 +318,7 @@ def plot_heatmap(
z_dimension
)
)
+
agg = rasterize(
dmap,
width=width,
@@ -565,20 +566,21 @@ def plot_mass_spectra(
mode='markers',
opacity=0.7,
marker=dict(color=b_ion_color, size=1),
- hovertext=predicted[2],
+ hovertext=predicted[2][predicted_b_ions_ind],
hovertemplate='m/z: %{x};
Intensity: %{y};
Ion: %{hovertext}.',
name='',
showlegend=False
)
)
+ predicted_y_ions_ind = list(set(predicted[2].index).difference(predicted_b_ions_ind))
fig.add_trace(
go.Scatter(
- x=predicted[0][set(predicted[2].index).difference(predicted_b_ions_ind)],
- y=predicted[1][set(predicted[2].index).difference(predicted_b_ions_ind)],
+ x=predicted[0][predicted_y_ions_ind],
+ y=predicted[1][predicted_y_ions_ind],
mode='markers',
opacity=0.7,
- marker=dict(color=b_ion_color if 'b' in predicted[2] else y_ion_color, size=1),
- hovertext=predicted[2],
+ marker=dict(color=y_ion_color, size=1),
+ hovertext=predicted[2][predicted_y_ions_ind],
hovertemplate='m/z: %{x};
Intensity: %{y};
Ion: %{hovertext}.',
name='',
showlegend=False
diff --git a/misc/bumpversion.cfg b/misc/bumpversion.cfg
index 52200a9..9260b21 100644
--- a/misc/bumpversion.cfg
+++ b/misc/bumpversion.cfg
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 1.1.1
+current_version = 1.1.2
commit = True
tag = False
parse = (?P\d+)\.(?P\d+)\.(?P\d+)(\-(?P[a-z]+)(?P\d+))?
diff --git a/nbs/tutorial_MaxQuant.ipynb b/nbs/tutorial_MaxQuant.ipynb
index 46a2d93..73ab59b 100644
--- a/nbs/tutorial_MaxQuant.ipynb
+++ b/nbs/tutorial_MaxQuant.ipynb
@@ -71,7 +71,7 @@
"metadata": {},
"source": [
"To save the Plotly plots as .svg, you need to add this code with the name of the file inside the show function:\n",
- "`.show(config=alphaviz.gui.update_config(filename='elution_profile.svg'))`. \n",
+ "`.show(config=alphaviz.gui.update_config(filename='elution_profile.svg'))` and when the plot is shown, click the \"Download plot\" button on the Plotly tool panel. \n",
"\n",
"You can also specify the height and width of the saved plot. See example for the Chromatogram plot."
]
@@ -577,7 +577,7 @@
"metadata": {},
"outputs": [],
"source": [
- "predlib = model_mgr.predict_all(data_slice, predict_items=['ms2'], frag_types=['b_z1', 'y_z1'])"
+ "predlib = model_mgr.predict_all(data_slice, predict_items=['ms2'], frag_types=['b_z1', 'y_z1'], multiprocessing=False)"
]
},
{
diff --git a/release/one_click_linux_gui/control b/release/one_click_linux_gui/control
index b8b2b04..cf86a19 100644
--- a/release/one_click_linux_gui/control
+++ b/release/one_click_linux_gui/control
@@ -1,5 +1,5 @@
Package: alphaviz
-Version: 1.1.1
+Version: 1.1.2
Architecture: all
Maintainer: Mann Labs
Description: alphaviz
diff --git a/release/one_click_linux_gui/create_installer_linux.sh b/release/one_click_linux_gui/create_installer_linux.sh
index 3aba172..4e76624 100644
--- a/release/one_click_linux_gui/create_installer_linux.sh
+++ b/release/one_click_linux_gui/create_installer_linux.sh
@@ -17,7 +17,7 @@ python setup.py sdist bdist_wheel
# Setting up the local package
cd release/one_click_linux_gui
# Make sure you include the required extra packages and always use the stable or very-stable options!
-pip install "../../dist/alphaviz-1.1.1-py3-none-any.whl[stable,gui-stable]"
+pip install "../../dist/alphaviz-1.1.2-py3-none-any.whl[stable,gui-stable]"
# Creating the stand-alone pyinstaller folder
pip install pyinstaller==4.2
diff --git a/release/one_click_macos_gui/Info.plist b/release/one_click_macos_gui/Info.plist
index b5b8b30..7ee0eaf 100644
--- a/release/one_click_macos_gui/Info.plist
+++ b/release/one_click_macos_gui/Info.plist
@@ -9,9 +9,9 @@
CFBundleIconFile
alpha_logo.icns
CFBundleIdentifier
- alphaviz.1.1.1
+ alphaviz.1.1.2
CFBundleShortVersionString
- 1.1.1
+ 1.1.2
CFBundleInfoDictionaryVersion
6.0
CFBundleName
diff --git a/release/one_click_macos_gui/create_installer_macos.sh b/release/one_click_macos_gui/create_installer_macos.sh
index 2b2c7d2..7e41168 100644
--- a/release/one_click_macos_gui/create_installer_macos.sh
+++ b/release/one_click_macos_gui/create_installer_macos.sh
@@ -20,7 +20,7 @@ python setup.py sdist bdist_wheel
# Setting up the local package
cd release/one_click_macos_gui
-pip install "../../dist/alphaviz-1.1.1-py3-none-any.whl[stable,gui-stable]"
+pip install "../../dist/alphaviz-1.1.2-py3-none-any.whl[stable,gui-stable]"
# Creating the stand-alone pyinstaller folder
pip install pyinstaller==4.2
@@ -40,5 +40,5 @@ cp ../../LICENSE.txt Resources/LICENSE.txt
cp ../logos/alpha_logo.png Resources/alpha_logo.png
chmod 777 scripts/*
-pkgbuild --root dist/alphaviz --identifier de.mpg.biochem.alphaviz.app --version 1.1.1 --install-location /Applications/alphaviz.app --scripts scripts alphaviz.pkg
+pkgbuild --root dist/alphaviz --identifier de.mpg.biochem.alphaviz.app --version 1.1.2 --install-location /Applications/alphaviz.app --scripts scripts alphaviz.pkg
productbuild --distribution distribution.xml --resources Resources --package-path alphaviz.pkg dist/alphaviz_gui_installer_macos.pkg
diff --git a/release/one_click_macos_gui/distribution.xml b/release/one_click_macos_gui/distribution.xml
index 3652660..e871cda 100644
--- a/release/one_click_macos_gui/distribution.xml
+++ b/release/one_click_macos_gui/distribution.xml
@@ -1,6 +1,6 @@
- alphaviz 1.1.1
+ alphaviz 1.1.2
diff --git a/release/one_click_windows_gui/alphaviz_innoinstaller.iss b/release/one_click_windows_gui/alphaviz_innoinstaller.iss
index 0b8475d..1080ed5 100644
--- a/release/one_click_windows_gui/alphaviz_innoinstaller.iss
+++ b/release/one_click_windows_gui/alphaviz_innoinstaller.iss
@@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "alphaviz"
-#define MyAppVersion "1.1.1"
+#define MyAppVersion "1.1.2"
#define MyAppPublisher "Max Planck Institute of Biochemistry and the University of Copenhagen, Mann Labs"
#define MyAppURL "https://github.com/MannLabs/alphaviz"
#define MyAppExeName "alphaviz_gui.exe"
diff --git a/release/one_click_windows_gui/create_installer_windows.sh b/release/one_click_windows_gui/create_installer_windows.sh
index 84dfff5..35095ce 100644
--- a/release/one_click_windows_gui/create_installer_windows.sh
+++ b/release/one_click_windows_gui/create_installer_windows.sh
@@ -17,7 +17,7 @@ python setup.py sdist bdist_wheel
# Setting up the local package
cd release/one_click_windows_gui
# Make sure you include the required extra packages and always use the stable or very-stable options!
-pip install "../../dist/alphaviz-1.1.1-py3-none-any.whl[stable,gui-stable]"
+pip install "../../dist/alphaviz-1.1.2-py3-none-any.whl[stable,gui-stable]"
# Creating the stand-alone pyinstaller folder
pip install pyinstaller==4.2
diff --git a/requirements/requirements.txt b/requirements/requirements.txt
index 1f87d6e..1cc4548 100644
--- a/requirements/requirements.txt
+++ b/requirements/requirements.txt
@@ -1,3 +1,3 @@
alphatims==0.3.0
-peptdeep==0.0.4
+peptdeep==0.0.5
alphabase==0.0.5