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

Feature/timsim gui #312

Merged
merged 8 commits into from
Jan 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
17 changes: 14 additions & 3 deletions imspy/imspy/timstof/dbsearch/imspy_dda.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

from sklearn.svm import SVC
from sagepy.rescore.rescore import rescore_psms
from sagepy.core.fdr import sage_fdr_psm

from imspy.timstof.dbsearch.utility import sanitize_mz, sanitize_charge, get_searchable_spec, split_fasta, \
write_psms_binary, \
Expand Down Expand Up @@ -405,7 +406,7 @@ def main():
paths.append(os.path.join(root, file))

# Get the write folder path
write_folder_path = str(Path(args.path).parent)
write_folder_path = str(Path(args.path))

# create imspy folder if it does not exist
if not os.path.exists(write_folder_path + "/imspy"):
Expand Down Expand Up @@ -527,10 +528,10 @@ def main():
load_tokenizer_from_resources("tokenizer-ptm"), verbose=True)

# go over RAW data one file at a time
for p, path in enumerate(paths):
for file_id, path in enumerate(paths):
if args.verbose:
print(f"processing {path} ...")
print(f"processing {p + 1} of {len(paths)} ...")
print(f"processing {file_id + 1} of {len(paths)} ...")

ds_name = os.path.basename(path).split(".")[0]
dataset = TimsDatasetDDA(str(path), in_memory=params['in_memory'], use_bruker_sdk=params['bruker_sdk'])
Expand Down Expand Up @@ -789,6 +790,10 @@ def main():
for rt, p in zip(rt_pred, psm):
p.retention_time_predicted = rt

# add file id to PSMs
for p in psm:
p.sage_feature_file_id = file_id

# serialize PSMs to bincode binary
bts = compress_psms(psm)

Expand Down Expand Up @@ -832,6 +837,12 @@ def main():
num_threads=params['num_threads'],
)

# if we have only one fasta file, we can use sage core fdr calculation
if len(fastas) == 1:
if args.verbose:
print("calculating q-values using SAGE internal functions...")
sage_fdr_psm(psms, indexed_db, use_hyper_score=False)

# serialize all PSMs to JSON binary
bts = compress_psms(psms)

Expand Down
4 changes: 2 additions & 2 deletions imspy/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "imspy"
version = "0.3.5"
version = "0.3.6"
description = ""
authors = [
{ name = "theGreatHerrLebert", email = "[email protected]" }
Expand All @@ -19,7 +19,7 @@ dependencies = [
"wandb>=0.12.1",
"mokapot>=0.10.0",
"sagepy>=0.3.0",
"imspy-connector>=0.3.5",
"imspy-connector>=0.3.6",
"scipy>=1.7.1",
"tqdm>=4.66",
"pyarrow>=13.0",
Expand Down
2 changes: 1 addition & 1 deletion imspy_connector/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "imspy-connector"
version = "0.3.5"
version = "0.3.6"
edition = "2021"

[lib]
Expand Down
12 changes: 6 additions & 6 deletions mscore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ version = "0.2.0"
edition = "2021"

[dependencies]
statrs = "0.16.0"
itertools = "0.13.0"
statrs = "0.18.0"
itertools = "0.14.0"
rayon = "1.10.0"
nalgebra = "0.32.5"
serde = { version = "1.0.198", features = ["derive"] }
regex = "1.10.4"
nalgebra = "0.33.2"
serde = { version = "1.0.217", features = ["derive"] }
regex = "1.11.1"
rand = "0.8.5"
ordered-float = "4.5.0"
ordered-float = "4.6.0"
bincode = "2.0.0-rc.3"

[lib]
Expand Down
12 changes: 6 additions & 6 deletions rustdf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ path = "src/lib.rs"
debug = true

[dependencies]
clap = { version = "4.5.4", features = ["derive"] }
libloading = "0.8.3"
rusqlite = { version = "0.31.0", features = ["bundled"] }
clap = { version = "4.5.24", features = ["derive"] }
libloading = "0.8.6"
rusqlite = { version = "0.32.1", features = ["bundled"] }
lzf = "1.0.0"
zstd = "0.13.1"
zstd = "0.13.2"
byteorder = "1.5.0"
mscore = {path = "../mscore"}
rayon = "1.10.0"
serde = { version = "1.0.197", features = ["derive"] }
serde_json = "1.0.115"
serde = { version = "1.0.217", features = ["derive"] }
serde_json = "1.0.135"
rand = "0.8.5"
Loading