pharmaobservatory 0.1.16 → 0.1.17

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.
@@ -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: 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.
17
+ # One row of the company_competitors dataset: one row per industry company and competitor, at the root level (the competitor's ultimate parent, top 25 by asset collision) and at the member level (a company under a kept root that itself collides, top 25 per root). 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
@@ -28,7 +28,10 @@ module PharmaObservatory
28
28
  # Display name of the group.
29
29
  attr_accessor :group_name
30
30
 
31
- # Company level: the competing company.
31
+ # root: the competitor's ultimate parent company, with its score, counts and evidence recomputed over the union of its members' colliding assets (the best weight per target family and per indication across members, distinct asset pairs and distinct trials, never a sum of member scores). member: a company under that root that itself collides, scored on its own assets. Filter on one level; the two do not add.
32
+ attr_accessor :row_level
33
+
34
+ # Company level: the competing company. At row_level root this is the root company; at member it is the member company itself.
32
35
  attr_accessor :competitor_company_id
33
36
 
34
37
  # Display name of the competitor's company.
@@ -40,19 +43,28 @@ module PharmaObservatory
40
43
  # Display name of the competitor's group.
41
44
  attr_accessor :competitor_group_name
42
45
 
46
+ # The ultimate parent company of the competitor, the ladder company's `coalesce(ultimate_parent_company_id, company_id)` (one root per company, never the multi-root group fan-out). Equal to competitor_company_id at row_level root, and the root a member row sits under.
47
+ attr_accessor :competitor_root_id
48
+
43
49
  # 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
50
  attr_accessor :competitor_class
45
51
 
46
52
  # 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
53
  attr_accessor :n_class_candidates
48
54
 
49
- # The competitor's rank within its competitor_class for the company by competitor_score (1 is the highest).
55
+ # The rank of the competitor ROOT within its competitor_class for the company by competitor_score (1 is the highest). The same on a root row and on each of its member rows.
50
56
  attr_accessor :competitor_rank
51
57
 
58
+ # 0 on a root row; 1 and up on the member rows of that root, by the member's own competitor_score. Order by competitor_rank then member_rank to list each root followed by its members.
59
+ attr_accessor :member_rank
60
+
61
+ # Member companies of this root that collide with the company, before the member cut. The same on a root row and its member rows.
62
+ attr_accessor :n_members
63
+
52
64
  # 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
65
  attr_accessor :competitor_score
54
66
 
55
- # Asset pairs (a drug of the company, a drug of the competitor) that act on a common target.
67
+ # Asset pairs (a drug of the company, a drug of the competitor) that act on a common target; 0 when the competitor is listed only for a same-market pair (see n_market_collisions).
56
68
  attr_accessor :n_collisions
57
69
 
58
70
  # Target families of the company's live assets that the competitor collides with.
@@ -79,6 +91,18 @@ module PharmaObservatory
79
91
  # 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
92
  attr_accessor :top_collisions
81
93
 
94
+ # Asset pairs (a Phase 3+ drug of the company, a Phase 3+ drug of the competitor) that share a MeSH indication on drugs with no common target; the pairs are the company_market_collisions dataset.
95
+ attr_accessor :n_market_collisions
96
+
97
+ # Distinct shared Phase 3+ indications of the pair, counted after a shared indication is replaced by a more specific one that the same asset pair also shares.
98
+ attr_accessor :n_market_indications
99
+
100
+ # The company's own Phase 3+ indications; with its target families, the denominator of competitor_score. 0 when it holds no Phase 3+ program.
101
+ attr_accessor :n_subject_markets
102
+
103
+ # Up to 3 strongest same-market asset pairs as text: \"drug A / drug B: indication, same market, different target (SYMBOLS vs SYMBOLS), stage\". An empty list when none. Kept apart from top_collisions, which is target evidence only.
104
+ attr_accessor :top_market_collisions
105
+
82
106
  # 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.
83
107
  attr_accessor :n_cosponsored_trials
84
108
 
@@ -89,13 +113,17 @@ module PharmaObservatory
89
113
  :'company_name' => :'company_name',
90
114
  :'group_id' => :'group_id',
91
115
  :'group_name' => :'group_name',
116
+ :'row_level' => :'row_level',
92
117
  :'competitor_company_id' => :'competitor_company_id',
