Skip to content

Commit 0771474

Browse files
authored
Merge pull request #105 from yueqixuan/master
Minor update
2 parents 9f8c734 + e8ffd68 commit 0771474

3 files changed

Lines changed: 21 additions & 7 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,15 @@ E.g. http://ftp.pride.ebi.ac.uk/pub/databases/pride/resources/proteomes/absolute
154154
#### Features to peptides
155155

156156
```asciidoc
157-
ibaqpy features2peptides -p tests/PXD003947/PXD003947-feature.parquet -s tests/PXD003947/PXD003947.sdrf.tsv --remove_ids data/contaminants_ids.tsv --remove_decoy_contaminants --remove_low_frequency_peptides --output tests/PXD003947/PXD003947-peptides-norm.csv
157+
ibaqpyc features2peptides -p PXD000000.ibaq.parquet -s PXD000000.sdrf.tsv --remove_ids data/contaminants_ids.tsv --remove_decoy_contaminants --remove_low_frequency_peptides --output PXD000000-peptides-norm.csv
158158
```
159159

160160
```asciidoc
161161
Usage: features2peptides.py [OPTIONS]
162162

163163
Options:
164-
-p, --parquet TEXT Parquet file import generated by quantms.io
165-
-s, --sdrf TEXT SDRF file import generated by quantms
164+
-p, --parquet TEXT iBAQ view generated by quantms.io
165+
-s, --sdrf TEXT SDRF file for the experiment
166166
--min_aa INTEGER Minimum number of amino acids to filter
167167
peptides
168168
--min_unique INTEGER Minimum number of unique peptides to filter
@@ -192,7 +192,7 @@ Options:
192192
#### Compute IBAQ/TPA
193193

194194
```asciidoc
195-
ibaqpy peptides2protein -f Homo-sapiens-uniprot-reviewed-contaminants-decoy-202210.fasta -p PXD017834-peptides.csv -e Trypsin -n -t -r --ploidy 2 --cpc 200 --organism human --output PXD003947.tsv --verbose
195+
ibaqpyc peptides2protein -f Homo-sapiens-uniprot-reviewed-contaminants-decoy-202210.fasta -p PXD017834-peptides.csv -e Trypsin -n -t -r --ploidy 2 --cpc 200 --organism human --output PXD003947.tsv --verbose
196196
```
197197

198198
```asciidoc
@@ -223,7 +223,7 @@ Options:
223223

224224
### Citation
225225

226-
> Zheng P, Audain E, Webel H, Dai C, Klein J, Hitz MP, Sachsenberg T, Bai M, Perez-Riverol Y. ibaqpy: A scalable Python package for baseline quantification in proteomics leveraging SDRF metadata. bioRxiv 2025.02.08.637208; doi: https://doi.org/10.1101/2025.02.08.637208
226+
> Zheng P, Audain E, Webel H, Dai C, Klein J, Hitz MP, Sachsenberg T, Bai M, Perez-Riverol Y. Ibaqpy: A scalable Python package for baseline quantification in proteomics leveraging SDRF metadata. J Proteomics. 2025 Jun 15;317:105440. doi: https://doi.org/10.1016/j.jprot.2025.105440. Epub 2025 Apr 21. PMID: 40268243.
227227

228228
Other relevant publications:
229229

ibaqpy/ibaq/peptide_normalization.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,18 @@ def apply_initial_filtering(data_df: pd.DataFrame, min_aa: int) -> pd.DataFrame:
208208

209209
data_df = data_df[(data_df["Condition"] != "Empty") | (data_df["Condition"].isnull())]
210210

211+
# "Run" is NA for reference files not found in the SDRF file.
212+
if data_df[RUN].isna().any():
213+
214+
missing_files = data_df.loc[
215+
data_df[RUN].isna(), "Reference"
216+
].drop_duplicates().tolist()
217+
218+
logger.warning(
219+
f"Reference files {missing_files} are not present in the SDRF file. Skipping calculation."
220+
)
221+
data_df.dropna(subset=[RUN], inplace=True)
222+
211223
# Filter peptides with less amino acids than min_aa (default: 7)
212224
data_df.loc[:, "len"] = data_df[PEPTIDE_CANONICAL].apply(len)
213225
data_df = data_df[data_df["len"] >= min_aa]

ibaqpy/model/quantification_type.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ def classify(
6666
"""
6767
label_scheme = None
6868

69-
if len(labels) == 1 and any("label free" in s.lower() for s in labels):
69+
if len(labels) == 1 and any(
70+
keyword in s.lower() for s in labels for keyword in ["lfq", "label free"]
71+
):
7072
label_category = cls.LFQ
7173

7274
elif any("tmt" in s.lower() for s in labels):
@@ -96,7 +98,7 @@ def classify(
9698

9799
else:
98100
raise ValueError(
99-
f"Cannot infer labeling scheme from {labels}, only support label free, TMT and ITRAQ experiment!"
101+
f"Cannot infer labeling scheme from {labels}, only support label free (or lfq), TMT and ITRAQ experiment!"
100102
)
101103
return label_category, label_scheme
102104

0 commit comments

Comments
 (0)