Skip to content

Commit

Permalink
update: readme
Browse files Browse the repository at this point in the history
  • Loading branch information
zprobot committed Jun 1, 2024
1 parent cad8fd0 commit f366474
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ E.g. http://ftp.pride.ebi.ac.uk/pub/databases/pride/resources/proteomes/absolute
### Assemble features as peptides

```asciidoc
python commands/features2peptides.py -p tests/PXD003947/PXD003947-featrue.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 --log2 --save_parquet
python commands/features2peptides.py -p tests/PXD003947/PXD003947-featrue.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
```
```asciidoc
Usage: features2peptides.py [OPTIONS]
Expand All @@ -87,11 +87,11 @@ Options:
properties for normalization
--skip_normalization Skip normalization step
--nmethod TEXT Normalization method used to normalize
feature intensities for all samples
feature intensities for tec
(options: mean, median, iqr, none)
--pnmethod TEXT Normalization method used to normalize
peptides intensities for all samples
(options: globalMedian,conditionMedian)
(options: globalMedian,conditionMedian,none)
--log2 Transform to log2 the peptide intensity
values before normalization
--save_parquet Save normalized peptides to parquet
Expand Down Expand Up @@ -178,7 +178,7 @@ Options:
The current version of this tool uses OpenMS method to load fasta file, and use [ProteaseDigestion](https://openms.de/current_doxygen/html/classOpenMS_1_1ProteaseDigestion.html) to enzyme digestion of protein sequences, and finally get the theoretical peptide number of each protein.

#### 2. Calculate the IBAQ Value
First, peptide intensity dataframe was grouped according to protein name, sample name and condition. The protein intensity of each group was summed. Finally, the sum of the intensity of the protein is divided by the number of theoretical peptides.
First, peptide intensity dataframe was grouped according to protein name, sample name and condition. The protein intensity of each group was summed. Due to the experimental type, the same protein may exhibit missing peptides in different samples, resulting in variations in the number of peptides detected for the protein across different samples. To handle this difference, normalization within the same group can be achieved by using the formula `sum(peptides) / n`(n represents the number of detected peptide segments). Finally, the sum of the intensity of the protein is divided by the number of theoretical peptides.

If protein-group exists in the peptide intensity dataframe, the intensity of all proteins in the protein-group is summed based on the above steps, and then multiplied by the number of proteins in the protein-group.

Expand Down
4 changes: 2 additions & 2 deletions ibaq/peptide_normalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ def get_report_from_database(self, samples: list, columns: list = None):
:param runs: A list of ms_runs
:return: The report
"""
cols = columns if columns is not None else "*"
cols = ','.join(columns) if columns is not None else '*'
database = self.parquet_db.sql(
"""SELECT {} FROM parquet_db WHERE sample_accession IN {}""".format(
cols, tuple(samples)
Expand Down Expand Up @@ -474,7 +474,7 @@ def get_report_condition_from_database(self, cons: list, columns: list = None):
:param runs: A list of ms_runs
:return: The report
"""
cols = columns if columns is not None else "*"
cols = ','.join(columns) if columns is not None else '*'
database = self.parquet_db.sql(
"""SELECT {} FROM parquet_db WHERE condition IN {}""".format(
cols, tuple(cons)
Expand Down

0 comments on commit f366474

Please sign in to comment.