Skip to content

Commit

Permalink
Merge branch 'master' into ns-rse/259-muropeptides-wasm-working
Browse files Browse the repository at this point in the history
  • Loading branch information
ns-rse committed Jun 4, 2024
2 parents 7b84a44 + 1500505 commit c4b6591
Show file tree
Hide file tree
Showing 9 changed files with 1,090 additions and 1,076 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/lib-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ jobs:
name: Ex1 (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
defaults:
run:
working-directory: ./lib
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4.3.0
with:
python-version: 3.9
python-version: "3.11"
- name: Installing the package
run: |
pip3 install .
Expand Down
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.2.0] - 2024-03-20

### Added

- Added automatic structure consolidation for single datasets (#266)
- Parameterized column names via `config/columns.yaml` (#269 + #275)

### Changed

- Bumped minimum Python version to 3.10 (#269)
- Renamed old columns with `(consolidated)` to `(best match)` (#269)

## [1.1.1] - 2023-11-06

### Changed
Expand Down Expand Up @@ -64,7 +76,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

Let there be peptidoglycan.

[Unreleased]: https://github.com/Mesnage-Org/pgfinder/compare/v1.1.1...HEAD
[Unreleased]: https://github.com/Mesnage-Org/pgfinder/compare/v1.2.0...HEAD
[1.2.0]: https://github.com/Mesnage-Org/pgfinder/compare/v1.1.1...v1.2.0
[1.1.1]: https://github.com/Mesnage-Org/pgfinder/compare/v1.1.0...v1.1.1
[1.1.0]: https://github.com/Mesnage-Org/pgfinder/compare/v1.0.3...v1.1.0
[1.0.3]: https://github.com/Mesnage-Org/pgfinder/compare/v1.0.2...v1.0.3
Expand Down
3 changes: 1 addition & 2 deletions lib/pgfinder/matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ def pick_from_highest_intensity_instance(column: pd.Series):
.reset_index()
)
total_intensity = consolidated_df[intensity_column].sum()
consolidated_df[abundance_column] = consolidated_df[intensity_column] / total_intensity
consolidated_df[abundance_column] = consolidated_df[intensity_column] / total_intensity * 100

consolidated_df[oligomer_column] = consolidated_df[structure_column].apply(lambda s: s[-1])
consolidated_df.sort_values(
Expand All @@ -594,7 +594,6 @@ def pick_from_highest_intensity_instance(column: pd.Series):
[total_column, structure_column, abundance_column, rt_column, theo_column, ppm_column]
]

consolidated_df[abundance_column] = consolidated_df[abundance_column].round(4)
consolidated_df[rt_column] = consolidated_df[rt_column].round(2)
consolidated_df[ppm_column] = consolidated_df[ppm_column].round(1)
# Rename columns using mapping defined in pgfinder/config/columns.yaml under 'consolidation'
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1,300 changes: 650 additions & 650 deletions lib/tests/_regtest_outputs/test_regression.test_matching_mq_baseline.out

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions lib/tests/resources/consolidated.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RT (min),Theo (Da),Delta (ppm),Inferred structure (best match),Intensity (best match),Total Intensity,Structure,Abundance (%),Consolidated RT (min),Consolidated Theo (Da),Consolidated Delta (ppm)
1,100,0.1,gm|0,100,360,gm|0,0.5278,1,100,0.1
2,200,0.2,"gm-AEJN|1, gm-AEJGG|1, gm-AEJX|1",50,,"gm-AEJN|1, gm-AEJGG|1, gm-AEJX|1",0.4167,4,400,0.4
3,300,0.3,gm-AEJR|1,20,,gm-AEJR|1,0.0556,3,300,0.3
1,100,0.1,gm|0,100,360,gm|0,52.7777777777778,1,100,0.1
2,200,0.2,"gm-AEJN|1, gm-AEJGG|1, gm-AEJX|1",50,,"gm-AEJN|1, gm-AEJGG|1, gm-AEJX|1",41.6666666666667,4,400,0.4
3,300,0.3,gm-AEJR|1,20,,gm-AEJR|1,5.55555555555556,3,300,0.3
4,400,0.4,"gm-AEJN|1, gm-AEJGG|1, gm-AEJX|1",60,,,,,,
5,500,0.5,gm|0,90,,,,,,
6,600,0.6,"gm-AEJN|1, gm-AEJGG|1, gm-AEJX|1",40,,,,,,
3 changes: 2 additions & 1 deletion web/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ const config: PlaywrightTestConfig = {
port: 4173
},
testDir: 'tests',
testMatch: /(.+\.)?(test|spec)\.[jt]s/
testMatch: /(.+\.)?(test|spec)\.[jt]s/,
timeout: 5 * 60 * 1000
};

export default config;

0 comments on commit c4b6591

Please sign in to comment.