Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.61 KB | None | 0 0
  1. #!/bin/bash
  2. #
  3. #SBATCH --ntasks=1
  4. #SBATCH --mem-per-cpu=10000
  5. #SBATCH --partition=pascalnodes
  6. #SBATCH --time=12:00:00
  7. #SBATCH --mail-type=FAIL
  8. #SBATCH --mail-user=snolin@uab.edu
  9. #SBATCH --job-name=FNstoV1tprob_%A_%a
  10. #SBATCH --gres=gpu:1
  11. #SBATCH --array=0-785%36
  12. #SBATCH --out=/data/scratch/snolin/HCP_jobs/prob/FNstoV1tproblog_%A_%a.txt
  13.  
  14. #This scripts run FSL probtrackx from newcentral region of V1 to the Yeo parcellation of the frontoparietal network (net6), the mid-peripheral region of V1 to the cingulo opercular network (net4), and the far-peripheral region of V1 to the default mode network (net7).
  15.  
  16. #location of job scripts and logs
  17. jobs=/data/scratch/snolin/HCP_jobs/prob
  18.  
  19. #set location for output of probtrackx paths
  20. outp=/data/project/vislab/a/HCP_diff_Sara/FNstoV1tprob
  21.  
  22. #set location for where target lists will go
  23. targ=$outp/targlists
  24. mkdir $targ
  25. #set location for where V1 segment labels exist
  26. lab=/data/project/vislab/a/HCP_diff_Sara/subjects_reconall_postcheckcopy
  27.  
  28. #set location for where bedpostX directories are located
  29. bed=/data/project/vislab/raw/HCP_900sub/HCP_diff_unzip_preproc
  30.  
  31. #location of participants you want to pull
  32. diff=/data/project/vislab/a/HCP_diff_Sara/subjects_reconall_postcheck
  33.  
  34. FILES=(`ls -1 $diff`)
  35. patient=${FILES[$SLURM_ARRAY_TASK_ID]}
  36.  
  37. #rename output file
  38. ln $jobs/FNstoV1tproblog_${SLURM_ARRAY_JOB_ID}_${SLURM_ARRAY_TASK_ID}.txt $jobs/FNstoV1tproblog$patient.txt
  39.  
  40. for task in FP:newcentral:4 FP:mid:4 FP:newfar:4 CO:newcentral:6 CO:mid:6 CO:newfar:6 DMN:newcentral:7 DMN:mid:7 DMN:newfar:7
  41. do
  42. #parse task
  43. network=`echo $task | cut -d: -f1`
  44. V1=`echo $task | cut -d: -f2`
  45. netnum=`echo $task | cut -d: -f3`
  46.  
  47. ##network to V1###
  48. #if [ -f $outp/${network}to${V1}/$patient/fdt_paths.nii.gz ]; then echo "${network}to${V1} has completed"
  49. #else
  50. #create folder structure
  51. cd $outp
  52. mkdir ${network}to${V1}
  53. cd ${network}to${V1}
  54. mkdir $patient
  55.  
  56. #create target list
  57. cd $targ
  58. touch targets${network}to${V1}_$patient.txt
  59. echo "$lab/$patient/mri/${V1}V1_diffROI.nii" > targets${network}to${V1}_$patient.txt
  60.  
  61. #Probtrackx run on network to ${V1} V1
  62. /share/apps/rc/software/FSL/5.0.9-centos6_64/bin/probtrackx2_gpu -x $lab/$patient/mri/net${netnum}_diffROI.nii -V 1 -l --onewaycondition -c 0.2 -S 2000 --steplength=0.5 -P 10000 --fibthresh=0.01 --distthresh=0.0 --sampvox=0.0 --forcedir --opd -s $bed/$patient/T1w/Diffusion.bedpostX/merged -m $bed/$patient/T1w/Diffusion.bedpostX/nodif_brain_mask --dir=$outp/${network}to${V1}/$patient --targetmasks=$targ/targets${network}to${V1}_$patient.txt --os2t
  63. #fi
  64. done
  65. rm $jobs/FNstoV1tproblog_${SLURM_ARRAY_JOB_ID}_${SLURM_ARRAY_TASK_ID}.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement