l <- l + 1
foie.sel <- cbind(foie.sel,foie[,j])
colnames(foie.sel)[l] <- colnames(foie)[j]
}
}
pdf("E:/PROJETS/PParOmic/P2015-076PParOmiques_PParBetaJeune_OSCPar2_evolution.pdf",onefile=TRUE)
for (j in 3:ncol(foie.sel))
{
boxplot(foie.sel[,j] ~ foie.sel[,2], main=colnames(foie.sel)[j])
}
dev.off()
data <- read.table("E:/PROJETS/InfectEra/P2016-069_InfectEraAntibiotic_withinVariation_OPLSDAMREp1o1.csv",header=TRUE,sep=";",dec=",")
data.vip <- read.table("E:/PROJETS/InfectEra/P2016-069_InfectEraAntibiotic_withinVariation_OPLSDAMREp1o1_VIP.csv",header=TRUE,sep=";",dec=",")
buckets <- read.table("E:/PROJETS/InfectEra/P2016-069_InfectEraAntibiotic_withinVariation_OPLSDAMREp1o1_ListeBuckets.csv",header=TRUE,sep=";",dec=",")
buckets <- data.frame(unique(sort(buckets[,1]))) #,decreasing=TRUE
colnames(buckets) <- "Buckets"
vip.t1 <- merge(buckets,data.vip[,1:2],by.x=colnames(buckets)[1],by.y=colnames(data.vip)[1],all.x=TRUE)
data.vip <- vip.t1[order(vip.t1[,1],decreasing=TRUE),] #vip.t3
## SELECTION BUCKETS AVEC VIP > SEUIL
data.sel <- data[,1:2]
l <- 2
for (j in 1:ncol(data))
{
for (k in 1:nrow(buckets))
if (colnames(data)[j]==buckets[k,1])
{
l <- l + 1
data.sel <- cbind(data.sel,data[,j])
colnames(data.sel)[l] <- colnames(data)[j]
}
}
P2016-069_InfectEraAntibiotic_withinVariation_OPLSDAMREp1o1
data <- read.table("E:/PROJETS/InfectEra/P2016-069_InfectEraMRELevel_withinVariation_OPLSDAParp1o4.csv",header=TRUE,sep=";",dec=",")
data.vip <- read.table("E:/PROJETS/InfectEra/P2016-069_InfectEraMRELevel_withinVariation_OPLSDAParp1o4_VIP.csv",header=TRUE,sep=";",dec=",")
buckets <- read.table("E:/PROJETS/InfectEra/P2016-069_InfectEraMRELevel_withinVariation_OPLSDAParp1o4_ListeBuckets.csv",header=TRUE,sep=";",dec=",")
buckets <- data.frame(unique(sort(buckets[,1]))) #,decreasing=TRUE
colnames(buckets) <- "Buckets"
vip.t1 <- merge(buckets,data.vip[,1:2],by.x=colnames(buckets)[1],by.y=colnames(data.vip)[1],all.x=TRUE)
vip.t4 <- merge(vip.t3,data.vip[,7:8],by.x=colnames(vip.t2)[1],by.y=colnames(data.vip)[7],all.x=TRUE)
data.vip <- vip.t1[order(vip.t1[,1],decreasing=TRUE),] #vip.t3
## SELECTION BUCKETS AVEC VIP > SEUIL
data.sel <- data[,1:2]
l <- 2
for (j in 1:ncol(data))
{
for (k in 1:nrow(buckets))
if (colnames(data)[j]==buckets[k,1])
{
l <- l + 1
data.sel <- cbind(data.sel,data[,j])
colnames(data.sel)[l] <- colnames(data)[j]
}
}
# GROUPES
groupes <- unique(data.sel[,2])
p_quantitatives <- ncol(data.sel) - 2
# TEST KRUSKAL-WALLIS
data <- data.sel[,3:length(colnames(data.sel))]
pvalue <- rep(0,ncol(data))
pvalue.fdr <- rep(0,ncol(data))
for (j in 1:p_quantitatives)
{
# cat(paste(colnames(data)[j]," "))
# TEST GLOBAL
pvalue[j] <- kruskal.test(data[,j],data.sel[,2])$p.value
}
pvalue.fdr <- p.adjust(pvalue, method="fdr")
data.vip.pvalue <- cbind(data.vip,pvalue,pvalue.fdr)
write.table(data.vip.pvalue,"E:/PROJETS/InfectEra/P2016-069_InfectEraMRELevel_withinVariation_OPLSDAParp1o4_VIPSup1KWT.csv",sep=";",dec=".")
data <- read.table("E:/PROJETS/InfectEra/P2016-069_InfectEraMRELevel_withinVariation_OPLSDAParp1o4.csv",header=TRUE,sep=";",dec=",")
data.vip <- read.table("E:/PROJETS/InfectEra/P2016-069_InfectEraMRELevel_withinVariation_OPLSDAParp1o4_VIPKWT.csv",header=TRUE,sep=";",dec=",")
data.sel <- data[,1:2]
l <- 2
for (j in 1:ncol(data))
{
for (k in 1:nrow(data.vip))
if (colnames(data)[j]==data.vip[k,1])
{
l <- l + 1
data.sel <- cbind(data.sel,data[,j])
colnames(data.sel)[l] <- colnames(data)[j]
}
}
pdf("E:/PROJETS/InfectEra/P2016-069_InfectEraMRELevel_withinVariation_OPLSDAParp1o4_evolution.pdf",onefile=TRUE)
for (j in 3:ncol(data.sel))
{
boxplot(data.sel[,j] ~ data.sel[,2], main=colnames(data.sel)[j])
}
dev.off()
foie <- read.table("E:/PROJETS/PParOmic/P2015-076PParOmiques_PParBetaGW_OSCPar2.csv",header=TRUE,sep=";",dec=",")
foie.vip <- read.table("E:/PROJETS/PParOmic/P2015-076PParOmiques_PParBetaGW_OSCPar2_VIP.csv",header=TRUE,sep=";",dec=",")
foie.buckets <- read.table("E:/PROJETS/PParOmic/P2015-076PParOmiques_PParBetaGW_OSCPar2_ListeBuckets.csv",header=TRUE,sep=";",dec=",")
foie.buckets <- data.frame(unique(sort(foie.buckets[,1],decreasing=TRUE)))
colnames(foie.buckets) <- "Buckets"
vip.t1 <- merge(foie.buckets,foie.vip[,1:2],by.x=colnames(foie.buckets)[1],by.y=colnames(foie.vip)[1],all.x=TRUE)
vip.t2 <- merge(vip.t1,foie.vip[,3:4],by.x=colnames(vip.t1)[1],by.y=colnames(foie.vip)[3],all.x=TRUE)
foie.vip <- vip.t2[order(vip.t2[,1],decreasing=TRUE),]
foie.sel <- foie[,1:2]
l <- 2
for (j in 1:ncol(foie))
{
for (k in 1:nrow(foie.buckets))
if (colnames(foie)[j]==foie.buckets[k,1])
{
l <- l + 1
foie.sel <- cbind(foie.sel,foie[,j])
colnames(foie.sel)[l] <- colnames(foie)[j]
}
}
groupes <- unique(foie.sel[,2])
p_quantitatives <- ncol(foie.sel) - 2
data <- foie.sel[,3:length(colnames(foie.sel))]
pvalue <- rep(0,ncol(data))
pvalue.fdr <- rep(0,ncol(data))
for (j in 1:p_quantitatives)
{
pvalue[j] <- kruskal.test(data[,j],foie.sel[,2])$p.value
}
pvalue.fdr <- p.adjust(pvalue, method="fdr")
foie.vip.pvalue <- cbind(foie.vip,pvalue,pvalue.fdr)
write.table(foie.vip.pvalue,"E:/PROJETS/PParOmic/P2015-076PParOmiques_PParBetaGW_OSCPar2VIPSup1KWT.csv",sep=";",dec=".")
sink("E:/PROJETS/PParOmic/P2015-076PParOmiques_PParBetaGW_OSCPar2_kruskal2a2.txt",append=TRUE)
for (j in 1:p_quantitatives)
{
cat("Variable ")
cat(paste(colnames(data)[j],"\n"))
# COMPARAISON TRAITEMENTS 2 A 2
kruskal_wallis(data[,j],foie.sel[,2],0.05,0,3)
cat("\n")
}
sink()
foie <- read.table("E:/PROJETS/PParOmic/P2015-076PParOmiques_PParBetaGW_OSCPar2.csv",header=TRUE,sep=";",dec=",")
foie.vip <- read.table("E:/PROJETS/PParOmic/P2015-076PParOmiques_PParBetaGW_OSCPar2VIPKWT.csv",header=TRUE,sep=";",dec=",")
foie.sel <- foie[,1:2]
l <- 2
for (j in 1:ncol(foie))
{
for (k in 1:nrow(foie.vip))
if (colnames(foie)[j]==foie.vip[k,1])
{
l <- l + 1
foie.sel <- cbind(foie.sel,foie[,j])
colnames(foie.sel)[l] <- colnames(foie)[j]
}
}
pdf("E:/PROJETS/PParOmic/P2015-076PParOmiques_PParBetaGW_OSCPar2_evolution.pdf",onefile=TRUE)
for (j in 3:ncol(foie.sel))
{
boxplot(foie.sel[,j] ~ foie.sel[,2], main=colnames(foie.sel)[j])
}
dev.off()
offspring <- read.table("E:/PROJETS/BpaMhU/P2016-078_BpaMhu_OffspringTemoinBPA10_OSCPar2.csv",header=TRUE,sep=";",dec=",")
offspring.vip <- read.table("E:/PROJETS/BpaMhU/P2016-078_BpaMhu_OffspringTemoinBPA10_OSCPar2_VIP.csv",header=TRUE,sep=";",dec=",")
buckets <- read.table("E:/PROJETS/BpaMhU/P2016-078_BpaMhu_OffspringTemoinBPA10_OSCPar2_ListeBuckets.csv",header=TRUE,sep=";",dec=",")
buckets <- data.frame(unique(sort(buckets[,1]))) #,decreasing=TRUE
colnames(buckets) <- "Buckets"
vip.t1 <- merge(buckets,offspring.vip[,1:2],by.x=colnames(buckets)[1],by.y=colnames(offspring.vip)[1],all.x=TRUE)
vip.t2 <- merge(vip.t1,offspring.vip[,3:4],by.x=colnames(vip.t1)[1],by.y=colnames(offspring.vip)[3],all.x=TRUE)
offspring.vip <- vip.t2[order(vip.t2[,1],decreasing=TRUE),] #vip.t3
offspring.sel <- offspring[,1:2]
l <- 2
for (j in 1:ncol(offspring))
{
for (k in 1:nrow(buckets))
if (colnames(offspring)[j]==buckets[k,1])
{
l <- l + 1
offspring.sel <- cbind(offspring.sel,offspring[,j])
colnames(offspring.sel)[l] <- colnames(offspring)[j]
}
}
groupes <- unique(offspring.sel[,2])
p_quantitatives <- ncol(offspring.sel) - 2
# TEST KRUSKAL-WALLIS
data <- offspring.sel[,3:length(colnames(offspring.sel))]
pvalue <- rep(0,ncol(data))
pvalue.fdr <- rep(0,ncol(data))
for (j in 1:p_quantitatives)
{
# cat(paste(colnames(data)[j]," "))
# TEST GLOBAL
pvalue[j] <- kruskal.test(data[,j],offspring.sel[,2])$p.value
}
pvalue.fdr <- p.adjust(pvalue, method="fdr")
offspring.vip.pvalue <- cbind(offspring.vip,pvalue,pvalue.fdr)
write.table(offspring.vip.pvalue,"E:/PROJETS/BpaMhU/P2016-078_BpaMhu_OffspringTemoinBPA10_OSCPar2_VIPSup1KWT.csv",sep=";",dec=".")
old <- read.table("E:/NMR/MTBLS1_Bucketed_Old.csv",header=TRUE,sep=";",dec=",")
new <- read.table("E:/NMR/MTBLS1_Bucketed_New.csv",header=TRUE,sep=";",dec=",")
old <- read.table("E:/NMR/MTBLS1_Bucketed_Old.csv",header=TRUE,sep=";",dec=",")
new <- read.table("E:/NMR/MTBLS1_Bucketed_New.csv",header=TRUE,sep=";",dec=",")
new <- read.table("E:/NMR/MTBLS1_Bucketed_New.csv",header=TRUE,sep=";",dec=",")
i <- 1
plot(old[,i],type='l',col=2)
plot(1:ncold(old),old[,i],type='l',col=2)
plot(1:ncold(old),old[,i]
)
plot(1:ncol(old),old[,i])
plot(1:row(old),old[,i]
)
plot(1:nrow(old),old[,i])
plot(1:nrow(old),old[,i], type='l')
old <- read.table("E:/NMR/MTBLS1_Bucketed_Old.csv",header=TRUE,sep=";",dec=",")
old[,i]
i <- 2
plot(1:nrow(old),old[,i], type='l', col=2)
lines(new[,i], lty=2, col=3)
pdf("E:/NMR/MTBLS1_Bucketed_OldNew", onefile=TRUE)
for (i in 2:ncol(old))
{
plot(1:nrow(old),old[,i], type='l', col=2)
lines(new[,i], lty=2, col=3)
}
dev.off()
pdf("E:/NMR/MTBLS1_Bucketed_OldNew.pdf", onefile=TRUE)
for (i in 2:ncol(old))
{
plot(1:nrow(old),old[,i], type='l', col=2)
lines(new[,i], lty=2, col=3)
}
dev.off()
pdf("E:/NMR/MTBLS1_Bucketed_OldNew.pdf", onefile=TRUE)
for (i in 2:ncol(old))
{
plot(1:nrow(old),old[,i], type='l', col=2)
lines(new[,i], col=3)
}
dev.off()
old <- read.table("E:/NMR/MTBLS1_Bucketed_Old.csv",header=TRUE,sep=";",dec=",")
new <- read.table("E:/NMR/MTBLS1_Bucketed_New.csv",header=TRUE,sep=";",dec=",")
xmax <- max(nrow(old),nrow(new))
par(mrrow=c(2,1))
xmax <- max(nrow(old),nrow(new))
par(mfrow=c(2,1))
xmax <- max(nrow(old),nrow(new))
ymax <- max(old[,i],new[,i])
plot(1:xmax,old[,i], xlim=c(0,xmax), ylim=c(0,ymax), type='l', col=2)
plot(1:xmax,new[,i], xlim=c(0,xmax), ylim=c(0,ymax), type='l', col=2)
{
par(mfrow=c(2,1))
xmax <- max(nrow(old),nrow(new))
ymax <- max(old[,i],new[,i])
plot(1:xmax,old[,i], xlim=c(0,xmax), ylim=c(0,ymax), type='l', col=2)
plot(1:xmax,new[,i], xlim=c(0,xmax), ylim=c(0,ymax), type='l', col=2)
}
par(mfrow=c(2,1))
xmax <- max(nrow(old),nrow(new))
ymax <- max(old[,i],new[,i])
plot(1:nrow(old),old[,i], xlim=c(0,xmax), ylim=c(0,ymax), type='l', col=2)
plot(1:nrow(new),new[,i], xlim=c(0,xmax), ylim=c(0,ymax), type='l', col=2)
old <- read.table("E:/NMR/MusMusculusBPA025BPA0025_NMRBucketing_1.0.2.csv",header=TRUE,sep=";",dec=",")
new <- read.table("E:/NMR/MusMusculusBPA025BPA0025_NMRBucketing_2.0.1.csv",header=TRUE,sep=";",dec=",")
pdf("E:/NMR/MusMusculusBPA025BPA0025_NMRBucketing_1.0.2_2.0.1.pdf", onefile=TRUE)
for (i in 2:ncol(old))
{
par(mfrow=c(2,1))
xmax <- max(nrow(old),nrow(new))
ymax <- max(old[,i],new[,i])
plot(1:nrow(old),old[,i], xlim=c(0,xmax), ylim=c(0,ymax), type='l', col=2)
plot(1:nrow(new),new[,i], xlim=c(0,xmax), ylim=c(0,ymax), type='l', col=2)
}
dev.off()
old[,1]
old[1:10,1]
old <- read.table("E:/NMR/MusMusculusBPA025BPA0025_NMRBucketing_1.0.2.csv",header=TRUE,sep=";",dec=",")
old[1:10,1]
new[1:10,1]
source('//tls-tox-nas/home$/mtremblayfr/Mes documents/METABOHUB/WP3 Bioinfo/Galaxy/Brique Bucketing Normalisation Rmn/NMRBucketing_ToolShed_v2/NmrBucketing_script.R')
source('//tls-tox-nas/home$/mtremblayfr/Mes documents/METABOHUB/WP3 Bioinfo/Galaxy/GitHub/nmr_bucketing/galaxy/nmr_bucketing/NmrBucketing_script.R')
source('E:/NMR/Test/Bucketing/NmrBucketing_script20150107.R')
source('E:/NMR/Test/Bucketing/NmrBucketing_script20170306.R')
source('E:/NMR/Test/Bucketing/NmrBucketing_script20150107.R')
source('E:/NMR/Test/Bucketing/NmrBucketing_script20170306.R')
StudyDir <- "E:/PROJETS/Metabohub/Bruker/Tlse_BrainMice_Bpa0025Bpa025/"
upper <- 9.5
lower <- 0.8
bucket.width <- 0.01
exclusion <- TRUE
exclusion.zone <- list(c(5.1,4.5))
graphique <- "Overlay"
source('E:/NMR/drawSpec.R')
library(pracma)
source('E:/NMR/Test/Bucketing/NmrBucketing_script20150107.R')
source('E:/NMR/Test/Bucketing/nmr_bucketing_20170414/NmrBucketing_script20170414.R')
source('E:/NMR/drawSpec.R')
StudyDir <- "E:/NMR/Test/Bucketing/MTBLS1/"
upper <- 9.3
library(pracma)
library(pracma)
upper <- 9.3
lower <- 0.8
bucket.width <- 0.01
exclusion <- TRUE
exclusion.zone <- list(c(6.01,4.24), c(4.0,3.19))
graphique <- "Overlay"
nomFichier20150107 <- "E:/NMR/Test/Bucketing/MTBLS1_20150107.pdf"
dataBucketed_20150107 <- NmrBucketing20150107(directory=StudyDir, leftBorder=upper, rightBorder=lower,
bucketSize=bucket.width, exclusionZones=exclusion,
exclusionZonesBorders=exclusion.zone, graph=graphique,
nomFichier=nomFichier20150107)
bucketedMatrix_20150107 <- dataBucketed_20150107[[1]]
spectra_20150107 <- t(bucketedMatrix_20150107[,1])
drawSpec(spectra_20150107,xlab="", ylab="Intensity", main="1.0.2")
fileType <- "zip"
nomFichier20170414 <- "E:/NMR/Test/Bucketing/MTBLS1_20170414.pdf"
dataBucketed_20170414 <- NmrBucketing20170414(fileType=fileType, fileName=StudyDir, leftBorder=upper,
rightBorder=lower, bucketSize=bucket.width, exclusionZones=exclusion,
exclusionZonesBorders=exclusion.zone, graph=graphique,
nomFichier=nomFichier20170414)
bucketedMatrix_20170414 <- dataBucketed_20170414[[1]]
spectra_20170414 <- t(bucketedMatrix_20170414[,1])
drawSpec(spectra_20170414,xlab="", ylab="Intensity", main="2.0.1")
mtbls1 <- rbind(spectra_20150107, spectra_20170414)
drawSpec(mtbls1,xlab="", ylab="Intensity", main="")
ppm_20170414 <- dataBucketed_20170414[[4]]
ppm_20170414 <- round(ppm_20170414,2)
excludedZone <- NULL
for (c in 1:length(exclusion.zone))
{
excludedZone <- c(excludedZone,exclusion.zone[[c]])
excludedZone <- sort(excludedZone)
}
nbZones <- length(excludedZone)/2
n <- length(excludedZone)
spectra <- data.frame(t(bucketedMatrix_20170414))
drawSpec(spectra,xlab="", ylab="Intensity", main="")
if (nbZones != 0)
{
BInf <- excludedZone[n]
if (round(BInf) == BInf)
{
BInf <- BInf+0.01
}
print(BInf)
spectra <- data.frame(t(bucketedMatrix_20170414[1:(which(ppm_20170414 == BInf)[[1]]),]))
drawSpec(spectra,xlab="", ylab="Intensity", main="")
n <- n - 1
while (n >= nbZones & nbZones > 1)
{
BInf <- excludedZone[n-1]
if (round(BInf) == BInf)
{
BInf <- BInf+0.01
}
print(BInf)
spectra <- data.frame(t(bucketedMatrix_20170414[(which(ppm_20170414 == excludedZone[n])[[1]]):(which(ppm_20170414 == BInf)[[1]]),]))
drawSpec(spectra,xlab="", ylab="Intensity", main="")
n <- n - 2
}
spectra <- data.frame(t(bucketedMatrix_20170414[(which(ppm_20170414 == excludedZone[1])[[1]]):nrow(bucketedMatrix_20170414),]))
drawSpec(spectra,xlab="", ylab="Intensity", main="")
}
ppm_20170414 <- dataBucketed_20170414[[4]]
ppm_20170414 <- round(ppm_20170414,2)
excludedZone <- NULL
exclusion.zone <- list(c(6.0,4.24), c(4.0,3.19))
for (c in 1:length(exclusion.zone))
{
excludedZone <- c(excludedZone,exclusion.zone[[c]])
excludedZone <- sort(excludedZone)
}
nbZones <- length(excludedZone)/2
n <- length(excludedZone)
spectra <- data.frame(t(bucketedMatrix_20170414))
drawSpec(spectra,xlab="", ylab="Intensity", main="")
nbZones
BInf <- excludedZone[n]
if (round(BInf) == BInf)
{
BInf <- BInf+0.01
}
print(BInf)
spectra <- data.frame(t(bucketedMatrix_20170414[1:(which(ppm_20170414 == BInf)[[1]]),]))
drawSpec(spectra,xlab="", ylab="Intensity", main="")
n <- n - 1
n
BInf <- excludedZone[n-1]
if (round(BInf) == BInf)
{
BInf <- BInf+0.01
}
print(BInf)
print(BInf)
spectra <- data.frame(t(bucketedMatrix_20170414[(which(ppm_20170414 == excludedZone[n])[[1]]):(which(ppm_20170414 == BInf)[[1]]),]))
drawSpec(spectra,xlab="", ylab="Intensity", main="")
n <- n - 2
n
spectra <- data.frame(t(bucketedMatrix_20170414[(which(ppm_20170414 == excludedZone[1])[[1]]):nrow(bucketedMatrix_20170414),]))
drawSpec(spectra,xlab="", ylab="Intensity", main="")
exclusion.zone <- list(c(6.0,4.24), c(3.99,3.19))
ppm_20170414 <- dataBucketed_20170414[[4]]
ppm_20170414 <- round(ppm_20170414,2)
excludedZone <- NULL
for (c in 1:length(exclusion.zone))
{
excludedZone <- c(excludedZone,exclusion.zone[[c]])
excludedZone <- sort(excludedZone)
}
nbZones <- length(excludedZone)/2
n <- length(excludedZone)
excludedZone
nbZones
n
spectra <- data.frame(t(bucketedMatrix_20170414))
drawSpec(spectra,xlab="", ylab="Intensity", main="")
BInf <- excludedZone[n]
if (round(BInf) == BInf)
ppm_20170414 <- round(ppm_20170414,2)
if (round(BInf) == BInf)
{
BInf <- BInf+0.01
}
print(BInf)
spectra <- data.frame(t(bucketedMatrix_20170414[1:(which(ppm_20170414 == BInf)[[1]]),]))
drawSpec(spectra,xlab="", ylab="Intensity", main="")
n <- n - 1
n
BInf <- excludedZone[n-1]
nf <- BInf+0.01
}
if (round(BInf) == BInf)
{
BInf <- BInf+0.01
}
print(BInf)
spectra <- data.frame(t(bucketedMatrix_20170414[(which(ppm_20170414 == excludedZone[n])[[1]]):(which(ppm_20170414 == BInf)[[1]]),]))
round(BInf)
BInf <- excludedZone[n-1]
BInf
round(BInf) == BInf
BInf <- excludedZone[n-1]
if (round(BInf) > BInf)
{
BInf <- BInf+0.01
}
print(BInf)
spectra <- data.frame(t(bucketedMatrix_20170414[(which(ppm_20170414 == excludedZone[n])[[1]]):(which(ppm_20170414 == BInf)[[1]]),]))
ppm_20170414
source('E:/NMR/Test/Bucketing/NmrBucketing_debug_MTBLS1.R')
source('E:/NMR/Test/Bucketing/nmr_bucketing_20170414/NmrBucketing_script20170414.R')
fileType <- "zip"
nomFichier20170414 <- "E:/NMR/Test/Bucketing/MTBLS1_20170414.pdf"
dataBucketed_20170414 <- NmrBucketing20170414(fileType=fileType, fileName=StudyDir, leftBorder=upper,
rightBorder=lower, bucketSize=bucket.width, exclusionZones=exclusion,
exclusionZonesBorders=exclusion.zone, graph=graphique,
nomFichier=nomFichier20170414)
dataBucketed_20170414[[4]]
dataBucketed_20170414 <- NmrBucketing20170414(fileType=fileType, fileName=StudyDir, leftBorder=upper,
rightBorder=lower, bucketSize=bucket.width, exclusionZones=exclusion,
exclusionZonesBorders=exclusion.zone, graph=graphique,
nomFichier=nomFichier20170414)
source('E:/NMR/Test/Bucketing/nmr_bucketing_20170414/NmrBucketing_script20170414.R')
dataBucketed_20170414 <- NmrBucketing20170414(fileType=fileType, fileName=StudyDir, leftBorder=upper,
rightBorder=lower, bucketSize=bucket.width, exclusionZones=exclusion,
exclusionZonesBorders=exclusion.zone, graph=graphique,
nomFichier=nomFichier20170414)
dataBucketed_20170414[[4]]
exclusion.zone <- list(c(6.0,4.24), c(3.99,3.19))
ppm_20170414 <- dataBucketed_20170414[[4]]
ppm_20170414 <- round(ppm_20170414,2)
excludedZone <- NULL
for (c in 1:length(exclusion.zone))
{
excludedZone <- c(excludedZone,exclusion.zone[[c]])
excludedZone <- sort(excludedZone)
}
nbZones <- length(excludedZone)/2
n <- length(excludedZone)
nbZones
n
BInf <- excludedZone[n]
if (round(BInf) == BInf)
{
BInf <- BInf+0.01
}
print(BInf)
spectra <- data.frame(t(bucketedMatrix_20170414[1:(which(ppm_20170414 == BInf)[[1]]),]))
drawSpec(spectra,xlab="", ylab="Intensity", main="")
spectra <- data.frame(t(bucketedMatrix_20170414[1:(which(ppm_20170414 == excludedZone[n])[[1]]),]))
ppm_20170414
ppm_20170414[1000:1500]
ppm_20170414[2000:3500]
ppm_20170414[5000:500]
ppm_20170414[5000:5500]
ppm_20170414[6500:7500]
ppm_20170414[10000:11500]
n
excludedZone[n]
which(ppm_20170414 == excludedZone[n])
(which(ppm_20170414 == excludedZone[n])[[1]]
)
spectra <- data.frame(t(bucketedMatrix_20170414[1:(which(ppm_20170414 == excludedZone[n])[[1]]),]))
spectra <- data.frame(t(bucketedMatrix_20170414[1:10790,]))
print(f.bucket)
source('E:/NMR/Test/Bucketing/nmr_bucketing_20170414/NmrBucketing_script20170414.R')
source('E:/NMR/Test/Bucketing/nmr_bucketing_20170414/NmrBucketing_script20170414.R')
fileType <- "zip"
nomFichier20170414 <- "E:/NMR/Test/Bucketing/MTBLS1_20170414.pdf"
dataBucketed_20170414 <- NmrBucketing20170414(fileType=fileType, fileName=StudyDir, leftBorder=upper,
rightBorder=lower, bucketSize=bucket.width, exclusionZones=exclusion,
exclusionZonesBorders=exclusion.zone, graph=graphique,
nomFichier=nomFichier20170414)
source('E:/NMR/Test/Bucketing/nmr_bucketing_20170414/NmrBucketing_script20170414.R')
dataBucketed_20170414 <- NmrBucketing20170414(fileType=fileType, fileName=StudyDir, leftBorder=upper,
rightBorder=lower, bucketSize=bucket.width, exclusionZones=exclusion,
exclusionZonesBorders=exclusion.zone, graph=graphique,
nomFichier=nomFichier20170414)
source('E:/NMR/Test/Bucketing/nmr_bucketing_20170414/NmrBucketing_script20170414.R')
dataBucketed_20170414 <- NmrBucketing20170414(fileType=fileType, fileName=StudyDir, leftBorder=upper,
rightBorder=lower, bucketSize=bucket.width, exclusionZones=exclusion,
exclusionZonesBorders=exclusion.zone, graph=graphique,
nomFichier=nomFichier20170414)
source('E:/NMR/Test/Bucketing/NmrBucketing_debug_MTBLS1.R')
