Demo entry 6717724



Submitted by anonymous on Feb 27, 2018 at 21:20
Language: Perl. Code size: 1.1 kB.

use Cwd;
$sbatchdir = "/home/zhuan117/data/ADNI600picked/sbatch602to631/";
$PRODIR = "/scratch/zhuan117/ADNI600picked/pross602to631/";
$FSDIR = "/scratch/zhuan117/ADNI600picked602to631";

open FP1, $ARGV[0];
foreach $line (<FP1>)
	$line =~ s/\x0D?\x0A?$//;
	$rs = $line;						
	$fname = "script-${rs}.sh";
	print $fname, "\n";
	open FP, ">${sbatchdir}/${fname}" || die "open file failed";
	print FP "#!/bin/bash\n";
    #print FP "#SBATCH -p serial\n";
    print FP "#SBATCH -n 2\n";
    #print FP "##SBATCH -A ywang354\n";
    print FP "#SBATCH -o slurm_%j.out\n";
    print FP "#SBATCH -t 3-10:40\n";
    print FP "#!/bin/bash\n";
    print FP "#SBATCH\n";
  	print FP "module load freesurfer/5.3.0\n";
	print FP "module load fsl/5.0.1\n";
	print FP "SUBJECTS_DIR=${FSDIR}\n";
  	print FP "cd ${FSDIR}\n";
	#print FP "subfile=\`find $FSDIR/ -name \"${rs}*.nii.gz\" \` \n";	
	$str = "recon-all -i ${rs}.nii -s ${rs} -sd ${PRODIR} -all\n";
	print FP $str;
	close FP;
close FP1;						

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).