library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.4     ✔ readr     2.1.5
## ✔ forcats   1.0.0     ✔ stringr   1.5.1
## ✔ ggplot2   3.5.2     ✔ tibble    3.3.0
## ✔ lubridate 1.9.4     ✔ tidyr     1.3.1
## ✔ purrr     1.0.4     
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
Phel <- read.delim("../output/18-annot-pycno/Phel_immune_shortlist.txt", 
                          header = TRUE, 
                          stringsAsFactors = FALSE)

head(Phel)
##   transcript_id PSC.0519 PSC.0525 PSC.0531 PSC.0537 PSC.0549 PSC.0561  sum
## 1      g5770.t1      489     1524      191      502       98      998 3802
## 2      g5770.t1      489     1524      191      502       98      998 3802
## 3      g2184.t1     1337     1651      866     1370      517     1794 7535
## 4      g2184.t1     1337     1651      866     1370      517     1794 7535
## 5      g2184.t1     1337     1651      866     1370      517     1794 7535
## 6      g2184.t1     1337     1651      866     1370      517     1794 7535
##        mean  std.dev std.error  Entry   gene_name  Entry.Name
## 1  633.6667 537.8828  219.5897 Q60636 PRDM1_MOUSE PRDM1_MOUSE
## 2  633.6667 537.8828  219.5897 Q60636 PRDM1_MOUSE PRDM1_MOUSE
## 3 1255.8333 482.3374  196.9134 Q9UGM3 DMBT1_HUMAN DMBT1_HUMAN
## 4 1255.8333 482.3374  196.9134 Q9UGM3 DMBT1_HUMAN DMBT1_HUMAN
## 5 1255.8333 482.3374  196.9134 Q9UGM3 DMBT1_HUMAN DMBT1_HUMAN
## 6 1255.8333 482.3374  196.9134 Q9UGM3 DMBT1_HUMAN DMBT1_HUMAN
##                                                                                                                                                                                                                         Protein.Names
## 1                              PR domain zinc finger protein 1 (EC 2.1.1.-) (B lymphocyte-induced maturation protein 1) (Blimp-1) (Beta-interferon gene positive regulatory domain I-binding factor) (PR domain-containing protein 1)
## 2                              PR domain zinc finger protein 1 (EC 2.1.1.-) (B lymphocyte-induced maturation protein 1) (Blimp-1) (Beta-interferon gene positive regulatory domain I-binding factor) (PR domain-containing protein 1)
## 3 Scavenger receptor cysteine-rich domain-containing protein DMBT1 (Deleted in malignant brain tumors 1 protein) (Glycoprotein 340) (Gp-340) (Hensin) (Salivary agglutinin) (SAG) (Surfactant pulmonary-associated D-binding protein)
## 4 Scavenger receptor cysteine-rich domain-containing protein DMBT1 (Deleted in malignant brain tumors 1 protein) (Glycoprotein 340) (Gp-340) (Hensin) (Salivary agglutinin) (SAG) (Surfactant pulmonary-associated D-binding protein)
## 5 Scavenger receptor cysteine-rich domain-containing protein DMBT1 (Deleted in malignant brain tumors 1 protein) (Glycoprotein 340) (Gp-340) (Hensin) (Salivary agglutinin) (SAG) (Surfactant pulmonary-associated D-binding protein)
## 6 Scavenger receptor cysteine-rich domain-containing protein DMBT1 (Deleted in malignant brain tumors 1 protein) (Glycoprotein 340) (Gp-340) (Hensin) (Salivary agglutinin) (SAG) (Surfactant pulmonary-associated D-binding protein)
##     Gene.Names             Organism
## 1 Prdm1 Blimp1 Mus musculus (Mouse)
## 2 Prdm1 Blimp1 Mus musculus (Mouse)
## 3  DMBT1 GP340 Homo sapiens (Human)
## 4  DMBT1 GP340 Homo sapiens (Human)
## 5  DMBT1 GP340 Homo sapiens (Human)
## 6  DMBT1 GP340 Homo sapiens (Human)
##                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         Gene.Ontology.biological.process
## 1 adaptive immune response [GO:0002250]; aorta development [GO:0035904]; artery morphogenesis [GO:0048844]; cardiac septum development [GO:0003279]; cell fate commitment [GO:0045165]; coronary vasculature development [GO:0060976]; embryonic placenta development [GO:0001892]; eye photoreceptor cell development [GO:0042462]; gene expression [GO:0010467]; germ cell development [GO:0007281]; heart valve development [GO:0003170]; in utero embryonic development [GO:0001701]; innate immune response [GO:0045087]; intestinal epithelial cell development [GO:0060576]; kidney development [GO:0001822]; maternal placenta development [GO:0001893]; methylation [GO:0032259]; morphogenesis of a branching structure [GO:0001763]; negative regulation of B cell proliferation [GO:0030889]; negative regulation of gene expression [GO:0010629]; negative regulation of lipopolysaccharide-mediated signaling pathway [GO:0031665]; negative regulation of transcription by RNA polymerase II [GO:0000122]; positive regulation of B cell differentiation [GO:0045579]; positive regulation of gene expression [GO:0010628]; post-embryonic development [GO:0009791]; regulation of cell population proliferation [GO:0042127]; regulation of extrathymic T cell differentiation [GO:0033082]; regulation of natural killer cell differentiation [GO:0032823]; regulation of NK T cell differentiation [GO:0051136]; regulation of transcription by RNA polymerase II [GO:0006357]; retinal bipolar neuron differentiation [GO:0060040]; sebum secreting cell proliferation [GO:1990654]; trophoblast giant cell differentiation [GO:0060707]; ventricular septum development [GO:0003281]
## 2 adaptive immune response [GO:0002250]; aorta development [GO:0035904]; artery morphogenesis [GO:0048844]; cardiac septum development [GO:0003279]; cell fate commitment [GO:0045165]; coronary vasculature development [GO:0060976]; embryonic placenta development [GO:0001892]; eye photoreceptor cell development [GO:0042462]; gene expression [GO:0010467]; germ cell development [GO:0007281]; heart valve development [GO:0003170]; in utero embryonic development [GO:0001701]; innate immune response [GO:0045087]; intestinal epithelial cell development [GO:0060576]; kidney development [GO:0001822]; maternal placenta development [GO:0001893]; methylation [GO:0032259]; morphogenesis of a branching structure [GO:0001763]; negative regulation of B cell proliferation [GO:0030889]; negative regulation of gene expression [GO:0010629]; negative regulation of lipopolysaccharide-mediated signaling pathway [GO:0031665]; negative regulation of transcription by RNA polymerase II [GO:0000122]; positive regulation of B cell differentiation [GO:0045579]; positive regulation of gene expression [GO:0010628]; post-embryonic development [GO:0009791]; regulation of cell population proliferation [GO:0042127]; regulation of extrathymic T cell differentiation [GO:0033082]; regulation of natural killer cell differentiation [GO:0032823]; regulation of NK T cell differentiation [GO:0051136]; regulation of transcription by RNA polymerase II [GO:0006357]; retinal bipolar neuron differentiation [GO:0060040]; sebum secreting cell proliferation [GO:1990654]; trophoblast giant cell differentiation [GO:0060707]; ventricular septum development [GO:0003281]
## 3                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        defense response [GO:0006952]; defense response to Gram-negative bacterium [GO:0050829]; defense response to Gram-positive bacterium [GO:0050830]; defense response to virus [GO:0051607]; epithelial cell differentiation [GO:0030855]; induction of bacterial agglutination [GO:0043152]; innate immune response [GO:0045087]; protein transport [GO:0015031]
## 4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        defense response [GO:0006952]; defense response to Gram-negative bacterium [GO:0050829]; defense response to Gram-positive bacterium [GO:0050830]; defense response to virus [GO:0051607]; epithelial cell differentiation [GO:0030855]; induction of bacterial agglutination [GO:0043152]; innate immune response [GO:0045087]; protein transport [GO:0015031]
## 5                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        defense response [GO:0006952]; defense response to Gram-negative bacterium [GO:0050829]; defense response to Gram-positive bacterium [GO:0050830]; defense response to virus [GO:0051607]; epithelial cell differentiation [GO:0030855]; induction of bacterial agglutination [GO:0043152]; innate immune response [GO:0045087]; protein transport [GO:0015031]
## 6                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        defense response [GO:0006952]; defense response to Gram-negative bacterium [GO:0050829]; defense response to Gram-positive bacterium [GO:0050830]; defense response to virus [GO:0051607]; epithelial cell differentiation [GO:0030855]; induction of bacterial agglutination [GO:0043152]; innate immune response [GO:0045087]; protein transport [GO:0015031]
##                                                                                                                                                                                                                      Gene.Ontology.cellular.component
## 1                                                                                                                                                      cytoplasm [GO:0005737]; nucleolus [GO:0005730]; nucleoplasm [GO:0005654]; nucleus [GO:0005634]
## 2                                                                                                                                                      cytoplasm [GO:0005737]; nucleolus [GO:0005730]; nucleoplasm [GO:0005654]; nucleus [GO:0005634]
## 3 cytoplasm [GO:0005737]; extracellular exosome [GO:0070062]; extracellular matrix [GO:0031012]; extracellular region [GO:0005576]; extracellular space [GO:0005615]; phagocytic vesicle membrane [GO:0030670]; zymogen granule membrane [GO:0042589]
## 4 cytoplasm [GO:0005737]; extracellular exosome [GO:0070062]; extracellular matrix [GO:0031012]; extracellular region [GO:0005576]; extracellular space [GO:0005615]; phagocytic vesicle membrane [GO:0030670]; zymogen granule membrane [GO:0042589]
## 5 cytoplasm [GO:0005737]; extracellular exosome [GO:0070062]; extracellular matrix [GO:0031012]; extracellular region [GO:0005576]; extracellular space [GO:0005615]; phagocytic vesicle membrane [GO:0030670]; zymogen granule membrane [GO:0042589]
## 6 cytoplasm [GO:0005737]; extracellular exosome [GO:0070062]; extracellular matrix [GO:0031012]; extracellular region [GO:0005576]; extracellular space [GO:0005615]; phagocytic vesicle membrane [GO:0030670]; zymogen granule membrane [GO:0042589]
##                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Gene.Ontology.GO
## 1 cytoplasm [GO:0005737]; nucleolus [GO:0005730]; nucleoplasm [GO:0005654]; nucleus [GO:0005634]; DNA-binding transcription repressor activity, RNA polymerase II-specific [GO:0001227]; histone deacetylase binding [GO:0042826]; histone methyltransferase binding [GO:1990226]; methyltransferase activity [GO:0008168]; promoter-specific chromatin binding [GO:1990841]; RNA polymerase II cis-regulatory region sequence-specific DNA binding [GO:0000978]; sequence-specific DNA binding [GO:0043565]; transcription cis-regulatory region binding [GO:0000976]; zinc ion binding [GO:0008270]; adaptive immune response [GO:0002250]; aorta development [GO:0035904]; artery morphogenesis [GO:0048844]; cardiac septum development [GO:0003279]; cell fate commitment [GO:0045165]; coronary vasculature development [GO:0060976]; embryonic placenta development [GO:0001892]; eye photoreceptor cell development [GO:0042462]; gene expression [GO:0010467]; germ cell development [GO:0007281]; heart valve development [GO:0003170]; in utero embryonic development [GO:0001701]; innate immune response [GO:0045087]; intestinal epithelial cell development [GO:0060576]; kidney development [GO:0001822]; maternal placenta development [GO:0001893]; methylation [GO:0032259]; morphogenesis of a branching structure [GO:0001763]; negative regulation of B cell proliferation [GO:0030889]; negative regulation of gene expression [GO:0010629]; negative regulation of lipopolysaccharide-mediated signaling pathway [GO:0031665]; negative regulation of transcription by RNA polymerase II [GO:0000122]; positive regulation of B cell differentiation [GO:0045579]; positive regulation of gene expression [GO:0010628]; post-embryonic development [GO:0009791]; regulation of cell population proliferation [GO:0042127]; regulation of extrathymic T cell differentiation [GO:0033082]; regulation of natural killer cell differentiation [GO:0032823]; regulation of NK T cell differentiation [GO:0051136]; regulation of transcription by RNA polymerase II [GO:0006357]; retinal bipolar neuron differentiation [GO:0060040]; sebum secreting cell proliferation [GO:1990654]; trophoblast giant cell differentiation [GO:0060707]; ventricular septum development [GO:0003281]
## 2 cytoplasm [GO:0005737]; nucleolus [GO:0005730]; nucleoplasm [GO:0005654]; nucleus [GO:0005634]; DNA-binding transcription repressor activity, RNA polymerase II-specific [GO:0001227]; histone deacetylase binding [GO:0042826]; histone methyltransferase binding [GO:1990226]; methyltransferase activity [GO:0008168]; promoter-specific chromatin binding [GO:1990841]; RNA polymerase II cis-regulatory region sequence-specific DNA binding [GO:0000978]; sequence-specific DNA binding [GO:0043565]; transcription cis-regulatory region binding [GO:0000976]; zinc ion binding [GO:0008270]; adaptive immune response [GO:0002250]; aorta development [GO:0035904]; artery morphogenesis [GO:0048844]; cardiac septum development [GO:0003279]; cell fate commitment [GO:0045165]; coronary vasculature development [GO:0060976]; embryonic placenta development [GO:0001892]; eye photoreceptor cell development [GO:0042462]; gene expression [GO:0010467]; germ cell development [GO:0007281]; heart valve development [GO:0003170]; in utero embryonic development [GO:0001701]; innate immune response [GO:0045087]; intestinal epithelial cell development [GO:0060576]; kidney development [GO:0001822]; maternal placenta development [GO:0001893]; methylation [GO:0032259]; morphogenesis of a branching structure [GO:0001763]; negative regulation of B cell proliferation [GO:0030889]; negative regulation of gene expression [GO:0010629]; negative regulation of lipopolysaccharide-mediated signaling pathway [GO:0031665]; negative regulation of transcription by RNA polymerase II [GO:0000122]; positive regulation of B cell differentiation [GO:0045579]; positive regulation of gene expression [GO:0010628]; post-embryonic development [GO:0009791]; regulation of cell population proliferation [GO:0042127]; regulation of extrathymic T cell differentiation [GO:0033082]; regulation of natural killer cell differentiation [GO:0032823]; regulation of NK T cell differentiation [GO:0051136]; regulation of transcription by RNA polymerase II [GO:0006357]; retinal bipolar neuron differentiation [GO:0060040]; sebum secreting cell proliferation [GO:1990654]; trophoblast giant cell differentiation [GO:0060707]; ventricular septum development [GO:0003281]
## 3                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            cytoplasm [GO:0005737]; extracellular exosome [GO:0070062]; extracellular matrix [GO:0031012]; extracellular region [GO:0005576]; extracellular space [GO:0005615]; phagocytic vesicle membrane [GO:0030670]; zymogen granule membrane [GO:0042589]; calcium-dependent protein binding [GO:0048306]; pattern recognition receptor activity [GO:0038187]; scavenger receptor activity [GO:0005044]; zymogen binding [GO:0035375]; defense response [GO:0006952]; defense response to Gram-negative bacterium [GO:0050829]; defense response to Gram-positive bacterium [GO:0050830]; defense response to virus [GO:0051607]; epithelial cell differentiation [GO:0030855]; induction of bacterial agglutination [GO:0043152]; innate immune response [GO:0045087]; protein transport [GO:0015031]
## 4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            cytoplasm [GO:0005737]; extracellular exosome [GO:0070062]; extracellular matrix [GO:0031012]; extracellular region [GO:0005576]; extracellular space [GO:0005615]; phagocytic vesicle membrane [GO:0030670]; zymogen granule membrane [GO:0042589]; calcium-dependent protein binding [GO:0048306]; pattern recognition receptor activity [GO:0038187]; scavenger receptor activity [GO:0005044]; zymogen binding [GO:0035375]; defense response [GO:0006952]; defense response to Gram-negative bacterium [GO:0050829]; defense response to Gram-positive bacterium [GO:0050830]; defense response to virus [GO:0051607]; epithelial cell differentiation [GO:0030855]; induction of bacterial agglutination [GO:0043152]; innate immune response [GO:0045087]; protein transport [GO:0015031]
## 5                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            cytoplasm [GO:0005737]; extracellular exosome [GO:0070062]; extracellular matrix [GO:0031012]; extracellular region [GO:0005576]; extracellular space [GO:0005615]; phagocytic vesicle membrane [GO:0030670]; zymogen granule membrane [GO:0042589]; calcium-dependent protein binding [GO:0048306]; pattern recognition receptor activity [GO:0038187]; scavenger receptor activity [GO:0005044]; zymogen binding [GO:0035375]; defense response [GO:0006952]; defense response to Gram-negative bacterium [GO:0050829]; defense response to Gram-positive bacterium [GO:0050830]; defense response to virus [GO:0051607]; epithelial cell differentiation [GO:0030855]; induction of bacterial agglutination [GO:0043152]; innate immune response [GO:0045087]; protein transport [GO:0015031]
## 6                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            cytoplasm [GO:0005737]; extracellular exosome [GO:0070062]; extracellular matrix [GO:0031012]; extracellular region [GO:0005576]; extracellular space [GO:0005615]; phagocytic vesicle membrane [GO:0030670]; zymogen granule membrane [GO:0042589]; calcium-dependent protein binding [GO:0048306]; pattern recognition receptor activity [GO:0038187]; scavenger receptor activity [GO:0005044]; zymogen binding [GO:0035375]; defense response [GO:0006952]; defense response to Gram-negative bacterium [GO:0050829]; defense response to Gram-positive bacterium [GO:0050830]; defense response to virus [GO:0051607]; epithelial cell differentiation [GO:0030855]; induction of bacterial agglutination [GO:0043152]; innate immune response [GO:0045087]; protein transport [GO:0015031]
##                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Gene.Ontology.Molecular.Function
## 1 DNA-binding transcription repressor activity, RNA polymerase II-specific [GO:0001227]; histone deacetylase binding [GO:0042826]; histone methyltransferase binding [GO:1990226]; methyltransferase activity [GO:0008168]; promoter-specific chromatin binding [GO:1990841]; RNA polymerase II cis-regulatory region sequence-specific DNA binding [GO:0000978]; sequence-specific DNA binding [GO:0043565]; transcription cis-regulatory region binding [GO:0000976]; zinc ion binding [GO:0008270]
## 2 DNA-binding transcription repressor activity, RNA polymerase II-specific [GO:0001227]; histone deacetylase binding [GO:0042826]; histone methyltransferase binding [GO:1990226]; methyltransferase activity [GO:0008168]; promoter-specific chromatin binding [GO:1990841]; RNA polymerase II cis-regulatory region sequence-specific DNA binding [GO:0000978]; sequence-specific DNA binding [GO:0043565]; transcription cis-regulatory region binding [GO:0000976]; zinc ion binding [GO:0008270]
## 3                                                                                                                                                                                                                                                                                                                          calcium-dependent protein binding [GO:0048306]; pattern recognition receptor activity [GO:0038187]; scavenger receptor activity [GO:0005044]; zymogen binding [GO:0035375]
## 4                                                                                                                                                                                                                                                                                                                          calcium-dependent protein binding [GO:0048306]; pattern recognition receptor activity [GO:0038187]; scavenger receptor activity [GO:0005044]; zymogen binding [GO:0035375]
## 5                                                                                                                                                                                                                                                                                                                          calcium-dependent protein binding [GO:0048306]; pattern recognition receptor activity [GO:0038187]; scavenger receptor activity [GO:0005044]; zymogen binding [GO:0035375]
## 6                                                                                                                                                                                                                                                                                                                          calcium-dependent protein binding [GO:0048306]; pattern recognition receptor activity [GO:0038187]; scavenger receptor activity [GO:0005044]; zymogen binding [GO:0035375]
##                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Gene.Ontology.IDs
## 1 GO:0000122; GO:0000976; GO:0000978; GO:0001227; GO:0001701; GO:0001763; GO:0001822; GO:0001892; GO:0001893; GO:0002250; GO:0003170; GO:0003279; GO:0003281; GO:0005634; GO:0005654; GO:0005730; GO:0005737; GO:0006357; GO:0007281; GO:0008168; GO:0008270; GO:0009791; GO:0010467; GO:0010628; GO:0010629; GO:0030889; GO:0031665; GO:0032259; GO:0032823; GO:0033082; GO:0035904; GO:0042127; GO:0042462; GO:0042826; GO:0043565; GO:0045087; GO:0045165; GO:0045579; GO:0048844; GO:0051136; GO:0060040; GO:0060576; GO:0060707; GO:0060976; GO:1990226; GO:1990654; GO:1990841
## 2 GO:0000122; GO:0000976; GO:0000978; GO:0001227; GO:0001701; GO:0001763; GO:0001822; GO:0001892; GO:0001893; GO:0002250; GO:0003170; GO:0003279; GO:0003281; GO:0005634; GO:0005654; GO:0005730; GO:0005737; GO:0006357; GO:0007281; GO:0008168; GO:0008270; GO:0009791; GO:0010467; GO:0010628; GO:0010629; GO:0030889; GO:0031665; GO:0032259; GO:0032823; GO:0033082; GO:0035904; GO:0042127; GO:0042462; GO:0042826; GO:0043565; GO:0045087; GO:0045165; GO:0045579; GO:0048844; GO:0051136; GO:0060040; GO:0060576; GO:0060707; GO:0060976; GO:1990226; GO:1990654; GO:1990841
## 3                                                                                                                                                                                                                                                                                                                                                 GO:0005044; GO:0005576; GO:0005615; GO:0005737; GO:0006952; GO:0015031; GO:0030670; GO:0030855; GO:0031012; GO:0035375; GO:0038187; GO:0042589; GO:0043152; GO:0045087; GO:0048306; GO:0050829; GO:0050830; GO:0051607; GO:0070062
## 4                                                                                                                                                                                                                                                                                                                                                 GO:0005044; GO:0005576; GO:0005615; GO:0005737; GO:0006952; GO:0015031; GO:0030670; GO:0030855; GO:0031012; GO:0035375; GO:0038187; GO:0042589; GO:0043152; GO:0045087; GO:0048306; GO:0050829; GO:0050830; GO:0051607; GO:0070062
## 5                                                                                                                                                                                                                                                                                                                                                 GO:0005044; GO:0005576; GO:0005615; GO:0005737; GO:0006952; GO:0015031; GO:0030670; GO:0030855; GO:0031012; GO:0035375; GO:0038187; GO:0042589; GO:0043152; GO:0045087; GO:0048306; GO:0050829; GO:0050830; GO:0051607; GO:0070062
## 6                                                                                                                                                                                                                                                                                                                                                 GO:0005044; GO:0005576; GO:0005615; GO:0005737; GO:0006952; GO:0015031; GO:0030670; GO:0030855; GO:0031012; GO:0035375; GO:0038187; GO:0042589; GO:0043152; GO:0045087; GO:0048306; GO:0050829; GO:0050830; GO:0051607; GO:0070062
Pisa <- read.delim("../output/19-annot-pisaster/Pisaster_immune_shortlist.txt", 
                          header = TRUE, 
                          stringsAsFactors = FALSE)

