Skip to content

Commit

Permalink
added a progress bar to razor_sum.py of removing protein less than th…
Browse files Browse the repository at this point in the history
…reshold
  • Loading branch information
byemaxx committed Sep 22, 2024
1 parent e1ba6c4 commit d4c3443
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions metax/taxafunc_analyzer/analyzer_utils/razor_sum.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@ def remove_proteins(proteins):


df = self.df.copy()
df[self.column_map['target']] = df[self.column_map['target']].apply(remove_proteins)

tqdm.pandas(desc="Removing proteins")
df[self.column_map['target']] = df[self.column_map['target']].progress_apply(remove_proteins)

# remove the rows with NA protein of sellf.df
self.df = self.df[df[self.column_map['target']] != '']
# print The number of proteins and peptides after removing the proteins with less than threshold peptides
Expand Down Expand Up @@ -265,5 +267,5 @@ def _update_output_dict(self, target_list, sample_name, intensity):
# res_df.to_csv('razor_protein_intensity.tsv', sep='\t')

# or get minimum target set only
mini_target_set = sia.get_mini_target_set(greedy_method='heap')
# mini_target_set = sia.get_mini_target_set(greedy_method='heap')

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "MetaXTools"
version = "1.114.1"
version = "1.114.2"
description = "MetaXTools is a novel tool for linking peptide sequences with taxonomic and functional information in Metaproteomics."
readme = "README_PyPi.md"
license = { text = "NorthOmics" }
Expand Down

0 comments on commit d4c3443

Please sign in to comment.