Skip to content

Commit

Permalink
Merge pull request #103 from MannLabs/development
Browse files Browse the repository at this point in the history
Release 1.5.4
  • Loading branch information
GeorgWa authored Mar 8, 2024
2 parents 5ca4ec3 + b31c712 commit 79e07a7
Show file tree
Hide file tree
Showing 115 changed files with 4,726 additions and 2,360 deletions.
160 changes: 160 additions & 0 deletions .github/workflows/release_new.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
on:
pull_request:
branches: [ main ]
workflow_dispatch:


name: Release on GitHub

jobs:
Version_Bumped:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.master_version_bumped.outputs.version }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Master version bumped
id: master_version_bumped
shell: bash -l {0}
run: |
cd misc
. ./check_version.sh
echo "version=$current_version" >> $GITHUB_OUTPUT
Create_Draft_On_GitHub:
runs-on: ubuntu-latest
needs: Version_Bumped
outputs:
upload_url: ${{ steps.draft_release.outputs.upload_url }}
steps:
- name: Draft Release
id: draft_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ needs.Version_Bumped.outputs.version }}
release_name: v${{ needs.Version_Bumped.outputs.version }}
draft: true
prerelease: false

Create_MacOS_Installer:
needs: [Create_Draft_On_GitHub, Version_Bumped]
env:
ARCH: x64
EAGER_IMPORT: true
runs-on: macos-latest-xlarge
steps:
- name : Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4

- name: Install conda
uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
continue-on-error: true
auto-update-conda: true
activate-environment: alpha
python-version: "3.11"

- name: Check arm64
shell: bash -el {0}
run: |
python -c "import platform; print(platform.machine())"
- name: Build GUI
run: |
release/macos/build_gui_macos.sh
- name: Build backend
shell: bash -l {0}
run: |
release/macos/build_backend_macos.sh
- name: Build package
shell: bash -l {0}
run: |
release/macos/build_pkg_macos.sh
- name: List output files
run: |
ls dist
- name: Upload a Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.Create_Draft_On_GitHub.outputs.upload_url }}
asset_path: dist/alphadia-${{ needs.Version_Bumped.outputs.version }}-darwin-${{ env.ARCH }}.pkg
asset_name: alphadia-${{ needs.Version_Bumped.outputs.version }}-darwin-${{ env.ARCH }}.pkg
asset_content_type: application/zip

#Create_Windows_Installer:
# needs: [Create_Draft_On_GitHub, Version_Bumped]
# env:
# ARCH: x64
# runs-on: windows-latest
# steps:
# - name : Checkout code
# uses: actions/checkout@v4

# - name: Setup Node.js
# uses: actions/setup-node@v4

# - name: Install conda
# uses: conda-incubator/setup-miniconda@v3
# with:
# miniconda-version: "latest"
# continue-on-error: true
# auto-update-conda: true
# activate-environment: alpha
# python-version: "3.11"

# - name: Check if Innosetup is installed
# shell: powershell
# run: |
# if (-not (Test-Path "C:\Program Files (x86)\Inno Setup 6\ISCC.exe")) {
# Write-Host "Inno Setup is not installed"
# exit 1
# }
# else {
# Write-Host "Inno Setup is installed"
# }

# - name: Build GUI
# shell: powershell
# run: |
# release/windows/build_gui.ps1

# - name: Build Backend
# shell: powershell
# run: |
# release/windows/build_backend.ps1

# - name: Build Installer
# shell: powershell
# run: |
# release/windows/build_installer.ps1

# - name: List output files
# run: |
# ls dist

# - name: Upload a Release Asset
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ needs.Create_Draft_On_GitHub.outputs.upload_url }}
# asset_path: dist/alphadia-${{ needs.Version_Bumped.outputs.version }}-win-x64.exe
# asset_name: alphadia-${{ needs.Version_Bumped.outputs.version }}-win-x64.exe
# asset_content_type: application/zip
4 changes: 2 additions & 2 deletions alphadia/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


