Skip to content

Commit 56a269b

Browse files
Fran McDadeFran McDade
authored andcommitted
Tests for 'Add sample type, model organ to project detail page'. Resolves #805.
1 parent 067a9c1 commit 56a269b

File tree

2 files changed

+473
-28
lines changed

2 files changed

+473
-28
lines changed

spa/src/app/files/hca-project/hca-project-mapper.mock.ts

Lines changed: 218 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
*/
77

88
// Example of project detail with single values
9-
export const PROJECT_DETAIL_SINGLE_VALUE = {
9+
export const PROJECT_DETAIL_SINGLE_VALUES = {
1010
"ageUnit": "month",
11-
"arrayExpressAccessions": "Unspecified",
12-
"bamCount": "--",
13-
"biologicalSex": "female, male",
11+
"arrayExpressAccessions": "E-AAAA-00",
12+
"bamCount": 2,
13+
"biologicalSex": "female",
1414
"contributors": [
1515
{
1616
"contactName": "Spyros,,Darmanis",
@@ -21,49 +21,153 @@ export const PROJECT_DETAIL_SINGLE_VALUE = {
2121
"projectRole": "principal investigator"
2222
},
2323
],
24-
"disease": "Unspecified",
24+
"disease": "H syndrome",
2525
"donorCount": 10,
2626
"entryId": "2cd14cf5-f8e0-4c97-91a2-9e8957f41ea8",
2727
"fileType": ["fastq.gz"],
28-
"genusSpecies": "Mus musculus",
29-
"geoSeriesAccessions": "Unspecified",
30-
"insdcProjectAccessions": "Unspecified",
31-
"insdcStudyAccessions": "Unspecified",
32-
"libraryConstructionApproach": "Smart-seq2",
33-
"matrixCount": "--",
34-
"modelOrgan": null,
35-
"organ": "large intestine, spleen , diaphragm, muscle, mammary gland, liver, lung endomucin, heart, thymus, brain, tongue , fat, bone, skin, pancreas, kidney , bladder , trachea , lung , lung epcam",
36-
"organPart": "Unspecified",
37-
"organismAge": "3",
38-
"otherCount": "--",
39-
"pairedEnd": "true",
40-
"projectDescription": "We have created a compendium of single cell transcriptome data from the model↵organism Mus musculus comprising more than 100,000 cells from 20 organs and↵tissues. These data represent a new resource for cell biology, revealing gene↵expression in poorly characterized cell populations and allowing for direct and↵controlled comparison of gene expression in cell types shared between tissues, such↵as T-lymphocytes and endothelial cells from distinct anatomical locations. Two distinct technical approaches were used for most tissues.",
41-
"projectShortname": "Tabula Muris",
28+
"genusSpecies": "Homo sapiens",
29+
"geoSeriesAccessions": "GSE00000",
30+
"insdcProjectAccessions": "SRP000000",
31+
"insdcStudyAccessions": "PRJNA000000",
32+
"libraryConstructionApproach": "10X v2 sequencing",
33+
"matrixCount": 1,
34+
"modelOrgan": "brain",
35+
"organ": "brain",
36+
"organPart": "amygdala",
37+
"organismAge": "20",
38+
"otherCount": 16,
39+
"pairedEnd": "false",
40+
"projectDescription": "Contains a small file set from the dataset: 4k PBMCs from a Healthy Donor, a Single Cell Gene Expression Dataset by Cell Ranger 2.1.0. Peripheral blood mononuclear cells (PBMCs) were taken from a healthy donor (same donor as pbmc8k). PBMCs are primary cells with relatively small amounts of RNA (~1pg RNA/cell). Data/Analysis can be found here https://support.10xgenomics.com/single-cell-gene-expression/datasets/2.1.0/pbmc4k and all data is licensed under the creative commons attribution license (https://creativecommons.org/licenses/by/4.0/). This test also contains extensive metadata for browser testing. Metadata is fabricated.",
41+
"projectShortname": "integration/optimus/2019-09-24T11:02:18Z",
4242
"projectTitle": "Tabula Muris: Transcriptomic characterization of 20 organs and tissues from Mus musculus at single cell resolution",
4343
"publications": [
4444
{
4545
"publicationTitle": "Transcriptomic characterization of 20 organs and tissues from mouse at single cell resolution creates a Tabula Muris",
4646
"publicationUrl": "https://www.biorxiv.org/content/early/2018/03/29/237446"
4747
}],
4848
"rawCount": 199640,
49-
"sampleEntityType": "specimens",
50-
"selectedCellType": "Unspecified",
49+
"sampleEntityType": "cellLines",
50+
"selectedCellType": "arcuate artery endothelial cell",
5151
"totalCells": 53755,
5252
"totalCount": 199640,
5353
"workflow": "optimus_v1.3.1"
5454
};
5555

56+
// Example of project detail with multiple values
57+
export const PROJECT_DETAIL_MULTIPLE_VALUES = {
58+
"ageUnit": "month, year",
59+
"arrayExpressAccessions": "E-MTAB-7427, E-MTAB-7417",
60+
"bamCount": 2,
61+
"biologicalSex": "female, male",
62+
"contributors": [
63+
{
64+
"contactName": "Spyros,,Darmanis",
65+
"correspondingContributor": true,
66+
"email": "spyros.darmanis@czbiohub.org",
67+
"institution": "Biohub",
68+
"laboratory": "Quake",
69+
"projectRole": "principal investigator"
70+
},
71+
{
72+
"contactName": "Jane,,Smith",
73+
"correspondingContributor": false,
74+
"email": "j.smith@smithemail.org",
75+
"institution": "University of Washington",
76+
"laboratory": "Department of Biology",
77+
"projectRole": "computational scientist"
78+
},
79+
],
80+
"disease": "colitis (disease), ulcerative colitis (disease)",
81+
"donorCount": 10,
82+
"entryId": "2cd14cf5-f8e0-4c97-91a2-9e8957f41ea8",
83+
"fileType": ["fastq.gz", "bam"],
84+
"genusSpecies": "Homo sapiens, Mus musculus",
85+
"geoSeriesAccessions": "GSE95446, GSE95435",
86+
"insdcProjectAccessions": "SRP145547, SRP100786",
87+
"insdcStudyAccessions": "PRJNA471188, PRJNA377118",
88+
"libraryConstructionApproach": "Smart-Seq, 10X 3' v2 sequencing",
89+
"matrixCount": 1,
90+
"modelOrgan": "brain, tissue",
91+
"organ": "brain, liver",
92+
"organPart": "amygdala, lamina propria of mucosa of colon",
93+
"organismAge": "20, 30",
94+
"otherCount": 16,
95+
"pairedEnd": "false, true",
96+
"projectDescription": "Contains a small file set from the dataset: 4k PBMCs from a Healthy Donor, a Single Cell Gene Expression Dataset by Cell Ranger 2.1.0. Peripheral blood mononuclear cells (PBMCs) were taken from a healthy donor (same donor as pbmc8k). PBMCs are primary cells with relatively small amounts of RNA (~1pg RNA/cell). Data/Analysis can be found here https://support.10xgenomics.com/single-cell-gene-expression/datasets/2.1.0/pbmc4k and all data is licensed under the creative commons attribution license (https://creativecommons.org/licenses/by/4.0/). This test also contains extensive metadata for browser testing. Metadata is fabricated.",
97+
"projectShortname": "integration/optimus/2019-09-24T11:02:18Z",
98+
"projectTitle": "Tabula Muris: Transcriptomic characterization of 20 organs and tissues from Mus musculus at single cell resolution",
99+
"publications": [
100+
{
101+
"publicationTitle": "Transcriptomic characterization of 20 organs and tissues from mouse at single cell resolution creates a Tabula Muris",
102+
"publicationUrl": "https://www.biorxiv.org/content/early/2018/03/29/237446"
103+
},
104+
{
105+
"publicationTitle": "A single‐cell transcriptome atlas of the adult human retina",
106+
"publicationUrl": "https://www.ncbi.nlm.nih.gov/pubmed/31436334"
107+
}],
108+
"rawCount": 199640,
109+
"sampleEntityType": "cellLines, specimens",
110+
"selectedCellType": "arcuate artery endothelial cell, stromal cell",
111+
"totalCells": 53755,
112+
"totalCount": 199640,
113+
"workflow": "optimus_v1.3.1, optimus_v1.3.2"
114+
};
115+
116+
// Example of project detail with empty values
117+
export const PROJECT_DETAIL_EMPTY_VALUES = {
118+
"ageUnit": "",
119+
"arrayExpressAccessions": "",
120+
"bamCount": "",
121+
"biologicalSex": "",
122+
"contributors": [],
123+
"disease": "",
124+
"donorCount": "",
125+
"entryId": "2cd14cf5-f8e0-4c97-91a2-9e8957f41ea8",
126+
"fileType": [],
127+
"genusSpecies": "",
128+
"geoSeriesAccessions": "",
129+
"insdcProjectAccessions": "",
130+
"insdcStudyAccessions": "",
131+
"libraryConstructionApproach": "",
132+
"matrixCount": "",
133+
"modelOrgan": "",
134+
"organ": "",
135+
"organPart": "",
136+
"organismAge": "",
137+
"otherCount": "",
138+
"pairedEnd": "",
139+
"projectDescription": "",
140+
"projectShortname": "",
141+
"projectTitle": "",
142+
"publications": [],
143+
"rawCount": "",
144+
"sampleEntityType": "",
145+
"selectedCellType": "",
146+
"totalCells": "",
147+
"totalCount": "",
148+
"workflow": ""
149+
};
150+
56151
// Example of project detail with unspecified values
57152
export const PROJECT_DETAIL_UNSPECIFIED_VALUES = {
58153
"ageUnit": "Unspecified",
59154
"arrayExpressAccessions": "Unspecified",
60155
"bamCount": "Unspecified",
61156
"biologicalSex": "Unspecified",
62-
"contributors": [],
157+
"contributors": [
158+
{
159+
"contactName": "Unspecified",
160+
"correspondingContributor": false,
161+
"email": "Unspecified",
162+
"institution": "Unspecified",
163+
"laboratory": "Unspecified",
164+
"projectRole": "Unspecified"
165+
}
166+
],
63167
"disease": "Unspecified",
64168
"donorCount": "Unspecified",
65169
"entryId": "2cd14cf5-f8e0-4c97-91a2-9e8957f41ea8",
66-
"fileType": [],
170+
"fileType": ["Unspecified"],
67171
"genusSpecies": "Unspecified",
68172
"geoSeriesAccessions": "Unspecified",
69173
"insdcProjectAccessions": "Unspecified",
@@ -79,11 +183,101 @@ export const PROJECT_DETAIL_UNSPECIFIED_VALUES = {
79183
"projectDescription": "Unspecified",
80184
"projectShortname": "Unspecified",
81185
"projectTitle": "Unspecified",
82-
"publications": [],
186+
"publications": [
187+
{
188+
"publicationTitle": "Unspecified",
189+
"publicationUrl": "Unspecified"
190+
},
191+
],
83192
"rawCount": "Unspecified",
84193
"sampleEntityType": "Unspecified",
85194
"selectedCellType": "Unspecified",
86195
"totalCells": "Unspecified",
87196
"totalCount": "Unspecified",
88197
"workflow": "Unspecified"
89198
};
199+
200+
// Example of project detail with null values
201+
export const PROJECT_DETAIL_NULL_VALUES = {
202+
"ageUnit": null,
203+
"arrayExpressAccessions": null,
204+
"bamCount": null,
205+
"biologicalSex": null,
206+
"contributors": null,
207+
"disease": null,
208+
"donorCount": null,
209+
"entryId": "2cd14cf5-f8e0-4c97-91a2-9e8957f41ea8",
210+
"fileType": null,
211+
"genusSpecies": null,
212+
"geoSeriesAccessions": null,
213+
"insdcProjectAccessions": null,
214+
"insdcStudyAccessions": null,
215+
"libraryConstructionApproach": null,
216+
"matrixCount": null,
217+
"modelOrgan": null,
218+
"organ": null,
219+
"organPart": null,
220+
"organismAge": null,
221+
"otherCount": null,
222+
"pairedEnd": null,
223+
"projectDescription": null,
224+
"projectShortname": null,
225+
"projectTitle": null,
226+
"publications": null,
227+
"rawCount": null,
228+
"sampleEntityType": null,
229+
"selectedCellType": null,
230+
"totalCells": null,
231+
"totalCount": null,
232+
"workflow": null
233+
};
234+
235+
// Example of project detail with specific values,
236+
// sample entity type as "specimens",
237+
// workflow as "Unspecified"
238+
export const PROJECT_DETAIL_SPECIFIC_VALUES = {
239+
"ageUnit": "month",
240+
"arrayExpressAccessions": "E-AAAA-00",
241+
"bamCount": 2,
242+
"biologicalSex": "female",
243+
"contributors": [
244+
{
245+
"contactName": "Spyros,,Darmanis",
246+
"correspondingContributor": true,
247+
"email": "spyros.darmanis@czbiohub.org",
248+
"institution": "Biohub",
249+
"laboratory": "Quake",
250+
"projectRole": "principal investigator"
251+
},
252+
],
253+
"disease": "H syndrome",
254+
"donorCount": 10,
255+
"entryId": "2cd14cf5-f8e0-4c97-91a2-9e8957f41ea8",
256+
"fileType": ["fastq.gz"],
257+
"genusSpecies": "Homo sapiens",
258+
"geoSeriesAccessions": "GSE00000",
259+
"insdcProjectAccessions": "SRP000000",
260+
"insdcStudyAccessions": "PRJNA000000",
261+
"libraryConstructionApproach": "10X v2 sequencing",
262+
"matrixCount": 1,
263+
"modelOrgan": "Unspecified",
264+
"organ": "brain",
265+
"organPart": "amygdala",
266+
"organismAge": "20",
267+
"otherCount": 16,
268+
"pairedEnd": "false",
269+
"projectDescription": "Contains a small file set from the dataset: 4k PBMCs from a Healthy Donor, a Single Cell Gene Expression Dataset by Cell Ranger 2.1.0. Peripheral blood mononuclear cells (PBMCs) were taken from a healthy donor (same donor as pbmc8k). PBMCs are primary cells with relatively small amounts of RNA (~1pg RNA/cell). Data/Analysis can be found here https://support.10xgenomics.com/single-cell-gene-expression/datasets/2.1.0/pbmc4k and all data is licensed under the creative commons attribution license (https://creativecommons.org/licenses/by/4.0/). This test also contains extensive metadata for browser testing. Metadata is fabricated.",
270+
"projectShortname": "integration/optimus/2019-09-24T11:02:18Z",
271+
"projectTitle": "Tabula Muris: Transcriptomic characterization of 20 organs and tissues from Mus musculus at single cell resolution",
272+
"publications": [
273+
{
274+
"publicationTitle": "Transcriptomic characterization of 20 organs and tissues from mouse at single cell resolution creates a Tabula Muris",
275+
"publicationUrl": "https://www.biorxiv.org/content/early/2018/03/29/237446"
276+
}],
277+
"rawCount": 199640,
278+
"sampleEntityType": "specimens",
279+
"selectedCellType": "arcuate artery endothelial cell",
280+
"totalCells": 53755,
281+
"totalCount": 199640,
282+
"workflow": "optimus_v1.3.1"
283+
};

0 commit comments

Comments
 (0)