Skip to content

Commit

Permalink
Merge pull request #81 from MannLabs/gui_fixes
Browse files Browse the repository at this point in the history
Release 0.2.7
  • Loading branch information
elena-krismer authored Jan 24, 2023
2 parents a548ac4 + f3e3f85 commit d7996a7
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.2.6
current_version = 0.2.7
commit = True
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<build>\d+))?
Expand Down
3 changes: 3 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 0.2.7
* Fix warning when loading DIA-NN GUI

## 0.2.6
* Bug fix when importing data in GUI
* version binning
Expand Down
2 changes: 1 addition & 1 deletion alphastats/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__project__ = "alphastats"
__version__ = "0.2.6"
__version__ = "0.2.7"
__license__ = "Apache"
__description__ = "An open-source Python package for Mass Spectrometry Analysis"
__author__ = "Mann Labs"
Expand Down
17 changes: 8 additions & 9 deletions alphastats/gui/pages/02_Import Data.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,9 @@ def check_software_file(df, software):

elif software == "DIANN":
expected_columns = [
"PG.Quantity",
"Protein.Group",
]

st.write(set(expected_columns).issubset(set(df.columns.to_list())))

if (set(expected_columns).issubset(set(df.columns.to_list()))) == False:
st.error("This is not a valid DIA-NN file.")

Expand Down Expand Up @@ -98,7 +95,7 @@ def load_proteomics_data(uploaded_file, intensity_column, index_column, software
return loader


def select_sample_column_metadata(df):
def select_sample_column_metadata(df, software):
samples_proteomics_data = get_sample_names_from_software_file()
valid_sample_columns = []

Expand All @@ -114,7 +111,7 @@ def select_sample_column_metadata(df):

st.write(
f"Select column that contains sample IDs matching the sample names described"
+ f"in {software_options.get(st.session_state.loader.software).get('import_file')}"
+ f"in {software_options.get(software).get('import_file')}"
)

with st.form("sample_column"):
Expand Down Expand Up @@ -161,7 +158,7 @@ def upload_softwarefile(software):
st.session_state["loader"] = loader


def upload_metadatafile():
def upload_metadatafile(software):

st.write("\n\n")
st.markdown("### 3. Upload corresponding metadata.")
Expand All @@ -180,7 +177,7 @@ def upload_metadatafile():
st.dataframe(metadatafile_df.head(5))
# pick sample column

if select_sample_column_metadata(metadatafile_df):
if select_sample_column_metadata(metadatafile_df, software):
# create dataset
st.session_state["dataset"] = DataSet(
loader=st.session_state.loader,
Expand Down Expand Up @@ -237,7 +234,7 @@ def import_data():
upload_softwarefile(software=software)

if "loader" in st.session_state:
upload_metadatafile()
upload_metadatafile(software)


def display_loaded_dataset():
Expand Down Expand Up @@ -332,5 +329,7 @@ def empty_session_state():

import_data()

display_loaded_dataset()
if "dataset" in st.session_state:

display_loaded_dataset()

2 changes: 0 additions & 2 deletions alphastats/gui/utils/analysis_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
from datetime import datetime




def check_if_options_are_loaded(f):
# decorator to check for missing values
def inner(*args, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion alphastats/loader/DIANNLoader.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __init__(
"""

super().__init__(file, intensity_column, index_column, sep)
self.software = "DIA-NN"
self.software = "DIANN"
self.no_sample_column = [
"PG.Q.value",
"Global.PG.Q.value",
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
author = "Elena Krismer"

# The full version, including alpha/beta/rc tags
release = "0.2.6"
release = "0.2.7"


# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def create_pip_wheel():
requirements, extra_requirements = get_requirements()
setuptools.setup(
name="alphastats",
version="0.2.6",
version="0.2.7",
license="Apache",
description="An open-source Python package for Mass Spectrometry Analysis",
long_description=get_long_description(),
Expand Down

0 comments on commit d7996a7

Please sign in to comment.