installed.packages()
install(admixr)
install.packages(admixr)
install.packages("admixr")
library(admixr)
library(admixr)
library(admixr)
# download a small testing dataset to a temporary directory and
# process it for use in R
snp_data <- eigenstrat(download_data())
# download a small testing dataset to a temporary directory and
# process it for use in R
snp_data <- eigenstrat("~/Downloads/snps/")
# download a small testing dataset to a temporary directory and
# process it for use in R
snp_data <- eigenstrat("~/Downloads/snps")
list("~/Downloads/snps/")
list.dirs("~/Downloads/snps/")
list.files("~/Downloads/snps/")
# download a small testing dataset to a temporary directory and
# process it for use in R
snp_data <- eigenstrat("~/Downloads/snps")
# download a small testing dataset to a temporary directory and
# process it for use in R
snp_data <- eigenstrat("~/Downloads/snps")
download_data()
snp_data <- eigenstrat(download_data())
# download a small testing dataset to a temporary directory and
# process it for use in R
snp_data <- eigenstrat("~/Downloads/snps")
list.files("~/Downloads/snps/")
BiocManager::install("biomaRt")
demo()
library(biomaRt)
copy.packages.between.libraries()
install.packages("Devtools")
install.packages("devtools")
Sys.getenv("R_LIBS_USER")
install.packages(c("abind", "amap", "ape", "aplot", "askpass", "backports", "BH", "BiocManager", "bit", "bit64", "bitops", "boot", "brio", "broom", "bslib", "cachem", "callr", "caTools", "checkmate", "class", "classInt", "cli", "cluster", "coda", "codetools", "colorspace", "commonmark", "cowplot", "cpp11", "crayon", "credentials", "curl", "data.table", "DBI", "dbplyr", "digest", "downlit", "DT", "e1071", "EnvStats", "evaluate", "expm", "farver", "fastcluster", "fastmap", "fastmatch", "fontawesome", "foreign", "fs", "gert", "ggforce", "ggfun", "ggnewscale", "ggplot2", "ggraph", "ggrepel", "ggVennDiagram", "gh", "glue", "gplots", "graphlayouts", "gtable", "highr", "Hmisc", "htmlTable", "htmltools", "httpuv", "httr2", "igraph", "jsonlite", "kableExtra", "KernSmooth", "knitr", "later", "lattice", "lme4", "locfit", "lubridate", "maps", "MASS", "Matrix", "matrixStats", "minqa", "munsell", "mvtnorm", "nlme", "nloptr", "nnet", "openssl", "paleotree", "patchwork", "pbkrtest", "phangorn", "phytools", "pillar", "pixmap", "pkgbuild", "pkgdown", "pkgload", "plotly", "polyclip", "processx", "profvis", "promises", "ps", "ragg", "rbibutils", "Rcpp", "RcppArmadillo", "RcppEigen", "RcppParallel", "RCurl", "Rdpack", "readr", "remaCor", "remotes", "reprex", "rjson", "rlang", "rmarkdown", "roxygen2", "rpart", "RSQLite", "rstudioapi", "rvest", "s2", "sass", "scatterpie", "segmented", "sf", "shadowtext", "shiny", "sp", "SparseM", "spatial", "stringi", "survival", "sys", "systemfonts", "testthat", "textshaping", "tidygraph", "tidyr", "tidyselect", "timechange", "tinytex", "tweenr", "usethis", "uuid", "vegan", "viridis", "waldo", "WGCNA", "withr", "wk", "writexl", "xfun", "XML", "xopen", "yaml", "yulab.utils", "zip"))
install.packages(c("class", "cluster", "foreign", "KernSmooth", "MASS", "nnet", "rpart", "spatial", "survival"), lib="/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library")
library("ggplot2")
knitr::opts_chunk$set(echo = TRUE)
plot(pressure)
summary(cars)
knitr::opts_chunk$set(echo = TRUE)
summary(cars)
knitr::opts_chunk$set(echo = TRUE)
knitr::opts_chunk$set(echo = TRUE)
knitr::opts_chunk$set(echo = TRUE)
plot(pressure)
BiocManager::install("biomaRt")
### Install packages
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("biomaRt")
BiocManager::install("biomaRt")
## Try some commands?               ####
biomaRt::listEnsembl
## Try some commands?               ####
biomaRt::listEnsembl()
library(txdbmaker)
?makeTxDbFromEnsembl
testEnsemblTxDb = makeTxDbFromEnsembl(organism="Zootoca vivipara")
BiocManager::install("RMariaDB")
testEnsemblTxDb = makeTxDbFromEnsembl(organism="Zootoca vivipara")
####Housekeeping~~~~~~~~~~~~~####
rm(list=ls()) #clear the environment
setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) #set wd to Scripts folder
###~specify data~~~~~~~~~~~~~####
dgeDir = "../gene_expression/by_cluster/"
eggnog = "../eggnog.tsv"
eggnogFile = "../eggnog.tsv"
####Load data~~~~~~~~~~~~~~~~####
nog = read.csv(eggnogFile, sep = "\t")
####Load data~~~~~~~~~~~~~~~~####
nog = read.csv(eggnogFile, sep = "\t", header = FALSE)
View(nog)
nog = nog[,-1:4]
nog = nog[,-c(1:4)]
####Load data~~~~~~~~~~~~~~~~####
###~Eggnog data~~~~~~~~~~~~~~####
nog = read.csv(eggnogFile, sep = "\t", header = FALSE)
nog = nog[-c(1:4),]
## Add annotations from eggnog mapper to Cellenics DGE results
## by J.
####Housekeeping~~~~~~~~~~~~~####
rm(list=ls()) #clear the environment
setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) #set wd to Scripts folder
###~Specify data~~~~~~~~~~~~~####
dgeDir = "../gene_expression/by_cluster/"
eggnogFile = "../eggnog.tsv"
gene2protFile = "../gene2prot.txt"
####Parse data~~~~~~~~~~~~~~~####
###~Gene to protein data~~~~~####
gene2prot = read.delim(gene2protFile, header = FALSE)
names(gene2prot) = c("SYMBOL","REFSEQ")
prot2gene = gene2prot[,c("REFSEQ","SYMBOL")]
###~Eggnog data~~~~~~~~~~~~~~####
nog = read.csv(eggnogFile, sep = "\t", header = FALSE)
nog = nog[-c(1:4),]
###~~add symbol to eggnogg~~~####
eggnog_symbols = merge(eggnog, prot2gene, by=1, all.x=TRUE)
## Add annotations from eggnog mapper to Cellenics DGE results
## by J.
####Housekeeping~~~~~~~~~~~~~####
rm(list=ls()) #clear the environment
setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) #set wd to Scripts folder
###~Specify data~~~~~~~~~~~~~####
dgeDir = "../gene_expression/by_cluster/"
eggnogFile = "../eggnog.tsv"
gene2protFile = "../gene2prot.txt"
####Parse data~~~~~~~~~~~~~~~####
###~Gene to protein data~~~~~####
gene2prot = read.delim(gene2protFile, header = FALSE)
names(gene2prot) = c("SYMBOL","REFSEQ")
prot2gene = gene2prot[,c("REFSEQ","SYMBOL")]
###~Eggnog data~~~~~~~~~~~~~~####
nog = read.csv(eggnogFile, sep = "\t", header = FALSE)
nog = nog[-c(1:4),]
###~~add symbol to eggnogg~~~####
nog = merge(nog, prot2gene, by=1, all.x=TRUE)
View(nog)
###~Eggnog data~~~~~~~~~~~~~~####
nog = read.csv(eggnogFile, sep = "\t", header = FALSE)
nog = nog[-c(1:4),]
###~~add symbol to eggnogg~~~####
nog = merge(nog, prot2gene, by=1, all.x=TRUE)
nog = nog[-c(1:4),]
## Add annotations from eggnog mapper to Cellenics DGE results
## by J.
####Housekeeping~~~~~~~~~~~~~####
rm(list=ls()) #clear the environment
setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) #set wd to Scripts folder
###~Specify data~~~~~~~~~~~~~####
dgeDir = "../gene_expression/by_cluster/"
eggnogFile = "../eggnog.tsv"
gene2protFile = "../gene2prot.txt"
####Parse data~~~~~~~~~~~~~~~####
###~Gene to protein data~~~~~####
gene2prot = read.delim(gene2protFile, header = FALSE)
names(gene2prot) = c("SYMBOL","REFSEQ")
prot2gene = gene2prot[,c("REFSEQ","SYMBOL")]
###~Eggnog data~~~~~~~~~~~~~~####
nog = read.csv(eggnogFile, sep = "\t", header = FALSE)
nog = nog[-c(1:4),]
###~~add symbol to eggnogg~~~####
nog = merge(nog, prot2gene, by=1, all.x=TRUE)
View(nog)
###~Eggnog data~~~~~~~~~~~~~~####
nog = read.csv(eggnogFile, sep = "\t", header = FALSE)
nog = nog[-c(1:4),]
###~~add symbol to eggnogg~~~####
nog = merge(nog, prot2gene, by=1, all.x=TRUE)
View(prot2gene)
####Parse data~~~~~~~~~~~~~~~####
###~Protein data~~~~~~~~~~~~~####
####~get longest prot only~~~####
all_prot = read.fasta(file = proteinFile)
## Add annotations from eggnog mapper to Cellenics DGE results
## by J.
####Housekeeping~~~~~~~~~~~~~####
rm(list=ls()) #clear the environment
setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) #set wd to Scripts folder
###~Specify data~~~~~~~~~~~~~####
dgeDir = "../gene_expression/by_cluster/"
eggnogFile = "../eggnog.tsv"
gene2protFile = "../gene2prot.txt"
proteinFile = "../protein.faa"
####Parse data~~~~~~~~~~~~~~~####
###~Gene to protein data~~~~~####
gene2prot = read.delim(gene2protFile, header = FALSE)
names(gene2prot) = c("SYMBOL","REFSEQ")
prot2gene = gene2prot[,c("REFSEQ","SYMBOL")]
###~Protein data~~~~~~~~~~~~~####
all_prot = read.fasta(file = proteinFile)
BiocManager::install("phylotools")
###~Protein data~~~~~~~~~~~~~####
all_prot = phylotools::read.fasta(file = proteinFile)
## Add annotations from eggnog mapper to Cellenics DGE results
## by J.
####Housekeeping~~~~~~~~~~~~~####
rm(list=ls()) #clear the environment
setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) #set wd to Scripts folder
###~Specify data~~~~~~~~~~~~~####
dgeDir = "../gene_expression/by_cluster/"
eggnogFile = "../eggnog.tsv"
gene2protFile = "../gene2prot.txt"
proteinFile = "../protein.faa"
####Parse data~~~~~~~~~~~~~~~####
###~Gene to protein data~~~~~####
gene2prot = read.delim(gene2protFile, header = FALSE)
names(gene2prot) = c("SYMBOL","REFSEQ")
prot2gene = gene2prot[,c("REFSEQ","SYMBOL")]
###~Protein data~~~~~~~~~~~~~####
all_prot = phylotools::read.fasta(file = proteinFile)
all_prot$seq.name = gsub(" .*","",all_prot$seq.name) #remove everything but prot ID
all_prot$length = str_count(all_prot$seq.text) #make new column with str length
BiocManager::install("stringr")
all_prot$length = stringr::str_count(all_prot$seq.text) #make new column with str length
prot_lengths = all_prot[,c(1,3)] #make new df with lengths and IDs only
prot_lengths = merge(prot_lengths, prot2gene, by=1, all.x=TRUE)
prot_lengths = prot_lengths[order(prot_lengths$SYMBOL, -abs(prot_lengths$length)),] #order df by SYMBOL and prot lengths
prot_longbois = prot_lengths[ !duplicated(prot_lengths$SYMBOL),] #get new df with only longest prots
###~Eggnog data~~~~~~~~~~~~~~####
nog = read.csv(eggnogFile, sep = "\t", header = FALSE)
###~~add symbol to eggnogg~~~####
nog = merge(nog, prot2gene, by=1, all.x=TRUE)
###~~get nogs for longbois~~~####
eggnog_longest = subset(nog, query %in% prot_longbois$seq.name)
###~Eggnog data~~~~~~~~~~~~~~####
nog = read.csv(eggnogFile, sep = "\t", header = FALSE)
colnames(nog) = nog[5,]
colnames(nog)[1] = "query" #remove hashtag from 1st column name
nog = read.csv(eggnogFile, sep = "\t", header = FALSE)
colnames(nog) = nog[5,] #set column names
colnames(nog)[1] = "query" #remove hashtag from 1st column name
nog = nog[c(1:5),] #remove misc header rows
nog = read.csv(eggnogFile, sep = "\t", header = FALSE)
colnames(nog) = nog[5,] #set column names
colnames(nog)[1] = "query" #remove hashtag from 1st column name
nog = nog[-c(1:5),] #remove misc header rows
###~~add symbol to eggnogg~~~####
nog = merge(nog, prot2gene, by=1, all.x=TRUE)
###~~get nogs for longbois~~~####
eggnog_longest = subset(nog, query %in% prot_longbois$seq.name)
row.names(nog) = eggnog_longest$SYMBOL #sets gene symbols as row names
View(eggnog_longest)
length(eggnog_longest$SYMBOL)
###~~get nogs for longbois~~~####
nog = subset(nog, query %in% prot_longbois$seq.name)
row.names(nog) = nog$SYMBOL #sets gene symbols as row names
###~~read DGE tables~~~~~~~~~####
dgeFiles = list.files(dgeDir)
DGE = lapply(dgeFiles, read.csv)
###~~read DGE tables~~~~~~~~~####
dgeFiles = list.files(dgeDir, full.names = TRUE)
DGE = lapply(dgeFiles, read.csv)
View(DGE)
dgeTables = lapply(dgeFiles, read.csv)
View(DGE)
View(DGE[[1]])
##~~Filter for DEGs~~~~~~~~~~####
function(geneTable) {
## Filter by logFC
geneTable = subset(geneTable, logFC > 1 | logFC < -1)
## Filter by p-adj
geneTable = subset(geneTable, p_val_adj < 0.1)
## return the gene table
return(geneTable)
}
##~~Filter for DEGs~~~~~~~~~~####
filter4DEGs = function(geneTable) {
## Filter by logFC
geneTable = subset(geneTable, logFC > 1 | logFC < -1)
## Filter by p-adj
geneTable = subset(geneTable, p_val_adj < 0.1)
## return the gene table
return(geneTable)
}
dgeTables = lapply(dgeTables, filter4DEGs)
dgeTables = lapply(dgeFiles, read.csv)
##~~Filter for DEGs~~~~~~~~~~####
filter4DEGs = function(geneTable) {
## Filter by logFC
geneTable = subset(geneTable, logFC > 1 | logFC < -1)
## Filter by p-adj
geneTable = subset(geneTable, p_val_adj < 0.1)
## return the gene table
return(geneTable)
}
dgeTables = lapply(dgeTables, filter4DEGs)
View(dgeTables)
View(dgeTables[[1]])
##~~Add eggnog annotation~~~~####
addEggnogAnnotation = function(df, x = nog) {
ncbi = row.names(x) #get ncbi gene names from nog df
eggnog = x$Preferred_name #get eggnog gene names from nog df
gene2gene = data.frame(ncbi,eggnog) #make a data frame with both sets of gene names
gene2gene$newnames = ifelse(
grepl("^LOC\\d+", gene2gene$ncbi) & !(gene2gene$eggnog %in% c("","0","NA","NaN","-")),
paste(sep = "", gene2gene$eggnog,"_",gene2gene$ncbi),
gene2gene$ncbi
) #make a list of new names, preferring the NCBI annotation for non "LOC..." genes
row.names(gene2gene) = gene2gene$ncbi
gene2gene = gene2gene[-c(1,2)] #leave just the new names indexed by the ncbi names
df = merge(df,gene2gene,by.x = "gene_names", by.y = 0) #merge the new names into the old df
row.names(df) = df$newnames #rename rows using the new names
df = subset(df, select=-c(Row.names,newnames)) #remove the old row names column
return(df)
}
dgeTablesRenamed = lapply(dgeTables, addEggnogAnnotation)
df = dgeTables[1]
ncbi = row.names(x) #get ncbi gene names from nog df
x = nog
ncbi = row.names(x) #get ncbi gene names from nog df
eggnog = x$Preferred_name #get eggnog gene names from nog df
gene2gene = data.frame(ncbi,eggnog) #make a data frame with both sets of gene names
gene2gene$newnames = ifelse(
grepl("^LOC\\d+", gene2gene$ncbi) & !(gene2gene$eggnog %in% c("","0","NA","NaN","-")),
paste(sep = "", gene2gene$eggnog,"_",gene2gene$ncbi),
gene2gene$ncbi
) #make a list of new names, preferring the NCBI annotation for non "LOC..." genes
row.names(gene2gene) = gene2gene$ncbi
gene2gene = gene2gene[-c(1,2)] #leave just the new names indexed by the ncbi names
df = merge(df,gene2gene,by.x = "gene_names", by.y = 0) #merge the new names into the old df
View(df)
row.names(df) = df$newnames #rename rows using the new names
df = subset(df, select=-newnames) #remove the old row names column
##~~Add eggnog annotation~~~~####
addEggnogAnnotation = function(df, x = nog) {
ncbi = row.names(x) #get ncbi gene names from nog df
eggnog = x$Preferred_name #get eggnog gene names from nog df
gene2gene = data.frame(ncbi,eggnog) #make a data frame with both sets of gene names
gene2gene$newnames = ifelse(
grepl("^LOC\\d+", gene2gene$ncbi) & !(gene2gene$eggnog %in% c("","0","NA","NaN","-")),
paste(sep = "", gene2gene$eggnog,"_",gene2gene$ncbi),
gene2gene$ncbi
) #make a list of new names, preferring the NCBI annotation for non "LOC..." genes
row.names(gene2gene) = gene2gene$ncbi
gene2gene = gene2gene[-c(1,2)] #leave just the new names indexed by the ncbi names
df = merge(df,gene2gene,by.x = "gene_names", by.y = 0) #merge the new names into the old df
row.names(df) = df$newnames #rename rows using the new names
df = subset(df, select=-newnames) #remove the old row names column
return(df)
}
dgeTablesRenamed = lapply(dgeTables, addEggnogAnnotation)
View(dgeTablesRenamed)
View(dgeTablesRenamed[[1]])
ncbi = row.names(x) #get ncbi gene names from nog df
eggnog = x$Preferred_name #get eggnog gene names from nog df
gene2gene = data.frame(ncbi,eggnog) #make a data frame with both sets of gene names
df = merge(df,gene2gene,by.x = "gene_names", by.y = 0) #merge the new names into the old df
row.names(df) = df$newnames #rename rows using the new names
df = subset(df, select=-newnames) #remove the old row names column
View(df)
dgeTablesRenamed[[1]]
df = dgeTables[1]
ncbi = row.names(x) #get ncbi gene names from nog df
eggnog = x$Preferred_name #get eggnog gene names from nog df
gene2gene = data.frame(ncbi,eggnog) #make a data frame with both sets of gene names
df = merge(df,gene2gene,by.x = "gene_names", by.y = 0) #merge the new names into the old df
row.names(df) = df$newnames #rename rows using the new names
View(df)
df = dgeTables[1]
View(df)
ncbi = row.names(x) #get ncbi gene names from nog df
eggnog = x$Preferred_name #get eggnog gene names from nog df
gene2gene = data.frame(ncbi,eggnog) #make a data frame with both sets of gene names
df = merge(df,gene2gene,by.x = "gene_names", by.y = 0) #merge the new names into the old df
dgeTables[1]
df = dgeTables[1]
View(df)
View(df)
View(df)
df = dgeTables[[1]
]
df = dgeTables[[1]]
ncbi = row.names(x) #get ncbi gene names from nog df
eggnog = x$Preferred_name #get eggnog gene names from nog df
gene2gene = data.frame(ncbi,eggnog) #make a data frame with both sets of gene names
df = merge(df,gene2gene,by.x = "gene_names", by.y = 0) #merge the new names into the old df
View(df)
df = dgeTables[[1]]
ncbi = row.names(x) #get ncbi gene names from nog df
eggnog = x$Preferred_name #get eggnog gene names from nog df
gene2gene = data.frame(ncbi,eggnog) #make a data frame with both sets of gene names
View(gene2gene)
df = merge(df,gene2gene,by.x = "gene_names", by.y = 1) #merge the new names into the old df
View(df)
dgeTablesRenamed = lapply(dgeTables, addEggnogAnnotation)
View(dgeTablesRenamed)
View(dgeTablesRenamed[[1]])
##~~Add eggnog annotation~~~~####
addEggnogAnnotation = function(df, x = nog) {
ncbi = row.names(x) #get ncbi gene names from nog df
eggnog = x$Preferred_name #get eggnog gene names from nog df
gene2gene = data.frame(ncbi,eggnog) #make a data frame with both sets of gene names
df = merge(df,gene2gene,by.x = "gene_names", by.y = 1) #merge the new names into the old df
return(df)
}
dgeTablesRenamed = lapply(dgeTables, addEggnogAnnotation)
View(dgeTablesRenamed[[1]])
##~~Tidy up gene tables~~~~~~####
tidyGeneTables = function(geneTable) {
## Rename rows
row.names(geneTable) = geneTable$gene_names
## Retain only useful columns
geneTable = geneTable[,c(10,2,3,6)]
return(geneTable)
}
dgeTablesTidied = lapply(dgeTablesRenamed, tidyGeneTables)
View(dgeTablesTidied)
View(dgeTablesTidied[[1]])
for (table in tidyGeneTables) {
write.csv(table, file = paste("Cluster_",cluster,".csv",sep = ""))
}
####Save out new tables~~~~~~####
cluster = 0
for (table in tidyGeneTables) {
write.csv(table, file = paste("Cluster_",cluster,".csv",sep = ""))
cluster = cluster+1
}
table = tidyGeneTables[[1]]
####Save out new tables~~~~~~####
cluster = 0
for (table in dgeTablesTidied) {
write.csv(table, file = paste("Cluster_",cluster,".csv",sep = ""))
cluster = cluster+1
}
####Save out new tables~~~~~~####
cluster = 0
for (table in dgeTablesTidied) {
write.csv(table, file = paste(dgeDir,"Cluster_",cluster,".csv",sep = ""))
cluster = cluster+1
}
source("~/Library/CloudStorage/Dropbox/Elmer Lab/Projects/Zootoca_WV_pregnancy_RNAseq/02_data/01_scRNAseq/scripts/add_eggnog_gene_names.R", echo=TRUE)
source("~/Library/CloudStorage/Dropbox/Elmer Lab/Projects/Zootoca_WV_pregnancy_RNAseq/02_data/01_scRNAseq/scripts/add_eggnog_gene_names.R", echo=TRUE)
####Housekeeping~~~~~~~~~~~~~####
rm(list=ls()) #clear the environment
setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) #set wd to Scripts folder
source("~/Library/CloudStorage/Dropbox/Elmer Lab/Projects/Zootoca_WV_pregnancy_RNAseq/02_data/01_scRNAseq/scripts/add_eggnog_gene_names.R", echo=TRUE)
dgeTablesRenamed = lapply(dgeTables, addEggnogAnnotation)
View(dgeTables)
View(dgeTables[[1]])
View(nog)
##~~Add eggnog annotation~~~~####
addEggnogAnnotation = function(df, x = nog) {
ncbi = row.names(x) #get ncbi gene names from nog df
eggnog = x$Preferred_name #get eggnog gene names from nog df
gene2gene = data.frame(ncbi,eggnog) #make a data frame with both sets of gene names
df = merge(df,gene2gene,by = 1) #merge the new names into the old df
return(df)
}
dgeTablesRenamed = lapply(dgeTables, addEggnogAnnotation)
View(dgeTablesRenamed)
View(dgeTablesRenamed[[1]])
df = dgeTablesRenamed[[1]]
x = nog
ncbi = row.names(x) #get ncbi gene names from nog df
eggnog = x$Preferred_name #get eggnog gene names from nog df
gene2gene = data.frame(ncbi,eggnog) #make a data frame with both sets of gene names
df = merge(df,gene2gene,by = 1) #merge the new names into the old df
View(df)
View(gene2gene)
View(df)
df = dgeTablesRenamed[[1]]
View(df)
source("~/Library/CloudStorage/Dropbox/Elmer Lab/Projects/Zootoca_WV_pregnancy_RNAseq/02_data/01_scRNAseq/scripts/add_eggnog_gene_names.R", echo=TRUE)
source("~/Library/CloudStorage/Dropbox/Elmer Lab/Projects/Zootoca_WV_pregnancy_RNAseq/02_data/01_scRNAseq/scripts/add_eggnog_gene_names.R", echo=TRUE)
source("~/Library/CloudStorage/Dropbox/Elmer Lab/Projects/Zootoca_WV_pregnancy_RNAseq/02_data/01_scRNAseq/scripts/add_eggnog_gene_names.R", echo=TRUE)
source("~/Library/CloudStorage/Dropbox/Elmer Lab/Projects/Zootoca_WV_pregnancy_RNAseq/02_data/01_scRNAseq/scripts/add_eggnog_gene_names.R", echo=TRUE)
source("~/Library/CloudStorage/Dropbox/Elmer Lab/Projects/Zootoca_WV_pregnancy_RNAseq/02_data/01_scRNAseq/scripts/add_eggnog_gene_names.R", echo=TRUE)
View(dgeTablesTidied)
View(dgeTablesRenamed)
source("~/Library/CloudStorage/Dropbox/Elmer Lab/Projects/Zootoca_WV_pregnancy_RNAseq/02_data/01_scRNAseq/scripts/add_eggnog_gene_names.R", echo=TRUE)
View(dgeTables)
dgeTables = lapply(dgeFiles, read.csv)
filter4DEGs(dgeTables[[4]])
View(dgeTables[[4]])
View(dgeTables[[1]])
View(dgeTables[[2]])
View(dgeTables[[3]])
View(dgeTables[[4]])
dgeFiles
cluster_order[1]
####Save out new tables~~~~~~####
cluster_order = c(0,1,10,2,3,4,5,6,7,8,9,10) #this is the order of the cluster files as read by R
cluster_order[1]
cluster_order[2]
cluster_order[3]
source("~/Library/CloudStorage/Dropbox/Elmer Lab/Projects/Zootoca_WV_pregnancy_RNAseq/02_data/01_scRNAseq/scripts/add_eggnog_gene_names.R", echo=TRUE)
source("~/Library/CloudStorage/Dropbox/Elmer Lab/Projects/Zootoca_WV_pregnancy_RNAseq/02_data/01_scRNAseq/scripts/add_eggnog_gene_names.R")
source("~/Library/CloudStorage/Dropbox/Elmer Lab/Projects/Zootoca_WV_pregnancy_RNAseq/02_data/01_scRNAseq/scripts/add_eggnog_gene_names_2.R", echo=TRUE)
source("~/Library/CloudStorage/Dropbox/Elmer Lab/Projects/Zootoca_WV_pregnancy_RNAseq/02_data/01_scRNAseq/scripts/add_eggnog_gene_names_2.R", echo=TRUE)
