Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/0.4.3 #100

Merged
merged 61 commits into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
c0280c8
cover plink2 result - need to check
mostafakalhor Jun 2, 2023
a88ead0
fixed plink2.py
mostafakalhor Jun 4, 2023
07b73d8
import plink2 and fix reverse col to boolean
mostafakalhor Jun 9, 2023
bfb7cf7
fixed some bugs
Jun 12, 2023
41edd8a
a
mostafakalhor Jun 12, 2023
413a97e
Merge branch 'development' into feature/xl_search_engine
mostafakalhor Jun 12, 2023
fa7fd21
updatae msraw.py from development branch
mostafakalhor Jul 3, 2023
08e3334
changed plink2
mostafakalhor Jul 6, 2023
3df8997
updated plink2.py
mostafakalhor Jul 9, 2023
7a00019
added xlinkx for cce (cce is working based on pep 1)
Jul 26, 2023
e1942ff
cover xisearch result
Nov 15, 2023
c045e25
cover xisearch result
Nov 15, 2023
102dc51
try to merge development to mine
Apr 9, 2024
2a975b1
divided rt by 60 to get minutes instead of seconds
arne-vdb Apr 9, 2024
105283d
blake file format modifications
arne-vdb Apr 9, 2024
608c4e1
focusing on xisearch - remove xlink and plink2 - everything is workin…
Apr 9, 2024
7edebff
xisearch test was added - pytest is working
Apr 9, 2024
00e2f8a
working on nox-based errors
Apr 10, 2024
e7a7dd5
working on nox-related errors - only Xisearch.add_mod_sequence is nee…
Apr 10, 2024
8c36f75
fixed typeguard error. only pre-commit need to be fixed
Apr 10, 2024
52fc13d
everything is working -ready for pull request
Apr 10, 2024
fe89064
still working on errors - fixed typrguard error
Apr 10, 2024
cdd6a08
ready for pull request
Apr 10, 2024
8f7a236
readd darglint to flake8 tests
picciama Apr 10, 2024
ca3c20d
fix pre-commit hooks and cleanup self/static
picciama Apr 10, 2024
bbbc87b
fix line endings CRLF -> LF
picciama Apr 10, 2024
97c0887
fixed gitattributes
picciama Apr 10, 2024
4a1f735
deleted unnecessary files
picciama Apr 10, 2024
4147606
custom init with xl arg and raise on tmt label
picciama Apr 10, 2024
698ceaa
removed def in
mostafakalhor Apr 11, 2024
a775f41
updated requirements.txt according to poetry
picciama Apr 11, 2024
46ebb64
Merge branch 'feature/xl_search_engine' of github.com:wilhelm-lab/spe…
picciama Apr 11, 2024
eda2dba
removed def internal to xisearch and import it from mod_string spectr…
mostafakalhor Apr 11, 2024
f659213
clean up
mostafakalhor Apr 12, 2024
ac86440
Merge branch 'feature/xl_search_engine' of github.com:wilhelm-lab/spe…
picciama Apr 12, 2024
b7df496
ensure deletion of output files
picciama Apr 12, 2024
d10b921
remove print statements
picciama Apr 12, 2024
4c854e3
fixed reading with dtypes correctly
picciama Apr 12, 2024
03b547c
updated fundamentals to 0.51
picciama Apr 12, 2024
c932841
Merge pull request #91 from wilhelm-lab/feature/xl_search_engine
picciama Apr 12, 2024
45313a3
[DEPENDABOT]: Bump pypa/gh-action-pypi-publish from 1.6.4 to 1.8.14
dependabot[bot] Apr 12, 2024
100afb2
Merge pull request #90 from wilhelm-lab/fix/alphatims_rt
picciama Apr 12, 2024
28bef6b
[DEPENDABOT]: Bump actions/cache from 3.2.4 to 4.0.2
dependabot[bot] Apr 15, 2024
476697e
[DEPENDABOT]: Bump actions/checkout from 2 to 4
dependabot[bot] Apr 15, 2024
318008c
fix read decoy info from label column
picciama Apr 27, 2024
e7372d8
fixed dlib for new oktoberfest logic
picciama Apr 27, 2024
21a03b4
Merge branch 'development' into feature/dlib_support
picciama Apr 27, 2024
80484f6
fix removing n-terminal dash for TMT sequences
picciama Apr 27, 2024
e14f86e
cleanup reading / storing to internal format
picciama Apr 27, 2024
cfdf207
fix carbamidomethylation weight
picciama Apr 27, 2024
efb28f8
Merge branch 'main' into development
picciama Apr 27, 2024
4855cde
Merge branch 'development' into feature/dlib_support
picciama Apr 27, 2024
436109f
fixed dep to fundamentals changed unimod:4 mass)
picciama Apr 27, 2024
f684731
close connection after writing is done
picciama Apr 27, 2024
4a0c100
update deps, removing tables
picciama Apr 27, 2024
275ef32
Merge pull request #99 from wilhelm-lab/feature/dlib_support
picciama Apr 27, 2024
080a28a
Merge pull request #98 from wilhelm-lab/fix/sage_read_tmt_and_decoys
picciama Apr 27, 2024
e55dab1
Merge pull request #93 from wilhelm-lab/dependabot/github_actions/dev…
picciama Apr 27, 2024
1d8e49c
Merge pull request #92 from wilhelm-lab/dependabot/github_actions/dev…
picciama Apr 27, 2024
071657f
Merge pull request #94 from wilhelm-lab/dependabot/github_actions/dev…
picciama Apr 27, 2024
c6f6a42
Bump version from 0.4.2 to 0.4.3
picciama Apr 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cookietemple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ full_name: Mario Picciani
email: [email protected]
project_name: spectrum_io
project_short_description: IO related functionalities for oktoberfest.
version: 0.4.2
version: 0.4.3
license: MIT
4 changes: 2 additions & 2 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name-template: "0.4.2 🌈" # <<COOKIETEMPLE_FORCE_BUMP>>
tag-template: 0.4.2 # <<COOKIETEMPLE_FORCE_BUMP>>
name-template: "0.4.3 🌈" # <<COOKIETEMPLE_FORCE_BUMP>>
tag-template: 0.4.3 # <<COOKIETEMPLE_FORCE_BUMP>>
exclude-labels:
- "skip-changelog"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
python: [3.8, 3.9]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
name: Check out source-code repository

