Skip to content

Commit 47b088a

Browse files
authored
IGVF-207-biosample-requirements (#103)
1 parent 933b52f commit 47b088a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+371
-62
lines changed

src/igvfd/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,8 @@ def main(global_config, **local_config):
229229
config.include(static_resources)
230230
config.include(changelogs)
231231

232+
config.include('.upgrade')
233+
232234
if asbool(settings.get('testing', False)):
233235
config.include('.tests.testing_views')
234236

src/igvfd/schemas/biosample.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
"required": [
88
"award",
99
"lab",
10-
"source"
10+
"source",
11+
"donors",
12+
"taxa"
1113
],
1214
"additionalProperties": false,
1315
"mixinProperties": [

src/igvfd/schemas/cell_line.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
"required": [
88
"award",
99
"lab",
10-
"source"
10+
"source",
11+
"donors",
12+
"taxa"
1113
],
1214
"identifyingProperties": [
1315
"uuid",
@@ -52,7 +54,7 @@
5254
},
5355
"properties": {
5456
"schema_version": {
55-
"default": "1"
57+
"default": "2"
5658
},
5759
"passage_number": {
5860
"title": "Passage number",

src/igvfd/schemas/changelogs/biosample.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## Changelog for *`biosample.json`*
22

3+
### Schema version 2
4+
5+
* Add `donors` and `taxa` to requirements.
6+
37
### Minor changes since schema version 1
48

59
* Rename `organism` to `taxa`.

src/igvfd/schemas/changelogs/cell_line.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## Changelog for *`cell_line.json`*
22

3+
### Schema version 2
4+
5+
* Add `donors` and `taxa` to requirements.
6+
37
### Minor changes since schema version 1
48

59
* Rename `organism` to `taxa`.

src/igvfd/schemas/changelogs/differentiated_cell.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## Changelog for *`differentiated_cell.json`*
22

3+
### Schema version 2
4+
5+
* Add `donors` and `taxa` to requirements.
6+
37
### Minor changes since schema version 1
48

59
* Rename `organism` to `taxa`.

src/igvfd/schemas/changelogs/differentiated_tissue.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## Changelog for *`differentiated_tissue.json`*
22

3+
### Schema version 2
4+
5+
* Add `donors` and `taxa` to requirements.
6+
37
### Minor changes since schema version 1
48

59
* Rename `organism` to `taxa`.

src/igvfd/schemas/changelogs/primary_cell.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## Changelog for *`primary_cell.json'*
22

3+
### Schema version 2
4+
5+
* Add `donors` and `taxa` to requirements.
6+
37
### Minor changes since schema version 1
48

59
* Rename `organism` to `taxa`.

src/igvfd/schemas/changelogs/tissue.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## Changelog for *`tissue.json`*
22

3+
### Schema version 2
4+
5+
* Add `donors` and `taxa` to requirements.
6+
37
### Minor changes since schema version 1
48

59
* Rename `organism` to `taxa`.
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
## Changelog for *`whole_organism.json`*
2+
3+
### Schema version 2
4+
5+
* Add `donors` and `taxa` to requirements.

src/igvfd/schemas/differentiated_cell.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
"required": [
88
"award",
99
"lab",
10-
"source"
10+
"source",
11+
"donors",
12+
"taxa"
1113
],
1214
"identifyingProperties": [
1315
"uuid",
@@ -49,7 +51,7 @@
4951
},
5052
"properties": {
5153
"schema_version": {
52-
"default": "1"
54+
"default": "2"
5355
},
5456
"post_differentiation_time": {
5557
"title": "Post-differentiation time",

src/igvfd/schemas/differentiated_tissue.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
"required": [
88
"award",
99
"lab",
10-
"source"
10+
"source",
11+
"donors",
12+
"taxa"
1113
],
1214
"identifyingProperties": [
1315
"uuid",
@@ -64,7 +66,7 @@
6466
},
6567
"properties": {
6668
"schema_version": {
67-
"default": "1"
69+
"default": "2"
6870
},
6971
"post_differentiation_time": {
7072
"title": "Post-differentiation time",

src/igvfd/schemas/primary_cell.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
"required": [
88
"award",
99
"lab",
10-
"source"
10+
"source",
11+
"donors",
12+
"taxa"
1113
],
1214
"identifyingProperties": [
1315
"uuid",
@@ -52,7 +54,7 @@
5254
},
5355
"properties": {
5456
"schema_version": {
55-
"default": "1"
57+
"default": "2"
5658
},
5759
"passage_number": {
5860
"title": "Passage number",

src/igvfd/schemas/tissue.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
"required": [
88
"award",
99
"lab",
10-
"source"
10+
"source",
11+
"donors",
12+
"taxa"
1113
],
1214
"identifyingProperties": [
1315
"uuid",
@@ -52,7 +54,7 @@
5254
},
5355
"properties": {
5456
"schema_version": {
55-
"default": "1"
57+
"default": "2"
5658
},
5759
"pmi": {
5860
"title": "Post-mortem interval",

src/igvfd/schemas/whole_organism.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
"required": [
88
"award",
99
"lab",
10-
"source"
10+
"source",
11+
"donors",
12+
"taxa"
1113
],
1214
"identifyingProperties": [
1315
"uuid",
@@ -173,7 +175,7 @@
173175
},
174176
"properties": {
175177
"schema_version": {
176-
"default": "1"
178+
"default": "2"
177179
},
178180
"description": {
179181
"title": "Description",

src/igvfd/tests/data/inserts/cell_line.json

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
"aliases": [
88
"igvf-dacc:cell_line"
99
],
10+
"donors": [
11+
"j-michael-cherry:alias_human_donor1"
12+
],
1013
"status": "released",
1114
"submitter_comment": "The submitter had very little to say.",
1215
"documents": [
@@ -72,6 +75,9 @@
7275
"aliases": [
7376
"ali-mortazavi:pooled_cell_line"
7477
],
78+
"donors": [
79+
"j-michael-cherry:alias_human_donor1"
80+
],
7581
"status": "released",
7682
"taxa": "Homo sapiens",
7783
"source": "/labs/ali-mortazavi/",

src/igvfd/tests/data/inserts/differentiated_cell.json

+9
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
"aliases": [
88
"j-michael-cherry:alias5"
99
],
10+
"donors": [
11+
"j-michael-cherry:alias_human_donor2"
12+
],
1013
"status": "released",
1114
"taxa": "Homo sapiens",
1215
"source": "/labs/j-michael-cherry/",
@@ -27,6 +30,9 @@
2730
"aliases": [
2831
"gary-hon:cardiomyocytes"
2932
],
33+
"donors": [
34+
"j-michael-cherry:alias_human_donor_child"
35+
],
3036
"status": "released",
3137
"taxa": "Homo sapiens",
3238
"source": "/labs/gary-hon/",
@@ -49,6 +55,9 @@
4955
"aliases": [
5056
"gary-hon:pooled_cardiomyocytes"
5157
],
58+
"donors": [
59+
"j-michael-cherry:alias_human_donor_child"
60+
],
5261
"status": "released",
5362
"taxa": "Homo sapiens",
5463
"source": "/labs/gary-hon/",

src/igvfd/tests/data/inserts/differentiated_tissue.json

+9
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
"aliases": [
88
"igvf:organoid"
99
],
10+
"donors": [
11+
"j-michael-cherry:alias_human_donor2"
12+
],
1013
"status": "released",
1114
"taxa": "Homo sapiens",
1215
"source": "/labs/j-michael-cherry/",
@@ -30,6 +33,9 @@
3033
"aliases": [
3134
"igvf:gastruloid"
3235
],
36+
"donors": [
37+
"j-michael-cherry:alias_human_donor1"
38+
],
3339
"status": "released",
3440
"taxa": "Homo sapiens",
3541
"source": "/labs/jay-shendure/",
@@ -43,6 +49,9 @@
4349
"aliases": [
4450
"igvf:pooled_gastruloid"
4551
],
52+
"donors": [
53+
"j-michael-cherry:alias_human_donor_child"
54+
],
4655
"status": "released",
4756
"taxa": "Homo sapiens",
4857
"source": "/labs/jay-shendure/",

src/igvfd/tests/data/inserts/primary_cell.json

+6
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
"documents": [
1313
"bcb5f3c8-d5e9-40d2-805f-4274f940c36d"
1414
],
15+
"donors": [
16+
"j-michael-cherry:alias_human_donor2"
17+
],
1518
"notes": "This is a note.",
1619
"product_id": "CL000001",
1720
"lot_id": "R56701",
@@ -73,6 +76,9 @@
7376
"aliases": [
7477
"j-michael-cherry:pooled_primary_cell"
7578
],
79+
"donors": [
80+
"j-michael-cherry:alias_human_donor_child"
81+
],
7682
"status": "released",
7783
"taxa": "Homo sapiens",
7884
"source": "/labs/j-michael-cherry/",

src/igvfd/tests/data/inserts/tissue.json

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
"aliases": [
88
"j-michael-cherry:alias3"
99
],
10+
"donors": [
11+
"j-michael-cherry:alias_human_donor2"
12+
],
1013
"status": "in progress",
1114
"taxa": "Homo sapiens",
1215
"source": "/labs/j-michael-cherry/",
@@ -51,6 +54,9 @@
5154
"aliases": [
5255
"j-michael-cherry:pooled_tissue"
5356
],
57+
"donors": [
58+
"j-michael-cherry:alias_human_donor_child"
59+
],
5460
"status": "released",
5561
"taxa": "Homo sapiens",
5662
"source": "/labs/j-michael-cherry/",

src/igvfd/tests/data/inserts/whole_organism.json

+6
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
"aliases": [
2727
"j-michael-cherry:yeastF"
2828
],
29+
"donors": [
30+
"j-michael-cherry:alias_human_donor1"
31+
],
2932
"status": "released",
3033
"source": "/labs/j-michael-cherry/",
3134
"description": "frozen yeast sample",
@@ -39,6 +42,9 @@
3942
"aliases": [
4043
"j-michael-cherry:yeastF2"
4144
],
45+
"donors": [
46+
"j-michael-cherry:alias_human_donor_child"
47+
],
4248
"status": "released",
4349
"source": "/labs/j-michael-cherry/",
4450
"taxa": "Saccharomyces"

src/igvfd/tests/fixtures/schemas/cell_line.py

+17-4
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,34 @@
22

33

44
@pytest.fixture
5-
def cell_line(testapp, other_lab, award):
5+
def cell_line(testapp, other_lab, award, rodent_donor):
66
item = {
77
'award': award['@id'],
88
'lab': other_lab['@id'],
9-
'source': other_lab['@id']
9+
'source': other_lab['@id'],
10+
'taxa': 'Mus musculus',
11+
'donors': [rodent_donor['@id']]
1012
}
1113
return testapp.post_json('/cell_line', item, status=201).json['@graph'][0]
1214

1315

1416
@pytest.fixture
15-
def cell_line_with_date_obtained(testapp, other_lab, award):
17+
def cell_line_with_date_obtained(testapp, other_lab, award, human_donor):
1618
item = {
1719
'award': award['@id'],
1820
'lab': other_lab['@id'],
1921
'source': other_lab['@id'],
20-
'date_obtained': '2022-04-02'
22+
'date_obtained': '2022-04-02',
23+
'taxa': 'Homo sapiens',
24+
'donors': [human_donor['@id']]
2125
}
2226
return testapp.post_json('/cell_line', item, status=201).json['@graph'][0]
27+
28+
29+
@pytest.fixture
30+
def cell_line_1(cell_line):
31+
item = cell_line.copy()
32+
item.update({
33+
'schema_version': '1'
34+
})
35+
return item

0 commit comments

Comments
 (0)