Procházet zdrojové kódy

Merge branch 'hc/api-more-than-two-parents' of neuroinformatics/oscar-test-data into master

K-Meech před 2 měsíci
rodič
revize
7f3ea712c1

+ 22 - 24
pyrat-api-multiple-responses-mother.json → pyrat-api-multiple-response-and-parents-both-parents.json

@@ -1,10 +1,10 @@
 [
     {
-        "animalid": 101,
-        "eartag_or_id": "ID-101",
+        "animalid": 100,
+        "eartag_or_id": "ID-100",
         "mutations": [
             {
-                "animalid": 101,
+                "animalid": 100,
                 "mutation_id": 5,
                 "mutationname": "Mut-A",
                 "mutationtype": "BAC transgenic",
@@ -14,33 +14,25 @@
         ]
     },
     {
-        "animalid": 103,
-        "eartag_or_id": "ID-103",
+        "animalid": 102,
+        "eartag_or_id": "ID-102",
         "mutations": [
             {
-                "animalid": 103,
+                "animalid": 102,
                 "mutation_id": 5,
                 "mutationname": "Mut-A",
                 "mutationtype": "BAC transgenic",
                 "grade_id": 5,
-                "mutationgrade": "het"
-            },
-            {
-                "animalid": 103,
-                "mutation_id": 5,
-                "mutationname": "Mut-B",
-                "mutationtype": "BAC transgenic",
-                "grade_id": 5,
                 "mutationgrade": "wt"
             }
         ]
     },
     {
-        "animalid": 105,
-        "eartag_or_id": "ID-105",
+        "animalid": 101,
+        "eartag_or_id": "ID-101",
         "mutations": [
             {
-                "animalid": 105,
+                "animalid": 101,
                 "mutation_id": 5,
                 "mutationname": "Mut-A",
                 "mutationtype": "BAC transgenic",
@@ -50,24 +42,30 @@
         ]
     },
     {
-        "animalid": 107,
-        "eartag_or_id": "ID-107",
+        "animalid": 103,
+        "eartag_or_id": "ID-103",
         "mutations": [
             {
-                "animalid": 107,
+                "animalid": 103,
                 "mutation_id": 5,
                 "mutationname": "Mut-A",
                 "mutationtype": "BAC transgenic",
                 "grade_id": 5,
                 "mutationgrade": "het"
-            },
+            }
+        ]
+    },
+    {
+        "animalid": 105,
+        "eartag_or_id": "ID-105",
+        "mutations": [
             {
-                "animalid": 107,
+                "animalid": 105,
                 "mutation_id": 5,
-                "mutationname": "Mut-B",
+                "mutationname": "Mut-A",
                 "mutationtype": "BAC transgenic",
                 "grade_id": 5,
-                "mutationgrade": "wt"
+                "mutationgrade": "hom"
             }
         ]
     }

+ 186 - 0
pyrat-api-multiple-response-and-parents-offspring.json

@@ -0,0 +1,186 @@
+[
+    {
+        "animalid": 1,
+        "eartag_or_id": "ID-001",
+        "species_name": "Mouse",
+        "sacrifice_reason_name": "Not usable age",
+        "dateborn": "2026-02-03T00:00:00",
+        "strain_name": "Line-A",
+        "mutations": [
+            {
+                "animalid": 1,
+                "mutation_id": 5,
+                "mutationname": "Mut-A",
+                "mutationtype": "BAC transgenic",
+                "grade_id": 5,
+                "mutationgrade": "het"
+            }
+        ],
+        "parents": [
+            {
+                "animalid": 1,
+                "parent_id": 100,
+                "parent_eartag": "ID-100",
+                "parent_sex": "m",
+                "parent_labid": "B",
+                "parent_cagenumber": "B2"
+            },
+            {
+                "animalid": 1,
+                "parent_id": 101,
+                "parent_eartag": "ID-101",
+                "parent_sex": "f",
+                "parent_labid": "B",
+                "parent_cagenumber": "B2"
+            }
+        ]
+    },
+    {
+        "animalid": 2,
+        "eartag_or_id": "ID-002",
+        "species_name": "Mouse",
+        "sacrifice_reason_name": "Not usable age",
+        "dateborn": "2026-02-04T00:00:00",
+        "strain_name": "Line-A",
+        "mutations": [
+            {
+                "animalid": 2,
+                "mutation_id": 5,
+                "mutationname": "Mut-A",
+                "mutationtype": "BAC transgenic",
+                "grade_id": 5,
+                "mutationgrade": "het"
+            }
+        ],
+        "parents": [
+            {
+                "animalid": 2,
+                "parent_id": 102,
+                "parent_eartag": "ID-102",
+                "parent_sex": "m",
+                "parent_labid": "B",
+                "parent_cagenumber": "B2"
+            },
+            {
+                "animalid": 2,
+                "parent_id": 100,
+                "parent_eartag": "ID-100",
+                "parent_sex": "m",
+                "parent_labid": "B",
+                "parent_cagenumber": "B2"
+            },
+            {
+                "animalid": 2,
+                "parent_id": 103,
+                "parent_eartag": "ID-103",
+                "parent_sex": "f",
+                "parent_labid": "B",
+                "parent_cagenumber": "B2"
+            },
+            {
+                "animalid": 2,
+                "parent_id": 101,
+                "parent_eartag": "ID-101",
+                "parent_sex": "f",
+                "parent_labid": "B",
+                "parent_cagenumber": "B2"
+            }
+        ]
+    },
+    {
+        "animalid": 3,
+        "eartag_or_id": "ID-003",
+        "species_name": "Mouse",
+        "sacrifice_reason_name": "Not usable age",
+        "dateborn": "2026-02-05T00:00:00",
+        "strain_name": "Line-A",
+        "mutations": [
+            {
+                "animalid": 3,
+                "mutation_id": 5,
+                "mutationname": "Mut-A",
+                "mutationtype": "BAC transgenic",
+                "grade_id": 5,
+                "mutationgrade": "het"
+            }
+        ],
+        "parents": [
+            {
+                "animalid": 3,
+                "parent_id": 100,
+                "parent_eartag": "ID-100",
+                "parent_sex": "m",
+                "parent_labid": "B",
+                "parent_cagenumber": "B2"
+            },
+            {
+                "animalid": 3,
+                "parent_id": 102,
+                "parent_eartag": "ID-102",
+                "parent_sex": "m",
+                "parent_labid": "B",
+                "parent_cagenumber": "B2"
+            },
+            {
+                "animalid": 3,
+                "parent_id": 105,
+                "parent_eartag": "ID-105",
+                "parent_sex": "f",
+                "parent_labid": "B",
+                "parent_cagenumber": "B2"
+            },
+            {
+                "animalid": 3,
+                "parent_id": 103,
+                "parent_eartag": "ID-103",
+                "parent_sex": "f",
+                "parent_labid": "B",
+                "parent_cagenumber": "B2"
+            }
+        ]
+    },
+    {
+        "animalid": 4,
+        "eartag_or_id": "ID-004",
+        "species_name": "Mouse",
+        "sacrifice_reason_name": "Not usable age",
+        "dateborn": "2026-02-06T00:00:00",
+        "strain_name": "Line-A",
+        "mutations": [
+            {
+                "animalid": 4,
+                "mutation_id": 5,
+                "mutationname": "Mut-A",
+                "mutationtype": "BAC transgenic",
+                "grade_id": 5,
+                "mutationgrade": "het"
+            }
+        ],
+        "parents": [
+            {
+                "animalid": 4,
+                "parent_id": 102,
+                "parent_eartag": "ID-102",
+                "parent_sex": "m",
+                "parent_labid": "B",
+                "parent_cagenumber": "B2"
+            },
+            {
+                "animalid": 4,
+                "parent_id": 101,
+                "parent_eartag": "ID-101",
+                "parent_sex": "f",
+                "parent_labid": "B",
+                "parent_cagenumber": "B2"
+            },
+            {
+                "animalid": 4,
+                "parent_id": 105,
+                "parent_eartag": "ID-105",
+                "parent_sex": "f",
+                "parent_labid": "B",
+                "parent_cagenumber": "B2"
+            }
+        ]
+    }
+]

+ 5 - 0
pyrat-api-multiple-response-multiple-parents.csv

@@ -0,0 +1,5 @@
+ID,Species,Sacrifice reason,DOB,Line / Strain (Name),Mutation 1,Grade 1,Mother 1,Mother 2,Father 1,Father 2,Mother 1: Mutation 1,Mother 1: Grade 1,Mother 2: Mutation 1,Mother 2: Grade 1,Father 1: Mutation 1,Father 1: Grade 1,Father 2: Mutation 1,Father 2: Grade 1
+ID-001,Mouse,Not usable age,2026-02-03,Line-A,Mut-A,het,ID-101,,ID-100,,Mut-A,het,,,Mut-A,het,,
+ID-002,Mouse,Not usable age,2026-02-04,Line-A,Mut-A,het,ID-103,ID-101,ID-102,ID-100,Mut-A,het,Mut-A,het,Mut-A,wt,Mut-A,het
+ID-003,Mouse,Not usable age,2026-02-05,Line-A,Mut-A,het,ID-105,ID-103,ID-100,ID-102,Mut-A,hom,Mut-A,het,Mut-A,het,Mut-A,wt
+ID-004,Mouse,Not usable age,2026-02-06,Line-A,Mut-A,het,ID-101,ID-105,ID-102,,Mut-A,het,Mut-A,hom,Mut-A,wt,,

+ 0 - 57
pyrat-api-multiple-responses-father.json

@@ -1,57 +0,0 @@
-[
-    {
-        "animalid": 100,
-        "eartag_or_id": "ID-100",
-        "mutations": [
-            {
-                "animalid": 100,
-                "mutation_id": 5,
-                "mutationname": "Mut-A",
-                "mutationtype": "BAC transgenic",
-                "grade_id": 5,
-                "mutationgrade": "wt"
-            }
-        ]
-    },
-    {
-        "animalid": 102,
-        "eartag_or_id": "ID-102",
-        "mutations": [
-            {
-                "animalid": 102,
-                "mutation_id": 5,
-                "mutationname": "Mut-A",
-                "mutationtype": "BAC transgenic",
-                "grade_id": 5,
-                "mutationgrade": "wt"
-            },
-            {
-                "animalid": 102,
-                "mutation_id": 5,
-                "mutationname": "Mut-B",
-                "mutationtype": "BAC transgenic",
-                "grade_id": 5,
-                "mutationgrade": "hom"
-            }
-        ]
-    },
-    {
-        "animalid": 104,
-        "eartag_or_id": "ID-104",
-        "mutations": [
-            {
-                "animalid": 104,
-                "mutation_id": 5,
-                "mutationname": "Mut-B",
-                "mutationtype": "BAC transgenic",
-                "grade_id": 5,
-                "mutationgrade": "hom"
-            }
-        ]
-    },
-    {
-        "animalid": 106,
-        "eartag_or_id": "ID-106",
-        "mutations": []
-    }
-]

+ 129 - 0
pyrat-api-multiple-responses-parents.json

@@ -0,0 +1,129 @@
+[
+    {
+        "animalid": 100,
+        "eartag_or_id": "ID-100",
+        "mutations": [
+            {
+                "animalid": 100,
+                "mutation_id": 5,
+                "mutationname": "Mut-A",
+                "mutationtype": "BAC transgenic",
+                "grade_id": 5,
+                "mutationgrade": "wt"
+            }
+        ]
+    },
+    {
+        "animalid": 102,
+        "eartag_or_id": "ID-102",
+        "mutations": [
+            {
+                "animalid": 102,
+                "mutation_id": 5,
+                "mutationname": "Mut-A",
+                "mutationtype": "BAC transgenic",
+                "grade_id": 5,
+                "mutationgrade": "wt"
+            },
+            {
+                "animalid": 102,
+                "mutation_id": 5,
+                "mutationname": "Mut-B",
+                "mutationtype": "BAC transgenic",
+                "grade_id": 5,
+                "mutationgrade": "hom"
+            }
+        ]
+    },
+    {
+        "animalid": 104,
+        "eartag_or_id": "ID-104",
+        "mutations": [
+            {
+                "animalid": 104,
+                "mutation_id": 5,
+                "mutationname": "Mut-B",
+                "mutationtype": "BAC transgenic",
+                "grade_id": 5,
+                "mutationgrade": "hom"
+            }
+        ]
+    },
+    {
+        "animalid": 106,
+        "eartag_or_id": "ID-106",
+        "mutations": []
+    },
+    {
+        "animalid": 101,
+        "eartag_or_id": "ID-101",
+        "mutations": [
+            {
+                "animalid": 101,
+                "mutation_id": 5,
+                "mutationname": "Mut-A",
+                "mutationtype": "BAC transgenic",
+                "grade_id": 5,
+                "mutationgrade": "het"
+            }
+        ]
+    },
+    {
+        "animalid": 103,
+        "eartag_or_id": "ID-103",
+        "mutations": [
+            {
+                "animalid": 103,
+                "mutation_id": 5,
+                "mutationname": "Mut-A",
+                "mutationtype": "BAC transgenic",
+                "grade_id": 5,
+                "mutationgrade": "het"
+            },
+            {
+                "animalid": 103,
+                "mutation_id": 5,
+                "mutationname": "Mut-B",
+                "mutationtype": "BAC transgenic",
+                "grade_id": 5,
+                "mutationgrade": "wt"
+            }
+        ]
+    },
+    {
+        "animalid": 105,
+        "eartag_or_id": "ID-105",
+        "mutations": [
+            {
+                "animalid": 105,
+                "mutation_id": 5,
+                "mutationname": "Mut-A",
+                "mutationtype": "BAC transgenic",
+                "grade_id": 5,
+                "mutationgrade": "het"
+            }
+        ]
+    },
+    {
+        "animalid": 107,
+        "eartag_or_id": "ID-107",
+        "mutations": [
+            {
+                "animalid": 107,
+                "mutation_id": 5,
+                "mutationname": "Mut-A",
+                "mutationtype": "BAC transgenic",
+                "grade_id": 5,
+                "mutationgrade": "het"
+            },
+            {
+                "animalid": 107,
+                "mutation_id": 5,
+                "mutationname": "Mut-B",
+                "mutationtype": "BAC transgenic",
+                "grade_id": 5,
+                "mutationgrade": "wt"
+            }
+        ]
+    }
+]

+ 1 - 1
pyrat-api-multiple-responses.csv

@@ -1,4 +1,4 @@
-ID,Species,Sacrifice reason,DOB,Line / Strain (Name),Mutation 1,Mutation 2,Grade 1,Grade 2,Mother,Father,Mother: Mutation 1,Mother: Mutation 2,Mother: Grade 1,Mother: Grade 2,Father: Mutation 1,Father: Mutation 2,Father: Grade 1,Father: Grade 2
+ID,Species,Sacrifice reason,DOB,Line / Strain (Name),Mutation 1,Mutation 2,Grade 1,Grade 2,Mother 1,Father 1,Mother 1: Mutation 1,Mother 1: Mutation 2,Mother 1: Grade 1,Mother 1: Grade 2,Father 1: Mutation 1,Father 1: Mutation 2,Father 1: Grade 1,Father 1: Grade 2
 ID-001,Mouse,Not usable age,2026-02-03,Line-A,Mut-A,,het,,ID-101,ID-100,Mut-A,,het,,Mut-A,,wt,
 ID-002,Mouse,Not usable age,2026-02-04,Line-A,Mut-A,,hom,,ID-101,ID-100,Mut-A,,het,,Mut-A,,wt,
 ID-003,Mouse,Not usable age,2026-02-05,Line-AB,Mut-A,Mut-B,het,hom,ID-103,ID-102,Mut-A,Mut-B,het,wt,Mut-A,Mut-B,wt,hom

+ 1 - 1
pyrat-api-no-parents-mutations.csv

@@ -1,3 +1,3 @@
-ID,Species,Sacrifice reason,DOB,Line / Strain (Name),Mutation 1,Grade 1,Mother,Father,Mother: Mutation 1,Mother: Grade 1,Father: Mutation 1,Father: Grade 1
+ID,Species,Sacrifice reason,DOB,Line / Strain (Name),Mutation 1,Grade 1,Mother 1,Father 1,Mother 1: Mutation 1,Mother 1: Grade 1,Father 1: Mutation 1,Father 1: Grade 1
 ID-001,Mouse,Not usable age,2026-02-03,Line-A,,,,,,,,
 ID-002,Mouse,Not usable age,2026-02-04,Line-A,,,,,,,,

+ 1 - 1
pyrat-api-single-parent.csv

@@ -1,3 +1,3 @@
-ID,Species,Sacrifice reason,DOB,Line / Strain (Name),Mutation 1,Grade 1,Mother,Father,Mother: Mutation 1,Mother: Grade 1,Father: Mutation 1,Father: Grade 1
+ID,Species,Sacrifice reason,DOB,Line / Strain (Name),Mutation 1,Grade 1,Mother 1,Father 1,Mother 1: Mutation 1,Mother 1: Grade 1,Father 1: Mutation 1,Father 1: Grade 1
 ID-001,Mouse,Not usable age,2026-02-03,Line-A,Mut-A,het,ID-101,,Mut-A,het,,
 ID-002,Mouse,Not usable age,2026-02-04,Line-A,Mut-A,wt,ID-101,,Mut-A,het,,

+ 0 - 7
pyrat-api-single-response-father.json

@@ -1,7 +0,0 @@
-[
-    {
-        "animalid": 100,
-        "eartag_or_id": "ID-100",
-        "mutations": []
-    }
-]

+ 5 - 0
pyrat-api-single-response-mother.json → pyrat-api-single-response-parents.json

@@ -1,4 +1,9 @@
 [
+    {
+        "animalid": 100,
+        "eartag_or_id": "ID-100",
+        "mutations": []
+    },
     {
         "animalid": 101,
         "eartag_or_id": "ID-101",

+ 1 - 1
pyrat-api-single-response.csv

@@ -1,2 +1,2 @@
-ID,Species,Sacrifice reason,DOB,Line / Strain (Name),Mutation 1,Grade 1,Mother,Father,Mother: Mutation 1,Mother: Grade 1,Father: Mutation 1,Father: Grade 1
+ID,Species,Sacrifice reason,DOB,Line / Strain (Name),Mutation 1,Grade 1,Mother 1,Father 1,Mother 1: Mutation 1,Mother 1: Grade 1,Father 1: Mutation 1,Father 1: Grade 1
 ID-001,Mouse,Not usable age,2026-02-03,Line-A,Mut-A,het,ID-101,ID-100,Mut-A,het,,