Loading packages

library(ggplot2)
library(ggVennDiagram)

Using ggVennDiagram to show overlapping orthogroups

#reading in the files 

#nerctarivores
ange <- readLines("ange01.csv")
loth<- readLines("loth01.csv")
glso<- readLines("glso01.csv")

#frugivores
arja <- readLines("arja01.csv")
cabr <- readLines("cabr01.csv")
chvi<- readLines("chvi01.csv")
stlu<- readLines("stlu01.csv")

#blood feeding
dero<- readLines("dero01.csv")

#insectivores
mawa<- readLines("mawa01.csv")
mobl<- readLines("mobl01.csv")
ptpa<- readLines("ptpa01.csv")

#piscivore
nole<- readLines("nole01.csv")
# nectarivores vs piscivore 
nec_pis <- list(nec1 = ange, nec2= glso, pis = nole )

ggVennDiagram(nec_pis[1:4],label_alpha = 0, stroke_size = 0.1) +
  ggplot2::scale_fill_gradient(low="white",high = "purple") + 
  theme(text = element_text(size=10,  family="Comic Sans MS"))

# nectarivores vs frugivore 
nec_fru <- list(nec1 = ange, nec2= glso, fru = arja )

ggVennDiagram(nec_fru[1:4],label_alpha = 0, stroke_size = 0.1) +
  ggplot2::scale_fill_gradient(low="white",high = "purple") + 
  theme(text = element_text(size=10,  family="Comic Sans MS"))

# nectarivores vs insectivore 
nec_ins <- list(nec1 = ange, nec2= glso, ins = ptpa )

ggVennDiagram(nec_ins[1:4],label_alpha = 0, stroke_size = 0.1) +
  ggplot2::scale_fill_gradient(low="white",high = "purple") + 
  theme(text = element_text(size=10,  family="Comic Sans MS"))

# frugivores vs piscivore
fru_pis <- list(fru1 = arja, fru2= stlu, pis = nole )

ggVennDiagram(fru_pis[1:4],label_alpha = 0, stroke_size = 0.1) +
  ggplot2::scale_fill_gradient(low="white",high = "purple") + 
  theme(text = element_text(size=10,  family="Comic Sans MS"))

# frugivores vs nectarivore
fru_nec <- list(fru1 = arja, fru2= stlu, nec = loth )

ggVennDiagram(fru_nec[1:4],label_alpha = 0, stroke_size = 0.1) +
  ggplot2::scale_fill_gradient(low="white",high = "purple") + 
  theme(text = element_text(size=10,  family="Comic Sans MS"))

# frugivores vs insectivore
fru_ins <- list(fru1 = arja, fru2= stlu, ins = ptpa )

ggVennDiagram(fru_ins[1:4],label_alpha = 0, stroke_size = 0.1) +
  ggplot2::scale_fill_gradient(low="white",high = "purple") + 
  theme(text = element_text(size=10,  family="Comic Sans MS"))

# frugivore vs nectarivore vs piscivore
fru_pis_nec <- list(fru = arja, nec = loth, pis= nole )

ggVennDiagram(fru_pis_nec[1:4],label_alpha = 0, stroke_size = 0.1) +
  ggplot2::scale_fill_gradient(low="white",high = "purple") + 
  theme(text = element_text(size=10,  family="Comic Sans MS"))

# frugivore vs blood feeding vs piscivore
fru_pis_blo <- list(fru = arja, blo = dero, pis= nole )

ggVennDiagram(fru_pis_blo[1:4],label_alpha = 0, stroke_size = 0.1) +
  ggplot2::scale_fill_gradient(low="white",high = "purple") + 
  theme(text = element_text(size=10,  family="Comic Sans MS"))

# frugivore vs insectivore  vs piscivore
fru_ins_blo <- list(fru = arja, blo = dero, ins = ptpa)

ggVennDiagram(fru_ins_blo[1:4],label_alpha = 0, stroke_size = 0.1) +
  ggplot2::scale_fill_gradient(low="white",high = "purple") + 
  theme(text = element_text(size=10,  family="Comic Sans MS"))

# frugivore vs nectarivore vs blood feeding
fru_blo_nec <- list(fru = arja, nec = loth, blo= dero )

ggVennDiagram(fru_blo_nec[1:4],label_alpha = 0, stroke_size = 0.1) +
  ggplot2::scale_fill_gradient(low="white",high = "purple") + 
  theme(text = element_text(size=10,  family="Comic Sans MS"))