Skip to content
Snippets Groups Projects
Commit 7ec8b896 authored by Sluijs, Lisa van's avatar Sluijs, Lisa van
Browse files

First steps normalisation and correlation checks. Filtered out samples that...

First steps normalisation and correlation checks. Filtered out samples that did not pass quality checks.
parent 124e764a
No related branches found
No related tags found
No related merge requests found
......@@ -4,33 +4,37 @@
###Set your work directory
setwd("H:/Nemawork/Projects/Orsay_transcriptomics")
workwd <- getwd()
Lisa <- FALSE
if(Lisa){
###Load pre-made functions
#uses
# transcriptomics functions https://git.wur.nl/mark_sterken/Transcriptomics.workbench
git_dir <- "H:/Nemawork/Projects_R_zone/Git"
source(paste(git_dir,"/Loader_git.R",sep=""))
###Set data locations
resources_dir <- paste(git_dir,"/../R_Resources/",sep="")
support_dir <- paste(git_dir,"/Orsay_transcriptomics/")
}
if(Lisa==FALSE){
###Load pre-made functions
#uses
# transcriptomics functions https://git.wur.nl/mark_sterken/Transcriptomics.workbench
git_dir <- "H:/Nemawork/Projects_R_zone/Git"
source(paste(git_dir,"/Loader_git.R",sep=""))
setwd("H:/Projects/OrV_transcriptomics/Analysis")
workwd <- getwd()
###Set data locations
resources_dir <- paste(git_dir,"/../R_Resources/",sep="")
support_dir <- paste(git_dir,"/Orsay_transcriptomics/Support_files",sep="")
}
Lisa <- TRUE
if(Lisa){
###Load pre-made functions
#uses
# transcriptomics functions https://git.wur.nl/mark_sterken/Transcriptomics.workbench
#git_dir <- "H:/R/Git"
C.ele.drive <- "H:/R/R_zone"
Organism <- "ele"
source(paste("H:/R/R_zone/R_functions/Loader_v3.r",sep=""))
###Set data locations
resources_dir <- "H:/R/R_zone/R_Resources/"
support_dir <- "H:/Projects/OrV_transcriptomics/Raw"
}
if(Lisa==FALSE){
###Load pre-made functions
#uses
# transcriptomics functions https://git.wur.nl/mark_sterken/Transcriptomics.workbench
git_dir <- "H:/Nemawork/Projects_R_zone/Git"
source(paste(git_dir,"/Loader_git.R",sep=""))
###Set data locations
resources_dir <- paste(git_dir,"/../R_Resources/",sep="")
support_dir <- paste(git_dir,"/Orsay_transcriptomics/Support_files",sep="")
}
################################################################################
......@@ -60,7 +64,8 @@ if(install){
library(openxlsx)
library("rmarkdown")
library(tidyverse)
library("ggplot2")
library("dplyr")
################################################################################
###Plotting theme, colours
......@@ -103,21 +108,28 @@ if(install){
colScale <- scale_colour_manual(name = "Treatment",values = myColors)
fillScale <- scale_fill_manual(name = "Treatment",values = myColors)
cols <- c("CB4856" = "#0072B2","N2"="#E69F00", "JU1580" = "#00CC33")
################################################################################
###Load targets, normalize & quality check
################################################################################
targets <- read.delim(paste(support_dir,"/Target_OrV.txt",sep="")); head(targets)
rg.norm <- agilent.limma.norm(targets=targets,array_dir=paste(workwd,"/../../Projects_data_reagents/MA_elegans/",sep=""),save_dir=paste(workwd,"/Normalized/",sep=""),filename="OrV")
#Removed 4 samples (2 arrays) with low quality before normalisation: sample number 539, 665, 554 and 607.
#Other samples that also have a low quality, but are not on the same array : 596, 728, 451, 470. They are manually filtered.
#Also the samples with low correlations in the heatmap: 727 and 474 are removed manually.
rg.norm <- agilent.limma.norm(targets=targets,array_dir=paste(workwd,"/../Raw/",sep=""),save_dir=paste(workwd,"/Normalized/",sep=""),filename="OrV", bad.arrays = c(20, 10, 31, 11))
rg.norm <- rg.norm[,-c(1, 9, 10, 26, 27, 28)]
trans.int <- transform.norm(rg.norm,save_dir=paste(workwd,"/Normalized/",sep=""),filename="OrV"); lapply(trans.int,head)
###Check quality
correlsums <- correlation.check(trans.int,filename="OrV",save_dir=paste(workwd,"/Normalized/",sep=""))
correlsums <- correlation.check(trans.int,filename="OrV",save_dir=paste(workwd,"/QC/",sep=""))
genes.check(trans.int,spot.id=Agilent.Ce.V2$gene_public_name,genes.to.check = c("gst-27","vit-1","vit-2","hsp-16.2","hsp-16.41","F26F2.1"),filename="OrV",save_dir=paste(workwd,"/Normalized/",sep=""))
genes.check(trans.int,spot.id=agi.id$Public_name,genes.to.check = c("gst-27","vit-1","vit-2","hsp-16.2","hsp-16.41","F26F2.1"),filename="OrV",save_dir=paste(workwd,"/GC/",sep=""))
colnames.sep <- ":"
......
No preview for this file type
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment