diff --git a/.gitignore b/.gitignore index b7e3a8f..b534954 100644 --- a/.gitignore +++ b/.gitignore @@ -190,3 +190,5 @@ misc/bumpversion.sh figures/ _docs/ _proc/ + +sandbox/ \ No newline at end of file diff --git a/directlfq/__init__.py b/directlfq/__init__.py index a053e46..914353d 100644 --- a/directlfq/__init__.py +++ b/directlfq/__init__.py @@ -2,7 +2,7 @@ __project__ = "directlfq" -__version__ = "0.2.10" +__version__ = "0.2.11" __license__ = "Apache" __description__ = "An open-source Python package of the AlphaPept ecosystem" __author__ = "Mann Labs" diff --git a/directlfq/utils.py b/directlfq/utils.py index 7be9124..11d1545 100644 --- a/directlfq/utils.py +++ b/directlfq/utils.py @@ -433,8 +433,8 @@ def filter_input(filter_dict, input): def merge_protein_and_ion_cols(input_df, config_dict): protein_cols = config_dict.get("protein_cols") ion_cols = config_dict.get("ion_cols") - input_df['protein'] = input_df.apply(lambda row : "_".join(row[protein_cols].astype('string')), axis = 1) - input_df['ion'] = input_df.apply(lambda row : "_".join(row[ion_cols].astype('string')), axis = 1) + input_df['protein'] = join_columns(input_df, protein_cols) + input_df['ion'] = join_columns(input_df, ion_cols) input_df = input_df.rename(columns = {config_dict.get('quant_ID') : "quant_val"}) return input_df @@ -458,7 +458,7 @@ def merge_protein_cols_and_ion_dict(input_df, config_dict): ion_dfs = [] #concatenate multiple protein columns into one - input_df['protein'] = input_df.apply(lambda row: "_".join(row[protein_cols].astype('string')), axis=1) + input_df['protein'] = join_columns(input_df, protein_cols) input_df = input_df.drop(columns = [x for x in protein_cols if x!='protein']) for hierarchy_type in ion_hierarchy.keys(): @@ -483,6 +483,12 @@ def merge_protein_cols_and_ion_dict(input_df, config_dict): input_df = pd.concat(ion_dfs, ignore_index=True) return input_df +def join_columns(df, columns, separator='_'): + if len(columns) == 1: + return df[columns[0]].fillna('nan').astype(str) + else: + return df[columns].fillna('nan').astype(str).agg(separator.join, axis=1) + def get_quantitative_columns(input_df, hierarchy_type, config_dict, ion_headers_merged): naming_columns = ion_headers_merged + ['protein'] diff --git a/misc/bumpversion.cfg b/misc/bumpversion.cfg index 9ed9ebd..edf29f9 100644 --- a/misc/bumpversion.cfg +++ b/misc/bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.2.10 +current_version = 0.2.11 commit = True tag = False parse = (?P\d+)\.(?P\d+)\.(?P\d+)(\-(?P[a-z]+)(?P\d+))? diff --git a/release/one_click_linux_gui/control b/release/one_click_linux_gui/control index 8915d1e..d30b739 100644 --- a/release/one_click_linux_gui/control +++ b/release/one_click_linux_gui/control @@ -1,5 +1,5 @@ Package: directlfq -Version: 0.2.10 +Version: 0.2.11 Architecture: all Maintainer: Mann Labs Description: directlfq diff --git a/release/one_click_linux_gui/create_installer_linux.sh b/release/one_click_linux_gui/create_installer_linux.sh index 9a32408..f806588 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/directlfq-0.2.10-py3-none-any.whl[stable, gui]" +pip install "../../dist/directlfq-0.2.11-py3-none-any.whl[stable, gui]" # Creating the stand-alone pyinstaller folder pip install pyinstaller==4.10 diff --git a/release/one_click_macos_gui/Info.plist b/release/one_click_macos_gui/Info.plist index d87da0a..00db3b6 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 - directlfq.0.2.10 + directlfq.0.2.11 CFBundleShortVersionString - 0.2.10 + 0.2.11 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 616ed56..0e65a9b 100755 --- 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/directlfq-0.2.10-py3-none-any.whl[stable, gui]" +pip install "../../dist/directlfq-0.2.11-py3-none-any.whl[stable, gui]" # Creating the stand-alone pyinstaller folder pip install pyinstaller==4.10 @@ -40,5 +40,5 @@ cp ../../LICENSE Resources/LICENSE cp ../logos/alpha_logo.png Resources/alpha_logo.png chmod 777 scripts/* -pkgbuild --root dist/directlfq --identifier de.mpg.biochem.directlfq.app --version 0.2.10 --install-location /Applications/directlfq.app --scripts scripts directlfq.pkg +pkgbuild --root dist/directlfq --identifier de.mpg.biochem.directlfq.app --version 0.2.11 --install-location /Applications/directlfq.app --scripts scripts directlfq.pkg productbuild --distribution distribution.xml --resources Resources --package-path directlfq.pkg dist/directlfq_gui_installer_macos.pkg diff --git a/release/one_click_macos_gui/distribution.xml b/release/one_click_macos_gui/distribution.xml index acd2b62..d964197 100644 --- a/release/one_click_macos_gui/distribution.xml +++ b/release/one_click_macos_gui/distribution.xml @@ -1,6 +1,6 @@ - directlfq 0.2.10 + directlfq 0.2.11 diff --git a/release/one_click_windows_gui/create_installer_windows.sh b/release/one_click_windows_gui/create_installer_windows.sh index 28e3e5d..10363cd 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/directlfq-0.2.10-py3-none-any.whl[stable, gui]" +pip install "../../dist/directlfq-0.2.11-py3-none-any.whl[stable, gui]" # Creating the stand-alone pyinstaller folder pip install pyinstaller==4.10 diff --git a/release/one_click_windows_gui/directlfq_innoinstaller.iss b/release/one_click_windows_gui/directlfq_innoinstaller.iss index 76e7f22..3882a4e 100644 --- a/release/one_click_windows_gui/directlfq_innoinstaller.iss +++ b/release/one_click_windows_gui/directlfq_innoinstaller.iss @@ -2,7 +2,7 @@ ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "directlfq" -#define MyAppVersion "0.2.10" +#define MyAppVersion "0.2.11" #define MyAppPublisher "Max Planck Institute of Biochemistry and the University of Copenhagen, Mann Labs" #define MyAppURL "https://github.com/MannLabs/directlfq" #define MyAppExeName "directlfq_gui.exe" diff --git a/settings.ini b/settings.ini index 15c4e22..27ac291 100644 --- a/settings.ini +++ b/settings.ini @@ -13,7 +13,7 @@ author = Constantin Ammar author_email = constantin.ammar@gmail.com copyright = fast.ai branch = master -version = 0.2.10 +version = 0.2.11 min_python = 3.6 audience = Developers language = English