pharmaobservatory 0.1.14 → 0.1.16
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.
- checksums.yaml +4 -4
- data/README.md +8 -5
- data/docs/ChangesList200Response.md +3 -1
- data/docs/CompaniesApi.md +86 -4
- data/docs/CompanyAssetCollisionsResponse.md +58 -0
- data/docs/CompanyAssetCollisionsRow.md +68 -0
- data/docs/CompanyCompetitorsRow.md +21 -33
- data/docs/SubscriptionsApi.md +2 -2
- data/lib/pharmaobservatory/api/companies_api.rb +93 -2
- data/lib/pharmaobservatory/models/changes_list200_response.rb +14 -4
- data/lib/pharmaobservatory/models/company_asset_collisions_response.rb +478 -0
- data/lib/pharmaobservatory/models/company_asset_collisions_row.rb +502 -0
- data/lib/pharmaobservatory/models/company_competitors_row.rb +78 -148
- data/lib/pharmaobservatory/version.rb +1 -1
- data/lib/pharmaobservatory.rb +2 -0
- metadata +6 -2
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module PharmaObservatory
|
|
17
|
-
# One row of the company_competitors dataset: one row per ordered company pair:
|
|
17
|
+
# One row of the company_competitors dataset: one row per ordered company pair: an industry company and one of its top 25 industry competitors by asset collision. A grouped request returns the group columns and the measures instead, as additional properties.
|
|
18
18
|
class CompanyCompetitorsRow
|
|
19
19
|
# Company level: the company the row is about; the entry key for the companies object type.
|
|
20
20
|
attr_accessor :company_id
|
|
@@ -40,62 +40,44 @@ module PharmaObservatory
|
|
|
40
40
|
# Display name of the competitor's group.
|
|
41
41
|
attr_accessor :competitor_group_name
|
|
42
42
|
|
|
43
|
-
# The competitor's class: industry
|
|
43
|
+
# The competitor's class: always industry since the not-classed-as-industry group left Competitors; the column is kept so a query written against it keeps working. competitor_rank is 1-based within the class.
|
|
44
44
|
attr_accessor :competitor_class
|
|
45
45
|
|
|
46
|
-
# How many companies of this competitor_class
|
|
46
|
+
# How many companies of this competitor_class had at least one asset collision with the company before the top 25 were kept. The same value on every row of one company and class.
|
|
47
47
|
attr_accessor :n_class_candidates
|
|
48
48
|
|
|
49
49
|
# The competitor's rank within its competitor_class for the company by competitor_score (1 is the highest).
|
|
50
50
|
attr_accessor :competitor_rank
|
|
51
51
|
|
|
52
|
-
#
|
|
52
|
+
# The weighted share of the company's live target families that the competitor's live assets collide with, 0 to 100, rounded to four places. Each colliding family counts its best collision weight (rarity of the family across companies, times factors for same action, a shared indication, the least advanced stage, recency and a head-to-head trial), capped at the family's rarity weight; the sum is divided by the rarity weights of ALL the company's families.
|
|
53
53
|
attr_accessor :competitor_score
|
|
54
54
|
|
|
55
|
-
#
|
|
56
|
-
attr_accessor :
|
|
55
|
+
# Asset pairs (a drug of the company, a drug of the competitor) that act on a common target.
|
|
56
|
+
attr_accessor :n_collisions
|
|
57
57
|
|
|
58
|
-
#
|
|
59
|
-
attr_accessor :
|
|
58
|
+
# Target families of the company's live assets that the competitor collides with.
|
|
59
|
+
attr_accessor :n_colliding_families
|
|
60
60
|
|
|
61
|
-
#
|
|
62
|
-
attr_accessor :
|
|
61
|
+
# Target families of the company's own live, owned assets; the denominator of competitor_score is their rarity weights.
|
|
62
|
+
attr_accessor :n_subject_families
|
|
63
63
|
|
|
64
|
-
#
|
|
65
|
-
attr_accessor :
|
|
64
|
+
# Asset pairs whose drugs act on the shared target with the same action type.
|
|
65
|
+
attr_accessor :n_same_action
|
|
66
66
|
|
|
67
|
-
#
|
|
68
|
-
attr_accessor :
|
|
67
|
+
# Asset pairs whose programs share at least one disease area. Every listed pair does, so it equals n_collisions.
|
|
68
|
+
attr_accessor :n_shared_indication_pairs
|
|
69
69
|
|
|
70
|
-
#
|
|
71
|
-
attr_accessor :
|
|
70
|
+
# Distinct trials led by either company in which one drug of a pair is experimental and the other an active comparator.
|
|
71
|
+
attr_accessor :n_head_to_head_trials
|
|
72
72
|
|
|
73
|
-
#
|
|
74
|
-
attr_accessor :
|
|
73
|
+
# The most advanced pair's stage, where a pair's stage is the less advanced of its two programs' furthest phase: 6 Phase 4, 5 Phase 3, 4 Phase 2/3, 3 Phase 2, 2 Phase 1/2, 1 Phase 1, 0 Early Phase 1, -1 phase not applicable. A tie-break key after the score.
|
|
74
|
+
attr_accessor :best_stage
|
|
75
75
|
|
|
76
|
-
#
|
|
77
|
-
attr_accessor :
|
|
76
|
+
# The latest trial start year over the company pair's programs (the maximum over its asset pairs of the later of the two programs' last start year). A tie-break key after the score; null when no program has a start year.
|
|
77
|
+
attr_accessor :last_year
|
|
78
78
|
|
|
79
|
-
#
|
|
80
|
-
attr_accessor :
|
|
81
|
-
|
|
82
|
-
# Targets the competitor pursues.
|
|
83
|
-
attr_accessor :n_competitor_targets
|
|
84
|
-
|
|
85
|
-
# Disease areas in the company's top 25.
|
|
86
|
-
attr_accessor :n_company_indications
|
|
87
|
-
|
|
88
|
-
# Disease areas in the competitor's top 25.
|
|
89
|
-
attr_accessor :n_competitor_indications
|
|
90
|
-
|
|
91
|
-
# Up to 5 shared target gene symbols, by combined phase then combined trials. An empty list when none.
|
|
92
|
-
attr_accessor :top_shared_targets
|
|
93
|
-
|
|
94
|
-
# Up to 5 shared disease area names, by combined trial count. An empty list when none.
|
|
95
|
-
attr_accessor :top_shared_indications
|
|
96
|
-
|
|
97
|
-
# Up to 3 shared mechanisms written as a gene symbol and an action, by combined phase then combined trials. An empty list when none.
|
|
98
|
-
attr_accessor :top_shared_mechanisms
|
|
79
|
+
# Up to 3 strongest asset pairs as text: \"drug A / drug B: target family, stage, N shared indications\". The stage is the less advanced of the two programs. An ownership_basis of inferred_lead on the underlying pair (see company_asset_collisions) is an inference.
|
|
80
|
+
attr_accessor :top_collisions
|
|
99
81
|
|
|
100
82
|
# Distinct trials on which the company and the competitor are both named as sponsors, counted over their subtrees; 0 when none. A consortium trial (more than 25 sponsor companies) is left out.
|
|
101
83
|
attr_accessor :n_cosponsored_trials
|
|
@@ -115,21 +97,15 @@ module PharmaObservatory
|
|
|
115
97
|
:'n_class_candidates' => :'n_class_candidates',
|
|
116
98
|
:'competitor_rank' => :'competitor_rank',
|
|
117
99
|
:'competitor_score' => :'competitor_score',
|
|
118
|
-
:'
|
|
119
|
-
:'
|
|
120
|
-
:'
|
|
121
|
-
:'
|
|
122
|
-
:'
|
|
123
|
-
:'
|
|
124
|
-
:'
|
|
125
|
-
:'
|
|
126
|
-
:'
|
|
127
|
-
:'n_competitor_targets' => :'n_competitor_targets',
|
|
128
|
-
:'n_company_indications' => :'n_company_indications',
|
|
129
|
-
:'n_competitor_indications' => :'n_competitor_indications',
|
|
130
|
-
:'top_shared_targets' => :'top_shared_targets',
|
|
131
|
-
:'top_shared_indications' => :'top_shared_indications',
|
|
132
|
-
:'top_shared_mechanisms' => :'top_shared_mechanisms',
|
|
100
|
+
:'n_collisions' => :'n_collisions',
|
|
101
|
+
:'n_colliding_families' => :'n_colliding_families',
|
|
102
|
+
:'n_subject_families' => :'n_subject_families',
|
|
103
|
+
:'n_same_action' => :'n_same_action',
|
|
104
|
+
:'n_shared_indication_pairs' => :'n_shared_indication_pairs',
|
|
105
|
+
:'n_head_to_head_trials' => :'n_head_to_head_trials',
|
|
106
|
+
:'best_stage' => :'best_stage',
|
|
107
|
+
:'last_year' => :'last_year',
|
|
108
|
+
:'top_collisions' => :'top_collisions',
|
|
133
109
|
:'n_cosponsored_trials' => :'n_cosponsored_trials'
|
|
134
110
|
}
|
|
135
111
|
end
|
|
@@ -159,21 +135,15 @@ module PharmaObservatory
|
|
|
159
135
|
:'n_class_candidates' => :'Integer',
|
|
160
136
|
:'competitor_rank' => :'Integer',
|
|
161
137
|
:'competitor_score' => :'Float',
|
|
162
|
-
:'
|
|
163
|
-
:'
|
|
164
|
-
:'
|
|
165
|
-
:'
|
|
166
|
-
:'
|
|
167
|
-
:'
|
|
168
|
-
:'
|
|
169
|
-
:'
|
|
170
|
-
:'
|
|
171
|
-
:'n_competitor_targets' => :'Integer',
|
|
172
|
-
:'n_company_indications' => :'Integer',
|
|
173
|
-
:'n_competitor_indications' => :'Integer',
|
|
174
|
-
:'top_shared_targets' => :'Array<String>',
|
|
175
|
-
:'top_shared_indications' => :'Array<String>',
|
|
176
|
-
:'top_shared_mechanisms' => :'Array<String>',
|
|
138
|
+
:'n_collisions' => :'Integer',
|
|
139
|
+
:'n_colliding_families' => :'Integer',
|
|
140
|
+
:'n_subject_families' => :'Integer',
|
|
141
|
+
:'n_same_action' => :'Integer',
|
|
142
|
+
:'n_shared_indication_pairs' => :'Integer',
|
|
143
|
+
:'n_head_to_head_trials' => :'Integer',
|
|
144
|
+
:'best_stage' => :'Integer',
|
|
145
|
+
:'last_year' => :'Integer',
|
|
146
|
+
:'top_collisions' => :'Array<String>',
|
|
177
147
|
:'n_cosponsored_trials' => :'Integer'
|
|
178
148
|
}
|
|
179
149
|
end
|
|
@@ -193,21 +163,15 @@ module PharmaObservatory
|
|
|
193
163
|
:'n_class_candidates',
|
|
194
164
|
:'competitor_rank',
|
|
195
165
|
:'competitor_score',
|
|
196
|
-
:'
|
|
197
|
-
:'
|
|
198
|
-
:'
|
|
199
|
-
:'
|
|
200
|
-
:'
|
|
201
|
-
:'
|
|
202
|
-
:'
|
|
203
|
-
:'
|
|
204
|
-
:'
|
|
205
|
-
:'n_competitor_targets',
|
|
206
|
-
:'n_company_indications',
|
|
207
|
-
:'n_competitor_indications',
|
|
208
|
-
:'top_shared_targets',
|
|
209
|
-
:'top_shared_indications',
|
|
210
|
-
:'top_shared_mechanisms',
|
|
166
|
+
:'n_collisions',
|
|
167
|
+
:'n_colliding_families',
|
|
168
|
+
:'n_subject_families',
|
|
169
|
+
:'n_same_action',
|
|
170
|
+
:'n_shared_indication_pairs',
|
|
171
|
+
:'n_head_to_head_trials',
|
|
172
|
+
:'best_stage',
|
|
173
|
+
:'last_year',
|
|
174
|
+
:'top_collisions',
|
|
211
175
|
:'n_cosponsored_trials'
|
|
212
176
|
])
|
|
213
177
|
end
|
|
@@ -276,69 +240,41 @@ module PharmaObservatory
|
|
|
276
240
|
self.competitor_score = attributes[:'competitor_score']
|
|
277
241
|
end
|
|
278
242
|
|
|
279
|
-
if attributes.key?(:'
|
|
280
|
-
self.
|
|
281
|
-
end
|
|
282
|
-
|
|
283
|
-
if attributes.key?(:'mechanism_sim')
|
|
284
|
-
self.mechanism_sim = attributes[:'mechanism_sim']
|
|
285
|
-
end
|
|
286
|
-
|
|
287
|
-
if attributes.key?(:'indication_sim')
|
|
288
|
-
self.indication_sim = attributes[:'indication_sim']
|
|
243
|
+
if attributes.key?(:'n_collisions')
|
|
244
|
+
self.n_collisions = attributes[:'n_collisions']
|
|
289
245
|
end
|
|
290
246
|
|
|
291
|
-
if attributes.key?(:'
|
|
292
|
-
self.
|
|
247
|
+
if attributes.key?(:'n_colliding_families')
|
|
248
|
+
self.n_colliding_families = attributes[:'n_colliding_families']
|
|
293
249
|
end
|
|
294
250
|
|
|
295
|
-
if attributes.key?(:'
|
|
296
|
-
self.
|
|
251
|
+
if attributes.key?(:'n_subject_families')
|
|
252
|
+
self.n_subject_families = attributes[:'n_subject_families']
|
|
297
253
|
end
|
|
298
254
|
|
|
299
|
-
if attributes.key?(:'
|
|
300
|
-
self.
|
|
255
|
+
if attributes.key?(:'n_same_action')
|
|
256
|
+
self.n_same_action = attributes[:'n_same_action']
|
|
301
257
|
end
|
|
302
258
|
|
|
303
|
-
if attributes.key?(:'
|
|
304
|
-
self.
|
|
259
|
+
if attributes.key?(:'n_shared_indication_pairs')
|
|
260
|
+
self.n_shared_indication_pairs = attributes[:'n_shared_indication_pairs']
|
|
305
261
|
end
|
|
306
262
|
|
|
307
|
-
if attributes.key?(:'
|
|
308
|
-
self.
|
|
263
|
+
if attributes.key?(:'n_head_to_head_trials')
|
|
264
|
+
self.n_head_to_head_trials = attributes[:'n_head_to_head_trials']
|
|
309
265
|
end
|
|
310
266
|
|
|
311
|
-
if attributes.key?(:'
|
|
312
|
-
self.
|
|
267
|
+
if attributes.key?(:'best_stage')
|
|
268
|
+
self.best_stage = attributes[:'best_stage']
|
|
313
269
|
end
|
|
314
270
|
|
|
315
|
-
if attributes.key?(:'
|
|
316
|
-
self.
|
|
317
|
-
end
|
|
318
|
-
|
|
319
|
-
if attributes.key?(:'n_company_indications')
|
|
320
|
-
self.n_company_indications = attributes[:'n_company_indications']
|
|
321
|
-
end
|
|
322
|
-
|
|
323
|
-
if attributes.key?(:'n_competitor_indications')
|
|
324
|
-
self.n_competitor_indications = attributes[:'n_competitor_indications']
|
|
325
|
-
end
|
|
326
|
-
|
|
327
|
-
if attributes.key?(:'top_shared_targets')
|
|
328
|
-
if (value = attributes[:'top_shared_targets']).is_a?(Array)
|
|
329
|
-
self.top_shared_targets = value
|
|
330
|
-
end
|
|
331
|
-
end
|
|
332
|
-
|
|
333
|
-
if attributes.key?(:'top_shared_indications')
|
|
334
|
-
if (value = attributes[:'top_shared_indications']).is_a?(Array)
|
|
335
|
-
self.top_shared_indications = value
|
|
336
|
-
end
|
|
271
|
+
if attributes.key?(:'last_year')
|
|
272
|
+
self.last_year = attributes[:'last_year']
|
|
337
273
|
end
|
|
338
274
|
|
|
339
|
-
if attributes.key?(:'
|
|
340
|
-
if (value = attributes[:'
|
|
341
|
-
self.
|
|
275
|
+
if attributes.key?(:'top_collisions')
|
|
276
|
+
if (value = attributes[:'top_collisions']).is_a?(Array)
|
|
277
|
+
self.top_collisions = value
|
|
342
278
|
end
|
|
343
279
|
end
|
|
344
280
|
|
|
@@ -379,21 +315,15 @@ module PharmaObservatory
|
|
|
379
315
|
n_class_candidates == o.n_class_candidates &&
|
|
380
316
|
competitor_rank == o.competitor_rank &&
|
|
381
317
|
competitor_score == o.competitor_score &&
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
n_competitor_targets == o.n_competitor_targets &&
|
|
392
|
-
n_company_indications == o.n_company_indications &&
|
|
393
|
-
n_competitor_indications == o.n_competitor_indications &&
|
|
394
|
-
top_shared_targets == o.top_shared_targets &&
|
|
395
|
-
top_shared_indications == o.top_shared_indications &&
|
|
396
|
-
top_shared_mechanisms == o.top_shared_mechanisms &&
|
|
318
|
+
n_collisions == o.n_collisions &&
|
|
319
|
+
n_colliding_families == o.n_colliding_families &&
|
|
320
|
+
n_subject_families == o.n_subject_families &&
|
|
321
|
+
n_same_action == o.n_same_action &&
|
|
322
|
+
n_shared_indication_pairs == o.n_shared_indication_pairs &&
|
|
323
|
+
n_head_to_head_trials == o.n_head_to_head_trials &&
|
|
324
|
+
best_stage == o.best_stage &&
|
|
325
|
+
last_year == o.last_year &&
|
|
326
|
+
top_collisions == o.top_collisions &&
|
|
397
327
|
n_cosponsored_trials == o.n_cosponsored_trials
|
|
398
328
|
end
|
|
399
329
|
|
|
@@ -406,7 +336,7 @@ module PharmaObservatory
|
|
|
406
336
|
# Calculates hash code according to all attributes.
|
|
407
337
|
# @return [Integer] Hash code
|
|
408
338
|
def hash
|
|
409
|
-
[company_id, company_name, group_id, group_name, competitor_company_id, competitor_company_name, competitor_group_id, competitor_group_name, competitor_class, n_class_candidates, competitor_rank, competitor_score,
|
|
339
|
+
[company_id, company_name, group_id, group_name, competitor_company_id, competitor_company_name, competitor_group_id, competitor_group_name, competitor_class, n_class_candidates, competitor_rank, competitor_score, n_collisions, n_colliding_families, n_subject_families, n_same_action, n_shared_indication_pairs, n_head_to_head_trials, best_stage, last_year, top_collisions, n_cosponsored_trials].hash
|
|
410
340
|
end
|
|
411
341
|
|
|
412
342
|
# Builds the object from hash
|
data/lib/pharmaobservatory.rb
CHANGED
|
@@ -82,6 +82,8 @@ require 'pharmaobservatory/models/companies_record'
|
|
|
82
82
|
require 'pharmaobservatory/models/companies_record_attributes'
|
|
83
83
|
require 'pharmaobservatory/models/companies_response'
|
|
84
84
|
require 'pharmaobservatory/models/companies_row'
|
|
85
|
+
require 'pharmaobservatory/models/company_asset_collisions_response'
|
|
86
|
+
require 'pharmaobservatory/models/company_asset_collisions_row'
|
|
85
87
|
require 'pharmaobservatory/models/company_assets_response'
|
|
86
88
|
require 'pharmaobservatory/models/company_assets_row'
|
|
87
89
|
require 'pharmaobservatory/models/company_biomarker_capability_response'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pharmaobservatory
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.16
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Scientist.com
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -156,6 +156,8 @@ files:
|
|
|
156
156
|
- docs/CompaniesRecordAttributes.md
|
|
157
157
|
- docs/CompaniesResponse.md
|
|
158
158
|
- docs/CompaniesRow.md
|
|
159
|
+
- docs/CompanyAssetCollisionsResponse.md
|
|
160
|
+
- docs/CompanyAssetCollisionsRow.md
|
|
159
161
|
- docs/CompanyAssetsResponse.md
|
|
160
162
|
- docs/CompanyAssetsRow.md
|
|
161
163
|
- docs/CompanyBiomarkerCapabilityResponse.md
|
|
@@ -677,6 +679,8 @@ files:
|
|
|
677
679
|
- lib/pharmaobservatory/models/companies_record_attributes.rb
|
|
678
680
|
- lib/pharmaobservatory/models/companies_response.rb
|
|
679
681
|
- lib/pharmaobservatory/models/companies_row.rb
|
|
682
|
+
- lib/pharmaobservatory/models/company_asset_collisions_response.rb
|
|
683
|
+
- lib/pharmaobservatory/models/company_asset_collisions_row.rb
|
|
680
684
|
- lib/pharmaobservatory/models/company_assets_response.rb
|
|
681
685
|
- lib/pharmaobservatory/models/company_assets_row.rb
|
|
682
686
|
- lib/pharmaobservatory/models/company_biomarker_capability_response.rb
|