In [1]:
import io
import gzip

import pandas
import requests
import networkx

import eutility
import cooccurrence
In [ ]:
 
In [ ]:
 

Tissues

In [3]:
# Read MeSH UBERON Anatomical structures
url = 'https://raw.githubusercontent.com/dhimmel/uberon/7de0ed6238c26ea82accae6fc57accd1b845111d/data/mesh-map.tsv'
uberon_df = pandas.read_table(url)
uberon_df.head()
Out[3]:
uberon_id uberon_name mesh_tree_number mesh_id mesh_name
0 UBERON:0001577 facial muscle A02.633.567.400 D005152 Facial Muscles
1 UBERON:0001681 nasal bone A02.835.232.781.324.665 D009295 Nasal Bone
2 UBERON:0001264 pancreas A03.734 D010179 Pancreas
3 UBERON:0002356 perineum A01.719 D010502 Perineum
4 UBERON:0001688 incus bone A09.246.397.247.362 D007188 Incus
In [5]:
rows_out = list()

for i, row in uberon_df.iterrows():
    term_query = '{tissue}[MeSH Terms:noexp]'.format(tissue = row.mesh_name.lower())
    payload = {'db': 'pubmed', 'term': term_query}
    pmids = eutility.esearch_query(payload, retmax = 5000, sleep=2)
    row['term_query'] = term_query
    row['n_articles'] = len(pmids)
    row['pubmed_ids'] = '|'.join(pmids)
    rows_out.append(row)
    print('{} articles for {}'.format(len(pmids), row.mesh_name))

