1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669 | def get_primary_classification():
"""Get the primary classification of the cells, based on https://www.wormatlas.org/colorcode.htm
Returns:
dict: Dict of cells vs classification/group from https://www.wormatlas.org/colorcode.htm
"""
classification = {}
for sex in WA_COLORS:
for cell_class in WA_COLORS[sex]:
for cell_type in WA_COLORS[sex][cell_class]:
print_(" - %s/%s/%s" % (sex, cell_class, cell_type))
if cell_type == "body wall muscle":
for cell in BODY_WALL_MUSCLE_NAMES + UNSPECIFIED_BODY_WALL_MUSCLES:
classification[cell] = cell_type
elif cell_type == "vulval muscle":
for cell in VULVAL_MUSCLE_NAMES:
classification[cell] = cell_type
elif cell_type == "uterine muscle":
for cell in UTERINE_MUSCLE_NAMES:
classification[cell] = cell_type
elif cell_type == "interneuron":
for cell in (
INTERNEURONS_COOK + MALE_HEAD_INTERNEURONS + MALE_INTERNEURONS
):
classification[cell] = cell_type
elif cell_type == "motor neuron":
for cell in MOTORNEURONS_COOK:
classification[cell] = cell_type
elif cell_type == "sensory neuron":
for cell in (
SENSORY_NEURONS_COOK
+ MALE_HEAD_SENSORY_NEURONS
+ MALE_SENSORY_NEURONS
):
classification[cell] = cell_type
elif cell_type == "odd numbered pharyngeal muscle":
for cell in ODD_PHARYNGEAL_MUSCLE_NAMES:
classification[cell] = cell_type
elif cell_type == "even numbered pharyngeal muscle":
for cell in EVEN_PHARYNGEAL_MUSCLE_NAMES:
classification[cell] = cell_type
elif cell_type == "polymodal neuron":
for cell in PHARYNGEAL_POLYMODAL_NEURONS:
classification[cell] = cell_type
elif cell_type == "marginal cells (mc) of the pharynx":
for cell in PHARYNGEAL_MARGINAL_CELLS:
classification[cell] = cell_type
elif cell_type == "pharyngeal epithelium":
for cell in PHARYNGEAL_EPITHELIUM + PHARYNGEAL_GLIAL_CELL:
classification[cell] = cell_type # TODO: check!
elif cell_type == "basement membrane":
for cell in PHARYNGEAL_BASEMENT_MEMBRANE:
classification[cell] = cell_type # TODO: check!
elif cell_type == "neuron with unknown function":
for cell in UNKNOWN_FUNCTION_NEURONS:
classification[cell] = cell_type
elif cell_type == "sheath cell other than amphid sheath and phasmid":
for cell in CEPSH_CELLS:
classification[cell] = cell_type
elif cell_type == "excretory cell":
for cell in EXCRETORY_CELL:
classification[cell] = cell_type
elif cell_type == "sphincter and anal depressor muscle":
for cell in ANAL_SPHINCTER_MUSCLES:
classification[cell] = cell_type
elif cell_type == "gland cell":
for cell in EXCRETORY_GLAND:
classification[cell] = cell_type
elif cell_type == "head mesodermal cell":
for cell in HEAD_MESODERMAL_CELL:
classification[cell] = cell_type
elif cell_type == "hypodermis":
for cell in HYPODERMIS:
classification[cell] = cell_type
elif cell_type == "intestinal cells":
for cell in INTESTINE:
classification[cell] = cell_type
elif cell_type == "intestinal muscle":
for cell in INTESTINAL_MUSCLES:
classification[cell] = cell_type
elif cell_type == "GLR cell":
for cell in GLR_CELLS:
classification[cell] = cell_type
elif cell_type == "diagonal muscles":
for cell in MALE_DIAGONAL_MUSCLES:
classification[cell] = cell_type
elif cell_type == "posterior outer longitudinal muscles":
for cell in MALE_POSTERIOR_OUTER_LONGITUDINAL_MUSCLES:
classification[cell] = cell_type
elif cell_type == "anterior inner longitudinal muscles":
for cell in MALE_ANTERIOR_INNER_LONGITUDINAL_MUSCLES:
classification[cell] = cell_type
elif cell_type == "posterior inner longitudinal muscles":
for cell in MALE_POSTERIOR_INNER_LONGITUDINAL_MUSCLES:
classification[cell] = cell_type
elif cell_type == "caudal inner longitudinal muscles":
for cell in MALE_CAUDAL_LONGITUDINAL_MUSCLES:
classification[cell] = cell_type
elif cell_type == "spicule retractor muscles":
for cell in (
MALE_VENTRAL_SPICULE_RETRACTOR + MALE_DORSAL_SPICULE_RETRACTOR
):
classification[cell] = cell_type
elif cell_type == "spicule protractor muscles":
for cell in (
MALE_VENTRAL_SPICULE_PROTRACTOR + MALE_DORSAL_SPICULE_PROTRACTOR
):
classification[cell] = cell_type
elif cell_type == "gubernacular retractor muscles":
for cell in MALE_GUBERNACULAR_RETRACTOR_MUSCLES:
classification[cell] = cell_type
elif cell_type == "gubernacular erector muscles":
for cell in MALE_GUBERNACULAR_ERECTOR_MUSCLES:
classification[cell] = cell_type
elif cell_type == "anterior oblique muscles":
for cell in MALE_ANTERIOR_OBLIQUE_MUSCLES:
classification[cell] = cell_type
elif cell_type == "posterior oblique muscles":
for cell in MALE_POSTERIOR_OBLIQUE_MUSCLES:
classification[cell] = cell_type
elif cell_type == "vas deferens":
for cell in GONAD_CELL_MALE:
classification[cell] = cell_type
elif cell_type == "proctodeum":
for cell in PROCTODEUM_CELL_MALE:
classification[cell] = cell_type
elif cell_type == "diagonal muscles":
for cell in MALE_DIAGONAL_MUSCLES:
classification[cell] = cell_type
elif cell_type == "ray structural cell":
for cell in MALE_RAY_STRUCTURAL_CELLS:
classification[cell] = cell_type
elif cell_type in [
"General code for neuronal tissue if subtype is unspecified",
"vulval epithelium",
"germline",
"DTC and somatic gonad",
"embryo",
"uterus",
"spermatheca",
"spermatheca-uterine valve",
"excretory pore cell",
"duct cell",
"excretory duct",
"seam cell",
"socket cell, XXX cells",
"amphid sheath and phasmid sheath",
"pharyngeal-intestinal valve, intestinal rectal valve",
"arcade cell",
"rectal epithelium (U, F, K, K', Y, B)",
"rectal gland, pharyngeal glands",
"pseudocoelomic space",
"coeloemocyte",
"anterior outer longitudinal muscles",
"seminal vesicle",
"sheath cell (spicules, hook or post-cloacal sensilla)",
"socket cell (spicules, hook or post-cloacal sensilla)",
]:
print_(
"No synaptic connnections to cells of type %s..?" % cell_type
)
else:
raise Exception("Cell type %s not handled" % cell_type)
for cell in ALL_PREFERRED_CELL_NAMES:
assert cell in classification
return classification
|