Skip to content

Commit

Permalink
new file: metax/taxafunc_analyzer/analyzer_utils/lfq_multiprocessing.py
Browse files Browse the repository at this point in the history
  • Loading branch information
byemaxx committed Oct 3, 2024
1 parent 45562bf commit 9a837a2
Show file tree
Hide file tree
Showing 2 changed files with 887 additions and 6 deletions.
13 changes: 7 additions & 6 deletions metax/taxafunc_analyzer/analyzer_utils/lfq.py
Original file line number Diff line number Diff line change
Expand Up @@ -852,16 +852,15 @@ def run_lfq(

if __name__ == "__main__":
import os
import time
t1 = time.time()

current_dir = os.path.dirname(os.path.realpath(__file__))
df_path = os.path.join(current_dir, "../../../local_tests/peptide_for_protein.tsv")
df = pd.read_csv(df_path, sep="\t")
# reorder df by Proteins
df = df.sort_values(by="Proteins", ignore_index=True)
print(df.head())

norm_df = run_norm(df, protein_id="Proteins", quant_id="Sequence")
print(norm_df.head())

# norm_df = run_norm(df, protein_id="Proteins", quant_id="Sequence")
# print(norm_df.head())

protein_df, ion_df = run_lfq(
df,
Expand All @@ -872,3 +871,5 @@ def run_lfq(
maximum_number_of_quadratic_ions_to_use_per_protein=10,
)
print(protein_df.head())
t2 = time.time()
print(f"Time: {t2-t1:.4f} s")
Loading

0 comments on commit 9a837a2

Please sign in to comment.