Xenopus metatetard source-sink analysis

# Warning turned off for rendering
library("ggplot2")

# Analysis using FEAST https://github.com/cozygene/FEAST

## Folders, Themes, colors
source("prelude.R")

# Setting up directories
data_dir <-paste0(data_dir_path,"xprna")
output_dir <- paste0(output_dir_path,"Figure4_rna")

# Importation of FEAST multisample results with same source
setwd(data_dir)
feast_result<-read.table(file="DataFiles/FEAST_results.csv",header=TRUE,sep=";")

# Plot the proportions of each source by cross
ggplot(feast_result)+geom_bar(aes(y=Feast,x=Cross,fill=Category),stat="identity")+ylab("Source proportion")+coord_flip()+xlab(label = "")+scale_fill_manual(limits=c("Embryo","Tadpole","unknown"),labels=c("Pre-feeding tadpoles","Feeding tadpoles","Unknown"),values=c("gray50","gray80","black"))+theme_npgray()

setwd(output_dir)
ggsave("FEAST_source_proportions_rna.pdf",width=12,height=8)