93
118
  :'competitor_company_name' => :'competitor_company_name',
94
119
  :'competitor_group_id' => :'competitor_group_id',
95
120
  :'competitor_group_name' => :'competitor_group_name',
121
+ :'competitor_root_id' => :'competitor_root_id',
96
122
  :'competitor_class' => :'competitor_class',
97
123
  :'n_class_candidates' => :'n_class_candidates',
98
124
  :'competitor_rank' => :'competitor_rank',
125
+ :'member_rank' => :'member_rank',
126
+ :'n_members' => :'n_members',
99
127
  :'competitor_score' => :'competitor_score',
100
128
  :'n_collisions' => :'n_collisions',
101
129
  :'n_colliding_families' => :'n_colliding_families',
@@ -106,6 +134,10 @@ module PharmaObservatory
106
134
  :'best_stage' => :'best_stage',
107
135
  :'last_year' => :'last_year',
108
136
  :'top_collisions' => :'top_collisions',
137
+ :'n_market_collisions' => :'n_market_collisions',
138
+ :'n_market_indications' => :'n_market_indications',
139
+ :'n_subject_markets' => :'n_subject_markets',
140
+ :'top_market_collisions' => :'top_market_collisions',
109
141
  :'n_cosponsored_trials' => :'n_cosponsored_trials'
110
142
  }
111
143
  end
@@ -127,13 +159,17 @@ module PharmaObservatory
127
159
  :'company_name' => :'String',
128
160
  :'group_id' => :'String',
129
161
  :'group_name' => :'String',
162
+ :'row_level' => :'String',
130
163
  :'competitor_company_id' => :'String',
131
164
  :'competitor_company_name' => :'String',
132
165
  :'competitor_group_id' => :'String',
133
166
  :'competitor_group_name' => :'String',
167
+ :'competitor_root_id' => :'String',
134
168
  :'competitor_class' => :'String',
135
169
  :'n_class_candidates' => :'Integer',
136
170
  :'competitor_rank' => :'Integer',
171
+ :'member_rank' => :'Integer',
172
+ :'n_members' => :'Integer',
137
173
  :'competitor_score' => :'Float',
138
174
  :'n_collisions' => :'Integer',
139
175
  :'n_colliding_families' => :'Integer',
@@ -144,6 +180,10 @@ module PharmaObservatory
144
180
  :'best_stage' => :'Integer',
145
181
  :'last_year' => :'Integer',
146
182
  :'top_collisions' => :'Array<String>',
183
+ :'n_market_collisions' => :'Integer',
184
+ :'n_market_indications' => :'Integer',
185
+ :'n_subject_markets' => :'Integer',
186
+ :'top_market_collisions' => :'Array<String>',
147
187
  :'n_cosponsored_trials' => :'Integer'
148
188
  }
149
189
  end
@@ -155,13 +195,17 @@ module PharmaObservatory
155
195
  :'company_name',
156
196
  :'group_id',
157
197
  :'group_name',
198
+ :'row_level',
158
199
  :'competitor_company_id',
159
200
  :'competitor_company_name',
160
201
  :'competitor_group_id',
161
202
  :'competitor_group_name',
203
+ :'competitor_root_id',
162
204
  :'competitor_class',
163
205
  :'n_class_candidates',
164
206
  :'competitor_rank',
207
+ :'member_rank',
208
+ :'n_members',
165
209
  :'competitor_score',
166
210
  :'n_collisions',
167
211
  :'n_colliding_families',
@@ -172,6 +216,10 @@ module PharmaObservatory
172
216
  :'best_stage',
173
217
  :'last_year',
174
218
  :'top_collisions',
219
+ :'n_market_collisions',
220
+ :'n_market_indications',
221
+ :'n_subject_markets',
222
+ :'top_market_collisions',
175
223
  :'n_cosponsored_trials'
176
224
  ])
177
225
  end
@@ -208,6 +256,10 @@ module PharmaObservatory
208
256
  self.group_name = attributes[:'group_name']
209
257
  end
210
258
 
259
+ if attributes.key?(:'row_level')
260
+ self.row_level = attributes[:'row_level']
261
+ end
262
+
211
263
  if attributes.key?(:'competitor_company_id')
