Difference between revisions of "MEG Software and Analysis"

From MEG Core
Jump to navigation Jump to search
Line 1: Line 1:
==== Using the CTF DataEditor with a Singularity Container ====
 
The current version of the '''CTF DataEditor tool''' runs under CentOS (Linux) version 6.9. To support the MEG user community,
 
[mailto:holroydt@mail.nih.gov Tom Holroyd] has created a [https://singularity.lbl.gov/index.html Singularity] container for CentOS 6.9 and populated the container with the necessary libraries to run the DataEditor tool. This allows MEG users to run the DataEditor tool under the operating system (Windows, Mac OSX, Linux) of their choice.
 
 
Singularity is a
 
[https://en.wikipedia.org/wiki/Operating-system-level_virtualization Operating-system-level virtualization] solution where an operating system
 
can host another operating system in an isolated container. To run a Singularity container on your operating system, you need to install the Singularity software for your operating system. There are install packages for the major operating systems from the [https://singularity.lbl.gov/index.html Singularity website.]
 
----
 
; Singularity container running CentOS 6.7 with the CTF DataEditor tool
 
: [https://megcore.nih.gov/MEG/ctf-6.1.14-beta.img Singularity container ctf-6.1.14-beta.img download]
 
: {| width=70% style="border: 1px solid black;"
 
|<u>Usage</u>: singularity shell --bind /data:/mnt/data ctf-6.1.14-beta.img
 
|-
 
| where the ''/data'' file system holds your CTF data set and mounts under /mnt/data inside the container
 
|-
 
| (your /home directory and the /tmp file systems are automatically visible inside the container)
 
|}
 
----
 
; felix.nih.gov users
 
: ssh -X login@felix.nih.gov
 
: Copy the ctf-6.1.14-beta.img to your /data directory.
 
 
: Either add '''module load singularity''' to your ~/.bashrc startup file or type this on the command line.
 
: Use the following bash script to shell into the singularity container.
 
 
<syntaxhighlight lang="bash">
 
#!/bin/bash
 
# goctf.sh
 
 
singularity shell --bind /data/username:/mnt/data ctf-6.1.14-beta.img
 
killall -s msgd 2>/dev/null
 
</syntaxhighlight>
 
 
The DataEditor communicates with other CTF tools using the '''msgd''' service and the DataEditor will automatically
 
launch this service if it isn't running. The trouble on felix.nih.gov is this service is not killed when you exit from the singularity container and you will end up with a persistent process on felix. To prevent this from occurring, make sure msgd goes away.
 
 
You may want to add this stanza to your ~/.bashrc file on felix.nih.gov.
 
This sets the command prompt and the command history format for inside the container
 
 
<syntaxhighlight lang="bash">
 
if [ ! -z "$SINGULARITY_CONTAINER" ]; then
 
## PS1 is set inside the container
 
HISTFILE=~/.bash_history
 
HISTTIMEFORMAT='%Y%m%d/%H:%M:%S '
 
else
 
export PS1='[\h \w]$ '
 
fi
 
</syntaxhighlight>
 
 
 
===== MEG Data Analysis =====
 
===== MEG Data Analysis =====
   

Revision as of 12:55, 30 March 2018

MEG Data Analysis

This section covers all aspects of MEG data analysis. The following pages assume that you have AFNI installed and have a reasonably good idea of how to use it.