uberon_pmids_df = pandas.DataFrame(rows_out)
6400 articles for Facial Muscles
2401 articles for Nasal Bone
60200 articles for Pancreas
7214 articles for Perineum
527 articles for Incus
3083 articles for Chromaffin System
7501 articles for Pressoreceptors
4298 articles for Vestibulocochlear Nerve
8645 articles for Kidney Pelvis
841 articles for Epigastric Arteries
46609 articles for Muscle, Smooth, Vascular
2461 articles for Vibrissae
11188 articles for Pineal Gland
26993 articles for Veins
764 articles for Meningeal Arteries
180254 articles for Lung
328 articles for Comb and Wattles
9237 articles for Palate
2849 articles for Mandibular Nerve
1324 articles for Brachiocephalic Veins
4018 articles for Vulva
2186 articles for Splenic Vein
23061 articles for Aortic Valve
7307 articles for Femoral Vein
595 articles for Beak
32153 articles for Trachea
9315 articles for Exudates and Transudates
9315 articles for Exudates and Transudates
6947 articles for Ligaments
2008 articles for Cisterna Magna
1592 articles for Circle of Willis
19116 articles for Epidermis
1552 articles for Descemet Membrane
59875 articles for Testis
1486 articles for Spiral Ganglion
9307 articles for Pigment Epithelium of Eye
7200 articles for Gonads
6079 articles for Tail
2241 articles for Pia Mater
4572 articles for Elastic Tissue
8941 articles for Ear
1132 articles for Basilar Membrane
3310 articles for Feathers
11958 articles for Blastocyst
782 articles for Laryngeal Mucosa
1607 articles for Joint Capsule
1650 articles for Chordae Tendineae
674 articles for Ophthalmic Nerve
7327 articles for Reticular Formation
3453 articles for Nerve Tissue
4803 articles for Meninges
1878 articles for Chromaffin Cells
2336 articles for Splanchnic Nerves
429 articles for Cochlear Duct
3331 articles for Frontal Sinus
19871 articles for Extremities
1311 articles for Sublingual Gland
810 articles for Maxillary Artery
6633 articles for Lacrimal Apparatus
3026 articles for Anterior Eye Segment
50166 articles for Blood
11234 articles for Synovial Fluid
9921 articles for Nerve Endings
263 articles for Manubrium
3835 articles for Cavernous Sinus
15589 articles for Ovarian Follicle
1589 articles for Recurrent Laryngeal Nerve
8158 articles for Vertebral Artery
962 articles for Subdural Space
6057 articles for Atrioventricular Node
11579 articles for Eyelids
7428 articles for Pancreatic Ducts
49546 articles for Knee
17165 articles for Mammary Glands, Animal
72259 articles for Feces
3921 articles for Peroneal Nerve
2333 articles for Thoracic Arteries
25579 articles for Cochlea
1144 articles for Thoracic Nerves
1144 articles for Thoracic Nerves
4587 articles for Periosteum
2126 articles for Enteric Nervous System
6784 articles for Gills
3722 articles for Celiac Artery
9105 articles for Ribs
868 articles for Acromion
104 articles for Paraganglia, Chromaffin
7425 articles for Ciliary Body
11741 articles for Mesenteric Arteries
1013 articles for Sternoclavicular Joint
6379 articles for Venoms
5579 articles for Telencephalon
3440 articles for Trabecular Meshwork
5779 articles for Adipose Tissue, Brown
12029 articles for Lymphoid Tissue
3295 articles for Fovea Centralis
23474 articles for Bile
2056 articles for Juxtaglomerular Apparatus
8667 articles for Brachial Artery
3720 articles for Tibial Nerve
7613 articles for Mandibular Condyle
40189 articles for Adrenal Glands
881 articles for Sesamoid Bones
23954 articles for Maxilla
9514 articles for Growth Plate
145 articles for Anal Sacs
12932 articles for Joints
8373 articles for Pleura
49432 articles for Muscle, Smooth
688 articles for Submucous Plexus
1565 articles for Superior Cervical Ganglion
1940 articles for Glossopharyngeal Nerve
39373 articles for Knee Joint
19878 articles for Connective Tissue
1874 articles for Retinal Vein
1692 articles for Hyoid Bone
1146 articles for Eyelashes
7420 articles for Macula Lutea
158 articles for Truncus Arteriosus
4778 articles for Urogenital System
2757 articles for Temporal Arteries
55662 articles for Leg
2022 articles for Temporal Muscle
2426 articles for Atlanto-Axial Joint
2564 articles for Ependyma
2564 articles for Ependyma
98 articles for Sternocostal Joints
1173 articles for Fascia Lata
889 articles for Apocrine Glands
619 articles for Bodily Secretions
295 articles for Omasum
5401 articles for Spinal Nerves
394 articles for Mesenteric Artery, Inferior
2485 articles for Sinus of Valsalva
268 articles for Gastroepiploic Artery
1746 articles for Otolithic Membrane
1551 articles for Cochlear Nucleus
940 articles for Fibrillar Collagens
189 articles for Interrenal Gland
6446 articles for Kidney Medulla
6446 articles for Kidney Medulla
4431 articles for Choroid Plexus
4991 articles for Cerebellar Cortex
3912 articles for Dermis
1520 articles for Pubic Symphysis
11465 articles for Kidney Tubules, Proximal
12620 articles for Pericardium
1434 articles for Azygos Vein
902 articles for Celiac Plexus
6999 articles for Tricuspid Valve
7442 articles for Heart Septum
748 articles for Harderian Gland
363 articles for Geniculate Ganglion
734 articles for Ganglia, Sensory
10367 articles for Axilla
198 articles for Area Postrema
1828 articles for Posterior Cruciate Ligament
591 articles for Salt Gland
7449 articles for Ganglia
4086 articles for Tunica Media
89 articles for Spiral Lamina
700 articles for Cerumen
15319 articles for Head
1789 articles for Abducens Nerve
27884 articles for Cervical Vertebrae
14794 articles for Plasma
668 articles for Lingual Nerve
1131 articles for Endolymphatic Sac
1554 articles for Tarsal Joints
14505 articles for Forearm
17741 articles for Diaphragm
2628 articles for Turbinates
3614 articles for Venae Cavae
2118 articles for Ductus Arteriosus
834 articles for Accessory Nerve
39129 articles for Central Nervous System
9824 articles for Aqueous Humor
28249 articles for Heart Conduction System
8090 articles for Trigeminal Nerve
3325 articles for Sebaceous Glands
1443 articles for Lateral Ventricles
1667 articles for Bronchial Arteries
1664 articles for Cranial Sutures
589 articles for Mushroom Bodies
2534 articles for Solitary Nucleus
2974 articles for Cerebellopontine Angle
311 articles for Oval Window, Ear
2392 articles for Ophthalmic Artery
45 articles for Metencephalon
5837 articles for Paranasal Sinuses
23514 articles for Spine
9999 articles for Genitalia, Female
4778 articles for Heart Valves
10128 articles for Shoulder
2952 articles for Peripheral Nervous System
10927 articles for Ankle Joint
233195 articles for Kidney
169 articles for Vernix Caseosa
8514 articles for Maxillary Sinus
72190 articles for Bone and Bones
1653 articles for Nasolacrimal Duct
1372 articles for Nictitating Membrane
22727 articles for Mouth Mucosa
967 articles for Foramen Magnum
4917 articles for Neck Muscles
4917 articles for Neck Muscles
4200 articles for Pulmonary Valve
435 articles for Broad Ligament
7822 articles for Sternum
8288 articles for Parasympathetic Nervous System
10758 articles for Ear, External
47891 articles for Coronary Vessels
3936 articles for Subarachnoid Space
218 articles for Tensor Tympani
2145 articles for Hoof and Claw
9920 articles for Tunica Intima
107 articles for Perianal Glands
20836 articles for Autonomic Nervous System
11922 articles for Retinal Vessels
11922 articles for Retinal Vessels
7301 articles for Masticatory Muscles
909 articles for Salivary Ducts
3820 articles for Kidney Tubules, Collecting
1368 articles for Pharyngeal Muscles
2445 articles for Zygoma
2319 articles for Petrous Bone
1122 articles for Stifle
6609 articles for Pyramidal Tracts
25500 articles for Fingers
33091 articles for Heart Atria
4482 articles for Hair Follicle
5589 articles for Biliary Tract
10109 articles for Corpus Luteum
1594 articles for Hallux
1660 articles for Popliteal Vein
3033 articles for Electric Organ
814 articles for Pterygoid Muscles
15703 articles for Renal Artery
398 articles for Bulbourethral Glands
7019 articles for Sacrum
16250 articles for Thoracic Vertebrae
28938 articles for Vagina
4550 articles for Clavicle
380364 articles for Liver
691 articles for Trigeminal Nucleus, Spinal
3796 articles for Myenteric Plexus
480 articles for Antlers
2862 articles for Oculomotor Nerve
37065 articles for Bronchi
62498 articles for Retina
432 articles for Blood-Air Barrier
11671 articles for Microvilli
741 articles for Haversian System
4556 articles for Carotid Sinus
819 articles for Stria Vascularis
14679 articles for Orbit
2948 articles for Cauda Equina
2831 articles for Septum Pellucidum
1357 articles for Odontoid Process
684 articles for Maxillary Nerve
518 articles for Palatal Muscles
474 articles for Stomach, Ruminant
11449 articles for Hepatic Artery
14622 articles for Shoulder Joint
939 articles for Seminiferous Epithelium
29249 articles for Blood Vessels
1194 articles for Zygapophyseal Joint
12524 articles for Ear, Middle
38133 articles for Mandible
38133 articles for Mandible
5158 articles for Endocardium
4368 articles for Mesenteric Veins
3503 articles for Iliac Vein
6137 articles for Achilles Tendon
0 articles for Body Regions
271 articles for Endolymphatic Duct
7045 articles for Tears
10165 articles for Rumen
3527 articles for Vestibular Nerve
2468 articles for Arachnoid
801 articles for Autonomic Pathways
2013 articles for Animal Structures
1877 articles for Axis
9927 articles for Hip
2086 articles for Subcutaneous Tissue
38875 articles for Cerebellum
1549 articles for Saccule and Utricle
567 articles for Cranial Fossa, Middle
12864 articles for Adrenal Cortex
1708 articles for Rectus Abdominis
157684 articles for Skin
157684 articles for Skin
5252 articles for Portal System
2771 articles for Intestinal Secretions
1014 articles for Diaphyses
5584 articles for Epiphyses
515 articles for Reticulum
28742 articles for Aorta, Thoracic
253 articles for Ultimobranchial Body
17286 articles for Mucous Membrane
415 articles for Zona Fasciculata
1970 articles for Loop of Henle
19445 articles for Nervous System
22757 articles for Pulmonary Alveoli
1229 articles for Skeleton
39457 articles for Pulmonary Artery
997 articles for Hypogastric Plexus
58319 articles for Bone Marrow
32508 articles for Face
16651 articles for Semen
12999 articles for Fundus Oculi
4634 articles for Cochlear Nerve
2398 articles for Metatarsus
774 articles for Trochlear Nerve
7911 articles for Pupil
472 articles for Internal Capsule
2963 articles for Olfactory Mucosa
16244 articles for Medulla Oblongata
2929 articles for Retinal Artery
243 articles for Vestibular Nucleus, Lateral
17700 articles for Membranes
2844 articles for Radial Nerve
713 articles for Spinothalamic Tracts
8041 articles for Mucus
2456 articles for Rhombencephalon
52930 articles for Aorta
121227 articles for Heart
1178 articles for Psoas Muscles
24596 articles for Kidney Glomerulus
1234 articles for Tibial Arteries
66368 articles for Epithelium
14496 articles for Vena Cava, Inferior
7440 articles for Brachial Plexus
3689 articles for Middle Cerebral Artery
15658 articles for Penis
8851 articles for Bile Ducts, Intrahepatic
55954 articles for Ovary
2371 articles for Brachiocephalic Trunk
854 articles for Zona Glomerulosa
548 articles for Bruch Membrane
3675 articles for Hematopoietic System
21597 articles for Hip Joint
28122 articles for Breast
387 articles for Neurilemma
24138 articles for Mitral Valve
8386 articles for Lower Extremity
15696 articles for Visual Pathways
823 articles for Tissues
1484 articles for Temporomandibular Joint Disc
28646 articles for Carotid Arteries
3272 articles for Bundle of His
13678 articles for Saphenous Vein
595 articles for Bartholin's Glands
9188 articles for Abdominal Muscles
9260 articles for Temporomandibular Joint
1048 articles for Cervical Plexus
3224 articles for Skull Base
5047 articles for Scapula
5284 articles for Hemolymph
1338 articles for Third Ventricle
5289 articles for Colostrum
3614 articles for Urothelium
3614 articles for Urothelium
3244 articles for Zona Pellucida
3181 articles for Optic Chiasm
1478 articles for Bile Ducts, Extrahepatic
990 articles for Medial Forebrain Bundle
9436 articles for Common Bile Duct
581 articles for Hymen
3386 articles for Semicircular Canals
4909 articles for Decidua
2272 articles for Axillary Artery
9983 articles for Jugular Veins
33182 articles for Saliva
3906 articles for Nipples
393 articles for Proventriculus
5721 articles for Nails
50679 articles for Thyroid Gland
1587 articles for Gizzard
2451 articles for Lumbosacral Plexus
70373 articles for Lymph Nodes
4733 articles for Buttocks
3465 articles for Splenic Artery
66828 articles for Heart Ventricles
15152 articles for Tongue
18641 articles for Basement Membrane
35262 articles for Sympathetic Nervous System
10586 articles for Scalp
640 articles for Foot Joints
1174 articles for Eccrine Glands
1815 articles for Olfactory Nerve
12423 articles for Iliac Artery
3972 articles for Sella Turcica
7563 articles for Arterioles
2196 articles for Carotid Artery, External
18418 articles for Aorta, Abdominal
29094 articles for Prostate
1182 articles for Sebum
3194 articles for Cranial Nerves
1232 articles for Toe Joint
5342 articles for Hepatic Veins
3263 articles for Vestibular Nuclei
42737 articles for Embryo, Mammalian
3458 articles for Seminiferous Tubules
2099 articles for Stellate Ganglion
13862 articles for Wrist
18382 articles for Gastric Juice
3301 articles for Sacroiliac Joint
17530 articles for Sputum
20375 articles for Vagus Nerve
39231 articles for Cornea
1590 articles for Tooth Socket
289 articles for Scent Glands
16151 articles for Mesencephalon
3487 articles for Sphenoid Bone
28659 articles for Skull
202 articles for Embryonic Structures
9291 articles for Elbow Joint
1748 articles for Wool
377 articles for Rete Testis
222 articles for Acoustic Maculae
1371 articles for Clitoris
2372 articles for Femoral Nerve
3226 articles for Frontal Bone
9974 articles for Submandibular Gland
7307 articles for Jaw
2780 articles for Mesenteric Artery, Superior
70663 articles for Spinal Cord
4713 articles for Glottis
847 articles for Bile Canaliculi
21183 articles for Tendons
647 articles for Fourth Ventricle
41408 articles for Pituitary Gland
80 articles for Spinocerebellar Tracts
4541 articles for Radial Artery
16069 articles for Optic Nerve
7352 articles for Vocal Cords
1469 articles for Limbus Corneae
68881 articles for Fetus
4190 articles for Epithelium, Corneal
3510 articles for Endocrine System
4346 articles for Viscera
28981 articles for Eye
3307 articles for Palate, Soft
9231 articles for Nasal Cavity
11184 articles for Pulmonary Veins
14731 articles for Cerebral Arteries
9338 articles for Spinal Nerve Roots
14866 articles for Myelin Sheath
1583 articles for Acromioclavicular Joint
18369 articles for Body Fluids
2572 articles for Cerebellar Nuclei
5133 articles for Carotid Artery, Common
6064 articles for Urinary Tract
18524 articles for Nose
998 articles for Intercostal Nerves
23301 articles for Neck
139139 articles for Myocardium
7711 articles for Scrotum
11512 articles for Bile Ducts
554 articles for Perforant Pathway
10798 articles for Parathyroid Glands
12594 articles for Oculomotor Muscles
8876 articles for Sclera
1165 articles for Axillary Vein
6694 articles for Renal Veins
97 articles for Smegma
5275 articles for Ganglia, Autonomic
436 articles for Vestibular Aqueduct
10345 articles for Kidney Cortex
743 articles for Endothelium, Lymphatic
414 articles for Malleus
6406 articles for Vena Cava, Superior
865 articles for Malpighian Tubules
1063 articles for Air Sacs
1843 articles for Laryngeal Muscles
1843 articles for Laryngeal Muscles
1602 articles for Trigeminal Nuclei
5841 articles for Wing
494 articles for Musculocutaneous Nerve
2796 articles for Exocrine Glands
12080 articles for Umbilical Veins
4247 articles for Corneal Stroma
4772 articles for Pancreatic Juice
176 articles for Bones of Upper Extremity
1538 articles for Palate, Hard
7944 articles for Vas Deferens
17188 articles for Sciatic Nerve
3779 articles for Oviducts
17275 articles for Amniotic Fluid
1028 articles for Round Window, Ear
24862 articles for Femoral Artery
6791 articles for Respiratory Mucosa
1026 articles for Nodose Ganglion
3787 articles for Epidural Space
5252 articles for Rotator Cuff
2051 articles for Sense Organs
105830 articles for Muscle, Skeletal
1669 articles for Patellar Ligament
25856 articles for Fetal Blood
626 articles for Vasa Vasorum
5714 articles for Sinoatrial Node
13702 articles for Immune System
1373 articles for Eyebrows
5255 articles for Umbilical Arteries
3279 articles for Sweat
8346 articles for Median Nerve
14662 articles for Respiratory System
1749 articles for Uvea
5964 articles for Mononuclear Phagocyte System
10376 articles for Lymphatic System
6026 articles for Phrenic Nerve
852 articles for Bursa, Synovial
18241 articles for Portal Vein
26622 articles for Arm
2545 articles for Bursa of Fabricius
10455 articles for Fallopian Tubes
10563 articles for Vestibule, Labyrinth
12318 articles for Ascitic Fluid
161 articles for Para-Aortic Bodies
1739 articles for Salivary Glands, Minor
34355 articles for Urine
3219 articles for Chin
8931 articles for Dura Mater
9383 articles for Choroid
1906 articles for Parietal Bone
53193 articles for Uterus
2443 articles for Mouth Floor
12902 articles for Carotid Artery, Internal
4563 articles for Genitalia
117 articles for Diagonal Band of Broca
2209 articles for Follicular Fluid
7198 articles for Papillary Muscles
345 articles for Cranial Fossa, Anterior
2795 articles for Purkinje Fibers
363 articles for Corpora Allata
3737 articles for Masseter Muscle
9742 articles for Thigh
2448 articles for Musculoskeletal System
2253 articles for Germinal Center
3102 articles for Pectoralis Muscles
859 articles for Neuropil
13270 articles for Gallbladder
21944 articles for Digestive System
28052 articles for Hindlimb
22087 articles for Cartilage
428 articles for Scala Tympani
7357 articles for Seminal Vesicles
17791 articles for Cardiovascular System
1529 articles for Uvula
10135 articles for Pons
47800 articles for Arteries
2587 articles for Kidney Tubules, Distal
4233 articles for Nephrons
6391 articles for Genitalia, Male
2762 articles for Forehead
34 articles for Spiral Ligament of Cochlea
28880 articles for Brain Stem
19210 articles for Neuromuscular Junction
7728 articles for Fascia
5679 articles for Cloaca
8664 articles for Endocrine Glands
9771 articles for Temporal Bone
4376 articles for Granulation Tissue
4396 articles for Locus Coeruleus
20658 articles for Foot
2961 articles for Ethmoid Sinus
563 articles for Horns
34205 articles for Hand
387999 articles for Brain
3140 articles for Trigeminal Ganglion
11795 articles for Iris
20615 articles for Hair
62834 articles for Adipose Tissue
18051 articles for Endothelium
4025 articles for Cranial Fossa, Posterior
8664 articles for Lip
10142 articles for Anterior Cruciate Ligament
21004 articles for Ureter
10210 articles for Alveolar Process
493 articles for Ligamentum Flavum
212 articles for Zona Reticularis
13420 articles for Salivary Glands
14456 articles for Elbow
20773 articles for Peripheral Nerves
11241 articles for Ear, Inner
3260 articles for Sweat Glands
1919 articles for Spermatic Cord
587 articles for Anterior Cerebral Artery
2887 articles for Sphenoid Sinus
1073 articles for Stapes
8136 articles for Anterior Chamber
486 articles for Ejaculatory Ducts
1024 articles for Subtalar Joint
1222 articles for Kidney Calices
7724 articles for Thumb
1692 articles for Egg Shell
463 articles for Stapedius
3191 articles for Cerebral Veins
23080 articles for Endometrium
400 articles for Animal Fins
2838 articles for Cervix Mucus
2551 articles for Heel
2892 articles for Hypoglossal Nerve
7731 articles for Optic Disk
8219 articles for Popliteal Artery
17228 articles for Mouth
11603 articles for Parotid Gland
80115 articles for Endothelium, Vascular
6036 articles for Basilar Artery
2562 articles for Hepatic Duct, Common
4915 articles for Endothelium, Corneal
6302 articles for Myometrium
2124 articles for Abomasum
1179 articles for Fat Body
24268 articles for Cervix Uteri
4278 articles for Ear Canal
2004 articles for Metatarsophalangeal Joint
1824 articles for Ethmoid Bone
6291 articles for Ulnar Nerve
2884 articles for Occipital Bone
137988 articles for Muscles
4101 articles for Subclavian Vein
1189 articles for Serous Membrane
7250 articles for Prosencephalon
6635 articles for Subclavian Artery
520 articles for Posterior Cerebral Artery
885 articles for Meibomian Glands
14977 articles for Synovial Membrane
16667 articles for Cerebral Ventricles
33043 articles for Islets of Langerhans
267 articles for Integumentary System
890 articles for Coccyx
13884 articles for Larynx
20551 articles for Urethra
748 articles for Ulnar Artery
501 articles for Trigeminal Caudal Nucleus
39906 articles for Lumbar Vertebrae
6506 articles for Cheek
8329 articles for Facial Nerve
20971 articles for Kidney Tubules
7825 articles for Forelimb
1568 articles for Intercostal Muscles
462 articles for Obturator Nerve
In [6]:
with gzip.open('data/uberon-pmids.tsv.gz', 'w') as write_file:
    write_file = io.TextIOWrapper(write_file)
    uberon_pmids_df.to_csv(write_file, sep='\t', index=False)

