-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDBPFilecompilation.R
More file actions
53 lines (43 loc) · 1.91 KB
/
DBPFilecompilation.R
File metadata and controls
53 lines (43 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File for compiling all files into CM and DrEEMS
# 10aug2015
# Ashlee Jollymore's phd
#######################
## set working directory
rm(list = ls())
ls()
## necessary packages
library(reshape)
library(plyr)
library(gsubfn)
##########
#all.EEMS <- "/Users/ashlee/Documents/UBC Data/DBP_data/DBP_fluorescence/DBP_all_corrected"
all.EEMS <- "/Users/user/Dropbox/PhD Work/PhD Data/DBP_data/DBP_fluorescence/DBP_preandpost"
# CM directory
directoryCM <-"/Users/user/Documents/MATLAB/CorrectedEEMS"
#project <- "DBPall"
project <- "DBPprepost"
##########################################################################
# Compile all files and make graph headings file for running CM on all EEMS
setwd(all.EEMS)
filelist_EEMScor <- list.files(pattern = ".csv$")
ex.PARAFAC <- seq(240, 800, by = 2) #change if excitation wavlenegths are different
# call function
setwd("/Users/user/SpecScripts")
source("EEMCMtrimDBPall_function.R")
CMsave <- CMtrim(filedirectory = all.EEMS, filelist = filelist_EEMScor, project = project, exmin = "X240",
directoryCM = directoryCM, ex = ex.PARAFAC)
####################################################################################################################################
######### DOM Fluor
########
# Get files ready for DOMFLuor toolbox.
# Need .csv file for ex, em and one csv file containing all of the fluorescence EEMS compiled
# Use Save Dr EEMS function
# Inputs include the filelist, the project, the vector containing sample names, and the excitation wavelength min you want to trim to
# File cuts EEMs from ex min that you want to
setwd("/Users/user/SpecScripts")
source("EEMSDrEEMsaveDBPall_function.R")
ex.DrEEMS = seq(240, 800, by = 2)
DrEEM.data = DrEEM(filelist = filelist_EEMScor, project = project,
exmin = 'X240', filedirectory = all.EEMS, ex = ex.DrEEMS)
# check DrEEM.data. This is the compiled EEMS for DrEEM PARAFAC modelling
head(DrEEM.data)