Skip to content

Commit

Permalink
fixing minor warnings that appeared while running pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
CCranney committed Mar 19, 2024
1 parent 7071a01 commit 3c0fac4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/zodiaq/scoring/quantificationFunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
import numpy as np
from zodiaq.utils import format_protein_string_to_list
from .idpickerFunctions import initialize__format_peptide_protein_connections
from scipy import mean
from collections import defaultdict
from itertools import chain
import scipy.linalg as linalg


def calculate_ion_count_from_peptides_of_protein(ionCountList):
return mean(ionCountList)
return np.mean(ionCountList)


def calculate_ion_count_for_each_protein_in_protein_fdr_df(proteinDf):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ def _create_input_template_for_scoring_module(self):
)
duplicatePeptideInputDf["zLIB"] = [2] * len(duplicatePeptideInputDf.index)
allDecoyDf = self._create_input_for_all_decoys()
firstDecoyLayerInputDf = allDecoyDf.iloc[:2]
firstDecoyLayerInputDf = allDecoyDf.iloc[:2].copy()
firstDecoyLayerInputDf["rank"] = [3] * len(firstDecoyLayerInputDf.index)
secondDecoyLayerInputDf = allDecoyDf.iloc[2:4]
secondDecoyLayerInputDf = allDecoyDf.iloc[2:4].copy()
secondDecoyLayerInputDf["rank"] = [4] * len(secondDecoyLayerInputDf.index)
thirdDecoyLayerInputDf = allDecoyDf.iloc[4:]
thirdDecoyLayerInputDf = allDecoyDf.iloc[4:].copy()
thirdDecoyLayerInputDf["rank"] = [5] * len(thirdDecoyLayerInputDf.index)
extraSpectralInputDf = self._create_input_for_generic_peptides(
rank=6, startingRow=200
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ def _create_input_template_for_scoring_module(self):
)
peptideInputDf = self._create_input_for_generic_peptides(rank=2, startingRow=2)
allDecoyDf = self._create_input_for_all_decoys(numRows=3)
firstDecoyLayerInputDf = allDecoyDf.iloc[:2]
firstDecoyLayerInputDf = allDecoyDf.iloc[:2].copy()
firstDecoyLayerInputDf["rank"] = [3] * len(firstDecoyLayerInputDf.index)
secondDecoyLayerInputDf = allDecoyDf.iloc[2:]
secondDecoyLayerInputDf = allDecoyDf.iloc[2:].copy()
secondDecoyLayerInputDf["rank"] = [4] * len(secondDecoyLayerInputDf.index)
self.inputDf = pd.concat(
[
Expand Down

0 comments on commit 3c0fac4

Please sign in to comment.