Skip to content

Commit

Permalink
Merge pull request #15 from MannLabs/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
ammarcsj authored Jul 27, 2023
2 parents 2b3c5e4 + 85df903 commit ea5315c
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 15 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,5 @@ misc/bumpversion.sh
figures/
_docs/
_proc/

sandbox/
2 changes: 1 addition & 1 deletion directlfq/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
12 changes: 9 additions & 3 deletions directlfq/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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():
Expand All @@ -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']
Expand Down
2 changes: 1 addition & 1 deletion misc/bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.2.10
current_version = 0.2.11
commit = True
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<build>\d+))?
Expand Down
2 changes: 1 addition & 1 deletion release/one_click_linux_gui/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: directlfq
Version: 0.2.10
Version: 0.2.11
Architecture: all
Maintainer: Mann Labs <opensource@alphapept.com>
Description: directlfq
Expand Down
2 changes: 1 addition & 1 deletion release/one_click_linux_gui/create_installer_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions release/one_click_macos_gui/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
<key>CFBundleIconFile</key>
<string>alpha_logo.icns</string>
<key>CFBundleIdentifier</key>
<string>directlfq.0.2.10</string>
<string>directlfq.0.2.11</string>
<key>CFBundleShortVersionString</key>
<string>0.2.10</string>
<string>0.2.11</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand Down
4 changes: 2 additions & 2 deletions release/one_click_macos_gui/create_installer_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion release/one_click_macos_gui/distribution.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<installer-script minSpecVersion="1.000000">
<title>directlfq 0.2.10</title>
<title>directlfq 0.2.11</title>
<background mime-type="image/png" file="alpha_logo.png" scaling="proportional"/>
<welcome file="welcome.html" mime-type="text/html" />
<conclusion file="conclusion.html" mime-type="text/html" />
Expand Down
2 changes: 1 addition & 1 deletion release/one_click_windows_gui/create_installer_windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion release/one_click_windows_gui/directlfq_innoinstaller.iss
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ea5315c

Please sign in to comment.