212
264
  self.competitor_company_id = attributes[:'competitor_company_id']
213
265
  end
@@ -224,6 +276,10 @@ module PharmaObservatory
224
276
  self.competitor_group_name = attributes[:'competitor_group_name']
225
277
  end
226
278
 
279
+ if attributes.key?(:'competitor_root_id')
280
+ self.competitor_root_id = attributes[:'competitor_root_id']
281
+ end
282
+
227
283
  if attributes.key?(:'competitor_class')
228
284
  self.competitor_class = attributes[:'competitor_class']
229
285
  end
@@ -236,6 +292,14 @@ module PharmaObservatory
236
292
  self.competitor_rank = attributes[:'competitor_rank']
237
293
  end
238
294
 
295
+ if attributes.key?(:'member_rank')
296
+ self.member_rank = attributes[:'member_rank']
297
+ end
298
+
299
+ if attributes.key?(:'n_members')
300
+ self.n_members = attributes[:'n_members']
301
+ end
302
+
239
303
  if attributes.key?(:'competitor_score')
240
304
  self.competitor_score = attributes[:'competitor_score']
241
305
  end
@@ -278,6 +342,24 @@ module PharmaObservatory
278
342
  end
279
343
  end
280
344
 
345
+ if attributes.key?(:'n_market_collisions')
346
+ self.n_market_collisions = attributes[:'n_market_collisions']
347
+ end
348
+
349
+ if attributes.key?(:'n_market_indications')
350
+ self.n_market_indications = attributes[:'n_market_indications']
351
+ end
352
+
353
+ if attributes.key?(:'n_subject_markets')
354
+ self.n_subject_markets = attributes[:'n_subject_markets']
355
+ end
356
+
357
+ if attributes.key?(:'top_market_collisions')
358
+ if (value = attributes[:'top_market_collisions']).is_a?(Array)
359
+ self.top_market_collisions = value
360
+ end
361
+ end
362
+
281
363
  if attributes.key?(:'n_cosponsored_trials')
282
364
  self.n_cosponsored_trials = attributes[:'n_cosponsored_trials']
283
365
  end
@@ -307,13 +389,17 @@ module PharmaObservatory
307
389
  company_name == o.company_name &&
308
390
  group_id == o.group_id &&
309
391
  group_name == o.group_name &&
392
+ row_level == o.row_level &&
310
393
  competitor_company_id == o.competitor_company_id &&
311
394
  competitor_company_name == o.competitor_company_name &&
312
395
  competitor_group_id == o.competitor_group_id &&
313
396
  competitor_group_name == o.competitor_group_name &&
397
+ competitor_root_id == o.competitor_root_id &&
314
398
  competitor_class == o.competitor_class &&
315
399
  n_class_candidates == o.n_class_candidates &&
316
400
  competitor_rank == o.competitor_rank &&
401
+ member_rank == o.member_rank &&
402
+ n_members == o.n_members &&
317
403
  competitor_score == o.competitor_score &&
318
404
  n_collisions == o.n_collisions &&
319
405
  n_colliding_families == o.n_colliding_families &&
@@ -324,6 +410,10 @@ module PharmaObservatory
324
410
  best_stage == o.best_stage &&
325
411
  last_year == o.last_year &&
326
412
  top_collisions == o.top_collisions &&
413
+ n_market_collisions == o.n_market_collisions &&
414
+ n_market_indications == o.n_market_indications &&
415
+ n_subject_markets == o.n_subject_markets &&
416
+ top_market_collisions == o.top_market_collisions &&
327
417
  n_cosponsored_trials == o.n_cosponsored_trials
328
418
  end
329
419
 
@@ -336,7 +426,7 @@ module PharmaObservatory
336
426
  # Calculates hash code according to all attributes.
337
427
  # @return [Integer] Hash code
338
428
  def hash
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
429
+ [company_id, company_name, group_id, group_name, row_level, competitor_company_id, competitor_company_name, competitor_group_id, competitor_group_name, competitor_root_id, competitor_class, n_class_candidates, competitor_rank, member_rank, n_members, 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_market_collisions, n_market_indications, n_subject_markets, top_market_collisions, n_cosponsored_trials].hash
340
430
  end
341
431
 
342
432
  # Builds the object from hash