- name: Setup Python
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2.3.3
uses: actions/checkout@v4

- name: Run Labeler
uses: crazy-max/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
name: Check out source-code repository

- name: Setup Python
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2.3.4
uses: actions/checkout@v4
with:
fetch-depth: 2

Expand All @@ -29,7 +29,7 @@ jobs:
poetry build --ansi

- name: Publish package on PyPI
uses: pypa/gh-action-pypi-publish@v1.6.4
uses: pypa/gh-action-pypi-publish@v1.8.14
with:
# TODO COOKIETEMPLE: Configure your PyPI Token to enable automatic deployment to PyPi on releases
# https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_cookietemple_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
name: Check out source-code repository

- name: Setup Python
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:

steps:
- name: Check out the repository
uses: actions/checkout@v2.3.4
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
print("::set-output name=result::{}".format(result))

- name: Restore pre-commit cache
uses: actions/cache@v3.2.4
uses: actions/cache@v4.0.2
if: matrix.session == 'pre-commit'
with:
path: ~/.cache/pre-commit
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
needs: tests
steps:
- name: Check out the repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python 3.8
uses: actions/setup-python@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Install cookietemple
run: pip install cookietemple

- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: "${{ secrets.CT_SYNC_TOKEN }}"
Expand Down
2 changes: 1 addition & 1 deletion cookietemple.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.4.2
current_version = 0.4.3

[bumpversion_files_whitelisted]
init_file = spectrum_io/__init__.py
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@
# the built documents.
#
# The short X.Y version.
version = "0.4.2"
version = "0.4.3"
# The full version, including alpha/beta/rc tags.
release = "0.4.2"
release = "0.4.3"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
1 change: 1 addition & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ def precommit(session: Session) -> None:
"flake8",
"flake8-bandit",
"flake8-bugbear",
"darglint",
"flake8-docstrings",
"flake8-rst-docstrings",
"isort",
Expand Down
1,942 changes: 883 additions & 1,059 deletions poetry.lock

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "spectrum_io"
version = "0.4.2" # <<COOKIETEMPLE_FORCE_BUMP>>
version = "0.4.3" # <<COOKIETEMPLE_FORCE_BUMP>>
description = "IO related functionalities for oktoberfest."
authors = ["Wilhelmlab at Technical University of Munich"]
license = "MIT"
Expand Down Expand Up @@ -29,8 +29,7 @@ h5py = "^3.1.0"
pymzml = "^2.5.0"
pyteomics = "^4.3.3"
lxml= '^4.5.2'
tables = "^3.6.1"
spectrum-fundamentals = ">=0.5.0,<0.6.0"
spectrum-fundamentals = ">=0.5.2,<0.6.0"
alphatims = "^1.0.8"
sortedcontainers = "^2.4.0"

