8 FAQ - Steph-Fulda/PLMScoRe GitHub Wiki

  • Is this program free?
  • I want to use PLMScore for a research project, how can I cite it?
  • I found a bug, what should I do?
  • What could possibly go wrong?
  • I cannot get PLMScore to work, what could be possible reasons?
  • I do not have REMLogic, can I use the program anyway?
  • How can I get information XYZ that is not part of the standard output?
  • Do I really, really have to score LM during wake?
  • What about other PLMS scoring rules (WASM/IRLSSG 2006, AASM 2016 etc.)?
  • How do I know that updates are available for PLMScoRe?

..coming soon

#What could possibly go wrong?

##WCPGW Batch processing

###Changing file specifications

When processing a large number of files in one go, it is important to be sure that the specifications are all the same. This means that:

  • the leg channel names are exactly the same
  • all sleep/wake annotation names are the same
  • all arousal and respiratory event names that have been used are listed in the respective RLs parts
  • the start/lights off and stop/lights on names that have been used are listed in the respective RLs parts
  • also, the number of columns of the data table and
  • the order of the columns has to be the same (such as Duration is always in the third column etc.)

What happens when this is not the case? The worst-case-scenario is not that output is not correct, but that the output is not correct and you do not realize it! If you have chosen the annotation names from "all annotations" and you did not add a new event category in REMLogic (which is unlikely but possible) than you will be ok concerning the annotations. The possibility that the leg channel names are different is also not likely if you always used the same recording set-up, but a definite possibility if you work with files from different labs.
It is therefore a good idea, to check the output of all recordings for suspicious results: for example, if there are no leg movements identified, or if all leg movements are only in one leg channel and not the other.
While it is always a good idea to open all txt files and confirm that they satisfy your specifications, you can do this for say 100 or even 200, but after that it just isn't feasible anymore. So if you want to process more than 100 files with batch processing the way to go is to implement independent error checking routines in R. If you are not an experienced R user you can contact me and I can share my strategies. If you are an R pro and want to implement your own routines but would like to get a second opinion, feel free to contact me too.
Why don't I share my error routines here? Because I use both automatic and manual processing steps and have no fully automated routine yet. Basically, I run the PLMScoRe procedure on all data sets and than investigate any error that comes up during the routine. That is the lucky case, because you get a direct feedback that something went wrong. After having fixed all specification errors, I start to screen for other possible errors. For example, I generate and inspect a list of all channel names in the recording and check if all possible leg channel names were included in the specification. I automatically check, if all supposed time value are indeed in the time format and so on. I also graph across group distributions to check for suspicious values. So in the end, this is only a semi automatic routine, which I am happy to share, if you need it, but it is not in a form that anybody could just use it without substantial additional information.
On the other hand, if you have already developed automatic error routines on you own, it would be great if you'd consider sharing this either by contributing to this project or by letting me know so that I can provide a link here to your project.

###Numeric vs string order of files

When you name your files consecutively with numbers (eg. Study_1.txt, Study_2.txt, ...,Study_10.txt, Study_11.txt) you would expect that the order in which the files are read is by number (eg. 1,2,3,...,10,11,...). Because your file name is a string, this is not the case!. To illustrate this, I have created 5 new txt files, labeled Study_X_S1, _S2, _S3, _S10, and _S11 in the D:/Study_X/ folder.

 #Look at the order of the files
 > list.files("D:/Study_X/", pattern=".txt")
 [1] "Study_X_S1.txt"   "Study_X_S10 .txt" "Study_X_S11.txt" 
 [4] "Study_X_S2.txt"   "Study_X_S3.txt"  

The work-around is to label them S01, S02 etc.

 > list.files("D:/Study_X/", pattern=".txt")
 [1] "Study_X_S01.txt"  "Study_X_S02.txt"  "Study_X_S03.txt" 
 [4] "Study_X_S10 .txt" "Study_X_S11.txt" 

Why is this important? Because it is very likely that you will want to match the batch results of PLMScoRe to some other data tables, for example containing information on age and gender of the subjects. In this case it is imperative that the two data tables are ordered exactly the same and that therefore the same row applies to the same subject in both tables.