uberon_pmids_df.head()
Out[6]:
uberon_id uberon_name mesh_tree_number mesh_id mesh_name term_query n_articles pubmed_ids
0 UBERON:0001577 facial muscle A02.633.567.400 D005152 Facial Muscles facial muscles[MeSH Terms:noexp] 6400 25876340|25785922|25675766|25626821|25626793|2...
1 UBERON:0001681 nasal bone A02.835.232.781.324.665 D009295 Nasal Bone nasal bone[MeSH Terms:noexp] 2401 25881382|25636552|25626787|25544298|25533074|2...
2 UBERON:0001264 pancreas A03.734 D010179 Pancreas pancreas[MeSH Terms:noexp] 60200 25876615|25864351|25842673|25796751|25775893|2...
3 UBERON:0002356 perineum A01.719 D010502 Perineum perineum[MeSH Terms:noexp] 7214 25898473|25807837|25767947|25751805|25730811|2...
4 UBERON:0001688 incus bone A09.246.397.247.362 D007188 Incus incus[MeSH Terms:noexp] 527 25182449|25085697|25045723|24969066|24834457|2...

Tissue-Disease Cooccurrence

In [2]:
uberon_df, uberon_to_pmids = cooccurrence.read_pmids_tsv('data/uberon-pmids.tsv.gz', key='mesh_id')
disease_df, disease_to_pmids = cooccurrence.read_pmids_tsv('data/disease-pmids.tsv.gz', key='doid_code')
In [7]:
cooc_df = cooccurrence.score_pmid_cooccurrence(disease_to_pmids, uberon_to_pmids, 'doid_code', 'mesh_id')
Total articles containing a doid_code: 3686312
Total articles containing a mesh_id: 5387135
Total articles containing both a doid_code and mesh_id: 820072

