cellmaps-utils 0.10.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cellmaps_utils/__init__.py +9 -0
- cellmaps_utils/apms_readme.txt +85 -0
- cellmaps_utils/apms_zmadex_saint_readme.txt +165 -0
- cellmaps_utils/apmstool.py +945 -0
- cellmaps_utils/basecmdtool.py +108 -0
- cellmaps_utils/cellmaps_utilscmd.py +133 -0
- cellmaps_utils/challenge.py +1000 -0
- cellmaps_utils/constants.py +392 -0
- cellmaps_utils/crispr_readme.txt +19 -0
- cellmaps_utils/crisprtool.py +369 -0
- cellmaps_utils/ddotconverter.py +285 -0
- cellmaps_utils/exceptions.py +15 -0
- cellmaps_utils/hcx_utils.py +198 -0
- cellmaps_utils/hidefconverter.py +245 -0
- cellmaps_utils/hierdiff.py +142 -0
- cellmaps_utils/ifimage_readme.txt +31 -0
- cellmaps_utils/iftool.py +657 -0
- cellmaps_utils/logutils.py +214 -0
- cellmaps_utils/music_utils.py +246 -0
- cellmaps_utils/ndexupload.py +193 -0
- cellmaps_utils/provenance.py +890 -0
- cellmaps_utils/secms_readme.txt +81 -0
- cellmaps_utils/secmstool.py +262 -0
- cellmaps_utils/statsgenerator.py +237 -0
- cellmaps_utils/tabletool.py +399 -0
- cellmaps_utils-0.10.0.data/scripts/cellmaps_utilscmd.py +133 -0
- cellmaps_utils-0.10.0.dist-info/AUTHORS.rst +20 -0
- cellmaps_utils-0.10.0.dist-info/LICENSE +22 -0
- cellmaps_utils-0.10.0.dist-info/METADATA +275 -0
- cellmaps_utils-0.10.0.dist-info/RECORD +32 -0
- cellmaps_utils-0.10.0.dist-info/WHEEL +5 -0
- cellmaps_utils-0.10.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
|
|
3
|
+
"""Top-level package for cellmaps_utils."""
|
|
4
|
+
|
|
5
|
+
__author__ = 'Cell Maps team'
|
|
6
|
+
__email__ = 'tools@cm4ai.org'
|
|
7
|
+
__version__ = '0.10.0'
|
|
8
|
+
__repo_url__ = 'https://github.com/idekerlab/cellmaps_utils'
|
|
9
|
+
__description__ = 'Contains utilities needed by Cell Maps tools'
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
Affinity Purification Mass spectrometry (AP-MS)
|
|
2
|
+
-----------------------------------------------
|
|
3
|
+
|
|
4
|
+
Affinity Purification-Mass Spectrometry (AP-MS) is a powerful technique used to uncover the intricate networks of
|
|
5
|
+
protein interactions within cells. Different methods can be used but the most popular approach is to attach a purifiable
|
|
6
|
+
tag to a protein of interest, the "bait". In the context of CM4AI the tag is directly attached to the endogenous protein
|
|
7
|
+
of interest using gene editing to maintain physiological level of expression. The tagged bait is then purified from cell
|
|
8
|
+
extract with its interacting partners. Once separated, the captured proteins are identified using a mass spectrometer
|
|
9
|
+
allowing to infer protein-protein interactions. Understanding these interactions allows can unravel complex cellular
|
|
10
|
+
processes, discover new roles for proteins, and gain insights into diseases caused by disrupted protein networks.
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
Data processing
|
|
14
|
+
---------------
|
|
15
|
+
|
|
16
|
+
Raw data acquired on a Orbitrap Fusion™ Lumos™ Tribrid™ Mass Spectrometer (Thermo Scientific)
|
|
17
|
+
Raw data are processed using Maxquant v1.6.12.0 using default parameter with LFQ quantification and the
|
|
18
|
+
“202209_uniprot_human_reviewed.fasta” file as reference.
|
|
19
|
+
Evidence file from maxquant are processed using ArtMS in R to generate SAINT input files using the
|
|
20
|
+
following command lines. SAINTexpress was run locally using version SAINTexpress_v3.6.3
|
|
21
|
+
SAINT is designed to assess the reliability and significance of protein-protein interactions identified
|
|
22
|
+
through mass spectrometry experiments. It takes into account both the presence and abundance of proteins
|
|
23
|
+
in different experimental conditions or replicates. The method uses a probabilistic model to estimate the
|
|
24
|
+
probability that a given interaction is a true positive rather than a random or non-specific interaction.
|
|
25
|
+
This approach helps to distinguish true interactions from noise in large-scale protein interaction datasets.
|
|
26
|
+
|
|
27
|
+
apms.tsv column labels
|
|
28
|
+
----------------------
|
|
29
|
+
|
|
30
|
+
Bait: Name of the pull downed protein
|
|
31
|
+
|
|
32
|
+
Prey: Uniprot ID number of identified proteins by MS in pull down (putative bait interactor).
|
|
33
|
+
|
|
34
|
+
PreyGene.x: Uniprot protein name of identified protein by MS in pull down (putative bait interactor).
|
|
35
|
+
|
|
36
|
+
Spec: Number of spectral count in each test biological replicates (separated by | ).
|
|
37
|
+
|
|
38
|
+
SpecSum: Sum of Spectral counts in test samples.
|
|
39
|
+
|
|
40
|
+
AvgSpec: Average Spectral counts across replicates in test samples.
|
|
41
|
+
|
|
42
|
+
NumReplicates.x: Number of replicates in test samples.
|
|
43
|
+
|
|
44
|
+
ctrlCounts: Number of spectral count in each control replicates (separated by | ).
|
|
45
|
+
|
|
46
|
+
AvgP.x: Average probability that an interaction is true, measure of the likelihood that a given
|
|
47
|
+
interaction is a true positive rather than a random or non-specific interaction. A lower AvgP indicates
|
|
48
|
+
higher confidence in the interaction being genuine.
|
|
49
|
+
|
|
50
|
+
MaxP.x: maximum probability associated with a protein interaction in the context of its prey-bait pair.
|
|
51
|
+
Similar to AvgP, a lower MaxP suggests a higher likelihood of the interaction being true.
|
|
52
|
+
|
|
53
|
+
TopoAvgP.x: extension of the AvgP score that also takes into consideration the topology of the
|
|
54
|
+
interaction network. It incorporates information about the hierarchical structure of the interaction
|
|
55
|
+
data to provide a refined assessment of the interactions.
|
|
56
|
+
|
|
57
|
+
TopoMaxP.x: topology-aware score that considers the maximum probability of an interaction in the
|
|
58
|
+
context of the interaction network's topology.
|
|
59
|
+
|
|
60
|
+
SaintScore.x: composite score that integrates multiple aspects of the interaction data, including
|
|
61
|
+
spectral counts and probability estimates. It's designed to prioritize interactions based on their
|
|
62
|
+
strength and reliability. Higher SaintScores indicate interactions that are more likely to be true.
|
|
63
|
+
|
|
64
|
+
logOddsScore: Logarithm of the odds ratio between test and control conditions for each prey as a
|
|
65
|
+
measure of interaction significance. The LogOddsScore is a statistical score that represents the
|
|
66
|
+
logarithm of the odds ratio for a protein-protein interaction. It's used to quantify the strength
|
|
67
|
+
and significance of the association between two proteins in an interaction network. The odds ratio
|
|
68
|
+
compares the likelihood of the interaction occurring to the likelihood of it not occurring. Taking
|
|
69
|
+
the logarithm of the odds ratio often helps to transform the score into a more symmetric and interpretable
|
|
70
|
+
form, making it easier to compare and analyze the interactions. Higher LogOddsScores typically indicate
|
|
71
|
+
stronger evidence for the interaction.
|
|
72
|
+
|
|
73
|
+
FoldChange.x: represents the ratio of the abundance of a protein or interaction in one experimental
|
|
74
|
+
condition (Test) compared to another (control). It helps assess whether the abundance of a protein
|
|
75
|
+
changes significantly between different conditions.
|
|
76
|
+
|
|
77
|
+
BFDR.x: Bayesian False Discovery Rate
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
SAINT References:
|
|
83
|
+
https://saint-apms.sourceforge.net/Main.html
|
|
84
|
+
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4102138/
|
|
85
|
+
https://pubmed.ncbi.nlm.nih.gov/21131968/
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
Affinity Purification Mass spectrometry (AP-MS)
|
|
2
|
+
-----------------------------------------------
|
|
3
|
+
|
|
4
|
+
Affinity Purification-Mass Spectrometry (AP-MS) is a powerful technique used to uncover the intricate networks of
|
|
5
|
+
protein interactions within cells. Different methods can be used but the most popular approach is to attach a purifiable
|
|
6
|
+
tag to a protein of interest, the "bait". In the context of CM4AI the tag is directly attached to the endogenous protein
|
|
7
|
+
of interest using gene editing to maintain physiological level of expression. The tagged bait is then purified from cell
|
|
8
|
+
extract with its interacting partners. Once separated, the captured proteins are identified using a mass spectrometer
|
|
9
|
+
allowing to infer protein-protein interactions.
|
|
10
|
+
|
|
11
|
+
This RO-Crate uses the Zmadex/SAINT analysis. It does not carry the legacy SAINT columns
|
|
12
|
+
(Spec, AvgSpec, TopoAvgP.x, SaintScore.x, logOddsScore and similar), because those values do not
|
|
13
|
+
exist in this analysis. Earlier CM4AI AP-MS releases used that older schema and are documented
|
|
14
|
+
separately.
|
|
15
|
+
|
|
16
|
+
@@DATASET_SUMMARY@@
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
Two different questions, two different sets of columns
|
|
20
|
+
------------------------------------------------------
|
|
21
|
+
|
|
22
|
+
Zmadex, SAINTBFDR* and Pass* measure INTERACTION CONFIDENCE. They answer "is this prey a real
|
|
23
|
+
interactor of this bait?" and are computed within a single drug arm.
|
|
24
|
+
|
|
25
|
+
DrugEffect* measures TREATMENT-ASSOCIATED CHANGE. It answers "does this bait-prey pair change
|
|
26
|
+
between vorinostat and DMSO?" and lives in its own file, apms_drug_effect.tsv.
|
|
27
|
+
|
|
28
|
+
Confusing the two is the most common way to misread this dataset. A prey can be a high confidence
|
|
29
|
+
interactor with no drug effect, or show a strong drug effect while failing every interaction
|
|
30
|
+
filter.
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
apms.tsv and apms_unfiltered.tsv column labels
|
|
34
|
+
-----------------------------------------------
|
|
35
|
+
|
|
36
|
+
Both files carry the identical 14 columns. apms.tsv is filtered, apms_unfiltered.tsv is the
|
|
37
|
+
complete pre-filter matrix.
|
|
38
|
+
|
|
39
|
+
Bait: Gene symbol of the pulled down protein.
|
|
40
|
+
|
|
41
|
+
Prey: Uniprot ID of a protein identified by MS in the pull down (putative bait interactor).
|
|
42
|
+
Always a single accession, never a protein group.
|
|
43
|
+
|
|
44
|
+
PreyGene: Gene symbol of the identified protein.
|
|
45
|
+
|
|
46
|
+
Batch: Experimental batch (SET1 through SET6) the measurement belongs to. Batch is part of the
|
|
47
|
+
record key. Two baits, HDAC2 and USP7, were run in two different batches, so Bait and Prey
|
|
48
|
+
together are NOT a unique key. Use Batch, Bait and Prey.
|
|
49
|
+
|
|
50
|
+
Zmadex: Median absolute deviation based enrichment score of the prey in the bait pull down
|
|
51
|
+
relative to the other pull downs in the batch. Higher means more specific enrichment.
|
|
52
|
+
|
|
53
|
+
BaitControlLog2FC: Log2 fold change of prey abundance in the tagged bait pull down versus the
|
|
54
|
+
background/control. Computed WITHIN one drug arm, so it is a measure of
|
|
55
|
+
bait-prey enrichment, not of drug response.
|
|
56
|
+
|
|
57
|
+
ObservedCount: Number of replicates in which the prey was observed.
|
|
58
|
+
|
|
59
|
+
MissingCount: Number of replicates in which the prey was not observed.
|
|
60
|
+
|
|
61
|
+
SAINTBFDRIntensity: SAINTexpress Bayesian False Discovery Rate computed on intensity. Lower is
|
|
62
|
+
more confident. A value of 0 is a real and common value, it is not missing
|
|
63
|
+
data. An EMPTY cell means the statistic could not be computed.
|
|
64
|
+
|
|
65
|
+
SAINTBFDRSpectralCount: SAINTexpress Bayesian False Discovery Rate computed on spectral counts.
|
|
66
|
+
Lower is more confident. Same empty/zero distinction as above.
|
|
67
|
+
|
|
68
|
+
PassZ: TRUE if the prey passes the Zmadex threshold.
|
|
69
|
+
|
|
70
|
+
PassSAINTIntensity: TRUE if the prey passes the SAINT intensity BFDR threshold.
|
|
71
|
+
|
|
72
|
+
PassSAINTSpectralCount: TRUE if the prey passes the SAINT spectral count BFDR threshold.
|
|
73
|
+
|
|
74
|
+
ReferenceLabel: Membership of the bait-prey pair in reference sets used for benchmarking.
|
|
75
|
+
One of corum, string, corum;string, decoy, or empty.
|
|
76
|
+
This is PRIOR KNOWLEDGE used to evaluate the scoring, it is NOT evidence of an
|
|
77
|
+
interaction in this experiment. A pair labelled corum is not thereby a hit, and a
|
|
78
|
+
pair labelled decoy is not thereby a false positive.
|
|
79
|
+
|
|
80
|
+
A note on empty cells: an empty value means the statistic could not be computed, and is written as
|
|
81
|
+
an empty field rather than NA, NaN or 0. It is never safe to read an empty cell as zero.
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
apms_drug_effect.tsv column labels
|
|
85
|
+
-----------------------------------
|
|
86
|
+
|
|
87
|
+
Present in the vorinostat RO-Crate only. Produced by MSstats. Every record is a single
|
|
88
|
+
vorinostat-versus-DMSO contrast for one bait and one prey, so there is one contrast per
|
|
89
|
+
Batch/Bait pair, with no drug dimension of its own.
|
|
90
|
+
|
|
91
|
+
Batch, Bait, Prey: The same key as apms.tsv. Join on all three.
|
|
92
|
+
|
|
93
|
+
DrugEffectLog2FC: Log2 fold change of prey abundance in the vorinostat pull down versus the DMSO
|
|
94
|
+
pull down for that bait. Positive means more abundant under vorinostat.
|
|
95
|
+
Do not confuse this with BaitControlLog2FC, which is bait versus control.
|
|
96
|
+
|
|
97
|
+
DrugEffectSE: Standard error of the log2 fold change.
|
|
98
|
+
|
|
99
|
+
DrugEffectTValue: T statistic of the contrast.
|
|
100
|
+
|
|
101
|
+
DrugEffectDF: Degrees of freedom of the contrast.
|
|
102
|
+
|
|
103
|
+
DrugEffectPValue: Raw p-value of the contrast.
|
|
104
|
+
|
|
105
|
+
DrugEffectAdjustedPValue: Multiple testing adjusted p-value.
|
|
106
|
+
|
|
107
|
+
DrugEffectSignificant: 1 if MSstats called the contrast significant, otherwise 0.
|
|
108
|
+
|
|
109
|
+
DrugEffect: Categorical call, one of:
|
|
110
|
+
up - significantly more abundant under vorinostat
|
|
111
|
+
down - significantly less abundant under vorinostat
|
|
112
|
+
insig - no significant change
|
|
113
|
+
gained - detected only under vorinostat, paired with
|
|
114
|
+
DrugEffectIssue = oneConditionMissing
|
|
115
|
+
lost - detected only under DMSO, paired with
|
|
116
|
+
DrugEffectIssue = oneConditionMissing
|
|
117
|
+
unidentified - not detected in either condition, paired with
|
|
118
|
+
DrugEffectIssue = completeMissing
|
|
119
|
+
|
|
120
|
+
DrugEffectIssue: Empty, oneConditionMissing, or completeMissing. Explains why DrugEffectLog2FC and
|
|
121
|
+
the test statistics may be empty.
|
|
122
|
+
|
|
123
|
+
DrugEffectComparison: The original MSstats contrast label, of the form
|
|
124
|
+
<Batch>_<Bait>_VRST-<Batch>_<Bait>_DMSO.
|
|
125
|
+
|
|
126
|
+
Protein groups: where MSstats could not resolve a single protein, Prey holds a semicolon separated
|
|
127
|
+
protein group. These rows are published unchanged and are NOT split onto their individual
|
|
128
|
+
accessions, because doing so creates ambiguous duplicate keys. They will not match apms.tsv, whose
|
|
129
|
+
Prey is always a single accession.
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
Joining the two files
|
|
133
|
+
----------------------
|
|
134
|
+
|
|
135
|
+
Join on Batch, Bait and Prey. All three are required, because HDAC2 and USP7 each appear in two
|
|
136
|
+
batches.
|
|
137
|
+
|
|
138
|
+
import pandas as pd
|
|
139
|
+
|
|
140
|
+
apms = pd.read_csv('apms.tsv', sep='\t', dtype=str, na_filter=False)
|
|
141
|
+
drug = pd.read_csv('apms_drug_effect.tsv', sep='\t', dtype=str, na_filter=False)
|
|
142
|
+
merged = apms.merge(drug, on=['Batch', 'Bait', 'Prey'], how='left')
|
|
143
|
+
|
|
144
|
+
Read the files with dtype=str and na_filter=False if you need the values to round trip unchanged.
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
Data processing
|
|
148
|
+
---------------
|
|
149
|
+
|
|
150
|
+
Raw data acquired on a Orbitrap Fusion(TM) Lumos(TM) Tribrid(TM) Mass Spectrometer (Thermo Scientific).
|
|
151
|
+
Raw data are processed using Maxquant using LFQ quantification against a reviewed human UniProt
|
|
152
|
+
reference. Evidence files are processed to generate SAINT input, and SAINTexpress is run to
|
|
153
|
+
estimate the probability that each observed bait-prey pair is a true interaction rather than a
|
|
154
|
+
non-specific or random association. The Zmadex score adds a robust, median absolute deviation
|
|
155
|
+
based measure of how specifically a prey is enriched in one bait pull down relative to the others
|
|
156
|
+
in its batch. Drug effects are computed separately with MSstats.
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
References
|
|
160
|
+
----------
|
|
161
|
+
SAINT: https://saint-apms.sourceforge.net/Main.html
|
|
162
|
+
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4102138/
|
|
163
|
+
https://pubmed.ncbi.nlm.nih.gov/21131968/
|
|
164
|
+
MSstats: https://msstats.org
|
|
165
|
+
CM4AI gene sets: https://cm4ai.org/product-documentation/
|