part6 output

177 views
Skip to first unread message

Anne Backes

unread,
Jan 16, 2025, 9:24:57 AM1/16/25
to R package GGIR

Hi all,

We are currently rerunning some analyses to test the new part6 functionality in GGIR, as described on the GitHub page.

In this context, we noticed that certain components, such as ‘part6DFA’, are not being exported (SSP and ABI variables). Could this be because this feature is still under development? If so, do you have any information on when it might become publicly available? Alternatively, is there maybe something else that needs to be adjusted besides ‘part6DFA = TRUE’?

Additionally, we observed a difference between the cosinor variables exported in part2 and those exported in part6. Is this because part6 utilises the ‘part6Window’ (what is the default value?), while part2 uses the window defined by 'strategy'? Furthermore, we noticed that the cosinorIS and cosinorIV variables are exclusively exported in part2 (for part6 they are in the RData file but not in the csv).

Thanks in advance!

Best,

Anne

Vincent van Hees

unread,
Jan 20, 2025, 3:00:56 PM1/20/25
to Anne Backes, R package GGIR
Hi Anne,

I think answers to most of your questions can be found in the documentation:
please let me know which part is not clear.

I am getting all output variables when I specify:
partCR = TRUE,
part6DFA = TRUE,

for part6 they are in the RData file but not in the csv
I cannot see them. Please be specific about the RData file object you found them in.
Also, why would you want another IV and IS to be reported in part 6, doesn't that duplicate what is already in part 2?

Thanks,
Vincent
--
You received this message because you are subscribed to the Google Groups "R package GGIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to RpackageGGIR...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/RpackageGGIR/44886311-556c-4999-8ace-30dbaef0a4a4n%40googlegroups.com.

Anne Backes

unread,
Jan 21, 2025, 5:11:45 AM1/21/25
to R package GGIR
Hi Vincent,

Thank you for your response.

I have thoroughly reviewed the documentation and made multiple adjustments to the shell script. However, the variables related to DFA (SSP, ABI) are still not being exported. The fragmentation variables are exported to part5, the cosinor variables to part2 and part6, only the DFA variables are missing. Please find enclosed a copy of the shell script used.

Regarding the IV and IS variables, the need for their inclusion in part6 depends on the clarification regarding the difference in results between part6 and part2. If the two parts use different windows, it would be helpful to include IV and IS in part6 as well. Currently, these variables are calculated (as they can be found in the RData file under meta > ms6.out) but are not added to the corresponding CSV file. It seems they are simply not being exported to the CSV.

Thank you in advance!
Best regards,
Anne

GGIR_shell_script_example.R

Jan Dygryn

unread,
Jan 22, 2025, 12:05:21 PM1/22/25
to Anne Backes, R package GGIR

Hi Anne and Vincent,

I downloaded Anne’s shell script and ran it on a few of my own files, and everything worked as expected. In the part6_summary file, I can see IS, IV, phi, along with the SSP and ABI metrics. I processed both .gt3x and then .cwa files.

I assume you’re using GGIR version 3.1-6 or 3.1-7. Have you tried (after "multiple adjustments" of your script)  re-running (mode 1:6) the analysis in a different Output folder on just a 1 file? Sometimes it helps.

All the best,

Jan Dygrýn


út 21. 1. 2025 v 11:11 odesílatel Anne Backes <backe...@hotmail.com> napsal:

Vincent van Hees

unread,
Jan 22, 2025, 12:36:35 PM1/22/25
to Jan Dygryn, Anne Backes, R package GGIR
Thanks Jan for confirming,

Anne - You may need to set overwrite = TRUE and if you have been adding and removing  parameters to your R script consider deleting config.csv to avoid that previously specified non-default parameter values affect your analysis as discussed here: https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html#parameter-extraction-order.

Part 6 output parameters are not documented in https://wadpac.github.io/GGIR/articles/GGIRoutput.html yet, it is on my to do list. However, I hope that most variables names are clear from the discussion in https://wadpac.github.io/GGIR/articles/chapter13_CircadianRhythm.html

Regarding difference between part 2 and 6:
  • Part 2 circadian rhythm analysis tries to use every valid data point in the recording. This is not ideal as it also can reflect incomplete days which makes it inconsistent with other parts of GGIR where we are more strict about inclusion/exclusion of valid days. It is not by definition wrong, but when comparing physical activity estimates with CR estimates it kind of helps to know that the same part of the time series was used.
  • Part 6 focuses on the time window as specified with parameter part6Window to help align with the subsegment of the recording as used for part 5 analysis, and it omits days that are considered invalid.
Sorry, I now see indeed that this was not part of the documentation. I will add this.

Thanks,

Vincent

Anne Backes

unread,
Feb 11, 2025, 5:20:41 AM2/11/25
to R package GGIR

Dear Vincent, dear Jan,

Thank you very much for your help - it works now!

However, we noticed that part5 produces unexpected results for some fragmentation metrics, particularly alpha, x0.5 and W0.5. Both alpha and x0.5 seem lower than expected and W0.5 is nearly always 1, which appears unrealistic.

Do you have any insights into what might be influencing these results?

Thanks in advance for your help!

Best,

Anne

Vincent van Hees

unread,
Feb 17, 2025, 12:00:13 PM2/17/25
to Anne Backes, R package GGIR
Dear Anne,

It sounds like this is a new question unrelated to the original focus of this thread. Please split questions/problems in separate threads to life easier for me and others to navigate all the messages in the google group.

In relation to your question:
  • Explore whether other GGIR output in relation to that recording may explain the values you get. For example, time spent in intensity levels and the amount of valid data used.
  • If you can pinpoint a mistake in the calculation then I am happy to have a quick look.

Needless to say that if you want me to investigate it for you then I am happy to do this as a paid consultancy.

Best wishes,

Vincent

Anne Backes

unread,
Feb 19, 2025, 5:08:13 AM2/19/25
to R package GGIR

Dear Vincent,

I noticed that W0.5 is consistently 1 for all 1080 participants, suggesting that the issue is not related to the input data. Instead, I believe the unexpected results are related to the definition of xmin.

In the g.fragmentation function, xmin is set to 1 (GGIR/R/g.fragmentation.R at master · wadpac/GGIR · GitHub line 4), which makes sense, as 1 (i.e., 5s) is the shortest recordable (though not necessarily observed) bout length. However, in the g.part5_analyseSegment function, xmin is overwritten as 60/ws3new, resulting in a value of 12 (60/5) (GGIR/R/g.part5_analyseSegment.R at master · wadpac/GGIR · GitHub line 398).

This adjustment appears to cause the very low results for alpha and the median bout length, leading to a proportion of 1 for all participants. When setting xmin to 1, the results seem more realistic.

Was there a specific reason for defining xmin as 12 in this case?

I appreciate your insights.

Best regards,

Anne

Vincent van Hees

unread,
Mar 2, 2025, 12:00:13 PM3/2/25
to Anne Backes, R package GGIR
Dear Anne,

I think you are right that xmin should be set to 1 regardless of epoch length. The research group I developed this for was only interested in 1 minute epochs by which neither they nor I noticed this as 60/60 is 1.

I will create a GGIR GitHub issue item for it now and try to include this update for the next GGIR release.

Thanks,

Vincent
Reply all
Reply to author
Forward
0 new messages