__project__ = "alphadia"
__version__ = "1.5.3"
__version__ = "1.5.4"
__license__ = "Apache"
__description__ = "An open-source Python package of the AlphaPept ecosystem"
__author__ = "Mann Labs"
Expand All @@ -13,7 +13,7 @@
"software",
"AlphaPept ecosystem",
]
__python_version__ = ">=3.8,<=3.12"
__python_version__ = ">=3.8"
__classifiers__ = [
"Development Status :: 1 - Planning",
# "Development Status :: 2 - Pre-Alpha",
Expand Down
13 changes: 11 additions & 2 deletions alphadia/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,12 @@ def parse_fasta(args: argparse.Namespace, config: dict) -> list:

def run(*args, **kwargs):
# parse command line arguments
args = parser.parse_args()
args, unknown = parser.parse_known_args()

if unknown:
print(f"Unknown arguments: {unknown}")
parser.print_help()
return

if args.version:
print(f"{alphadia.__version__}")
Expand All @@ -310,7 +315,11 @@ def run(*args, **kwargs):

output_directory = parse_output_directory(args, config)
if output_directory is None:
raise ValueError("No output directory specified.")
# print help message if no output directory specified
parser.print_help()

print("No output directory specified.")
return

reporting.init_logging(output_directory)
raw_path_list = parse_raw_path_list(args, config)
Expand Down
Binary file not shown.
185 changes: 185 additions & 0 deletions alphadia/constants/default.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
# configuration for the extraction plan
version: 1

general:
thread_count: 10
# maximum number of threads or processes to use per raw file
reuse_calibration: false
reuse_quant: false
astral_ms1: false
log_level: 'INFO'
wsl: false
mmap_detector_events: false
use_gpu: true

library_loading:
rt_heuristic: 180
# if retention times are reported in absolute units, the rt_heuristic defines rt is interpreted as minutes or seconds

library_prediction:
predict: False
enzyme: trypsin
fixed_modifications: 'Carbamidomethyl@C'
variable_modifications: 'Oxidation@M;Acetyl@Protein N-term'
max_var_mod_num: 2
missed_cleavages: 1
precursor_len:
- 7
- 35
precursor_charge:
- 2
- 4
precursor_mz:
- 400
- 1200
fragment_mz:
- 200
- 2000
nce: 25.0
instrument: QE
save_hdf: True

search:
channel_filter: '0'
exclude_shared_ions: True
compete_for_fragments: True

target_num_candidates: 2
target_ms1_tolerance: 15
target_ms2_tolerance: 15
target_mobility_tolerance: 0.04
target_rt_tolerance: 60

quant_window: 3

search_advanced:
top_k_fragments: 12

calibration:
min_epochs: 3
max_epochs: 20
batch_size: 8000
recalibration_target: 200
final_full_calibration: False
norm_rt_mode: 'linear'

search_initial:
initial_num_candidates: 1
initial_ms1_tolerance: 30
initial_ms2_tolerance: 30
initial_mobility_tolerance: 0.08
initial_rt_tolerance: 240

selection_config:
peak_len_rt: 10.
sigma_scale_rt: 0.5
peak_len_mobility: 0.01
sigma_scale_mobility: 1.

top_k_precursors: 3
kernel_size: 30

f_mobility: 1.0
f_rt: 0.99
center_fraction: 0.5
min_size_mobility: 8
min_size_rt: 3
max_size_mobility: 50
max_size_rt: 15

group_channels: False
use_weighted_score: True

join_close_candidates: True
join_close_candidates_scan_threshold: 0.01
join_close_candidates_cycle_threshold: 0.6

scoring_config:
score_grouped: false
top_k_isotopes: 3
reference_channel: -1
precursor_mz_tolerance: 10
fragment_mz_tolerance: 15

multiplexing:
multiplexed_quant: False
target_channels: '4,8'
decoy_channel: 12
reference_channel: 0
competetive_scoring: True

fdr:
fdr: 0.01
group_level: 'proteins'
competetive_scoring: true
keep_decoys: false
channel_wise_fdr: false
inference_strategy: "heuristic"

search_output:
peptide_level_lfq: false
precursor_level_lfq: false
min_k_fragments: 12
min_correlation: 0.9
num_samples_quadratic: 50
min_nonnan: 3
normalize_lfq: True

# configuration for the optimization manager
# initial parameters, will nbe optimized
optimization_manager:
fwhm_rt: 5
fwhm_mobility: 0.01
score_cutoff: 0

# configuration for the calibration manager
# the config has to start with the calibration keyword and consists of a list of calibration groups.
# each group consists of datapoints which have multiple properties.
# This can be for example precursors (mz, rt ...), fragments (mz, ...), quadrupole (transfer_efficiency)
calibration_manager:
- name: fragment
estimators:
- name: mz
model: LOESSRegression
model_args:
n_kernels: 2
input_columns:
- mz_library
target_columns:
- mz_observed
output_columns:
- mz_calibrated
transform_deviation: 1e6
- name: precursor
estimators:
- name: mz
model: LOESSRegression
model_args:
n_kernels: 2
input_columns:
- mz_library
target_columns:
- mz_observed
output_columns:
- mz_calibrated
transform_deviation: 1e6
- name: rt
model: LOESSRegression
model_args:
n_kernels: 6
input_columns:
- rt_library
target_columns:
- rt_observed
output_columns:
- rt_calibrated
- name: mobility
model: LOESSRegression
model_args:
n_kernels: 2
input_columns:
- mobility_library
target_columns:
- mobility_observed
output_columns:
- mobility_calibrated
Loading

0 comments on commit 79e07a7

Please sign in to comment.