Skip to content

Commit

Permalink
update: tpa
Browse files Browse the repository at this point in the history
  • Loading branch information
zprobot committed Nov 27, 2024
1 parent b5e324e commit 9068fd1
Show file tree
Hide file tree
Showing 4 changed files with 529 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ Options:
#### Compute TPA

```asciidoc
python compute_tpa --fasta Homo-sapiens-uniprot-reviewed-contaminants-decoy-202210.fasta --organism 'human' --peptides PXD003947-peptides.csv --ruler --ploidy 2 --cpc 200 --output PXD003947-tpa.tsv --verbose
ibaqpy tpa --fasta Homo-sapiens-uniprot-reviewed-contaminants-decoy-202210.fasta --organism human --peptides PXD003947-peptides.csv --ruler --ploidy 2 --cpc 200 --output PXD003947-tpa.tsv --verbose
```

```asciidoc
Expand Down
6 changes: 2 additions & 4 deletions ibaqpy/commands/compute_tpa.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import pandas as pd
from matplotlib.backends.backend_pdf import PdfPages
from pyopenms import *
from ibaqpy.data.data import histones

from ibaqpy.ibaq.ibaqpy_commons import (
CONDITION,
Expand Down Expand Up @@ -156,11 +157,8 @@ def get_protein_group_mw(group: str) -> float:
if ruler:
avogadro = 6.02214129e23
average_base_pair_mass = 617.96 # 615.8771

organism = organism.lower()
histone_df = pd.read_json(
open(os.path.split(__file__)[0] + "../data/histones.json", "rb")
).T
histone_df = pd.DataFrame(histones).T
target_histones = histone_df[histone_df["name"] == organism.lower()]
genome_size = target_histones["genome_size"].values[0]
histones_list = target_histones["histone_entries"].values[0]
Expand Down
File renamed without changes.
Loading

0 comments on commit 9068fd1

Please sign in to comment.