Data that comes from the MRI needs to be tagged with the subject timepoint. This is currently (as of 2020-03-17) the only data that is tagged with subject timepoint. The reason for the need of subject timepoint for this data is the Brain Imaging Data Structure (BIDS) that the MRI data are placed into, which requires this information. To ease the work of the MRI engineer, we add this information to the exported files from MRI, when we create dummy names. The information with the 7-digit ID, and the 2-digit timepoint should be clearly visible in the calendar, so that this information is easily available at scan. Note: the timepoint information is only needed in the exported files, not anywhere else.

To make it easier for the RAs to find this information, there are two alternatives using R-functions that come with the MOAS R-package.

Setup

Windows PC at UiO

If you are working on a Windows office PC at the University, find the Software center in the windows menu, and locate R, RStudio, and rtools, and click install to install them on your PC. Once they are installed, open RStudio.

Mac

If you have a Mac, install R from this link, and Rstudio from this link. Install the programs like any other.

Install necessary packages

Open RStudio and in the RStudio console (bottom left of the RStudio program), do the following:

install.packages("devtools")
devtools::install_github("LCBC-UiO/MOAS")

If the last command outputs a numbered list asking you to choose which packages to update, type in the number for the “None” option. You may also choose “All” but this might take some time, depending on the number of packages it wants to update. If it additionally asks you Do you want to install from sources the package which needs compilation?, always type n, for no.

No matter which option you choose, the installation of the MOAS-packages takes some time, because it needs many other packages to work.

Warning: we know there is an issue with installing this package on the UiO office PCs. If the installation is failing, please follow this troubleshoot, and see if that fixed your problem.

After this, try installing again:

remotes::install_github("LCBC-UiO/MOAS")

Once everything has been installed sucessfully, your computer will have the necessary setup to run the function to find the subject timepoints. Thankfully, once it is all installed, you don’t have to do these steps again!

Finding the time point

Alternative 1: interactive shiny launcher

The shiny launcher is arguably the easier for those who are unfamiliar with R and who do not feel comfortable using it.

In the Rstudio console type:

This should open a website in your browser. Here, you need to navigate to and upload the MOAS.RData file (on lagringshotell). Then you will be able to look for specific IDs and be provided information on the next timepoint for this participant.

Alternative 2: R console function

If you are more familiar with R and RStudio in general, you might want to use the function directly in R, rather than open the shiny instance.

There are two ways you can do this, and you will need to know how to navigate to the MOAS file using paths in both.

Option 1: giving the MOAS path directly to the function

In this variant, you use the R-console directly, meaning the same place you typed all the install commands above. If you are on a UiO windows machine, the function will only need an ID as input to work. This is convenient if you are only checking a couple of IDs

If you are on a mac, you will need to provide another path. If you are mounting the lagringshotell the exact way specified in the wiki on this, the path should be ~/LCBC/Projects/Cross_projects/MOAS/Data/MOAS.RData.

MOAS::check_tp(1000401, "~/LCBC/Projects/Cross_projects/MOAS/Data/MOAS.RData")

Option 2: Pre-loading the MOAS

If you are checking many IDs, it is an idea to pre-load the MOAS into R, and then provide that to the function. The MOAS is large, and reading it in every time you check an ID will make the process slow. If you pre-load it, it will be much faster.

load("//lagringshotell/sv-psi/LCBC/Projects/Cross_projects/MOAS/Data/MOAS.RData") # Windows path
# load("~/LCBC/Projects/Cross_projects/MOAS/Data/MOAS.RData") # Mac paths

MOAS::check_tp(1000401, MOAS)