If bjobs
yields a job that’s suspended–
JOBID USER STAT QUEUE FROM_HOST EXEC_HOST JOB_NAME SUBMIT_TIME
253030 cl322 SUSP big rgs13 cn031 *vl-3.TCGA Jul 16 16:54
The fastest/easiest thing to do (assuming resources are now available) is–
brequeue 253030
find `pwd` -name *_2.fastq.gz
for f in *.bam; do samtools index $f; done
find . -type f -exec awk -v x=1000 'NR==x{exit 1}' {} \; -exec rm -f {} \;
Assumes that you have a header.sam
floating around
Change all *.bam
files to *.sam
files
for f in *.bam; do mv -- "$f" "${f%.bam}.sam"; done
Change all *.sam
files to .bam
files using compression
for f in *.sam; do cat ../header.sam $f | samtools view -b - > "${f%.*}.bam"; done
This is less painful if you don’t butcher your .sam
file without its header.