-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSamToIGV.pbs
More file actions
22 lines (16 loc) · 880 Bytes
/
SamToIGV.pbs
File metadata and controls
22 lines (16 loc) · 880 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
#PBS -l nodes=1:ppn=8,walltime=1:00:00
#PBS -N SamToIGV
#PBS -M ${USER}@nyu.edu
#PBS -m abe
#PBS -o localhost:/scratch/$USER/${PBS_JOBNAME}.o${PBS_JOBID}
#PBS -e localhost:/scratch/$USER/${PBS_JOBNAME}.o${PBS_JOBID}
cd /scratch/$USER
module load samtools/intel/1.2
TAG1=$arg2 ## write on command line, example AH6407A-120412-Try1
TAG2=$arg1 ## write on command line, folder name where SAM file is found
cd ${TAG2}
samtools view -b -S -o ${TAG1}.bam ${TAG1}.sam
samtools sort ${TAG1}.bam ${TAG1}.sorted
samtools index ${TAG1}.sorted.bam
exit 0;