AnalysisGuidelines: Difference between revisions

From MEG Core
Jump to navigation Jump to search
Content added Content deleted
mNo edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 45: Line 45:
(It should look like the below - only copy the portion after the token= )
(It should look like the below - only copy the portion after the token= )
http://localhost:8887/?token=####HERE_IS_THE_TOKEN_CODE---COPY_THIS_AND_PASTE_INTO_BROWSER
http://localhost:8887/?token=####HERE_IS_THE_TOKEN_CODE---COPY_THIS_AND_PASTE_INTO_BROWSER

'''Biowulf Jupyter Notebook Connection'''<br>
1) Run one terminal to access the persistent biowulf node and start jupyter notebook:
#Connect to login node
ssh -Y $USER@biowulf.nih.gov
spersist #This will startup a persistent node
#Alternatively if a persistent node is already running, you can ssh into the persistent node

#In the persistent node
conda activate $CONDA_ENVIRONMENT_NAME
cd $FOLDER_WITH_CODE
jupyter notebook --no-browser --port=8887

2) Run another terminal to forward the port to your local machine<br>
<em>(Replace User and Remote_Host with the appropriate username and ip-address)</em>
<em>(This is a two step process, the notebook port is sent to biowulf first, then to your local computer)</em>
ssh -L localhost:8888:localhost:8888 $USER@biowulf.nih.gov
#In the same ssh terminal from the line above this one, type the following
ssh -N -L localhost:8888:localhost:8887 $USER@$PERSISTENT_NODE

3) In Firefox/Chrome/Etc - Log into localhost:8888 <br>
This will prompt you for a token<br>
<br>
4) In the password/token column, copy the token created in the first terminal<br>
(It should look like the below - only copy the portion after the token= )
http://localhost:8887/?token=####HERE_IS_THE_TOKEN_CODE---COPY_THIS_AND_PASTE_INTO_BROWSER




'''Version Control for Jupyter Notebook'''
'''Version Control for Jupyter Notebook'''
Nbdime for notebook version control (a jupyter interface for git)
Nbdime for notebook version control (a jupyter interface for git)


'''SAM installation from within NIH'''
git clone -b devel ...@$SERVER:SAMsrcV#

cd SAMsrcV#
make

If errors asking for GSL
#Use either (yum - Centos/redhat), (dnf - fedora) , or (apt-get - ubuntu)
sudo yum install gsl

#Alternatively if Fedora
sudo dnf install gsl

#Alternatively if using Ubuntu
sudo apt-get install gsl

Latest revision as of 17:26, 17 October 2019

UNDER CONSTRUCTION
Analysis Introduction
1) Anatomical Processing
2) MEG Trigger Configuration
3) MEG Inverse Solution (SAM software)
4) Statistical Analysis


Data collection: Exact timing of the experiment can be provided in the data acquisition or a set of smaller trials can be provided

CTF Software: DataEditor -data $DATA

thresholdDetect - Detect changes in the analog inputs to determine onset of stimulus addmarkers - necessary to embed the stimulus timing into the CTF dataset

parsemarks - Combines markers (i.e optical and parallel port)

newDs -f -filter processing.cfg


Anatomy Processing: The MRI processing starts with anat+orig.BRIK and anat+orig.HEAD format. The datasets are opened using AFNI

fiddist.py fiddist2.py - wrapper that accepts two inputs and provides the difference in distance (e.g. MRI and dataset)


Jupyter Notebook Over a Remote Connection
1) Run one terminal to start the notebook:

 ssh -Y $USER@$REMOTE_HOST
 cd $FOLDER_WITH_CODE
 #If necessary: conda activate $CONDA_ENV
 jupyter notebook --no-browser --port=8887

2) Run another terminal to forward the port to your local machine
(Replace User and Remote_Host with the appropriate username and ip-address)

 ssh -N -L localhost:8888:localhost:8887 $USER@$REMOTE_HOST

3) In Firefox/Chrome/Etc - Log into localhost:8888
This will prompt you for a token

4) In the password/token column, copy the token created in the first terminal
(It should look like the below - only copy the portion after the token= )

 http://localhost:8887/?token=####HERE_IS_THE_TOKEN_CODE---COPY_THIS_AND_PASTE_INTO_BROWSER

Biowulf Jupyter Notebook Connection
1) Run one terminal to access the persistent biowulf node and start jupyter notebook:

 #Connect to login node
 ssh -Y $USER@biowulf.nih.gov
 
 spersist #This will startup a persistent node
    #Alternatively if a persistent node is already running, you can ssh into the persistent node
 #In the persistent node
 conda activate $CONDA_ENVIRONMENT_NAME
 cd $FOLDER_WITH_CODE
 jupyter notebook --no-browser --port=8887

2) Run another terminal to forward the port to your local machine
(Replace User and Remote_Host with the appropriate username and ip-address) (This is a two step process, the notebook port is sent to biowulf first, then to your local computer)

 ssh -L localhost:8888:localhost:8888 $USER@biowulf.nih.gov
 #In the same ssh terminal from the line above this one, type the following
 ssh -N -L localhost:8888:localhost:8887 $USER@$PERSISTENT_NODE

3) In Firefox/Chrome/Etc - Log into localhost:8888
This will prompt you for a token

4) In the password/token column, copy the token created in the first terminal
(It should look like the below - only copy the portion after the token= )

 http://localhost:8887/?token=####HERE_IS_THE_TOKEN_CODE---COPY_THIS_AND_PASTE_INTO_BROWSER


Version Control for Jupyter Notebook Nbdime for notebook version control (a jupyter interface for git)


SAM installation from within NIH

 git clone -b devel ...@$SERVER:SAMsrcV#
 cd SAMsrcV#
 make

If errors asking for GSL

 #Use either (yum - Centos/redhat), (dnf - fedora) , or (apt-get - ubuntu)
 sudo yum install gsl
 #Alternatively if Fedora 
 sudo dnf install gsl 
 #Alternatively if using Ubuntu
 sudo apt-get install gsl