anz2 commited on
Commit
0246d97
1 Parent(s): 4e46152

clone another repo.

Browse files
.gitattributes CHANGED
@@ -53,3 +53,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
53
  *.jpg filter=lfs diff=lfs merge=lfs -text
54
  *.jpeg filter=lfs diff=lfs merge=lfs -text
55
  *.webp filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
53
  *.jpg filter=lfs diff=lfs merge=lfs -text
54
  *.jpeg filter=lfs diff=lfs merge=lfs -text
55
  *.webp filter=lfs diff=lfs merge=lfs -text
56
+ data/train/experiment_columns.json filter=lfs diff=lfs merge=lfs -text
57
+ data/train/samples_columns.json filter=lfs diff=lfs merge=lfs -text
58
+ data/train/experiments.csv filter=lfs diff=lfs merge=lfs -text
59
+ data/train/samples.csv filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ configs:
4
+ - config_name: experiments
5
+ data_files: "data/train/experiments.csv"
6
+ sep: ","
7
+ default: true
8
+ - config_name: samples
9
+ data_files: "data/train/samples.csv"
10
+ sep: ","
11
+ ---
data/train/experiment_columns.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:458076ad409329da911811cd4fc4cdb74fb77322ab94f9bf8843d3cdeb3eb4fc
3
+ size 187
data/train/experiments.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5c768beafb374cc13c6014eedb9c12d4e8ca211efc37f18e19681005333bcd2d
3
+ size 195199
data/train/samples.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:968e20a83fb761baf5135c102d71814028c34b0c267ed64a854b82d0815b523b
3
+ size 43320263
data/train/samples_columns.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a078975aa1f5ad7d54715443320fecabf8c87119b78601f923d448f444a040b1
3
+ size 31127
nasa-osdr.py ADDED
@@ -0,0 +1,548 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ """NASA OSDR - Open Science Data Repository"""
16
+
17
+ import os
18
+
19
+ import datasets
20
+ import pandas as pd
21
+
22
+ _CITATION = """
23
+ NASA Space Biology Open Science Data Repository (OSDR) was accessed on 11.10.2023 from https://registry.opendata.aws/nasa-osdr.
24
+ """
25
+
26
+ _DESCRIPTION = """
27
+ This contains aggregated data from nasa-osdr s3 bucket.
28
+ It contains up to 451 experiments and tables of samples from those experiments.
29
+ Dataset curation is done in another github repo: https://github.com/AnzorGozalishvili/nasa_osdr_data_curation
30
+ """
31
+
32
+ _HOMEPAGE = "https://huggingface.co/datasets/anz2/nasa-osdr"
33
+
34
+ _DATA_URL = "https://huggingface.co/datasets/anz2/nasa-osdr/resolve/main/data"
35
+
36
+ _LICENSE = "Apache 2.0"
37
+
38
+ _SPLITS = ["train"]
39
+
40
+ class NasaOsdrConfig(datasets.BuilderConfig):
41
+ """BuilderConfig for nasa-osdr dataset."""
42
+
43
+ def __init__(self, features, data_url, citation, license, url, **kwargs):
44
+ """BuilderConfig for SuperGLUE.
45
+
46
+ Args:
47
+ features: *list[string]*, list of the features that will appear in the
48
+ feature dict. Should not include "label".
49
+ data_url: *string*, url to download the zip file from.
50
+ citation: *string*, citation for the data set.
51
+ url: *string*, url for information about the data set.
52
+ label_classes: *list[string]*, the list of classes for the label if the
53
+ label is present as a string. Non-string labels will be cast to either
54
+ 'False' or 'True'.
55
+ **kwargs: keyword arguments forwarded to super.
56
+ """
57
+ super().__init__(**kwargs)
58
+ self.features = features
59
+ self.data_url = data_url
60
+ self.citation = citation
61
+ self.license = license
62
+ self.url = url
63
+
64
+
65
+ class NasaOsdr(datasets.GeneratorBasedBuilder):
66
+ """NASA OSDR dataset."""
67
+
68
+ BUILDER_CONFIGS = [
69
+ NasaOsdrConfig(
70
+ name="experiments",
71
+ version=datasets.Version("1.0.0"),
72
+ description=_DESCRIPTION,
73
+ citation=_CITATION,
74
+ features=["experiment_id", "version", "all_studies", "metadata_file_extensions", "metadata_filename",
75
+ "metadata_path", "metadata_filenames", "study_metadata_filenames", "metadata_sample_filename"],
76
+ data_url=_DATA_URL,
77
+ license=_LICENSE,
78
+ url=_HOMEPAGE,
79
+ ),
80
+ NasaOsdrConfig(
81
+ name="samples",
82
+ version=datasets.Version("1.0.0"),
83
+ description=_DESCRIPTION,
84
+ citation=_CITATION,
85
+ features=["source name", "sample name", "characteristics[organism]", "term source ref",
86
+ "term accession number", "characteristics[strain]", "term source ref.1",
87
+ "term accession number.1", "characteristics[sex]", "term source ref.2", "term accession number.2",
88
+ "characteristics[developmental stage]", "term source ref.3", "term accession number.3",
89
+ "characteristics[material type]", "term source ref.4", "term accession number.4",
90
+ "factor value[spaceflight]", "term source ref.5", "term accession number.5",
91
+ "factor value[infection]", "term source ref.6", "term accession number.6",
92
+ "characteristics[experiment start date (dd/mm/yyyy)]",
93
+ "characteristics[experiment end date (dd/mm/yyyy)]", "protocol ref", "protocol ref.1",
94
+ "parameter value[vehicle]", "term source ref.7", "term accession number.7",
95
+ "parameter value[absorbed radiation dose]", "unit", "term source ref.8",
96
+ "term accession number.8", "parameter value[absorbed radiation dose rate]", "unit.1",
97
+ "term source ref.9", "term accession number.9", "parameter value[exposure duration]", "unit.2",
98
+ "term source ref.10", "term accession number.10",
99
+ "parameter value[ionizing radiation categorized by source]", "term source ref.11",
100
+ "term accession number.11", "parameter value[ionizing radiation]", "term source ref.12",
101
+ "term accession number.12", "comment [sample_description]", "comment [sample_source_name]",
102
+ "comment [sample_title]", "experiment_id", "version", "metadata_filename", "metadata_path",
103
+ "metadata_sample_filename", "characteristics[animal source]", "characteristics[age at launch]",
104
+ "characteristics[diet]", "comment[feeding schedule]", "parameter value[light cycle]",
105
+ "parameter value[habitat]", "parameter value[duration]", "parameter value[euthanasia method]",
106
+ "parameter value[carcass preservation method]", "parameter value[sample preservation method]",
107
+ "parameter value[sample storage temperature]", "term source ref.13", "term accession number.13",
108
+ "comment[source description]", "comment[original submitted sample name]",
109
+ "comment[alsda biospecimen id]", "comment[alsda biospecimen subject id]",
110
+ "comment[sample name description]", "comment[animal source]",
111
+ "parameter value[euthanasia chemical]", "comment[lsda biospecimen id]",
112
+ "comment[lsda biospecimen subject id]", "protocol ref.2", "unit.3", "term source ref.14",
113
+ "term accession number.14", "unit.4", "term source ref.15", "term accession number.15", "unit.5",
114
+ "term source ref.16", "term accession number.16", "term source ref.17",
115
+ "term accession number.17", "term source ref.18", "term accession number.18",
116
+ "parameter value[carcass storage method]",
117
+ "characteristics[strain,http://www.ebi.ac.uk/efo/efo_0005135,efo]",
118
+ "parameter value[light cycle,http://ncicb.nci.nih.gov/xml/owl/evs/thesaurus.owl#c90419,ncit]",
119
+ "parameter value[habitat,http://purl.obolibrary.org/obo/envo_01000739,envo]", "material type",
120
+ "characteristics[sex,http://purl.obolibrary.org/obo/pato_0000047,efo]",
121
+ "parameter value[source storage method]",
122
+ "characteristics[growth,http://purl.obolibrary.org/obo/go_0040007,go]",
123
+ "factor value[weightlessness simulation]", "characteristics [age]", "characteristics [genotype]",
124
+ "characteristics [organism part]", "characteristics [protocol]", "characteristics [strain]",
125
+ "factor value[genotype]", "factor value[treatment]", "comment[initiation date]",
126
+ "comment[completion date]", "parameter value[storage temperature setting]",
127
+ "comment[maximum total absorbed dose ]", "comment[minimum total absorbed dose ]",
128
+ "factor value[absorbed radiation dose]",
129
+ "characteristics[exposure duration,http://ncicb.nci.nih.gov/xml/owl/evs/thesaurus.owl#c83280,ncit]",
130
+ "characteristics[age]", "factor value[ionizing radiation]",
131
+ "parameter value[dose,http://purl.obolibrary.org/obo/exo_0000076,exo]", "factor value[time]",
132
+ "comment[sample_source_name]", "characteristics[genotype]", "characteristics[subspecies]",
133
+ "characteristics[flight name]", "characteristics[duration]", "parameter value[hardware]",
134
+ "parameter value[growth environment]", "parameter value[growth medium]",
135
+ "comment[sample characteristic]",
136
+ "factor value[weightlessness simulation,http://purl.bioontology.org/ontology/mesh/d018474,mesh]",
137
+ "factor value[tissue]", "comment[enclosure]",
138
+ "characteristics[diet,http://www.ebi.ac.uk/efo/efo_0002755,efo]",
139
+ "parameter value[exposure duration,http://ncicb.nci.nih.gov/xml/owl/evs/thesaurus.owl#c83280,ncit]",
140
+ "parameter value[low let average abs. dose (spds only)]",
141
+ "parameter value[high let average abs. dose (all detectors)]",
142
+ "parameter value[abs. dose (gcr) rd3-b3]", "unit.6", "parameter value[abs. dose (orb) rd3-b3]",
143
+ "unit.7", "parameter value[abs. dose (total) rd3-b3]", "unit.8",
144
+ "parameter value[low let average abs. dose (all detectors)]", "unit.9",
145
+ "parameter value[low let max. abs. dose (all detectors)]", "unit.10",
146
+ "parameter value[high let min. abs. dose (all detectors)]", "unit.11",
147
+ "parameter value[high let max. abs. dose (all detectors)]", "unit.12",
148
+ "parameter value[low let min. abs. dose (all detectors)]", "unit.13", "term source ref.19",
149
+ "term accession number.19", "parameter value[abs. dose (irb/saa) rd3-b3]", "unit.14",
150
+ "term source ref.20", "term accession number.20",
151
+ "parameter value[average absorbed dose (spds only)]", "unit.15", "term source ref.21",
152
+ "term accession number.21", "parameter value[high let average abs. dose (spds only)]", "unit.16",
153
+ "term source ref.22", "term accession number.22", "characteristics[stage]",
154
+ "parameter value[sampling time,http://www.ebi.ac.uk/efo/efo_0000689,efo]",
155
+ "parameter value[temperature,http://www.ebi.ac.uk/efo/efo_0001702,efo]",
156
+ "factor value[microgravity]", "parameter value[housing temperature]", "comment[sample title]",
157
+ "comment[sanple description]", "factor value[bleomycin treatment]",
158
+ "characteristics[treatment duration]", "comment[sample source name]", "factor value[irradiation]",
159
+ "factor value[timepoint]",
160
+ "characteristics[cell line,http://purl.bioontology.org/ontology/mesh/d002460,mesh]",
161
+ "characteristics[cell type,http://purl.obolibrary.org/obo/cl_0000000,clo]",
162
+ "comment[source name description]", "characteristics[secondary organism]",
163
+ "characteristics[symbiosis,http://purl.bioontology.org/ontology/mesh/d013559,mesh]",
164
+ "factor value[simulated microgravity]", "characteristics [strainorline]",
165
+ "characteristics [biosourceprovider]", "characteristics [generation]", "factor value[generation]",
166
+ "factor value[environmentalstress]", "factor value[ecotype]", "characteristics[organism part]",
167
+ "characteristics[seed source]", "characteristics[stratification exposure]",
168
+ "parameter value[light source]", "parameter value[growth time]",
169
+ "characteristics[ecotype,http://www.ebi.ac.uk/efo/efo_0000434,efo]",
170
+ "parameter value[maximum total absorbed dose]", "parameter value[minimum total absorbed dose]",
171
+ "factor value[hypergravity]", "characteristics [cell type]", "characteristics [passage]",
172
+ "factor value[electromagnetic fields]", "parameter value[growth termperature]",
173
+ "characteristics[cell source]", "factor value[cell line]",
174
+ "parameter value[sample media information]", "parameter value[growth temperature]",
175
+ "factor value[microgravity simulation]", "comment[sample description]", "comment[iss expedition]",
176
+ "factor value[sample location]", "comment [ena_sample]", "characteristics [developmental stage]",
177
+ "factor value[ionzing radiation]", "characteristics[cell type]",
178
+ "characteristics[cell type,http://www.ebi.ac.uk/efo/efo_0000324,efo]",
179
+ "factor value[time of sample collection after treatment]", "comment[nih geo sample name]",
180
+ "factor value[age]", "characteristics[collection date]", "characteristics[isolation source]",
181
+ "characteristics[ecotype]", "factor value[atmospheric pressure]", "factor value[organism part]",
182
+ "parameter value[light regimen]", "parameter value[mean growth temperature]",
183
+ "parameter value[container]", "parameter value[light intensity]",
184
+ "parameter value[ph of growth medium]", "comment[original submitted sample]",
185
+ "parameter value[absorbed radiation dose,http://ncicb.nci.nih.gov/xml/owl/evs/thesaurus.owl#c95181,ncit]",
186
+ "comment[enclosure/habitat]",
187
+ "characteristics[ecotype,http://mged.sourceforge.net/ontologies/mgedontology.owl#ecotype,mo]",
188
+ "characteristics[age,http://mged.sourceforge.net/ontologies/mgedontology.owl#age,mo]",
189
+ "parameter value[growth condition,http://www.ebi.ac.uk/efo/efo_0000523,efo]",
190
+ "parameter value[duration,http://www.ebi.ac.uk/efo/efo_0000433,efo]",
191
+ "parameter value[treatment]", "parameter value[carcass weight]",
192
+ "parameter value[source storage temperature]", "comment[dissection date]",
193
+ "comment[alsda biospecimen source id]", "parameter value[canister and position]",
194
+ "factor value[freezing]", "parameter value[total cfu count]",
195
+ "parameter value[sample storage method]", "factor value[muscle, skeletal]",
196
+ "factor value[weightlessness,http://purl.bioontology.org/ontology/mesh/d014893,mesh]",
197
+ "characteristics[age,http://purl.obolibrary.org/obo/pato_0000011,pato]",
198
+ "comment[average absorbed dose (mgy) (spds only)]",
199
+ "comment[low let average abs. dose (spds only - mgy)]",
200
+ "comment[high let average abs. dose (spds only - mgy)]", "comment[abs. dose (gcr mgy) rd3-b3]",
201
+ "comment[abs. dose (irb/saa mgy) rd3-b3]", "comment[abs. dose (orb mgy) rd3-b3]",
202
+ "comment[abs. dose (total mgy) rd3-b3]",
203
+ "comment[low let average abs. dose (all detectors - mgy)]",
204
+ "comment[high let average abs. dose (all detectors - mgy)]",
205
+ "comment[low let min. abs. dose (all detectors - mgy)]",
206
+ "comment[low let max. abs. dose (all detectors - mgy)]",
207
+ "comment[high let min. abs. dose (all detectors - mgy)]",
208
+ "comment[high let max. abs. dose (all detectors - mgy)]",
209
+ "parameter value[media,http://www.ebi.ac.uk/efo/efo_0000579,ccont]",
210
+ "characteristics [individual identifier]", "characteristics [sex]",
211
+ "factor value[sample collection protocol]",
212
+ "characteristics[cell line,http://purl.obolibrary.org/obo/clo_0000031,obi]",
213
+ "characteristics[age,http://purl.obolibrary.org/obo/pato_0000011,obi]",
214
+ "characteristics[cell cycle phase]", "factor value[cell cycle phase]", "comment[sample_title]",
215
+ "comment[sample_description]", "characteristics[host organism]", "factor value[dose]",
216
+ "characteristics[cultivar]", "parameter value[environment]", "factor value[sex]",
217
+ "characteristics[culture condition]", "factor value[culture condition]",
218
+ "characteristics[biosourceprovider]", "parameter value[ccont:media]",
219
+ "characteristics[sample type]", "characteristics[tissue]", "characteristics[study subject]",
220
+ "parameter value[ionizing radiation energy]", "parameter value[ionizing radiation device]",
221
+ "characteristics[sex,http://purl.bioontology.org/ontology/mesh/d012723,mesh]",
222
+ "characteristics[diet,http://purl.bioontology.org/ontology/mesh/d004032,mesh]", "unit[time unit]",
223
+ "characteristics[culture type]", "factor value[donor]", "factor value[gender]",
224
+ "factor value[radiation dose]", "factor value[smoking status]", "characteristics[strain or line]",
225
+ "characteristics[launch mission]", "comment[lsda subject id]",
226
+ "comment[sample name in raw and processed data]", "factor value[weightlessness]",
227
+ "factor value[altered gravity]", "factor value[space mission]",
228
+ "characteristics[genotype,http://purl.bioontology.org/ontology/mesh/d005838,mesh]",
229
+ "characteristics[ecotype,http://purl.bioontology.org/ontology/mesh/d060146,mesh]",
230
+ "unit[timeunit]", "parameter value[sample description]",
231
+ "characteristics[collection date,http://ncicb.nci.nih.gov/xml/owl/evs/thesaurus.owl#c81286,ncit]",
232
+ "factor value[altitude]", "characteristics[cell line]", "parameter value[preservation method]",
233
+ "factor value[exposure duration]", "comment [sample_characteristics]",
234
+ "comment[location of afflicted plants]", "characteristics [treatment group]",
235
+ "characteristics [cellline]", "factor value[treatment group]",
236
+ "characteristics[cell line origin]", "characteristics[treatment]",
237
+ "characteristics[treatment time]", "factor value[mitochondrial status]",
238
+ "factor value[rad9 status]", "comment[sample_name]", "characteristics [rad9 status]",
239
+ "parameter value[time]", "comment[bric canister]", "parameter value[sample storage temeperature]",
240
+ "parameter value[time in microgravity]", "parameter value[time in hypergravity]",
241
+ "factor value[hindlimb unloading]", "factor value[gravity, altered]", "characteristics [culture]",
242
+ "characteristics [organism]", "characteristics[subject]", "parameter value[group]",
243
+ "factor value[light cycle]", "factor value[animal housing]", "factor value[food deprivation]",
244
+ "factor value[water deprivation]", "parameter value[sample storage temperature setting]",
245
+ "parameter value[light amount]", "unnamed: 72", "factor value[bed rest]",
246
+ "factor value[sampling time]", "factor value[experimental campaign]",
247
+ "parameter value[tissue preservation,http://purl.bioontology.org/ontology/mesh/d014021,mesh]",
248
+ "parameter value[particle charge]", "parameter value[linear energy transfer]",
249
+ "comment[nsrl run]", "characteristics [growth condition]", "comment[maximum total absorbed dose]",
250
+ "comment[minimum total absorbed dose]", "parameter value[sequencing blank]",
251
+ "factor value[sieve size]", "factor value[tetanus toxoid]", "factor value[vaccine adjuvant]",
252
+ "parameter value[housing condition]", "parameter value[starting body mass]",
253
+ "parameter value[final body mass]", "parameter value[final body mass].1",
254
+ "parameter value[sample preservatin method]", "parameter value[thymus mass]",
255
+ "comment[injection date]", "comment[sacrifice date]", "comment[ncorticosterone]",
256
+ "comment[genotype info]", "parameter value[ph]", "parameter value[age at sample harvest]",
257
+ "parameter value[sex,http://purl.obolibrary.org/obo/pato_0000047,efo]",
258
+ "factor value[dissection timeline]", "comment[average absorbed dose (spds only - mgy)]",
259
+ "comment[duration]", "characteristics[age at harvest]", "parameter value[mesh: cosmic radiation]",
260
+ "parameter value[time of sample collection after treatment]",
261
+ "parameter value[quantity of growth medium]", "parameter value[culture media]", "protocol ref.3",
262
+ "parameter value[injection date]", "parameter value[sacrifice date]",
263
+ "parameter value[ncorticosterone]", "parameter value[age at harvest]", "comment[seed source]",
264
+ "comment[sample name notes]", "factor value[cultivar]", "parameter value[light quality]",
265
+ "parameter value[environment,http://purl.bioontology.org/ontology/mesh/d004777,mesh]",
266
+ "factor value[soil environment exposure]", "parameter value[watering method]",
267
+ "parameter value[number of plants per sample (pooled)]", "parameter value[light time]",
268
+ "parameter value[light exposure]", "factor value[clinical treatment]",
269
+ "parameter value[body weight]", "characteristics[age,http://www.ebi.ac.uk/efo/efo_0000246,efo]",
270
+ "characteristics[tissue,http://purl.obolibrary.org/obo/uberon_0000479,envo]",
271
+ "parameter value[temperature,http://purl.obolibrary.org/obo/pato_0000146,envo]",
272
+ "parameter value[light,http://www.ebi.ac.uk/efo/efo_0000568,efo]",
273
+ "parameter value[euthanasia time after hs]", "factor value[growth time]",
274
+ "factor value[euthanasia method]", "factor value[carcass preservation method]",
275
+ "factor value[dissection condition]", "factor value[tissue preservation method]",
276
+ "factor value[diet]", "parameter value[sample weight]", "comment[launch date]",
277
+ "comment[euthanasia date]", "parameter value[enrichment material]",
278
+ "comment[date of ucla arrival]", "comment[alsda source name]", "comment[lsda source name]",
279
+ "factor value[duration]", "factor value[euthanasia location]", "comment[lsda sample name]",
280
+ "comment[alsda sample name]", "characteristics[host strain]", "characteristics[feeding schedule]",
281
+ "parameter value[nurfb lot number used during acclimation]",
282
+ "parameter value[nurfb lot number used in the habitat]",
283
+ "parameter value[nurfb nutrition values]", "term source ref.23", "term accession number.23",
284
+ "term source ref.24", "term accession number.24", "parameter value[ionizing radiation source]",
285
+ "term source ref.25", "term accession number.25",
286
+ "characteristics[organism,http://purl.bioontology.org/ontology/sty/t001,mesh]",
287
+ "comment[euthanasia and dissection date]",
288
+ "characteristics[mission duration (between launch and landing)]",
289
+ "characteristics[time between launch and sample harvest]", "parameter value[growth light color]",
290
+ "parameter value[growth time start date (mm/dd/yy)]", "parameter value[actual gravity level]",
291
+ "parameter value[light treatment duration]", "parameter value[treatment light intensity]",
292
+ "parameter value[treatment light color]", "parameter value[treatment light source]",
293
+ "parameter value[gravity treatment duration]", "parameter value[mission launch]",
294
+ "parameter value[mission return]", "parameter value[launch date (mm/dd/yy)]",
295
+ "parameter value[absorbed radiation dose (from launch to sample harvest)]", "term source ref.26",
296
+ "term accession number.26", "parameter value[sample harvest date (mm/dd/yy)]",
297
+ "term source ref.27", "term accession number.27", "comment[run]", "comment[mission]",
298
+ "parameter value[sampling material]", "comment[collection date]", "factor value[strain]",
299
+ "parameter value[carcass storage temperature]", "comment[bsp dissection date]",
300
+ "comment[lsda biospecimen source id]",
301
+ "characteristics[filter,http://ncicb.nci.nih.gov/xml/owl/evs/thesaurus.owl#c41199,ncit]",
302
+ "parameter value[carbon dioxide,http://purl.obolibrary.org/obo/chebi_16526,efo]",
303
+ "parameter value[sample preservation temperature]",
304
+ "parameter value[location,http://ncicb.nci.nih.gov/xml/owl/evs/thesaurus.owl#c25341,ncit]",
305
+ "parameter value[sample location]", "factor value[uv mutagenesis]", "factor value[growth cycle]",
306
+ "factor value[sample storage]", "characteristics[strain source]",
307
+ "parameter value[minimum growth temperature]", "parameter value[maximum growth temperature]",
308
+ "parameter value[uv light exposure]", "characteristics[host genotype]",
309
+ "characteristics[host age (at irradiation)]", "characteristics[donor strain]",
310
+ "characteristics[donor genotype]", "characteristics[donor age (at mammary gland collection)]",
311
+ "parameter value[light color]", "parameter value[harvest date (dd/mm/yyyy)]",
312
+ "parameter value[experiment start date]", "parameter value[harvest date]",
313
+ "parameter value[number of seeds per container]",
314
+ "characteristics[developmental stage,http://www.ebi.ac.uk/efo/efo_0000399,efo]",
315
+ "factor value[altered gravity simulator]", "factor value[temperature]",
316
+ "characteristics[return mission]", "comment[source description].1",
317
+ "parameter value[whole tissue weight]", "parameter value[tissue section level]",
318
+ "comment[slide quadrant]", "comment[technical replicate #]",
319
+ "comment[initiation date (dd-mmm-yy)]", "comment[completion date (dd-mmm-yy)]",
320
+ "comment[dissection date (dd-mmm-yy)]", "factor value[preservation method]",
321
+ "factor value[order of preservation]", "comment[spleen collection date]",
322
+ "comment[liver collection date]", "comment[carcass weight (g)]",
323
+ "comment[soleus collection date]", "parameter value[tissue]",
324
+ "parameter value[host sample media information]", "parameter value[host growth time]",
325
+ "parameter value[co2 level]", "characteristics[title]", "characteristics[biosample]",
326
+ "characteristics[host,http://www.ebi.ac.uk/efo/efo_0000532,efo]", "parameter value[subject id]",
327
+ "parameter value[sample collection timepoint]", "characteristics[age at onset of treatment]",
328
+ "parameter value[anoxia treatment duration]", "parameter value[heat treatment duration]",
329
+ "parameter value[treatment light regimen]", "comment[original submittted sample name]",
330
+ "comment[sample name in raw data file]",
331
+ "characteristics[identification,http://ncicb.nci.nih.gov/xml/owl/evs/thesaurus.owl#c25737,ncit]",
332
+ "parameter value[growth media information]",
333
+ "characteristics[tissue,http://ncicb.nci.nih.gov/xml/owl/evs/thesaurus.owl#c12801,ncit]",
334
+ "parameter value[experiment batch]", "characteristics[age(at launch)]",
335
+ "characteristics[growth time]", "parameter value[flight no.]",
336
+ "parameter value[sampling matrial]", "factor value[light]", "factor value[developmental stage]",
337
+ "characteristics[organism,http://mged.sourceforge.net/ontologies/mgedontology.owl#organism,mo]",
338
+ "comment[description]", "characteristics[cultivar,http://www.ebi.ac.uk/efo/efo_0005136,efo]",
339
+ "comment[seed lot]", "parameter value[broad-scale environmental context]",
340
+ "parameter value[environmental medium]", "parameter value[isolation and growth condition]",
341
+ "comment[biosample]", "comment[accession]", "comment[wgs accession no.]",
342
+ "factor value[atmospheric composition]", "comment[biosample accession]",
343
+ "parameter value[light type]", "parameter value[air temperature]",
344
+ "parameter value[relative air humidity]", "parameter value[relative humidity]",
345
+ "characteristics[maternal age]", "characteristics[paternal age]", "comment[ncbi accession]",
346
+ "parameter value[ovariectomy]", "parameter value[euthanasia timing]",
347
+ "parameter value[growth light cycle]", "parameter value[growth light source]",
348
+ "parameter value[growth light intensity]", "parameter value[treatment light cycle]",
349
+ "parameter value[gravity, altered]", "parameter value[mission]",
350
+ "parameter value[developmental stage at onset of gravity treatment]",
351
+ "parameter value[developmental stage at onset of light treatment]",
352
+ "parameter value[developmental stage at time of sample collection]", "factor value[tiime]",
353
+ "parameter value[sex]", "parameter value[growth temprature]", "factor value[study subject]",
354
+ "parameter value[dose rate]", "comment[animal source (host)]",
355
+ "characteristics[age (at irradiation)]", "characteristics[strain (donor strain)]",
356
+ "comment[animal source (donor)]", "characteristics[genotype (donor genotype)]",
357
+ "characteristics[control diet]", "parameter value[housing temperature(pre hibernation)]",
358
+ "parameter value[light cycle (pre-hibernation)]",
359
+ "parameter value[housing temperature (hibernation)]",
360
+ "parameter value[light cycle (hibernation)]", "comment[sampling time]",
361
+ "parameter value[growth time].1",
362
+ "parameter value[euthanasia method,http://ncicb.nci.nih.gov/xml/owl/evs/thesaurus.owl#c90336,ncit]",
363
+ "parameter value[age at euthanasia]",
364
+ "characteristics[developmental stage at onset of treatment]",
365
+ "characteristics[genetic modification]", "characteristics [cage]", "characteristics [location]",
366
+ "characteristics [strain or line]", "factor value[cage]", "factor value[location]",
367
+ "parameter value[time,http://www.ebi.ac.uk/efo/efo_0000721,efo]",
368
+ "parameter value[outer frame rotation]", "parameter value[inner frame rotation]",
369
+ "factor value[particle charge]", "parameter value[time of sample collection after irradiation]",
370
+ "characteristics[drosophila developmental stage,http://www.ebi.ac.uk/efo/efo_0005651,efo]",
371
+ "factor value[ground based facilities]", "parameter value[radiation]", "parameter value[energy]",
372
+ "parameter value[radiation source]",
373
+ "characteristics[sex,http://ncicb.nci.nih.gov/xml/owl/evs/thesaurus.owl#c28421,ncit]",
374
+ "comment[animal id]",
375
+ "parameter value[diet,http://purl.bioontology.org/ontology/mesh/d004032,mesh]",
376
+ "parameter value[age at launch]",
377
+ "parameter value[euthanasia,http://purl.bioontology.org/ontology/mesh/d005065,mesh]",
378
+ "characteristics[mission return]", "parameter value[growth time start date (mm/dd/yyyy)]",
379
+ "comment[light treatment description]", "parameter value[sample harvest date (mm/dd/yyyy)]",
380
+ "characteristics[growth condition,http://www.ebi.ac.uk/efo/efo_0000523,efo]",
381
+ "comment[technical replicate]", "comment[sacrifice date (dd-mmm-yy)]",
382
+ "factor value[dry immersion]", "characteristics [biosourcetype]", "factor value[hze]",
383
+ "comment[biosample no.]", "characteristics[height]", "characteristics[weight]",
384
+ "factor value[intracranial pressure]", "parameter value[average icp]", "comment[plate]",
385
+ "comment[plate well]", "parameter value[average fractionated dose rate]",
386
+ "parameter value[ionizing radiation facility]", "parameter value[sample media informtion]",
387
+ "factor value[radiation distance]", "parameter value[hze]",
388
+ "parameter value[sample media informtio]", "parameter value[container diameter]",
389
+ "parameter value[age at sample collection]", "characteristics[nasa isolate identifier]",
390
+ "characteristics[mission collected]", "factor value[collection date]", "factor value[accession]",
391
+ "parameter value[parental treatment light cycle]",
392
+ "parameter value[parental treatment growth medium]",
393
+ "parameter value[parental treatment light intensity]",
394
+ "parameter value[parental treatment growth temperature]",
395
+ "comment[lar animal receipt date at scrippts]", "comment[euthanasia dates]",
396
+ "comment[dissection dates]", "characteristics[variety]",
397
+ "factor value[sample preservation method]", "factor value[seed sanitization]",
398
+ "characteristics[escherichia coli strain]", "parameter value[quantity of fertilizer]",
399
+ "parameter value[collection date]", "comment[biosample accession ]",
400
+ "comment[original sample id]", "comment[wgs accession no]", "comment[biosample no]",
401
+ "parameter value[recovery duration on earth]", "comment[rfid]", "comment[date of birth]",
402
+ "comment[lar animal receipt data at scripps]", "factor value[spacecraft]",
403
+ "factor value[gravity]", "parameter value[quantity growth medium]",
404
+ "parameter value[average percent humidity]", "parameter value[temperature range]",
405
+ "parameter value[mean light intensity]", "comment[data file note]",
406
+ "parameter value[mouse cage id]", "comment[rfid(last 4 digit)]",
407
+ "comment[rfid(complete or last 4 digit)]", "factor value[partial weight bearing]",
408
+ "comment[bsp dissection date (final dissection)]",
409
+ "comment[euthanasia and dissection date (mm/dd/yyyy)]", "characteristics[experiment]",
410
+ "characteristics[age when exposed to x-ray]",
411
+ "characteristics[age when exposed to rapamycin/placebo]", "characteristics[age at irradiation]",
412
+ "parameter value[diet]", "parameter value[number of particle types]",
413
+ "parameter value[time between exposures]", "parameter value[nsrl run]",
414
+ "comment[did samples remain in the beamline between exposures?]",
415
+ "characteristics[sampling time,http://www.ebi.ac.uk/efo/efo_0000689,efo]",
416
+ "comment[original submitter sample name]", "factor value[time after treatment]",
417
+ "comment[alsda subject id]", "parameter value[body weight upon euthanasia]",
418
+ "characteristics[age at euthanasia]", "parameter value[number of leaves at onset of treatment]",
419
+ "parameter value[maximum growth protocol]",
420
+ "parameter value[developmental stage at onset of treatment]",
421
+ "parameter value[number of leaves at time of sample collection]",
422
+ "parameter value[number of open flowers at time of sample collection]",
423
+ "characteristics[variant]", "parameter value[number of seeds sown per well]",
424
+ "characteristics[final body weight]", "characteristics[run number]",
425
+ "parameter value[study subject]", "factor value[parabola]", "factor value[sample condition]",
426
+ "comment[sample type]", "parameter value[collection condition]",
427
+ "factor value[sample storage time]", "characteristics [celltype]",
428
+ "factor value[space flight,http://purl.bioontology.org/ontology/mesh/d013026,mesh]",
429
+ "characteristics[age before irradiation]", "characteristics [tissue]",
430
+ "comment[lar animal receipt date at scripps]", "characteristics[generation]",
431
+ "parameter value[age of f0 at launch]", "comment[experiment start date (dd/mm/yyyy)]",
432
+ "comment[experiment end date (dd/mm/yyyy)]", "parameter value[mean treatment temperature]",
433
+ "parameter value[age at time of sample collection]", "comment[parental treatment]",
434
+ "characteristics[sample collection phase]", "factor value[tissue segment]",
435
+ "parameter value[duration on iss]", "characteristics[donor id]",
436
+ "comment[maximum total absorbed dose]", "characteristics [cell line]",
437
+ "characteristics [sample type]", "characteristics [treatment duration]",
438
+ "factor value[treatment duration]", "parameter value[experiment]", "characteristics [individual]",
439
+ "characteristics [sample name]", "factor value[individual]", "factor value[growth environment]",
440
+ "parameter value[euthanasia date]", "comment[euthanasia date (dd/mm/yyyy)]",
441
+ "comment[euthanasia date (dd-mmm-yyyy)]", "comment[bsp dissection date (dd-mmm-yyyy)]",
442
+ "parameter value[growth hardware]", "parameter value[treatment hardware]",
443
+ "comment[other sample source name]", "factor value[tissue model]",
444
+ "factor value[culture media,http://purl.bioontology.org/ontology/mesh/d003470,mesh]",
445
+ "factor value[zygosity,http://semanticscience.org/resource/sio_001263,sio]",
446
+ "factor value[generation number,http://semanticscience.org/resource/sio_010061,sio]",
447
+ "parameter value[age at onset of treatment]",
448
+ "comment[intensity of best extracted proteins by beatbox homogenizer]",
449
+ "parameter value[tonometry window]",
450
+ "parameter value[sample preservation method histology and immunohistochemistry]",
451
+ "parameter value[sample preservation method immunoblotting]", "comment[set]",
452
+ "characteristics[seed source (host)]", "characteristics[pathogen strain source]",
453
+ "parameter value[irrigation]", "parameter value[treatment mean growth temperature]",
454
+ "parameter value[culture medium]", "comment[pathosystem]",
455
+ "characteristics[age at start of assay]", "characteristics[stimulus]", "performer",
456
+ "parameter value[anesthesia method]", "comment[euthanasia date (dd-mm-year)]",
457
+ "comment[euthanasia time (hh:mm:ss)]", "comment[body weight at euthanasia]",
458
+ "comment[bsp dissection date (dd-mm-year)]",
459
+ "comment[partial body weight on bsp dissection date]", "factor value[housing condition]",
460
+ "parameter value[number of cagemates]", "parameter value[feeding schedule]",
461
+ "parameter value[age at time of assay]", "characteristics[growth temperature]",
462
+ "characteristics[growth condition]", "comment[sample_characteristics]",
463
+ "factor value[tissue type]", "factor value[developmental condition]", "comment[iss module type]",
464
+ "parameter value[sample collection method]", "characteristics[age at experiment start]",
465
+ "comment[sample location]", "comment[flight number]", "comment[location]", "comment[sample id]",
466
+ "comment[sample collection date]", "comment[growthcondition]", "factor value[oxygen gas]",
467
+ "characteristics[volunteers,http://purl.bioontology.org/ontology/mesh/d014838,mesh]",
468
+ "characteristics[age at launch or beginning of treatment]",
469
+ "characteristics [biological replicate]", "characteristics [dose gray]",
470
+ "characteristics [post radiation time hour]", "characteristics [radiation]",
471
+ "characteristics [technical replicate]", "factor value[post radiation timepoint]",
472
+ "factor value[radiation type]", "parameter value[highly charged energetic nuclei]",
473
+ "factor value[stress]",
474
+ "characteristics[passage number,http://www.ebi.ac.uk/efo/efo_0007061,efo]",
475
+ "characteristics[sample media information]", "factor value[variation]",
476
+ "factor value[magnetic field]", "comment[sample type description]", "characteristics [exposure]",
477
+ "characteristics [exposure time]", "factor value[pressure]", "factor value[collection set]",
478
+ "characteristics[organism 2]", "characteristics[strain 2]", "characteristics[organism 3]",
479
+ "parameter value[euthanasia time after landing]", "characteristics[sample_type]",
480
+ "characteristics[organism_part]", "characteristics[sample_title]", "characteristics[irradation]",
481
+ "characteristics[cell model]", "factor value[radiation]", "characteristics [mouse strain]",
482
+ "factor value[mouse strain]", "characteristics[dose,http://www.ebi.ac.uk/efo/efo_0000428,efo]",
483
+ "characteristics[radiation quality]", "characteristics [pathology]", "factor value[neoplasm]",
484
+ "characteristics[antibiotic]", "factor value[antibiotic concentration]",
485
+ "comment[source name- channel 2]", "factor value[radiation, ionzing]"],
486
+ data_url=_DATA_URL,
487
+ license=_LICENSE,
488
+ url=_HOMEPAGE,
489
+ ),
490
+ ]
491
+
492
+ def _info(self):
493
+ features = datasets.Features(
494
+ {
495
+ feature: datasets.Value("string")
496
+ for feature in self.config.features
497
+ }
498
+ )
499
+
500
+ return datasets.DatasetInfo(
501
+ description=_DESCRIPTION,
502
+ features=features,
503
+ homepage=self.config.url,
504
+ license=self.config.license,
505
+ citation=self.config.citation,
506
+ )
507
+
508
+ def _split_generators(self, dl_manager):
509
+ if self.config.name == 'experiments':
510
+ downloaded_files = dl_manager.download_and_extract(
511
+ {
512
+ "train": {
513
+ "file": os.path.join(self.config.data_url, 'train/experiments.csv'),
514
+ },
515
+ }
516
+ )
517
+
518
+ return [
519
+ datasets.SplitGenerator(
520
+ name=datasets.Split.TRAIN,
521
+ gen_kwargs={
522
+ "file": downloaded_files['train']['file'],
523
+ },
524
+ ),
525
+ ]
526
+ elif self.config.name == 'samples':
527
+ downloaded_files = dl_manager.download_and_extract(
528
+ {
529
+ "train": {
530
+ "file": os.path.join(self.config.data_url, 'train/samples.csv'),
531
+ },
532
+ }
533
+ )
534
+
535
+ return [
536
+ datasets.SplitGenerator(
537
+ name=datasets.Split.TRAIN,
538
+ gen_kwargs={
539
+ "file": downloaded_files['train']['file'],
540
+ },
541
+ ),
542
+ ]
543
+
544
+ def _generate_examples(self, file: str):
545
+ df = pd.read_csv(file, index_col=0, low_memory=False)
546
+ for idx, row in df.iterrows():
547
+ _item = {**row.to_dict()}
548
+ yield idx, _item
tests/test_nasa_osdr.py ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import datasets
2
+ from datasets import DatasetInfo, DownloadManager
3
+
4
+ from NASA_OSDR import NasaOsdr
5
+
6
+
7
+ def test_inherit_generator_base_builder_works():
8
+ class Child(datasets.GeneratorBasedBuilder):
9
+ BUILDER_CONFIGS = [
10
+ datasets.BuilderConfig(
11
+ name="some dataset",
12
+ version=datasets.Version("1.0.0"),
13
+ description="some description",
14
+ )
15
+ ]
16
+
17
+ DEFAULT_CONFIG_NAME = "some dataset"
18
+
19
+ def _info(self) -> DatasetInfo:
20
+ return datasets.DatasetInfo(
21
+ description="""dadada """,
22
+ features=None,
23
+ supervised_keys=None,
24
+ homepage="dada",
25
+ license="dada",
26
+ citation="dsada",
27
+ )
28
+
29
+ child = Child()
30
+
31
+ assert child
32
+
33
+
34
+ def test_generate_examples():
35
+ dataset = NasaOsdr(name='experiments')
36
+ train_data = dataset._generate_examples(file='data/train/experiments.csv')
37
+ idx, sample = next(iter(train_data))
38
+ print(idx, sample.keys())
39
+
40
+ dataset = NasaOsdr(name='samples')
41
+ train_data = dataset._generate_examples(file='data/train/samples.csv')
42
+ idx, sample = next(iter(train_data))
43
+ print(idx, sample.keys())
44
+
45
+
46
+ def test_load_dataset():
47
+ from datasets import load_dataset
48
+ experiments_dataset = load_dataset("nasa_osdr.py", "experiments")
49
+ print(len(experiments_dataset["train"]))
50
+ print(experiments_dataset['train'][:10])
51
+
52
+ samples_dataset = load_dataset("nasa_osdr.py", "samples")
53
+ print(len(samples_dataset["train"]))
54
+ print(samples_dataset['train'][:10])
55
+
56
+
57
+ # def test_load_dataset2():
58
+ # from datasets import load_dataset
59
+ # dataset = load_dataset("anz2/NASA_OSDR", "experiments", use_auth_token="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")
60
+ # print(len(dataset["train"]))
61
+
62
+ # from datasets import load_dataset
63
+ # dataset = load_dataset("anz2/NASA_OSDR", "samples", use_auth_token="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")
64
+ # print(len(dataset["train"]))