head(Pisa)
##   transcript_id PSC.0518 PSC.0524 PSC.0530 PSC.0536 PSC.0548 PSC.0560  sum
## 1     g15560.t1     1116      555     1294     1022      912     1424 6323
## 2      g6656.t1      248      123      671      343      346      532 2263
## 3     g12829.t1       15       97       13        0       39       15  179
## 4     g12829.t1       15       97       13        0       39       15  179
## 5     g12829.t1       15       97       13        0       39       15  179
## 6     g12829.t1       15       97       13        0       39       15  179
##         mean   std.dev std.error  Entry   gene_name
## 1 1053.83333 306.11528 124.97104 P55266   DSRAD_RAT
## 2  377.16667 196.84249  80.36061 E7F4Z4 ZDHC1_DANRE
## 3   29.83333  35.23871  14.38614 Q9UGM3 DMBT1_HUMAN
## 4   29.83333  35.23871  14.38614 Q9UGM3 DMBT1_HUMAN
## 5   29.83333  35.23871  14.38614 Q9UGM3 DMBT1_HUMAN
## 6   29.83333  35.23871  14.38614 Q9UGM3 DMBT1_HUMAN
##                                                                                                                                                                                                                         Protein.Names
## 1                                                                                                                                                              Double-stranded RNA-specific adenosine deaminase (DRADA) (EC 3.5.4.37)
## 2                                                                                                        Palmitoyltransferase ZDHHC1 (EC 2.3.1.225) (DHHC domain-containing protein 1) (Zinc finger DHHC domain-containing protein 1)
## 3 Scavenger receptor cysteine-rich domain-containing protein DMBT1 (Deleted in malignant brain tumors 1 protein) (Glycoprotein 340) (Gp-340) (Hensin) (Salivary agglutinin) (SAG) (Surfactant pulmonary-associated D-binding protein)
## 4 Scavenger receptor cysteine-rich domain-containing protein DMBT1 (Deleted in malignant brain tumors 1 protein) (Glycoprotein 340) (Gp-340) (Hensin) (Salivary agglutinin) (SAG) (Surfactant pulmonary-associated D-binding protein)
## 5 Scavenger receptor cysteine-rich domain-containing protein DMBT1 (Deleted in malignant brain tumors 1 protein) (Glycoprotein 340) (Gp-340) (Hensin) (Salivary agglutinin) (SAG) (Surfactant pulmonary-associated D-binding protein)
## 6 Scavenger receptor cysteine-rich domain-containing protein DMBT1 (Deleted in malignant brain tumors 1 protein) (Glycoprotein 340) (Gp-340) (Hensin) (Salivary agglutinin) (SAG) (Surfactant pulmonary-associated D-binding protein)
##     Gene.Names                                    Organism
## 1   Adar Dsrad                     Rattus norvegicus (Rat)
## 2 zdhhc1 dhhc1 Danio rerio (Zebrafish) (Brachydanio rerio)
## 3  DMBT1 GP340                        Homo sapiens (Human)
## 4  DMBT1 GP340                        Homo sapiens (Human)
## 5  DMBT1 GP340                        Homo sapiens (Human)
## 6  DMBT1 GP340                        Homo sapiens (Human)
##                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         Gene.Ontology.biological.process
## 1 adenosine to inosine editing [GO:0006382]; apoptotic process [GO:0006915]; base conversion or substitution editing [GO:0016553]; cellular response to virus [GO:0098586]; defense response to virus [GO:0051607]; definitive hemopoiesis [GO:0060216]; erythrocyte differentiation [GO:0030218]; hematopoietic progenitor cell differentiation [GO:0002244]; hematopoietic stem cell homeostasis [GO:0061484]; hepatocyte apoptotic process [GO:0097284]; innate immune response [GO:0045087]; miRNA processing [GO:0035196]; mRNA processing [GO:0006397]; negative regulation of hepatocyte apoptotic process [GO:1903944]; negative regulation of post-transcriptional gene silencing by regulatory ncRNA [GO:1900369]; negative regulation of protein kinase activity by regulation of protein phosphorylation [GO:0044387]; negative regulation of type I interferon-mediated signaling pathway [GO:0060339]; osteoblast differentiation [GO:0001649]; positive regulation of viral genome replication [GO:0045070]; pre-miRNA processing [GO:0031054]; response to interferon-alpha [GO:0035455]; response to virus [GO:0009615]; RISC complex assembly [GO:0070922]; RNA processing [GO:0006396]; somatic diversification of immune receptors via somatic mutation [GO:0002566]
## 2                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     antiviral innate immune response [GO:0140374]; positive regulation of NLRP3 inflammasome complex assembly [GO:1900227]; protein targeting to membrane [GO:0006612]
## 3                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        defense response [GO:0006952]; defense response to Gram-negative bacterium [GO:0050829]; defense response to Gram-positive bacterium [GO:0050830]; defense response to virus [GO:0051607]; epithelial cell differentiation [GO:0030855]; induction of bacterial agglutination [GO:0043152]; innate immune response [GO:0045087]; protein transport [GO:0015031]
## 4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        defense response [GO:0006952]; defense response to Gram-negative bacterium [GO:0050829]; defense response to Gram-positive bacterium [GO:0050830]; defense response to virus [GO:0051607]; epithelial cell differentiation [GO:0030855]; induction of bacterial agglutination [GO:0043152]; innate immune response [GO:0045087]; protein transport [GO:0015031]
## 5                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        defense response [GO:0006952]; defense response to Gram-negative bacterium [GO:0050829]; defense response to Gram-positive bacterium [GO:0050830]; defense response to virus [GO:0051607]; epithelial cell differentiation [GO:0030855]; induction of bacterial agglutination [GO:0043152]; innate immune response [GO:0045087]; protein transport [GO:0015031]
## 6                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        defense response [GO:0006952]; defense response to Gram-negative bacterium [GO:0050829]; defense response to Gram-positive bacterium [GO:0050830]; defense response to virus [GO:0051607]; epithelial cell differentiation [GO:0030855]; induction of bacterial agglutination [GO:0043152]; innate immune response [GO:0045087]; protein transport [GO:0015031]
##                                                                                                                                                                                                                      Gene.Ontology.cellular.component
## 1                                                                                                            cytoplasm [GO:0005737]; nuclear speck [GO:0016607]; nucleolus [GO:0005730]; nucleus [GO:0005634]; supraspliceosomal complex [GO:0044530]
## 2                                                                                                       endoplasmic reticulum [GO:0005783]; endoplasmic reticulum membrane [GO:0005789]; endosome membrane [GO:0010008]; Golgi apparatus [GO:0005794]
## 3 cytoplasm [GO:0005737]; extracellular exosome [GO:0070062]; extracellular matrix [GO:0031012]; extracellular region [GO:0005576]; extracellular space [GO:0005615]; phagocytic vesicle membrane [GO:0030670]; zymogen granule membrane [GO:0042589]
## 4 cytoplasm [GO:0005737]; extracellular exosome [GO:0070062]; extracellular matrix [GO:0031012]; extracellular region [GO:0005576]; extracellular space [GO:0005615]; phagocytic vesicle membrane [GO:0030670]; zymogen granule membrane [GO:0042589]
## 5 cytoplasm [GO:0005737]; extracellular exosome [GO:0070062]; extracellular matrix [GO:0031012]; extracellular region [GO:0005576]; extracellular space [GO:0005615]; phagocytic vesicle membrane [GO:0030670]; zymogen granule membrane [GO:0042589]
## 6 cytoplasm [GO:0005737]; extracellular exosome [GO:0070062]; extracellular matrix [GO:0031012]; extracellular region [GO:0005576]; extracellular space [GO:0005615]; phagocytic vesicle membrane [GO:0030670]; zymogen granule membrane [GO:0042589]
##                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               Gene.Ontology.GO
## 1 cytoplasm [GO:0005737]; nuclear speck [GO:0016607]; nucleolus [GO:0005730]; nucleus [GO:0005634]; supraspliceosomal complex [GO:0044530]; DNA binding [GO:0003677]; double-stranded RNA adenosine deaminase activity [GO:0003726]; double-stranded RNA binding [GO:0003725]; metal ion binding [GO:0046872]; tRNA-specific adenosine deaminase activity [GO:0008251]; adenosine to inosine editing [GO:0006382]; apoptotic process [GO:0006915]; base conversion or substitution editing [GO:0016553]; cellular response to virus [GO:0098586]; defense response to virus [GO:0051607]; definitive hemopoiesis [GO:0060216]; erythrocyte differentiation [GO:0030218]; hematopoietic progenitor cell differentiation [GO:0002244]; hematopoietic stem cell homeostasis [GO:0061484]; hepatocyte apoptotic process [GO:0097284]; innate immune response [GO:0045087]; miRNA processing [GO:0035196]; mRNA processing [GO:0006397]; negative regulation of hepatocyte apoptotic process [GO:1903944]; negative regulation of post-transcriptional gene silencing by regulatory ncRNA [GO:1900369]; negative regulation of protein kinase activity by regulation of protein phosphorylation [GO:0044387]; negative regulation of type I interferon-mediated signaling pathway [GO:0060339]; osteoblast differentiation [GO:0001649]; positive regulation of viral genome replication [GO:0045070]; pre-miRNA processing [GO:0031054]; response to interferon-alpha [GO:0035455]; response to virus [GO:0009615]; RISC complex assembly [GO:0070922]; RNA processing [GO:0006396]; somatic diversification of immune receptors via somatic mutation [GO:0002566]
## 2                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             endoplasmic reticulum [GO:0005783]; endoplasmic reticulum membrane [GO:0005789]; endosome membrane [GO:0010008]; Golgi apparatus [GO:0005794]; protein-cysteine S-palmitoyltransferase activity [GO:0019706]; antiviral innate immune response [GO:0140374]; positive regulation of NLRP3 inflammasome complex assembly [GO:1900227]; protein targeting to membrane [GO:0006612]
## 3                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             cytoplasm [GO:0005737]; extracellular exosome [GO:0070062]; extracellular matrix [GO:0031012]; extracellular region [GO:0005576]; extracellular space [GO:0005615]; phagocytic vesicle membrane [GO:0030670]; zymogen granule membrane [GO:0042589]; calcium-dependent protein binding [GO:0048306]; pattern recognition receptor activity [GO:0038187]; scavenger receptor activity [GO:0005044]; zymogen binding [GO:0035375]; defense response [GO:0006952]; defense response to Gram-negative bacterium [GO:0050829]; defense response to Gram-positive bacterium [GO:0050830]; defense response to virus [GO:0051607]; epithelial cell differentiation [GO:0030855]; induction of bacterial agglutination [GO:0043152]; innate immune response [GO:0045087]; protein transport [GO:0015031]
## 4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             cytoplasm [GO:0005737]; extracellular exosome [GO:0070062]; extracellular matrix [GO:0031012]; extracellular region [GO:0005576]; extracellular space [GO:0005615]; phagocytic vesicle membrane [GO:0030670]; zymogen granule membrane [GO:0042589]; calcium-dependent protein binding [GO:0048306]; pattern recognition receptor activity [GO:0038187]; scavenger receptor activity [GO:0005044]; zymogen binding [GO:0035375]; defense response [GO:0006952]; defense response to Gram-negative bacterium [GO:0050829]; defense response to Gram-positive bacterium [GO:0050830]; defense response to virus [GO:0051607]; epithelial cell differentiation [GO:0030855]; induction of bacterial agglutination [GO:0043152]; innate immune response [GO:0045087]; protein transport [GO:0015031]
## 5                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             cytoplasm [GO:0005737]; extracellular exosome [GO:0070062]; extracellular matrix [GO:0031012]; extracellular region [GO:0005576]; extracellular space [GO:0005615]; phagocytic vesicle membrane [GO:0030670]; zymogen granule membrane [GO:0042589]; calcium-dependent protein binding [GO:0048306]; pattern recognition receptor activity [GO:0038187]; scavenger receptor activity [GO:0005044]; zymogen binding [GO:0035375]; defense response [GO:0006952]; defense response to Gram-negative bacterium [GO:0050829]; defense response to Gram-positive bacterium [GO:0050830]; defense response to virus [GO:0051607]; epithelial cell differentiation [GO:0030855]; induction of bacterial agglutination [GO:0043152]; innate immune response [GO:0045087]; protein transport [GO:0015031]
## 6                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             cytoplasm [GO:0005737]; extracellular exosome [GO:0070062]; extracellular matrix [GO:0031012]; extracellular region [GO:0005576]; extracellular space [GO:0005615]; phagocytic vesicle membrane [GO:0030670]; zymogen granule membrane [GO:0042589]; calcium-dependent protein binding [GO:0048306]; pattern recognition receptor activity [GO:0038187]; scavenger receptor activity [GO:0005044]; zymogen binding [GO:0035375]; defense response [GO:0006952]; defense response to Gram-negative bacterium [GO:0050829]; defense response to Gram-positive bacterium [GO:0050830]; defense response to virus [GO:0051607]; epithelial cell differentiation [GO:0030855]; induction of bacterial agglutination [GO:0043152]; innate immune response [GO:0045087]; protein transport [GO:0015031]
##                                                                                                                                                                                             Gene.Ontology.Molecular.Function
## 1 DNA binding [GO:0003677]; double-stranded RNA adenosine deaminase activity [GO:0003726]; double-stranded RNA binding [GO:0003725]; metal ion binding [GO:0046872]; tRNA-specific adenosine deaminase activity [GO:0008251]
## 2                                                                                                                                                              protein-cysteine S-palmitoyltransferase activity [GO:0019706]
## 3                                                 calcium-dependent protein binding [GO:0048306]; pattern recognition receptor activity [GO:0038187]; scavenger receptor activity [GO:0005044]; zymogen binding [GO:0035375]
## 4                                                 calcium-dependent protein binding [GO:0048306]; pattern recognition receptor activity [GO:0038187]; scavenger receptor activity [GO:0005044]; zymogen binding [GO:0035375]
## 5                                                 calcium-dependent protein binding [GO:0048306]; pattern recognition receptor activity [GO:0038187]; scavenger receptor activity [GO:0005044]; zymogen binding [GO:0035375]
## 6                                                 calcium-dependent protein binding [GO:0048306]; pattern recognition receptor activity [GO:0038187]; scavenger receptor activity [GO:0005044]; zymogen binding [GO:0035375]
##                                                                                                                                                                                                                                                                                                                                                                                                                    Gene.Ontology.IDs
## 1 GO:0001649; GO:0002244; GO:0002566; GO:0003677; GO:0003725; GO:0003726; GO:0005634; GO:0005730; GO:0005737; GO:0006382; GO:0006396; GO:0006397; GO:0006915; GO:0008251; GO:0009615; GO:0016553; GO:0016607; GO:0030218; GO:0031054; GO:0035196; GO:0035455; GO:0044387; GO:0044530; GO:0045070; GO:0045087; GO:0046872; GO:0051607; GO:0060216; GO:0060339; GO:0061484; GO:0070922; GO:0097284; GO:0098586; GO:1900369; GO:1903944
## 2                                                                                                                                                                                                                                                                                                                                     GO:0005783; GO:0005789; GO:0005794; GO:0006612; GO:0010008; GO:0019706; GO:0140374; GO:1900227
## 3                                                                                                                                                                                                 GO:0005044; GO:0005576; GO:0005615; GO:0005737; GO:0006952; GO:0015031; GO:0030670; GO:0030855; GO:0031012; GO:0035375; GO:0038187; GO:0042589; GO:0043152; GO:0045087; GO:0048306; GO:0050829; GO:0050830; GO:0051607; GO:0070062
## 4                                                                                                                                                                                                 GO:0005044; GO:0005576; GO:0005615; GO:0005737; GO:0006952; GO:0015031; GO:0030670; GO:0030855; GO:0031012; GO:0035375; GO:0038187; GO:0042589; GO:0043152; GO:0045087; GO:0048306; GO:0050829; GO:0050830; GO:0051607; GO:0070062
## 5                                                                                                                                                                                                 GO:0005044; GO:0005576; GO:0005615; GO:0005737; GO:0006952; GO:0015031; GO:0030670; GO:0030855; GO:0031012; GO:0035375; GO:0038187; GO:0042589; GO:0043152; GO:0045087; GO:0048306; GO:0050829; GO:0050830; GO:0051607; GO:0070062
## 6                                                                                                                                                                                                 GO:0005044; GO:0005576; GO:0005615; GO:0005737; GO:0006952; GO:0015031; GO:0030670; GO:0030855; GO:0031012; GO:0035375; GO:0038187; GO:0042589; GO:0043152; GO:0045087; GO:0048306; GO:0050829; GO:0050830; GO:0051607; GO:0070062
Derm <- read.delim("../output/20-annot-derm/Derm_immune_shortlist.txt", 
                          header = TRUE, 
                          stringsAsFactors = FALSE)

