# write 'cycSimu4h2d', 'cycMouseLiverRNA' and 'cycYeastCycle' into three
# 'csv' files
# replace 'temp_indir' with your target directory
temp_indir <- tempdir()
cycSimu_infile <- file.path(temp_indir, "cycSimu4h2d.csv")
cycMouseLiverRNA_infile <- file.path(temp_indir, "cycMouseLiverRNA.csv")
cycYeastCycle_infile <- file.path(temp_indir, "cycYeastCycle.csv")
cycMouseLiverProtein_infile <- file.path(temp_indir, "cycMouseLiverProtein.txt")
write.csv(cycSimu4h2d, file=cycSimu_infile, row.names=FALSE)
write.csv(cycMouseLiverRNA, file=cycMouseLiverRNA_infile, row.names=FALSE)
write.csv(cycYeastCycle, file=cycYeastCycle_infile, row.names=FALSE)
# write 'cycMouseLiverProtein' into a 'txt' file
write.table(cycMouseLiverProtein, file=cycMouseLiverProtein_infile,
sep="\t", quote=FALSE, row.names=FALSE)
# replace 'temp_outdir' with your target directory
temp_outdir <- file.path(temp_indir, "example")
# create the "example" directory (if it doesn't exist)
if (!dir.exists(temp_outdir)) {
dir.create(temp_outdir, recursive = TRUE)
}
# analyze 'cycMouseLiverRNA.csv' with JTK_CYCLE
# this is masked for keeping the total running time within 10s required by CRAN check
# meta2d(infile=cycMouseLiverRNA_infile, filestyle="csv", outdir=temp_outdir,
# timepoints=18:65, cycMethod="JTK", outIntegration="noIntegration")
# analyze 'cycMouseLiverProtein.txt' with JTK_CYCLE and Lomb-Scargle
meta2d(infile=cycMouseLiverProtein_infile, filestyle="txt",
outdir=temp_outdir, timepoints=rep(seq(0, 45, by=3), each=3),
cycMethod=c("JTK","LS"), outIntegration="noIntegration")
# analyze 'cycSimu4h2d.csv' with ARSER, JTK_CYCLE and Lomb-Scargle and
# output integration file with analysis results from each method
meta2d(infile=cycSimu_infile, filestyle="csv", outdir=temp_outdir,
timepoints="Line1")
# analyze 'cycYeastCycle.csv' with ARSER, JTK_CYCLE and Lomb-Scargle to
# detect transcripts associated with cell cycle, and only output
# integration file
meta2d(infile=cycYeastCycle_infile,filestyle="csv", outdir=temp_outdir,
minper=80, maxper=96, timepoints=seq(2, 162, by=16),
outIntegration="onlyIntegration", ARSdefaultPer=85,
outRawData=TRUE)
# return analysis results instead of output them into files
cyc <- meta2d(infile=cycYeastCycle_infile,filestyle="csv",
minper=80, maxper=96, timepoints=seq(2, 162, by=16),
outputFile=FALSE, ARSdefaultPer=85, outRawData=TRUE)
head(cyc$ARS)
head(cyc$JTK)
head(cyc$LS)
head(cyc$meta)
Run the code above in your browser using DataLab