edpclau / circadian-dynamics

A repository for analyzing circadian data
GNU General Public License v3.0
3 stars 1 forks source link

Export not working if only one individual is selected in the trikinectics workflow #14

Closed giannoma closed 4 years ago

giannoma commented 4 years ago

export_all(raw_data = dplyr::select(monitor_downsampled, datetime, IND 10), processed_data = list(monitor_processed$mean, monitor_processed$IND 10), rythm_analysis_data = monitor_analysis, autocorrelation = TRUE, new_dir_name = "2020_0730 Mon40_10")

image

edpclau commented 4 years ago

The export all function was assuming there would always be a "mean" individual. Now, it'll carry out a test instead of assuming existence.

giannoma commented 4 years ago

New error while it runs now it does not output the individual summary graph or the window plots.

edpclau commented 4 years ago

Try removing the "mean" individual since we're not using it.

export_all(raw_data = dplyr::select(monitor_downsampled, datetime, IND 10), processed_data = list(monitor_processed$IND 10), rythm_analysis_data = monitor_analysis, autocorrelation = TRUE, new_dir_name = "2020_0730 Mon40_10")

edpclau commented 4 years ago

Remember to remove the "mean" IND from the monitor_analysis

giannoma commented 4 years ago

Removing the mean still results in no individual files.

On Jul 30, 2020, at 9:58 AM, edpclau notifications@github.com wrote:

The export all function was assuming there would always be a "mean" individual. Now, it'll carry out a test instead of assuming existence.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/edpclau/circadian-dynamics/issues/14#issuecomment-666427018, or unsubscribe https://github.com/notifications/unsubscribe-auth/APVA2MVRL7PMDM3YNPLBOB3R6GDC7ANCNFSM4PN5KYUQ.

giannoma commented 4 years ago

Everything seems to run but the output files for the individuals are not made. here are the functions I am running.

monitor_processed <- multivariate_process_timeseries( df = monitor_downsampled, sampling_rate = '30 min', window_size_in_days =7, window_step_in_days = 1, detrend_data = TRUE, butterworth = TRUE, f_low=1/4, f_high=0, plot = TRUE )

monitor_analysis <- multivariate_rythm_analysis( list(monitor_processed$IND 10, monitor_processed$IND 27), sampling_rate = "30 min", alpha=0.000000001, autocorrelation = TRUE, lomb_scargle = TRUE, from = 16, to = 32, ofac =60) export_all(raw_data = dplyr::select(monitor_downsampled, datetime, IND 10,IND 27), processed_data = list(monitor_processed$IND 10,monitor_processed$IND 27), rythm_analysis_data = monitor_analysis, autocorrelation = TRUE, new_dir_name = "2020_07_31_Mon40_10")

image

also, I tried to run. export_plots_multivariate. this only made an empty folder called analysis.

export_plots_multivariate(processed_data =list(monitor_processed$IND 10,monitor_processed$IND 12), rythm_analysis_data = monitor_analysis, autocorrelation = TRUE, lomb_scargle = TRUE, cosinor_fit = c("lomb_scargle", "autocorrelation"), dir_choose_gui = TRUE, new_dir_name = "analysis")

edpclau commented 4 years ago

Fixed.

` monitor <- read_trikinetics() ld_data <- monitor[1:2] monitor_downsampled <- downsample_time_series(monitor[,c(1,3)], amount = 30, units = "minutes", method = "mean")

monitor_processed <- multivariate_process_timeseries( monitor_downsampled, sampling_rate = "30 min", butterworth = TRUE, detrend_data = TRUE, f_low = 1/2, f_high = 0 )

monitor_analysis <- multivariate_rythm_analysis( monitor_processed, sampling_rate = "30 min", from = 16, to = 32, ofac = 30, alpha = 0.0000000001, )

export_all(raw_data = monitor_downsampled, processed_data = list(monitor_processed$IND 1), rythm_analysis_data = list(monitor_analysis$IND 1), ld_data = ld_data, new_dir_name = "IND_1")

` image