Skip to content

Commit 0c694fb

Browse files
committed
Root node under another root node only chooses the one that comes lower down #265
1 parent bffb22c commit 0c694fb

File tree

4 files changed

+22
-18
lines changed

4 files changed

+22
-18
lines changed

src/dendrograms/taxonomy_details.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,6 @@
110110
Cell_type: CL:0000679
111111
Location_relation: has_soma_location
112112
#glutamatergic neuron
113-
- Node: CS201912131_151
114-
Cell_type: CL:0000125
115-
Location_relation: part_of
116-
# non-neuronal currently mapped as glial cell
117113
- Node: CS201912131_125
118114
Cell_type: CL:0000115
119115
Location_relation: part_of
@@ -134,6 +130,10 @@
134130
Cell_type: CL:0002453
135131
Location_relation: part_of
136132
#OPC
133+
- Node: CS201912131_151
134+
Cell_type: CL:0000125
135+
Location_relation: part_of
136+
# non-neuronal currently mapped as glial cell
137137
- Node: CS201912131_140
138138
Cell_type: CL:0000128
139139
Location_relation: part_of

src/patterns/data/default/CCN201912131_class_base.tsv

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ http://purl.obolibrary.org/obo/PCL_0015075 Exc L2 LINC00507 GLRA3 Exc L2 LINC005
7777
http://purl.obolibrary.org/obo/PCL_0015076 Exc L2-3 RORB RTKN2 Exc L2-3 RORB RTKN2 CL:0000679 NCBITaxon:9606 UBERON:0001384 CS201912131_76 PMID:34616062 entrez:101927745|entrez:105376987|entrez:196475|entrez:23007 entrez:219790|entrez:6096 M1 Human http://purl.obolibrary.org/obo/PCL_0015576 UBERON:0001384 PCL:0016576
7878
http://purl.obolibrary.org/obo/PCL_0015077 Exc L2-3 LINC00507 DSG3 Exc L2-3 LINC00507 DSG3 CL:0000679 NCBITaxon:9606 UBERON:0001384 CS201912131_77 PMID:34616062 entrez:105379003|entrez:627|entrez:658 entrez:100862680|entrez:1830 M1 Human http://purl.obolibrary.org/obo/PCL_0015577 UBERON:0001384 PCL:0016577
7979
http://purl.obolibrary.org/obo/PCL_0015078 Exc L3 LAMP5 CARM1P1 Exc L3 LAMP5 CARM1P1 CL:0000679 NCBITaxon:9606 UBERON:0001384 CS201912131_78 PMID:34616062 entrez:127833|entrez:22987|entrez:64097 entrez:100130873|entrez:24141 M1 Human http://purl.obolibrary.org/obo/PCL_0015578 UBERON:0001384 PCL:0016578
80-
http://purl.obolibrary.org/obo/PCL_0015079 Oligo L2-6 OPALIN MAP6D1 Oligo L2-6 OPALIN MAP6D1 CL:0000128 NCBITaxon:9606 UBERON:0001384 CS201912131_79 PMID:34616062 entrez:103689918|entrez:4155|entrez:5168|entrez:9705 entrez:79929|entrez:93377 M1 Human http://purl.obolibrary.org/obo/PCL_0015579 UBERON:0001384 PCL:0016579
80+
http://purl.obolibrary.org/obo/PCL_0015079 Oligo L2-6 OPALIN MAP6D1 Oligo L2-6 OPALIN MAP6D1 CL:0002453 NCBITaxon:9606 UBERON:0001384 CS201912131_79 PMID:34616062 entrez:103689918|entrez:4155|entrez:5168|entrez:9705 entrez:79929|entrez:93377 M1 Human http://purl.obolibrary.org/obo/PCL_0015579 UBERON:0001384 PCL:0016579
8181
http://purl.obolibrary.org/obo/PCL_0015080 Exc L2-3 RORB CCDC68 Exc L2-3 RORB CCDC68 CL:0000679 NCBITaxon:9606 UBERON:0001384 CS201912131_80 PMID:34616062 entrez:1290|entrez:22837|entrez:8492 entrez:6096|entrez:80323 M1 Human http://purl.obolibrary.org/obo/PCL_0015580 UBERON:0001384 PCL:0016580
8282
http://purl.obolibrary.org/obo/PCL_0015081 Exc L2-3 RORB PTPN3 Exc L2-3 RORB PTPN3 CL:0000679 NCBITaxon:9606 UBERON:0001384 CS201912131_81 PMID:34616062 entrez:105370610|entrez:105378334|entrez:1290|entrez:6096 entrez:5774|entrez:6096 M1 Human http://purl.obolibrary.org/obo/PCL_0015581 UBERON:0001384 PCL:0016581
8383
http://purl.obolibrary.org/obo/PCL_0015082 Exc L3 THEMIS ENPEP Exc L3 THEMIS ENPEP CL:0000679 NCBITaxon:9606 UBERON:0001384 CS201912131_82 PMID:34616062 entrez:101928964|entrez:105376081|entrez:2191|entrez:3908 entrez:2028|entrez:387357 M1 Human http://purl.obolibrary.org/obo/PCL_0015582 UBERON:0001384 PCL:0016582
@@ -116,13 +116,13 @@ http://purl.obolibrary.org/obo/PCL_0015114 Exc L5 FEZF2 NREP-AS1 Exc L5 FEZF2 NR
116116
http://purl.obolibrary.org/obo/PCL_0015115 Exc L5 FEZF2 RNF144A-AS1 Exc L5 FEZF2 RNF144A-AS1 CL:0000679 NCBITaxon:9606 UBERON:0001384 CS201912131_115 PMID:34616062 entrez:105369818|entrez:105370019|entrez:948 entrez:386597|entrez:55079 M1 Human http://purl.obolibrary.org/obo/PCL_0015615 UBERON:0001384 PCL:0016615
117117
http://purl.obolibrary.org/obo/PCL_0015116 Exc L5-6 FEZF2 IFNG-AS1 Exc L5-6 FEZF2 IFNG-AS1 CL:0000679 NCBITaxon:9606 UBERON:0001384 CS201912131_116 PMID:34616062 entrez:105369818|entrez:404744 entrez:100885789|entrez:55079 M1 Human http://purl.obolibrary.org/obo/PCL_0015616 UBERON:0001384 PCL:0016616
118118
http://purl.obolibrary.org/obo/PCL_0015117 Exc L5-6 FEZF2 LPO Exc L5-6 FEZF2 LPO CL:0002453 NCBITaxon:9606 UBERON:0001384 CS201912131_117 PMID:34616062 entrez:101928114|entrez:105376372 entrez:4025|entrez:55079 M1 Human http://purl.obolibrary.org/obo/PCL_0015617 UBERON:0001384 PCL:0016617
119-
http://purl.obolibrary.org/obo/PCL_0015118 OPC L1-6 PDGFRA COL20A1 OPC|OPC L1-6 PDGFRA COL20A1 CL:0000125 NCBITaxon:9606 UBERON:0001384 CS201912131_118 PMID:34616062 entrez:1462|entrez:202374 entrez:5156|entrez:57642 M1 Human http://purl.obolibrary.org/obo/PCL_0015618 UBERON:0001384 OPC PCL:0016618
120-
http://purl.obolibrary.org/obo/PCL_0015119 Oligo L3-6 OPALIN-like ENPP6 Oligo L3-6 OPALIN-like ENPP6|Oligo_1 CL:0000128 NCBITaxon:9606 UBERON:0001384 CS201912131_119 PMID:34616062 entrez:101927199|entrez:220416|entrez:5129|entrez:6285|entrez:9705 entrez:133121 M1 Human http://purl.obolibrary.org/obo/PCL_0015619 UBERON:0001384 Oligo_1 PCL:0016619
121-
http://purl.obolibrary.org/obo/PCL_0015120 Oligo L2-6 OPALIN FTH1P3 Oligo L2-6 OPALIN FTH1P3 CL:0000128 NCBITaxon:9606 UBERON:0001384 CS201912131_120 PMID:34616062 entrez:101927459|entrez:5168 entrez:2498|entrez:93377 M1 Human http://purl.obolibrary.org/obo/PCL_0015620 UBERON:0001384 PCL:0016620
119+
http://purl.obolibrary.org/obo/PCL_0015118 OPC L1-6 PDGFRA COL20A1 OPC|OPC L1-6 PDGFRA COL20A1 CL:0002453 NCBITaxon:9606 UBERON:0001384 CS201912131_118 PMID:34616062 entrez:1462|entrez:202374 entrez:5156|entrez:57642 M1 Human http://purl.obolibrary.org/obo/PCL_0015618 UBERON:0001384 OPC PCL:0016618
120+
http://purl.obolibrary.org/obo/PCL_0015119 Oligo L3-6 OPALIN-like ENPP6 Oligo L3-6 OPALIN-like ENPP6|Oligo_1 CL:0002453 NCBITaxon:9606 UBERON:0001384 CS201912131_119 PMID:34616062 entrez:101927199|entrez:220416|entrez:5129|entrez:6285|entrez:9705 entrez:133121 M1 Human http://purl.obolibrary.org/obo/PCL_0015619 UBERON:0001384 Oligo_1 PCL:0016619
121+
http://purl.obolibrary.org/obo/PCL_0015120 Oligo L2-6 OPALIN FTH1P3 Oligo L2-6 OPALIN FTH1P3 CL:0002453 NCBITaxon:9606 UBERON:0001384 CS201912131_120 PMID:34616062 entrez:101927459|entrez:5168 entrez:2498|entrez:93377 M1 Human http://purl.obolibrary.org/obo/PCL_0015620 UBERON:0001384 PCL:0016620
122122
http://purl.obolibrary.org/obo/PCL_0015121 Oligo L5-6 OPALIN LDLRAP1 Oligo L5-6 OPALIN LDLRAP1 CL:0000128 NCBITaxon:9606 UBERON:0001384 CS201912131_121 PMID:34616062 entrez:3834|entrez:7039|entrez:84915 entrez:26119|entrez:93377 M1 Human http://purl.obolibrary.org/obo/PCL_0015621 UBERON:0001384 PCL:0016621
123-
http://purl.obolibrary.org/obo/PCL_0015122 Astro L1-6 FGFR3 AQP1 Astro L1-6 FGFR3 AQP1 CL:0000125 NCBITaxon:9606 UBERON:0001384 CS201912131_122 PMID:34616062 entrez:3371 entrez:2261|entrez:358 M1 Human http://purl.obolibrary.org/obo/PCL_0015622 UBERON:0001384 PCL:0016622
124-
http://purl.obolibrary.org/obo/PCL_0015123 Astro L1 FGFR3 SERPINI2 Astro L1 FGFR3 SERPINI2 CL:0000125 NCBITaxon:9606 UBERON:0001384 CS201912131_123 PMID:34616062 entrez:151790|entrez:286464 entrez:2261|entrez:5276 M1 Human http://purl.obolibrary.org/obo/PCL_0015623 UBERON:0001384 PCL:0016623
125-
http://purl.obolibrary.org/obo/PCL_0015124 Astro L1-6 FGFR3 PLCG1 Astro L1-6 FGFR3 PLCG1|Astro_2 CL:0000125 NCBITaxon:9606 UBERON:0001384 CS201912131_124 PMID:34616062 entrez:105376917|entrez:50509 entrez:2261|entrez:5335 M1 Human http://purl.obolibrary.org/obo/PCL_0015624 UBERON:0001384 Astro_2 PCL:0016624
123+
http://purl.obolibrary.org/obo/PCL_0015122 Astro L1-6 FGFR3 AQP1 Astro L1-6 FGFR3 AQP1 CL:0000127 NCBITaxon:9606 UBERON:0001384 CS201912131_122 PMID:34616062 entrez:3371 entrez:2261|entrez:358 M1 Human http://purl.obolibrary.org/obo/PCL_0015622 UBERON:0001384 PCL:0016622
124+
http://purl.obolibrary.org/obo/PCL_0015123 Astro L1 FGFR3 SERPINI2 Astro L1 FGFR3 SERPINI2 CL:0000127 NCBITaxon:9606 UBERON:0001384 CS201912131_123 PMID:34616062 entrez:151790|entrez:286464 entrez:2261|entrez:5276 M1 Human http://purl.obolibrary.org/obo/PCL_0015623 UBERON:0001384 PCL:0016623
125+
http://purl.obolibrary.org/obo/PCL_0015124 Astro L1-6 FGFR3 PLCG1 Astro L1-6 FGFR3 PLCG1|Astro_2 CL:0000127 NCBITaxon:9606 UBERON:0001384 CS201912131_124 PMID:34616062 entrez:105376917|entrez:50509 entrez:2261|entrez:5335 M1 Human http://purl.obolibrary.org/obo/PCL_0015624 UBERON:0001384 Astro_2 PCL:0016624
126126
http://purl.obolibrary.org/obo/PCL_0015125 Endo L2-5 NOSTRIN SRGN Endo|Endo L2-5 NOSTRIN SRGN|Endothelial CL:0000115 NCBITaxon:9606 UBERON:0001384 CS201912131_125 PMID:34616062 entrez:7122 entrez:115677|entrez:5552 M1 Human http://purl.obolibrary.org/obo/PCL_0015625 UBERON:0001384 Endothelial PCL:0016625
127127
http://purl.obolibrary.org/obo/PCL_0015126 VLMC L1-5 PDGFRA COLEC12 VLMC|VLMC L1-5 PDGFRA COLEC12 CL:4023051 NCBITaxon:9606 UBERON:0001384 CS201912131_126 PMID:34616062 entrez:1278|entrez:81035 entrez:5156|entrez:81035 M1 Human http://purl.obolibrary.org/obo/PCL_0015626 UBERON:0001384 VLMC PCL:0016626
128128
http://purl.obolibrary.org/obo/PCL_0015127 Micro L1-6 TYROBP CD74 Micro L1-6 TYROBP CD74|Microglia-PVM|Microglia/PVM CL:0000129 NCBITaxon:9606 UBERON:0001384 CS201912131_127 PMID:34616062 entrez:54518|entrez:64805 entrez:7305|entrez:972 M1 Human http://purl.obolibrary.org/obo/PCL_0015627 UBERON:0001384 Microglia-PVM PCL:0016627
@@ -172,4 +172,4 @@ http://purl.obolibrary.org/obo/PCL_0015176 (Mouse L6 IT)-like_C1 (Mouse L6 IT)-l
172172
http://purl.obolibrary.org/obo/PCL_0015177 (Mouse L6 CT)-like_C1 (Mouse L6 CT)-like_C1|L6 CT_1 CL:0000679 NCBITaxon:9606 UBERON:0001384 CS201912131_177 PMID:34616062 M1 Human http://purl.obolibrary.org/obo/PCL_0015677 UBERON:0001384 L6 CT_1
173173
http://purl.obolibrary.org/obo/PCL_0015178 (Mouse L5 ET)-like_C1 (Mouse L5 ET)-like_C1|L5 ET_1 CL:0000679 NCBITaxon:9606 UBERON:0001384 CS201912131_178 PMID:34616062 M1 Human http://purl.obolibrary.org/obo/PCL_0015678 UBERON:0001384 L5 ET_1
174174
http://purl.obolibrary.org/obo/PCL_0015179 Oligo_C2 Oligo_2|Oligo_C2 CL:0000128 NCBITaxon:9606 UBERON:0001384 CS201912131_179 PMID:34616062 M1 Human http://purl.obolibrary.org/obo/PCL_0015679 UBERON:0001384 Oligo_2
175-
http://purl.obolibrary.org/obo/PCL_0015180 Astro_C1 Astro_1|Astro_C1 CL:0000125 NCBITaxon:9606 UBERON:0001384 CS201912131_180 PMID:34616062 M1 Human http://purl.obolibrary.org/obo/PCL_0015680 UBERON:0001384 Astro_1
175+
http://purl.obolibrary.org/obo/PCL_0015180 Astro_C1 Astro_1|Astro_C1 CL:0000127 NCBITaxon:9606 UBERON:0001384 CS201912131_180 PMID:34616062 M1 Human http://purl.obolibrary.org/obo/PCL_0015680 UBERON:0001384 Astro_1

