Skip to content

Commit

Permalink
Merge pull request #28 from compomics/feature/beta3
Browse files Browse the repository at this point in the history
v2.0.0-beta.3
  • Loading branch information
RalfG authored Feb 10, 2021
2 parents 67d5b81 + d7bc0c8 commit 5c4fc7e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ms2rescore/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,4 +245,4 @@ def run(self):
if self.config["general"]["run_percolator"]:
self._run_percolator()

logging.info("MS²ReScore finished!")
logger.info("MS²ReScore finished!")
2 changes: 1 addition & 1 deletion ms2rescore/_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Single source of ms2rescore version number."""

__version__ = "2.0.0-beta.2"
__version__ = "2.0.0-beta.3"
3 changes: 2 additions & 1 deletion ms2rescore/id_file_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,9 @@ def get_peprec(self) -> PeptideRecord:
pin = self.original_pin
pin.add_peprec_modifications_column()
pin.add_spectrum_index_column(label="tandem_id")
pin.df["ModPeptide"] = pin.df["Peptide"]
peprec_df = peprec_df.merge(
pin.df[["modifications", "tandem_id", "hyperscore", "Label"]],
pin.df[["modifications", "tandem_id", "hyperscore", "Label", "ModPeptide", "Proteins"]],
on="tandem_id"
)
# Validate merge by comparing the hyperscore columns
Expand Down
3 changes: 2 additions & 1 deletion ms2rescore/percolator.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,8 @@ def get_feature_table(self) -> pd.DataFrame:
"charge",
"observed_retention_time"
]
non_feature_cols = pin_cols + peprec_cols
misc_cols = ["tandem_id", "ModPeptide"]
non_feature_cols = pin_cols + peprec_cols + misc_cols
feature_cols = [col for col in self.df.columns if col not in non_feature_cols]
return self.df[feature_cols]

Expand Down
4 changes: 4 additions & 0 deletions ms2rescore/retention_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ def __init__(
self.calibration_set_size = calibration_set_size
self.num_cpu = num_cpu

# Until fixed upstream: https://github.com/compomics/DeepLC/issues/19
if "NUMEXPR_MAX_THREADS" not in os.environ:
os.environ['NUMEXPR_MAX_THREADS'] = str(self.num_cpu)

from deeplc import DeepLC

self.deeplc_predictor = DeepLC(
Expand Down

0 comments on commit 5c4fc7e

Please sign in to comment.