Expand Down
53 changes: 42 additions & 11 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,42 @@
click>=8.0.0
rich>=10.3.0
PyYAML>=5.4.1
numpy>=1.18.1
pandas>=1.3.0
h5py>=3.1.0
pymzml>=2.5.0
pyteomics>=4.3.3
lxml>=4.5.2
tables>=3.6.1
spectrum-fundamentals>=0.3.0
alphatims==1.0.8 ; python_version >= "3.8" and python_full_version < "3.11.0"
click==8.1.7 ; python_version >= "3.8" and python_full_version < "3.11.0"
colorama==0.4.6 ; python_version >= "3.8" and python_full_version < "3.11.0" and platform_system == "Windows"
contourpy==1.1.1 ; python_version >= "3.8" and python_full_version < "3.11.0"
cycler==0.12.1 ; python_version >= "3.8" and python_full_version < "3.11.0"
fonttools==4.51.0 ; python_version >= "3.8" and python_full_version < "3.11.0"
h5py==3.11.0 ; python_version >= "3.8" and python_full_version < "3.11.0"
importlib-metadata==7.1.0 ; python_version >= "3.8" and python_version < "3.9"
importlib-resources==6.4.0 ; python_version >= "3.8" and python_version < "3.10"
joblib==1.4.0 ; python_version >= "3.8" and python_full_version < "3.11.0"
kiwisolver==1.4.5 ; python_version >= "3.8" and python_full_version < "3.11.0"
llvmlite==0.41.1 ; python_version >= "3.8" and python_full_version < "3.11.0"
lxml==4.9.4 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0"
markdown-it-py==3.0.0 ; python_version >= "3.8" and python_full_version < "3.11.0"
matplotlib==3.7.5 ; python_version >= "3.8" and python_full_version < "3.11.0"
mdurl==0.1.2 ; python_version >= "3.8" and python_full_version < "3.11.0"
moepy==1.1.4 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0"
numba==0.58.1 ; python_version >= "3.8" and python_full_version < "3.11.0"
numpy==1.24.4 ; python_version >= "3.8" and python_full_version < "3.11.0"
packaging==24.0 ; python_version >= "3.8" and python_full_version < "3.11.0"
pandas==1.5.3 ; python_version >= "3.8" and python_full_version < "3.11.0"
pillow==10.3.0 ; python_version >= "3.8" and python_full_version < "3.11.0"
psutil==5.9.8 ; python_version >= "3.8" and python_full_version < "3.11.0"
pygments==2.17.2 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0"
pymzml==2.5.9 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0"
pyparsing==3.1.2 ; python_version >= "3.8" and python_full_version < "3.11.0"
pyteomics==4.7.2 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0"
python-dateutil==2.9.0.post0 ; python_version >= "3.8" and python_full_version < "3.11.0"
pytz==2024.1 ; python_version >= "3.8" and python_full_version < "3.11.0"
pyyaml==6.0.1 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0"
pyzstd==0.15.10 ; python_version >= "3.8" and python_full_version < "3.11.0"
regex==2024.4.16 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0"
rich==13.7.1 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0"
scikit-learn==1.3.2 ; python_version >= "3.8" and python_full_version < "3.11.0"
scipy==1.10.1 ; python_version >= "3.8" and python_full_version < "3.11.0"
six==1.16.0 ; python_version >= "3.8" and python_full_version < "3.11.0"
sortedcontainers==2.4.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0"
spectrum-fundamentals==0.5.2 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0"
threadpoolctl==3.4.0 ; python_version >= "3.8" and python_full_version < "3.11.0"
tqdm==4.66.2 ; python_version >= "3.8" and python_full_version < "3.11.0"
typing-extensions==4.11.0 ; python_version >= "3.8" and python_version < "3.9"
zipp==3.18.1 ; python_version >= "3.8" and python_version < "3.10"
2 changes: 1 addition & 1 deletion spectrum_io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