head(Derm)
##   transcript_id PSC.0523 PSC.0529 PSC.0529.1 PSC.0535 PSC.0547 PSC.0559  sum
## 1      g9822.t1       96      146        146     1002      885        0 2275
## 2      g9822.t1       96      146        146     1002      885        0 2275
## 3      g9822.t1       96      146        146     1002      885        0 2275
## 4      g9822.t1       96      146        146     1002      885        0 2275
## 5      g9822.t1       96      146        146     1002      885        0 2275
## 6      g9822.t1       96      146        146     1002      885        0 2275
##       mean  std.dev std.error  Entry   gene_name  Entry.Name
## 1 379.1667 441.9214  180.4137 Q9UGM3 DMBT1_HUMAN DMBT1_HUMAN
## 2 379.1667 441.9214  180.4137 Q9UGM3 DMBT1_HUMAN DMBT1_HUMAN
## 3 379.1667 441.9214  180.4137 Q9UGM3 DMBT1_HUMAN DMBT1_HUMAN
## 4 379.1667 441.9214  180.4137 Q9UGM3 DMBT1_HUMAN DMBT1_HUMAN
## 5 379.1667 441.9214  180.4137 Q9UGM3 DMBT1_HUMAN DMBT1_HUMAN
## 6 379.1667 441.9214  180.4137 Q9UGM3 DMBT1_HUMAN DMBT1_HUMAN
##                                                                                                                                                                                                                         Protein.Names
## 1 Scavenger receptor cysteine-rich domain-containing protein DMBT1 (Deleted in malignant brain tumors 1 protein) (Glycoprotein 340) (Gp-340) (Hensin) (Salivary agglutinin) (SAG) (Surfactant pulmonary-associated D-binding protein)
## 2 Scavenger receptor cysteine-rich domain-containing protein DMBT1 (Deleted in malignant brain tumors 1 protein) (Glycoprotein 340) (Gp-340) (Hensin) (Salivary agglutinin) (SAG) (Surfactant pulmonary-associated D-binding protein)
## 3 Scavenger receptor cysteine-rich domain-containing protein DMBT1 (Deleted in malignant brain tumors 1 protein) (Glycoprotein 340) (Gp-340) (Hensin) (Salivary agglutinin) (SAG) (Surfactant pulmonary-associated D-binding protein)
## 4 Scavenger receptor cysteine-rich domain-containing protein DMBT1 (Deleted in malignant brain tumors 1 protein) (Glycoprotein 340) (Gp-340) (Hensin) (Salivary agglutinin) (SAG) (Surfactant pulmonary-associated D-binding protein)
## 5 Scavenger receptor cysteine-rich domain-containing protein DMBT1 (Deleted in malignant brain tumors 1 protein) (Glycoprotein 340) (Gp-340) (Hensin) (Salivary agglutinin) (SAG) (Surfactant pulmonary-associated D-binding protein)
## 6 Scavenger receptor cysteine-rich domain-containing protein DMBT1 (Deleted in malignant brain tumors 1 protein) (Glycoprotein 340) (Gp-340) (Hensin) (Salivary agglutinin) (SAG) (Surfactant pulmonary-associated D-binding protein)
##    Gene.Names             Organism
## 1 DMBT1 GP340 Homo sapiens (Human)
## 2 DMBT1 GP340 Homo sapiens (Human)
## 3 DMBT1 GP340 Homo sapiens (Human)
## 4 DMBT1 GP340 Homo sapiens (Human)
## 5 DMBT1 GP340 Homo sapiens (Human)
## 6 DMBT1 GP340 Homo sapiens (Human)
##                                                                                                                                                                                                                                                                                                                                  Gene.Ontology.biological.process
## 1 defense response [GO:0006952]; defense response to Gram-negative bacterium [GO:0050829]; defense response to Gram-positive bacterium [GO:0050830]; defense response to virus [GO:0051607]; epithelial cell differentiation [GO:0030855]; induction of bacterial agglutination [GO:0043152]; innate immune response [GO:0045087]; protein transport [GO:0015031]
## 2 defense response [GO:0006952]; defense response to Gram-negative bacterium [GO:0050829]; defense response to Gram-positive bacterium [GO:0050830]; defense response to virus [GO:0051607]; epithelial cell differentiation [GO:0030855]; induction of bacterial agglutination [GO:0043152]; innate immune response [GO:0045087]; protein transport [GO:0015031]
## 3 defense response [GO:0006952]; defense response to Gram-negative bacterium [GO:0050829]; defense response to Gram-positive bacterium [GO:0050830]; defense response to virus [GO:0051607]; epithelial cell differentiation [GO:0030855]; induction of bacterial agglutination [GO:0043152]; innate immune response [GO:0045087]; protein transport [GO:0015031]
## 4 defense response [GO:0006952]; defense response to Gram-negative bacterium [GO:0050829]; defense response to Gram-positive bacterium [GO:0050830]; defense response to virus [GO:0051607]; epithelial cell differentiation [GO:0030855]; induction of bacterial agglutination [GO:0043152]; innate immune response [GO:0045087]; protein transport [GO:0015031]
## 5 defense response [GO:0006952]; defense response to Gram-negative bacterium [GO:0050829]; defense response to Gram-positive bacterium [GO:0050830]; defense response to virus [GO:0051607]; epithelial cell differentiation [GO:0030855]; induction of bacterial agglutination [GO:0043152]; innate immune response [GO:0045087]; protein transport [GO:0015031]
## 6 defense response [GO:0006952]; defense response to Gram-negative bacterium [GO:0050829]; defense response to Gram-positive bacterium [GO:0050830]; defense response to virus [GO:0051607]; epithelial cell differentiation [GO:0030855]; induction of bacterial agglutination [GO:0043152]; innate immune response [GO:0045087]; protein transport [GO:0015031]
##                                                                                                                                                                                                                      Gene.Ontology.cellular.component
## 1 cytoplasm [GO:0005737]; extracellular exosome [GO:0070062]; extracellular matrix [GO:0031012]; extracellular region [GO:0005576]; extracellular space [GO:0005615]; phagocytic vesicle membrane [GO:0030670]; zymogen granule membrane [GO:0042589]
## 2 cytoplasm [GO:0005737]; extracellular exosome [GO:0070062]; extracellular matrix [GO:0031012]; extracellular region [GO:0005576]; extracellular space [GO:0005615]; phagocytic vesicle membrane [GO:0030670]; zymogen granule membrane [GO:0042589]
## 3 cytoplasm [GO:0005737]; extracellular exosome [GO:0070062]; extracellular matrix [GO:0031012]; extracellular region [GO:0005576]; extracellular space [GO:0005615]; phagocytic vesicle membrane [GO:0030670]; zymogen granule membrane [GO:0042589]
## 4 cytoplasm [GO:0005737]; extracellular exosome [GO:0070062]; extracellular matrix [GO:0031012]; extracellular region [GO:0005576]; extracellular space [GO:0005615]; phagocytic vesicle membrane [GO:0030670]; zymogen granule membrane [GO:0042589]
## 5 cytoplasm [GO:0005737]; extracellular exosome [GO:0070062]; extracellular matrix [GO:0031012]; extracellular region [GO:0005576]; extracellular space [GO:0005615]; phagocytic vesicle membrane [GO:0030670]; zymogen granule membrane [GO:0042589]
## 6 cytoplasm [GO:0005737]; extracellular exosome [GO:0070062]; extracellular matrix [GO:0031012]; extracellular region [GO:0005576]; extracellular space [GO:0005615]; phagocytic vesicle membrane [GO:0030670]; zymogen granule membrane [GO:0042589]
##                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   Gene.Ontology.GO
## 1 cytoplasm [GO:0005737]; extracellular exosome [GO:0070062]; extracellular matrix [GO:0031012]; extracellular region [GO:0005576]; extracellular space [GO:0005615]; phagocytic vesicle membrane [GO:0030670]; zymogen granule membrane [GO:0042589]; calcium-dependent protein binding [GO:0048306]; pattern recognition receptor activity [GO:0038187]; scavenger receptor activity [GO:0005044]; zymogen binding [GO:0035375]; defense response [GO:0006952]; defense response to Gram-negative bacterium [GO:0050829]; defense response to Gram-positive bacterium [GO:0050830]; defense response to virus [GO:0051607]; epithelial cell differentiation [GO:0030855]; induction of bacterial agglutination [GO:0043152]; innate immune response [GO:0045087]; protein transport [GO:0015031]
## 2 cytoplasm [GO:0005737]; extracellular exosome [GO:0070062]; extracellular matrix [GO:0031012]; extracellular region [GO:0005576]; extracellular space [GO:0005615]; phagocytic vesicle membrane [GO:0030670]; zymogen granule membrane [GO:0042589]; calcium-dependent protein binding [GO:0048306]; pattern recognition receptor activity [GO:0038187]; scavenger receptor activity [GO:0005044]; zymogen binding [GO:0035375]; defense response [GO:0006952]; defense response to Gram-negative bacterium [GO:0050829]; defense response to Gram-positive bacterium [GO:0050830]; defense response to virus [GO:0051607]; epithelial cell differentiation [GO:0030855]; induction of bacterial agglutination [GO:0043152]; innate immune response [GO:0045087]; protein transport [GO:0015031]
## 3 cytoplasm [GO:0005737]; extracellular exosome [GO:0070062]; extracellular matrix [GO:0031012]; extracellular region [GO:0005576]; extracellular space [GO:0005615]; phagocytic vesicle membrane [GO:0030670]; zymogen granule membrane [GO:0042589]; calcium-dependent protein binding [GO:0048306]; pattern recognition receptor activity [GO:0038187]; scavenger receptor activity [GO:0005044]; zymogen binding [GO:0035375]; defense response [GO:0006952]; defense response to Gram-negative bacterium [GO:0050829]; defense response to Gram-positive bacterium [GO:0050830]; defense response to virus [GO:0051607]; epithelial cell differentiation [GO:0030855]; induction of bacterial agglutination [GO:0043152]; innate immune response [GO:0045087]; protein transport [GO:0015031]
## 4 cytoplasm [GO:0005737]; extracellular exosome [GO:0070062]; extracellular matrix [GO:0031012]; extracellular region [GO:0005576]; extracellular space [GO:0005615]; phagocytic vesicle membrane [GO:0030670]; zymogen granule membrane [GO:0042589]; calcium-dependent protein binding [GO:0048306]; pattern recognition receptor activity [GO:0038187]; scavenger receptor activity [GO:0005044]; zymogen binding [GO:0035375]; defense response [GO:0006952]; defense response to Gram-negative bacterium [GO:0050829]; defense response to Gram-positive bacterium [GO:0050830]; defense response to virus [GO:0051607]; epithelial cell differentiation [GO:0030855]; induction of bacterial agglutination [GO:0043152]; innate immune response [GO:0045087]; protein transport [GO:0015031]
## 5 cytoplasm [GO:0005737]; extracellular exosome [GO:0070062]; extracellular matrix [GO:0031012]; extracellular region [GO:0005576]; extracellular space [GO:0005615]; phagocytic vesicle membrane [GO:0030670]; zymogen granule membrane [GO:0042589]; calcium-dependent protein binding [GO:0048306]; pattern recognition receptor activity [GO:0038187]; scavenger receptor activity [GO:0005044]; zymogen binding [GO:0035375]; defense response [GO:0006952]; defense response to Gram-negative bacterium [GO:0050829]; defense response to Gram-positive bacterium [GO:0050830]; defense response to virus [GO:0051607]; epithelial cell differentiation [GO:0030855]; induction of bacterial agglutination [GO:0043152]; innate immune response [GO:0045087]; protein transport [GO:0015031]
## 6 cytoplasm [GO:0005737]; extracellular exosome [GO:0070062]; extracellular matrix [GO:0031012]; extracellular region [GO:0005576]; extracellular space [GO:0005615]; phagocytic vesicle membrane [GO:0030670]; zymogen granule membrane [GO:0042589]; calcium-dependent protein binding [GO:0048306]; pattern recognition receptor activity [GO:0038187]; scavenger receptor activity [GO:0005044]; zymogen binding [GO:0035375]; defense response [GO:0006952]; defense response to Gram-negative bacterium [GO:0050829]; defense response to Gram-positive bacterium [GO:0050830]; defense response to virus [GO:0051607]; epithelial cell differentiation [GO:0030855]; induction of bacterial agglutination [GO:0043152]; innate immune response [GO:0045087]; protein transport [GO:0015031]
##                                                                                                                                             Gene.Ontology.Molecular.Function
## 1 calcium-dependent protein binding [GO:0048306]; pattern recognition receptor activity [GO:0038187]; scavenger receptor activity [GO:0005044]; zymogen binding [GO:0035375]
## 2 calcium-dependent protein binding [GO:0048306]; pattern recognition receptor activity [GO:0038187]; scavenger receptor activity [GO:0005044]; zymogen binding [GO:0035375]
## 3 calcium-dependent protein binding [GO:0048306]; pattern recognition receptor activity [GO:0038187]; scavenger receptor activity [GO:0005044]; zymogen binding [GO:0035375]
## 4 calcium-dependent protein binding [GO:0048306]; pattern recognition receptor activity [GO:0038187]; scavenger receptor activity [GO:0005044]; zymogen binding [GO:0035375]
## 5 calcium-dependent protein binding [GO:0048306]; pattern recognition receptor activity [GO:0038187]; scavenger receptor activity [GO:0005044]; zymogen binding [GO:0035375]
## 6 calcium-dependent protein binding [GO:0048306]; pattern recognition receptor activity [GO:0038187]; scavenger receptor activity [GO:0005044]; zymogen binding [GO:0035375]
##                                                                                                                                                                                                                    Gene.Ontology.IDs
## 1 GO:0005044; GO:0005576; GO:0005615; GO:0005737; GO:0006952; GO:0015031; GO:0030670; GO:0030855; GO:0031012; GO:0035375; GO:0038187; GO:0042589; GO:0043152; GO:0045087; GO:0048306; GO:0050829; GO:0050830; GO:0051607; GO:0070062
## 2 GO:0005044; GO:0005576; GO:0005615; GO:0005737; GO:0006952; GO:0015031; GO:0030670; GO:0030855; GO:0031012; GO:0035375; GO:0038187; GO:0042589; GO:0043152; GO:0045087; GO:0048306; GO:0050829; GO:0050830; GO:0051607; GO:0070062
## 3 GO:0005044; GO:0005576; GO:0005615; GO:0005737; GO:0006952; GO:0015031; GO:0030670; GO:0030855; GO:0031012; GO:0035375; GO:0038187; GO:0042589; GO:0043152; GO:0045087; GO:0048306; GO:0050829; GO:0050830; GO:0051607; GO:0070062
## 4 GO:0005044; GO:0005576; GO:0005615; GO:0005737; GO:0006952; GO:0015031; GO:0030670; GO:0030855; GO:0031012; GO:0035375; GO:0038187; GO:0042589; GO:0043152; GO:0045087; GO:0048306; GO:0050829; GO:0050830; GO:0051607; GO:0070062
## 5 GO:0005044; GO:0005576; GO:0005615; GO:0005737; GO:0006952; GO:0015031; GO:0030670; GO:0030855; GO:0031012; GO:0035375; GO:0038187; GO:0042589; GO:0043152; GO:0045087; GO:0048306; GO:0050829; GO:0050830; GO:0051607; GO:0070062
## 6 GO:0005044; GO:0005576; GO:0005615; GO:0005737; GO:0006952; GO:0015031; GO:0030670; GO:0030855; GO:0031012; GO:0035375; GO:0038187; GO:0042589; GO:0043152; GO:0045087; GO:0048306; GO:0050829; GO:0050830; GO:0051607; GO:0070062
Derm_unique <- Derm[!duplicated(Derm), ] %>% distinct(Entry, .keep_all = TRUE)
Phel_unique <- Phel[!duplicated(Phel), ] %>% distinct(Entry, .keep_all = TRUE)
Pisa_unique <- Pisa[!duplicated(Pisa), ] %>% distinct(Entry, .keep_all = TRUE)
joined_immune <- Derm_unique %>%
  inner_join(Phel_unique, by = "Entry") %>%
  inner_join(Pisa_unique, by = "Entry")