After removing terms without any cooccurences:
+ 133 doid_codes remain
+ 629 mesh_ids remain

Cooccurrence scores calculated for 83657 doid_code -- mesh_id pairs
In [ ]:
 
In [8]:
cooc_df = uberon_df[['mesh_id', 'mesh_name']].drop_duplicates().merge(cooc_df)
cooc_df = disease_df[['doid_code', 'doid_name']].drop_duplicates().merge(cooc_df)
cooc_df = cooc_df.sort(['doid_name', 'p_fisher'])
cooc_df.to_csv('data/disease-uberon-cooccurrence.tsv', index=False, sep='\t')
cooc_df.head()
Out[8]:
doid_code doid_name mesh_id mesh_name cooccurrence expected enrichment odds_ratio p_fisher
45214 DOID:10652 Alzheimer's disease D001921 Brain 11209 1037.397404 10.804924 71.792880 0.000000e+00
45269 DOID:10652 Alzheimer's disease D016548 Prosencephalon 114 6.426617 17.738725 24.829124 3.728344e-105
44934 DOID:10652 Alzheimer's disease D002531 Cerebellum 303 75.919555 3.991067 4.274664 4.204287e-89
45209 DOID:10652 Alzheimer's disease D008125 Locus Coeruleus 97 7.412799 13.085475 16.508638 8.148977e-76
44861 DOID:10652 Alzheimer's disease D010275 Parasympathetic Nervous System 103 12.918980 7.972765 9.086085 2.664472e-58
In [ ]: