meta2d: Detect rhythmic signals from time-series datasets with...

Description Usage Arguments Details Value References Examples

Description

This is a function that incorporates ARSER, JTK_CYCLE and Lomb-Scargle to detect rhythmic signals from time-series datasets.

Usage

1
2
3
4
5
6
meta2d(infile, outdir = "cirout", filestyle, timepoints, minper = 20,
  maxper = 28, cirMethod = c("ARS", "JTK", "LS"),
  analysisStrategy = "auto", outIntegrationFile = "both",
  adjustedPhase = "predictedPer", combinePvalue = "fisher",
  weightedPerPha = FALSE, ARSmle = "auto", ARSdefaultPer = 24,
  outRawExpValue = FALSE, outSymbol = "")

Arguments

infile

a character string. The name of input file containing time-series data.

outdir

a character string. The name of directory used to store output files.

filestyle

a character vector(length 1 or 3). The data format of input file, must be "txt", or "csv", or a character vector containing field separator character(sep), quoting character (quote), and the character used for decimal points(dec, for details see read.table).

timepoints

a numeric vector corresponding to sampling time points of input time-series data; if sampling time points are in the first line of input file, it could be set as a character sting-"Line1".

minper

a numeric value. The minimum period length of interested rhythms. The default is 20 for circadian rhythms.

maxper

a numeric value. The maximum period length of interested rhythms. The default is 28 for circadian rhythms.

cirMethod

a character vector(length 1 or 2 or 3). User-defined methods for detecting rhythmic signals, must be selected as any one, any two or all three methods(default) from "ARS"(ARSER), "JTK"(JTK_CYCLE) and "LS"(Lomb-Scargle).

analysisStrategy

a character string. The strategy used to select proper methods from cirMethod for analyzing input time-series data, must be "auto"(default), or "selfUSE". See Details part for more information.

outIntegrationFile

a character string. This parameter controls what kinds of analysis results will be outputted, must be one of "both" (default), "onlyIntegration"(only output integration file), or "noIntegration"(not output integration file).

adjustedPhase

a character string. The method used to adjust original phase calculated by each method in integration file, must be one of "predictedPer"(adjust phase with predicted period length) or "notAdjusted"(not adjust phase).

combinePvalue

a character string. The method used to integrate multiple p-values, must be one of "bonferroni"(Bonferroni correction), or "fisher"(Fisher's method).

weightedPerPha

logical. If TRUE, weighted scores based on p-value given by each method will be used to calculate the integrated period length and phase.

ARSmle

a character string. The stragegy of using MLE method in ar fit of "ARS", must be one of "auto"(use MLE depending the number of time points), "mle" (always use MLE), or "nomle"(never use MLE).

ARSdefaultPer

a numeric value. The expected period length of interested rhythm, which is a necessary parameter for ARS. The default is 24(for circadian rhythms). Set it to another proper numeric value for other rhythms.

outRawExpValue

logical. If TRUE, time-series data will be added in the output files.

outSymbol

a character string. A common prefix exists in the names of output files.

Details

ARSER(Yang, 2010), JTK_CYCLE( Hughes, 2010), and Lomb-Scargle(Glynn, 2006) are three popular methods of detecting rhythmic signals. ARS can not analyze unevenly sampled datasets, or enenly sampled datasets but with missing values, or with replicate samples, or with non-integer sampling interval. JTK is not suitable to analyze unevenly sampled datasets or evenly sampled datasets but with non-integer sampling interval. If set analysisStrategy as "auto"(default), meta2d will automatically select proper method from cirMethod for each input dataset. If the user clearly know that the dataset could be analyzed by each method defined by cirMethod and do not hope to output integrated values, analysisStrategy can be set as "selfUSE".

ARS used here is translated from its python version which always uses "yule-walker", "burg", and "mle" methods(see ar) to fit autoregressive models to time-series data. Fitting by "mle" will be very slow for datasets with many time points. If ARSmle = "auto" is used, meta2d will only include "mle" when number of time points is smaller than 24. In addition, one evalution work(Wu, 2014) indicates that ARS shows relative high false positive rate in analyzing high-resolution datasets (1h/2days and 2h/2days). JTK(version 1) used here is minorly modified for easing its p-value calculation problem in analyzing datasets with missing values(reporting more significant p-values). MetaCycle will add a new version of JTK(may provide a better solution for this problem) when it is released.

The power of detecting rhythmic signals for an algorithm is associated with the nature of data and interested periodic pattern(Deckard, 2013), which indicates that integrating analysis results from multiple methods may be helpful to rhythmic detection. For integrating p-values, Bonferroni correction("bonferroni") and Fisher's method( "fisher") (Fisher, 1925; implementation code from MADAM) could be selected, and "bonferroni" is usually more conservative than "fisher". The integrated period is arithmetic mean of multiple periods. For integrating phase, meta2d takes use of mean of circular quantities. Integrated period and phase is further used to calculate the baseline value and amplitude through fitting a constructed periodic model.

Phases given by JTK and LS need to be adjusted with their predicted period (adjustedPhase = "predictedPer") before integration. If adjustedPhas = "notAdjusted" is selected, no integrated phase will be calculated. If set weightedPerPha as TRUE, weighted scores will be used in averaging periods and phases. Weighted scores for one method are based on all its reported p-values, which means a weighted score assigned to any one profile will be affected by all other profiles. It is always a problem of averaging phases with quite different period lengths(eg. averaging two phases with 16-hours' and 30-hours' period length). Currently, setting minper, maxper and ARSdefaultPer to a same value may be the only way of completely eliminating such problem.

This function is originally aimed to analyze large scale perodic data( eg. circadian transcriptome data) without individual information. Please pay attention to data format of input file(see Examples part). Except the first column and first row, others are time-series experimental values(setting missing values as NA).

Value

meta2d will store analysis results in different files under outdir instead of returning them as objects. Files named with "ARSresult", "JTKresult" and "LSreult" store analysis results from ARS, JTK and LS respectively. The file named with "CirOmicsresult" is integration file, and it stores integrated values in columns with a common name-"CirOmics". The integration file also contains p-value, FDR value, period, phase(adjusted phase if adjustedPhase = "predictedPer") and amplitude values calculated by each method.

References

Yang R. and Su Z. (2010). Analyzing circadian expression data by harmonic regression based on autoregressive spectral estimation. Bioinformatics, 26(12), i168–i174.

Hughes M. E., Hogenesch J. B. and Kornacker K. (2010). JTK_CYCLE: an efficient nonparametric algorithm for detecting rhythmic components in genome-scale data sets. Journal of Biological Rhythms, 25(5), 372–380.

Glynn E. F., Chen J. and Mushegian A. R. (2006). Detecting periodic patterns in unevenly spaced gene expression time series using Lomb-Scargle periodograms. Bioinformatics, 22(3), 310–316.

Wu G., Zhu J., Yu J., Zhou L., Huang J. Z. and Zhang Z. (2014). Evaluation of five methods for genome-wide circadian gene identification. Journal of Biological Rhythms, 29(4), 231–242.

Deckard A., Anafi R. C., Hogenesch J. B., Haase S.B. and Harer J. (2013). Design and analysis of large-scale biological rhythm studies: a comparison of algorithms for detecting periodic signals in biological data. Bioinformatics, 29(24), 3174–3180.

Fisher, R.A. (1925). Statistical methods for research workers. Oliver and Boyd (Edinburgh).

Kugler K. G., Mueller L.A. and Graber A. (2010). MADAM - an open source toolbox for meta-analysis. Source Code for Biology and Medicine, 5, 3.

Examples

 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
# write 'cycSimu4h2d', 'cycMouseLiverRNA' and 'cycYeastCycle' into three
# 'csv' files
write.csv(cycSimu4h2d, file="cycSimu4h2d.csv", row.names=FALSE)
write.csv(cycMouseLiverRNA, file="cycMouseLiverRNA.csv", row.names=FALSE)
write.csv(cycYeastCycle, file="cycYeastCycle.csv", row.names=FALSE)

# write 'cycMouseLiverProtein' into a 'txt' file
write.table(cycMouseLiverProtein, file="cycMouseLiverProtein.txt",
  sep="\t", quote=FALSE, row.names=FALSE)

# analyze 'cycMouseLiverRNA.csv' with JTK_CYCLE
meta2d(infile="cycMouseLiverRNA.csv", filestyle="csv", outdir="example",
  timepoints=18:65, cirMethod="JTK", outIntegrationFile="noIntegration")

# analyze 'cycMouseLiverProtein.txt' with JTK_CYCLE and Lomb-Scargle
meta2d(infile="cycMouseLiverProtein.txt", filestyle="txt",
  outdir="example", timepoints=rep(seq(0, 45, by=3), each=3),
  cirMethod=c("JTK","LS"), outIntegrationFile="noIntegration")

# analyze 'cycSimu4h2d.csv' with ARSER, JTK_CYCLE and Lomb-Scargle and
# output integration file with analysis results from each method
meta2d(infile="cycSimu4h2d.csv", filestyle="csv", outdir="example",
  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.csv",filestyle="csv", outdir="example",
  minper=80, maxper=96, timepoints=seq(2, 162, by=16),
  outIntegrationFile="onlyIntegration", ARSdefaultPer=85,
  outRawExpValue=TRUE)

gangwug/MetaCycleV100 documentation built on May 16, 2019, 5:37 p.m.