for (name in colnames(joined_immune)) {
  cat(name, "\n")
}
## transcript_id.x 
## PSC.0523 
## PSC.0529 
## PSC.0529.1 
## PSC.0535 
## PSC.0547 
## PSC.0559 
## sum.x 
## mean.x 
## std.dev.x 
## std.error.x 
## Entry 
## gene_name.x 
## Entry.Name.x 
## Protein.Names.x 
## Gene.Names.x 
## Organism.x 
## Gene.Ontology.biological.process.x 
## Gene.Ontology.cellular.component.x 
## Gene.Ontology.GO.x 
## Gene.Ontology.Molecular.Function.x 
## Gene.Ontology.IDs.x 
## transcript_id.y 
## PSC.0519 
## PSC.0525 
## PSC.0531 
## PSC.0537 
## PSC.0549 
## PSC.0561 
## sum.y 
## mean.y 
## std.dev.y 
## std.error.y 
## gene_name.y 
## Entry.Name.y 
## Protein.Names.y 
## Gene.Names.y 
## Organism.y 
## Gene.Ontology.biological.process.y 
## Gene.Ontology.cellular.component.y 
## Gene.Ontology.GO.y 
## Gene.Ontology.Molecular.Function.y 
## Gene.Ontology.IDs.y 
## transcript_id 
## PSC.0518 
## PSC.0524 
## PSC.0530 
## PSC.0536 
## PSC.0548 
## PSC.0560 
## sum 
## mean 
## std.dev 
## std.error 
## gene_name 
## Protein.Names 
## Gene.Names 
## Organism 
## Gene.Ontology.biological.process 
## Gene.Ontology.cellular.component 
## Gene.Ontology.GO 
## Gene.Ontology.Molecular.Function 
## Gene.Ontology.IDs
selected_df <- joined_immune %>%
  select(
    Entry,
    gene_name.x,
    Entry.Name.x,
    Protein.Names.x,
    Gene.Names.x,
    Gene.Ontology.biological.process.x,
    transcript_id.x,
    sum.x,
    mean.x,
    std.dev.x,
    std.error.x,
    transcript_id.y,
    sum.y,
    mean.y,
    std.dev.y,
    std.error.y,
    transcript_id,
    sum,
    mean,
    std.dev,
    std.error
  )