__author__ = "Mario Picciani"
__email__ = "[email protected]"
__version__ = "0.4.2"
__version__ = "0.4.3"

import logging
import logging.handlers
Expand Down
2 changes: 1 addition & 1 deletion spectrum_io/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


@click.command()
@click.version_option(version="0.4.2", message=click.style("spectrum_io Version: 0.4.2"))
@click.version_option(version="0.4.3", message=click.style("spectrum_io Version: 0.4.3"))
def main() -> None:
"""spectrum_io."""

Expand Down
3 changes: 3 additions & 0 deletions spectrum_io/d/bruker.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ def read_timstof(hdf_file: Path, scan_to_precursor_map: pd.DataFrame) -> pd.Data
)
df.columns = ["FRAME", "SCAN", "PRECURSOR", "RETENTION_TIME", "INV_ION_MOBILITY", "MZ", "INTENSITIES"]

# converting RETENTION TIME from seconds to minutes
df["RETENTION_TIME"] = df["RETENTION_TIME"].div(60)

# aggregation
df_combined_grouped = (
df.merge(
Expand Down
1 change: 1 addition & 0 deletions spectrum_io/search_result/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
from .maxquant import MaxQuant
from .msfragger import MSFragger
from .sage import Sage
from .xisearch import Xisearch
21 changes: 9 additions & 12 deletions spectrum_io/search_result/sage.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ def read_result(self, tmt_labeled: str = "") -> pd.DataFrame:
:param tmt_labeled: tmt label as str
:return: pd.DataFrame with the formatted data
"""
logger.info("Reading msms.tsv file")
logger.info(f"Reading {self.path}")
df = pd.read_csv(
self.path,
usecols=["filename", "scannr", "peptide", "charge", "hyperscore", "calcmass", "proteins"],
usecols=["filename", "scannr", "peptide", "charge", "hyperscore", "calcmass", "label", "proteins"],
sep="\t",
)
logger.info("Finished reading msms.tsv file")
logger.info(f"Finished reading {self.path}")

# Standardize column names
df.columns = df.columns.str.upper()
Expand All @@ -51,6 +51,9 @@ def update_columns_for_prosit(df: pd.DataFrame, tmt_labeled: str) -> pd.DataFram
"SCANNR": "SCAN_NUMBER",
"PEPTIDE": "MODIFIED_SEQUENCE",
"CHARGE": "PRECURSOR_CHARGE",
"CALCMASS": "MASS",
"HYPERSCORE": "SCORE",
"LABEL": "REVERSE",
}
)

Expand All @@ -59,18 +62,12 @@ def update_columns_for_prosit(df: pd.DataFrame, tmt_labeled: str) -> pd.DataFram
# extracting only the scan number
df["SCAN_NUMBER"] = [int(x.rsplit("=", 1)[-1]) for x in df["SCAN_NUMBER"]]
# creating a column of decoys and targets
df["REVERSE"] = df["PROTEINS"].str.startswith("rev_")
df["REVERSE"] = df["REVERSE"] < 0
# removing modification to create the unmodified sequences
df["SEQUENCE"] = df["MODIFIED_SEQUENCE"].str.replace(r"\[.*?\]", "", regex=True)
df["SEQUENCE"] = df["MODIFIED_SEQUENCE"].str.replace(r"\-|\[.*?\]", "", regex=True)
# length of the peptide
df["PEPTIDE_LENGTH"] = df["SEQUENCE"].str.len()
# mass of the peptide
df["MASS"] = df["CALCMASS"]
# score of the peptide
df["SCORE"] = df["HYPERSCORE"]
# converting proforma to unimode
print(df)
# converting sage to unimod
df["MODIFIED_SEQUENCE"] = sage_to_internal(df["MODIFIED_SEQUENCE"])

print(df.columns)
return df
6 changes: 5 additions & 1 deletion spectrum_io/search_result/search_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ def __init__(self, path: Union[str, Path]):

@abstractmethod
def read_result(self, tmt_labeled: str):
"""Read result."""
"""Read result.

:param tmt_labeled: tmt label as str

"""
raise NotImplementedError

def generate_internal(self, tmt_labeled: str, out_path: Optional[Union[str, Path]] = None) -> pd.DataFrame:
Expand Down
Loading
Loading