src/patterns/data/default/CS1908210_class_base.tsv

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ http://purl.obolibrary.org/obo/PCL_0023066 Exc L6 FEZF2 SCUBE1 Exc L6 FEZF2 SCUB
8181
http://purl.obolibrary.org/obo/PCL_0023067 Exc L5-6 FEZF2 IL15 Exc L5-6 FEZF2 IL15 CL:0000679 NCBITaxon:9606 UBERON:0002771 CS1908210067 entrez:3600|entrez:55079 MTG Human http://purl.obolibrary.org/obo/PCL_0023567 UBERON:0002771 entrez:2078|entrez:255743|entrez:4929 PCL:0024567
8282
http://purl.obolibrary.org/obo/PCL_0023068 Exc L6 FEZF2 OR2T8 Exc L6 FEZF2 OR2T8 CL:0000679 NCBITaxon:9606 UBERON:0002771 CS1908210068 entrez:343172|entrez:55079 MTG Human http://purl.obolibrary.org/obo/PCL_0023568 UBERON:0002771 entrez:26577|entrez:3486|entrez:729025|entrez:84189 PCL:0024568
8383
http://purl.obolibrary.org/obo/PCL_0023069 Exc L5-6 FEZF2 EFTUD1P1 Exc L5-6 FEZF2 EFTUD1P1 CL:0000679 NCBITaxon:9606 UBERON:0002771 CS1908210069 entrez:55079|entrez:648809 MTG Human http://purl.obolibrary.org/obo/PCL_0023569 UBERON:0002771 entrez:105377183|entrez:10886 PCL:0024569
84-
http://purl.obolibrary.org/obo/PCL_0023070 OPC L1-6 PDGFRA OPC|OPC L1-6 PDGFRA CL:0000125 NCBITaxon:9606 UBERON:0002771 CS1908210070 entrez:5156 MTG Human http://purl.obolibrary.org/obo/PCL_0023570 UBERON:0002771 entrez:5156|entrez:65217 PCL:0024570
84+
http://purl.obolibrary.org/obo/PCL_0023070 OPC L1-6 PDGFRA OPC|OPC L1-6 PDGFRA CL:0002453 NCBITaxon:9606 UBERON:0002771 CS1908210070 entrez:5156 MTG Human http://purl.obolibrary.org/obo/PCL_0023570 UBERON:0002771 entrez:5156|entrez:65217 PCL:0024570
8585
http://purl.obolibrary.org/obo/PCL_0023149 Astrocyte Astrocyte CL:0000125 NCBITaxon:9606 UBERON:0002771 CS1908210149 MTG Human http://purl.obolibrary.org/obo/PCL_0023649 UBERON:0002771
86-
http://purl.obolibrary.org/obo/PCL_0023071 Astro L1-6 FGFR3 SLC14A1 Astro L1-6 FGFR3 SLC14A1 CL:0000125 NCBITaxon:9606 UBERON:0002771 CS1908210071 entrez:2261|entrez:6563 MTG Human http://purl.obolibrary.org/obo/PCL_0023571 UBERON:0002771 entrez:105376917|entrez:6507 PCL:0024571
87-
http://purl.obolibrary.org/obo/PCL_0023072 Astro L1-2 FGFR3 GFAP Astro L1-2 FGFR3 GFAP CL:0000125 NCBITaxon:9606 UBERON:0002771 CS1908210072 entrez:2261|entrez:2670 MTG Human http://purl.obolibrary.org/obo/PCL_0023572 UBERON:0002771 entrez:3399|entrez:4494 PCL:0024572
86+
http://purl.obolibrary.org/obo/PCL_0023071 Astro L1-6 FGFR3 SLC14A1 Astro L1-6 FGFR3 SLC14A1 CL:0000127 NCBITaxon:9606 UBERON:0002771 CS1908210071 entrez:2261|entrez:6563 MTG Human http://purl.obolibrary.org/obo/PCL_0023571 UBERON:0002771 entrez:105376917|entrez:6507 PCL:0024571
87+
http://purl.obolibrary.org/obo/PCL_0023072 Astro L1-2 FGFR3 GFAP Astro L1-2 FGFR3 GFAP CL:0000127 NCBITaxon:9606 UBERON:0002771 CS1908210072 entrez:2261|entrez:2670 MTG Human http://purl.obolibrary.org/obo/PCL_0023572 UBERON:0002771 entrez:3399|entrez:4494 PCL:0024572
8888
http://purl.obolibrary.org/obo/PCL_0023073 Oligo L1-6 OPALIN Oligo L1-6 OPALIN|Oligodendrocyte CL:0000128 NCBITaxon:9606 UBERON:0002771 CS1908210073 entrez:93377 MTG Human http://purl.obolibrary.org/obo/PCL_0023573 UBERON:0002771 entrez:51148|entrez:5168 PCL:0024573
89-
http://purl.obolibrary.org/obo/PCL_0023074 Endo L2-6 NOSTRIN Endo L2-6 NOSTRIN|Endothelial CL:0000125 NCBITaxon:9606 UBERON:0002771 CS1908210074 entrez:115677 MTG Human http://purl.obolibrary.org/obo/PCL_0023574 UBERON:0002771 entrez:51705 PCL:0024574
90-
http://purl.obolibrary.org/obo/PCL_0023075 Micro L1-6 TYROBP Micro L1-6 TYROBP|Microglia CL:0000125 NCBITaxon:9606 UBERON:0002771 CS1908210075 entrez:7305 MTG Human http://purl.obolibrary.org/obo/PCL_0023575 UBERON:0002771 entrez:1436|entrez:54518 PCL:0024575
89+
http://purl.obolibrary.org/obo/PCL_0023074 Endo L2-6 NOSTRIN Endo L2-6 NOSTRIN|Endothelial CL:0000115 NCBITaxon:9606 UBERON:0002771 CS1908210074 entrez:115677 MTG Human http://purl.obolibrary.org/obo/PCL_0023574 UBERON:0002771 entrez:51705 PCL:0024574
90+
http://purl.obolibrary.org/obo/PCL_0023075 Micro L1-6 TYROBP Micro L1-6 TYROBP|Microglia CL:0000129 NCBITaxon:9606 UBERON:0002771 CS1908210075 entrez:7305 MTG Human http://purl.obolibrary.org/obo/PCL_0023575 UBERON:0002771 entrez:1436|entrez:54518 PCL:0024575

src/scripts/template_generation_utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import csv
44
import networkx as nx
55
import json
6+
import sys
67
import pcl_id_factory
78

89
from dendrogram_tools import tree_recurse
@@ -365,9 +366,12 @@ def read_markers(marker_path, gene_names):
365366

366367
def get_gross_cell_type(_id, subtrees, taxonomy_config):
367368
gross_cell_type = ''
369+
matched_subtree_size = sys.maxsize
368370
for index, subtree in enumerate(subtrees):
369-
if _id in subtree:
371+
# in case _id exists in multiple subtrees, pick the smallest one (the most specific)
372+
if _id in subtree and len(subtree) < matched_subtree_size:
370373
gross_cell_type = taxonomy_config['Root_nodes'][index]['Cell_type']
374+
matched_subtree_size = len(subtree)
371375
return gross_cell_type
372376

373377

0 commit comments

Comments
 (0)