Skip to content

Commit

Permalink
Merge pull request #134 from Roestlab/fix/scipy-bump
Browse files Browse the repository at this point in the history
Minor Fixes
  • Loading branch information
jcharkow committed Apr 9, 2024
2 parents 5860ead + 4e5ad60 commit cfb9cd3
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions massdash/loaders/access/MzMLDataAccess.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,14 +391,14 @@ def msExperimentToFeatureMap(self, msExperiment: po.MSExperiment, feature: Trans
spec = msExperiment.getSpectrum(k)
mz, intensity = spec.get_peaks()
if (len(mz) == 0 and len(intensity) == 0):
LOGGER.warn(
LOGGER.warning(
f"MS{spec.getMSLevel()} spectrum native id {spec.getNativeID()} had no m/z or intensity array, skipping this spectrum")
continue
rt = np.full([mz.shape[0]], spec.getRT(), float)

if not self.has_im:
if config.im_window is not None:
LOGGER.warn(
LOGGER.warning(
f"MS{spec.getMSLevel()} spectrum native id {spec.getNativeID()} had no ion mobility array")
im = np.full([mz.shape[0]], np.nan, float)
else:
Expand All @@ -420,7 +420,7 @@ def msExperimentToFeatureMap(self, msExperiment: po.MSExperiment, feature: Trans
annotation_mz_mapping = pd.concat([annotation_mz_mapping, pd.DataFrame({'Annotation': ['prec'], 'product_mz': [feature.precursor_mz]})])
results_df = results_df.merge(annotation_mz_mapping, on='Annotation', how='left')
else:
LOGGER.warn(f"No spectra found for peptide: {feature.sequence}{feature.precursor_charge}. Try adjusting the extraction parameters")
LOGGER.warning(f"No spectra found for peptide: {feature.sequence}{feature.precursor_charge}. Try adjusting the extraction parameters")
results_df = pd.DataFrame(columns=['rt', 'int', 'Annotation'])

return FeatureMap(results_df, feature.sequence, feature.precursor_charge, config)
Expand Down
3 changes: 2 additions & 1 deletion massdash/plotting/InteractivePlotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

# Data modules
import numpy as np
from scipy.signal import savgol_filter, gaussian, convolve
from scipy.signal import savgol_filter, convolve
from scipy.signal.windows import gaussian

# Plotting modules
from bokeh.plotting import figure
Expand Down
4 changes: 2 additions & 2 deletions massdash/plotting/InteractiveTwoDimensionPlotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Data modules
import numpy as np
import pandas as pd
from scipy.ndimage.filters import gaussian_filter
from scipy.ndimage import gaussian_filter

# Plotting modules
from bokeh.models import HoverTool, CrosshairTool, Title
Expand All @@ -20,7 +20,7 @@
from .GenericPlotter import PlotConfig
# Structs
from ..structs.FeatureMap import FeatureMap
#Transofmrations
#Transformations
from ..dataProcessing.transformations import equalize2D

class InteractiveTwoDimensionPlotter:
Expand Down
2 changes: 1 addition & 1 deletion massdash/structs/TransitionGroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def plot(self,
transitionGroupFeatures (Optional[List[TransitionGroupFeature]], optional): list of transition group features include in plot. Defaults to None.
smoothing (Optional[Literal['none', 'sgolay', 'gauss']], optional): Smoothing to apply on the plot. Defaults to 'none'.
gaussian_sigma (float, optional): sigma for gaussian plotting, ignored if smoothing is not 'gauss'. Defaults to 2.0.
gaussian_window (int, optional): window for guassian plotting, ignored if smoothing is not 'gauss'. Defaults to 11.
gaussian_window (int, optional): window for gaussian plotting, ignored if smoothing is not 'gauss'. Defaults to 11.
sgolay_polynomial_order (int, optional): Polynomial order for sgolay, ignored if smoothing is not 'sgolay'. Defaults to 3.
sgolay_frame_length (int, optional): Frame length for sgolay, ignored if smoothing is not 'sgolay'. Defaults to 11.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ requires = [
"plotly",
"psutil",
"pyopenms",
"scipy",
"scipy>=1.12.0",
"streamlit>=1.30.0",
"streamlit-javascript",
"tk",
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ install_requires =
plotly
psutil
pyopenms
scipy
scipy>=1.12.0
streamlit>=1.30.0
streamlit-javascript
tk
Expand Down

0 comments on commit cfb9cd3

Please sign in to comment.