From 72090ff96856ba525f9acb0e88f9a49e23ddce6d Mon Sep 17 00:00:00 2001 From: zprobot <1727697083@qq.com> Date: Thu, 31 Oct 2024 16:59:18 +0800 Subject: [PATCH] update: ibaqpy --- .gitignore | 2 ++ ibaqpy/ibaq/ibaqpy_commons.py | 14 ++++++-------- ibaqpy/ibaq/peptide_normalization.py | 4 ++-- ibaqpy/ibaq/utils.py | 2 +- setup.py | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 9f404e4..ed58c0e 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ venv /tests/PXD003947/PXD003947-ibaq-norm.csv /tests/PXD003947/PXD003947-peptides-norm.csv /tests/PXD003947/PXD003947-peptides-norm.parquet +/build/ +/dist/ \ No newline at end of file diff --git a/ibaqpy/ibaq/ibaqpy_commons.py b/ibaqpy/ibaq/ibaqpy_commons.py index 2dd2337..d77a391 100644 --- a/ibaqpy/ibaq/ibaqpy_commons.py +++ b/ibaqpy/ibaq/ibaqpy_commons.py @@ -6,12 +6,10 @@ from matplotlib import pyplot as plt PARQUET_COLUMNS = [ - "protein_accessions", + "pg_accessions", "peptidoform", "sequence", - "charge", - "fragment_ion", - "isotope_label_type", + "precursor_charge", "channel", "condition", "biological_replicate", @@ -52,12 +50,12 @@ IBAQ_PPB = "IbaqPpb" parquet_map = { - "protein_accessions": PROTEIN_NAME, + "pg_accessions": PROTEIN_NAME, "peptidoform": PEPTIDE_SEQUENCE, "sequence": PEPTIDE_CANONICAL, - "charge": PEPTIDE_CHARGE, - "fragment_ion": FRAGMENT_ION, - "isotope_label_type": ISOTOPE_LABEL_TYPE, + "precursor_charge": PEPTIDE_CHARGE, + #"fragment_ion": FRAGMENT_ION, + #"isotope_label_type": ISOTOPE_LABEL_TYPE, "channel": CHANNEL, "condition": CONDITION, "biological_replicate": BIOREPLICATE, diff --git a/ibaqpy/ibaq/peptide_normalization.py b/ibaqpy/ibaq/peptide_normalization.py index aaf6029..f24fbf3 100644 --- a/ibaqpy/ibaq/peptide_normalization.py +++ b/ibaqpy/ibaq/peptide_normalization.py @@ -439,9 +439,9 @@ def get_unique_labels(self): return: A list of labels. """ unique = self.parquet_db.sql( - "SELECT DISTINCT isotope_label_type FROM parquet_db" + "SELECT DISTINCT channel FROM parquet_db" ).df() - return unique["isotope_label_type"].tolist() + return unique["channel"].tolist() def get_unique_tec_reps(self): """ diff --git a/ibaqpy/ibaq/utils.py b/ibaqpy/ibaq/utils.py index 310c1ab..f9cecc1 100644 --- a/ibaqpy/ibaq/utils.py +++ b/ibaqpy/ibaq/utils.py @@ -10,7 +10,7 @@ from sklearn.decomposition import PCA from sklearn.impute import KNNImputer -from combat.pycombat import pycombat +#from combat.pycombat import pycombat logging.basicConfig( format="%(asctime)s [%(funcName)s] - %(message)s", level=logging.DEBUG diff --git a/setup.py b/setup.py index 470ec63..2728ced 100644 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ def readme(): "qnorm", "seaborn", "typing_extensions", - "combat", + #"combat", ], entry_points={"console_scripts": ["ibaqpy=ibaqpy.ibaqpyc:main"]}, classifiers=[