selected_df <- joined_immune %>%
  select(
    Entry,
    gene_name.x,
    Entry.Name.x,
    Protein.Names.x,
    Gene.Names.x,
    Gene.Ontology.biological.process.x,
    starts_with("transcript_id.x"),
    starts_with("sum.x"),
    starts_with("mean.x"),
    starts_with("std.dev.x"),
    starts_with("std.error.x"),
    starts_with("transcript_id.y"),
    starts_with("sum.y"),
    starts_with("mean.y"),
    starts_with("std.dev.y"),
    starts_with("std.error.y"),
    transcript_id,
    sum,
    mean,
    std.dev,
    std.error
  ) %>%
  rename_with(~ gsub("\\.x$", "_Derm", .x), ends_with(".x")) %>%
  rename_with(~ gsub("\\.y$", "_Phel", .x), ends_with(".y")) %>%
  rename_with(~ paste0(.x, "_Pisa"), c("transcript_id", "sum", "mean", "std.dev", "std.error"))
selected_df <- selected_df %>%
  rowwise() %>%
  mutate(
    mean_range = max(c_across(c(mean_Derm, mean_Phel, mean_Pisa))) -
                 min(c_across(c(mean_Derm, mean_Phel, mean_Pisa)))
  ) %>%
  ungroup()
most_equal <- selected_df %>%
  arrange(mean_range) %>%
  slice(1:20)  # Top 20 most similar
most_divergent <- selected_df %>%
  arrange(desc(mean_range)) %>%
  slice(1:20)  # Top 20 most divergent