Commit d1c95feb authored by nchernia's avatar nchernia
Browse files

fixing bug in SLURM juicer when ligation flag -b sent in; updating mega in...

fixing bug in SLURM juicer when ligation flag -b sent in; updating mega in SLURM; updating cleanup script
parent e3a0483b
Loading
Loading
Loading
Loading
+4 −0
Changes for SLURM/scripts/cleanup.sh: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -31,10 +31,14 @@ if [ $total -eq $total2 ]
then 
    rm aligned/merged_sort.txt 
    rm -r splits 
    testname=$(ls -l fastq | awk 'NR==1{print $9}')
    if [ "${testname: -5}" == ".fastq" ]
    then
	for i in fastq/*.fastq
	do
            gzip $i
	done
    fi
    gzip aligned/merged_nodups.txt
    gzip aligned/dups.txt
    gzip aligned/opt_dups.txt
+22 −24
Changes for SLURM/scripts/juicer.sh: 22 added lines, 24 removed lines.
Original line number Diff line number Diff line
@@ -85,8 +85,10 @@ then
    juiceDir="/work/ea14/juicer" ### RICE
    # default queue, can also be set in options via -q
    queue="commons"
    queue_time="1440"
    # default long queue, can also be set in options via -l
    long_queue="commons"
    long_queue_time="1440"
elif [ $isBCM -eq 1 ]
then    
    # Juicer directory, contains scripts/, references/, and restriction_sites/
@@ -108,8 +110,10 @@ else
    juiceDir="/gpfs0/juicer/"
    # default queue, can also be set in options
    queue="commons"
    queue_time="1440"
    # default long queue, can also be set in options
    long_queue="long"
    long_queue_time="10080"
fi

# size to split fastqs. adjust to match your needs. 4000000=1M reads per split
@@ -263,6 +267,7 @@ if [ ! -e "${refSeq}.bwt" ]; then
fi

## Set ligation junction based on restriction enzyme
if [ -z "$ligation" ]; then
    case $site in
	HindIII) ligation="AAGCTAGCTT";;
	DpnII) ligation="GATCGATC";;
@@ -273,6 +278,7 @@ case $site in
	    echo "$site not listed as recognized enzyme. Using $site_file as site file"
	    echo "Ligation junction is undefined"
    esac
fi

## If DNAse-type experiment, no fragment maps
if [ "$site" == "none" ]
@@ -476,7 +482,7 @@ then
		    jid=`sbatch <<- SPLITEND | egrep -o -e "\b[0-9]+$"
			#!/bin/bash -l
			#SBATCH -p $queue
			#SBATCH -t 1440
			#SBATCH -t $queue_time
			#SBATCH -c 1
			#SBATCH -o $debugdir/split-%j.out
			#SBATCH -e $debugdir/split-%j.err
@@ -490,7 +496,7 @@ SPLITEND`
		    jid=`sbatch <<- SPLITEND | egrep -o -e "\b[0-9]+$"
			#!/bin/bash -l
			#SBATCH -p $queue
			#SBATCH -t 1440
			#SBATCH -t $queue_time
			#SBATCH -c 1
			#SBATCH -o $debugdir/split-%j.out
			#SBATCH -e $debugdir/split-%j.err
@@ -560,7 +566,7 @@ SPLITEND`
	jid=`sbatch <<- CNTLIG
		#!/bin/bash -l
		#SBATCH -p $queue
		#SBATCH -t 1440
		#SBATCH -t $queue_time
		#SBATCH -c 1
		#SBATCH -o $debugdir/count_ligation-%j.out
		#SBATCH -e $debugdir/count_ligation-%j.err
@@ -578,7 +584,7 @@ CNTLIG`
		#SBATCH -p $queue
		#SBATCH -o $debugdir/align1-%j.out
		#SBATCH -e $debugdir/align1-%j.err
		#SBATCH -t 1440
		#SBATCH -t $queue_time
		#SBATCH -n 1
		#SBATCH -c $threads
		#SBATCH --ntasks=1
@@ -624,7 +630,7 @@ ALGNR1`
		#SBATCH -p $queue
		#SBATCH -o $debugdir/align2-%j.out
		#SBATCH -e $debugdir/align2-%j.err
		#SBATCH -t 1440
		#SBATCH -t $queue_time
		#SBATCH -n 1
		#SBATCH -c $threads
		#SBATCH --ntasks=1
@@ -671,7 +677,7 @@ ALGNR2`
		#SBATCH -o $debugdir/merge-%j.out
		#SBATCH -e $debugdir/merge-%j.err
		#SBATCH --mem-per-cpu=14G
		#SBATCH -t 1440
		#SBATCH -t $long_queue_time
		#SBATCH -c 8 
		#SBATCH --ntasks=1
		#SBATCH -d $dependalign
@@ -802,7 +808,7 @@ MRGALL`
		#!/usr/bin/bash
		#SBATCH -o $debugdir/aligncheck-%j.out
		#SBATCH -e $debugdir/aligncheck-%j.err
		#SBATCH -t 1440
		#SBATCH -t $queue_time
		#SBATCH -p $queue
		#SBATCH -J "${groupname}_check"
		#SBATCH -d $dependmerge
@@ -832,21 +838,12 @@ then
    
    # merge the sorted files into one giant file that is also sorted.      jid=`sbatch <<- MRGSRT | egrep -o -e "\b[0-9]+$"

    if [ $isVoltron -eq 1 ]
    then  
	sbatch_time="#SBATCH -t 10080"
    else
	sbatch_time="#SBATCH -t 1440"
    fi



    jid=`sbatch <<- EOF
		#!/usr/bin/bash
		#SBATCH -o $debugdir/fragmerge-%j.out
		#SBATCH -e $debugdir/fragmerge-%j.err
		#SBATCH --mem 256000
		${sbatch_time}
		#SBATCH -t $long_queue_time
		#SBATCH -p $long_queue
		#SBATCH -c 8
		#SBATCH -J "${groupname}_fragmerge"
@@ -921,7 +918,7 @@ DEDUPGUARD`
	#SBATCH --mem-per-cpu=2G
	#SBATCH -o $debugdir/dedup-%j.out
	#SBATCH -e $debugdir/dedup-%j.err
	#SBATCH -t 1440
	#SBATCH -t $queue_time
	#SBATCH -c 1
	#SBATCH --ntasks=1
	#SBATCH -J "${groupname}_dedup"
@@ -987,7 +984,7 @@ then
	#SBATCH -p $queue
	#SBATCH -o $debugdir/dupcheck-%j.out
	#SBATCH -e $debugdir/dupcheck-%j.err
	#SBATCH -t 1440
	#SBATCH -t $queue_time
	#SBATCH -c 1
	#SBATCH --ntasks=1
	#SBATCH --mem-per-cpu=1G
@@ -1010,7 +1007,7 @@ DUPCHECK`
		#SBATCH -p $long_queue
		#SBATCH -o $debugdir/stats-%j.out
		#SBATCH -e $debugdir/stats-%j.err
		#SBATCH -t 1440
		#SBATCH -t $long_queue_time
		#SBATCH -c 1
		#SBATCH --ntasks=1
		#SBATCH --mem-per-cpu=6G
@@ -1051,7 +1048,7 @@ STATS`
	#SBATCH -p $long_queue
	#SBATCH -o $debugdir/hic-%j.out
	#SBATCH -e $debugdir/hic-%j.err	
	#SBATCH -t 1440
	#SBATCH -t $long_queue_time
	#SBATCH -c 1
	#SBATCH --ntasks=1
	#SBATCH --mem-per-cpu=32G
@@ -1070,6 +1067,7 @@ STATS`
		${juiceDir}/scripts/juicer_tools48g pre -s $outputdir/inter.txt -g $outputdir/inter_hists.m -q 1 $outputdir/merged_nodups.txt $outputdir/inter.hic $genomePath
	else
		${juiceDir}/scripts/juicer_tools48g pre -f $site_file -s $outputdir/inter.txt -g $outputdir/inter_hists.m -q 1 $outputdir/merged_nodups.txt $outputdir/inter.hic $genomePath
echo "${juiceDir}/scripts/juicer_tools48g pre -f $site_file -s $outputdir/inter.txt -g $outputdir/inter_hists.m -q 1 $outputdir/merged_nodups.txt $outputdir/inter.hic $genomePath "
	fi
	date
HIC`
@@ -1081,7 +1079,7 @@ HIC`
	#SBATCH -p $long_queue
	#SBATCH -o $debugdir/hic30-%j.out
	#SBATCH -e $debugdir/hic30-%j.err
	#SBATCH -t 1440
	#SBATCH -t $long_queue_time
	#SBATCH -c 1
	#SBATCH --ntasks=1
	#SBATCH --mem-per-cpu=32G
@@ -1126,7 +1124,7 @@ HIC30`
	${sbatch_req}
	#SBATCH -o $debugdir/hiccups_wrap-%j.out
	#SBATCH -e $debugdir/hiccups_wrap-%j.err
	#SBATCH -t 1440
	#SBATCH -t $queue_time
	#SBATCH --ntasks=1
	#SBATCH -J "${groupname}_hiccups_wrap"
	${sbatch_wait}
@@ -1154,7 +1152,7 @@ HICCUPS`
	#SBATCH --mem-per-cpu=8G
	#SBATCH -o $debugdir/arrowhead_wrap-%j.out
	#SBATCH -e $debugdir/arrowhead_wrap-%j.err
	#SBATCH -t 1440
	#SBATCH -t $queue_time
	#SBATCH --ntasks=1
	#SBATCH -J "${groupname}_arrowhead_wrap"
	${sbatch_wait}
+84 −51
Changes for SLURM/scripts/mega.sh: 84 added lines, 51 removed lines.
Original line number Diff line number Diff line
@@ -32,21 +32,54 @@
# [topDir]/mega     - Location of result of processing the mega map
#
# Juicer version 1.5
juicer_version="1.5" 
juicer_version="1.5.6" 
## Set the following variables to work with your system

## use cluster load commands:
#usePath=""
load_java="module load Java/7.1.2.0"
#load_cluster=""
#load_coreutils=""
load_gpu="module load gcccuda/2.6.10;export PATH=\$PATH:/usr/local/cuda/bin/;"
# Juicer directory, contains scripts/ and restriction_sites/
juiceDir="/poscratch/aidenlab/juicer"
# Aiden Lab specific check
isRice=$(hostname | awk '{if ($1~/rice/){print 1}else {print 0}}')
isBCM=$(hostname | awk '{if ($1~/bcm/){print 1}else {print 0}}')
isVoltron=0
## path additionals, make sure paths are correct for your system
## use cluster load commands
if [ $isRice -eq 1 ] 
then
    myPath=/bin:$PATH 
    load_bwa="module load BioBuilds/2015.04" 
    load_java="module load Java/8.0.3.22" 
    load_gpu="module load gcccuda/2016a;module load CUDA/8.0.54;" 
    # Juicer directory, contains scripts/, references/, and restriction_sites/
    # can also be set in options via -D
    juiceDir="/work/ea14/juicer" ### RICE
    # default queue, can also be set in options via -q
    queue="commons"
    # default long queue, can also be set in options via -l
    long_queue="commons"
    long_queue_time="1440"
elif [ $isBCM -eq 1 ]
then    
    # Juicer directory, contains scripts/, references/, and restriction_sites/
    # can also be set in options via -D
    juiceDir="/storage/aiden/juicer/"
    # default queue, can also be set in options via -q
    queue="mhgcp"
    queue_time="1200"
    # default long queue, can also be set in options via -l
    long_queue="mhgcp"
    long_queue_time="3600"
else
    isVoltron=1
    export PATH=/gpfs0/biobuild/biobuilds-2016.11/bin:$PATH 
    unset MALLOC_ARENA_MAX
    load_gpu="CUDA_VISIBLE_DEVICES=0,1,2,3"
    # Juicer directory, contains scripts/, references/, and restriction_sites/
    # can also be set in options via -D
    juiceDir="/gpfs0/juicer/"
    # default queue, can also be set in options
    queue="commons"
    # default long queue, can also be set in options
long_queue="commons"
    long_queue="long"
    long_queue_time="10080"
fi

# unique name for jobs in this run
groupname="a$(date +%s)"
@@ -56,7 +89,7 @@ groupname="a$(date +%s)"
# top level directory, can also be set in options
topDir=$(pwd)
# restriction enzyme, can also be set in options
site="DpnII"
site="MboI"
# genome ID, default to human, can also be set in options
genomeID="hg19"

@@ -192,7 +225,7 @@ touchfile2=${megadir}/touch2
jid2=`sbatch <<- MRGSRT | egrep -o -e "\b[0-9]+$"
#!/bin/bash -l
#SBATCH -p ${long_queue}
#SBATCH -t 1440
#SBATCH -t ${long_queue_time}
#SBATCH -c 1
#SBATCH --ntasks=1
#SBATCH --mem-per-cpu=16384
@@ -203,7 +236,7 @@ jid2=`sbatch <<- MRGSRT | egrep -o -e "\b[0-9]+$"
if [ ! -f "${touchfile1}" ]
then
    echo "***! Top stats job failed, type \"scontrol show job $jid1\" to see what happened."
    exit 100;
    exit 1
fi
if ! sort -T ${tmpdir} -m -k2,2d -k6,6d ${merged_names} > ${outputdir}/merged_nodups.txt
then 
@@ -222,7 +255,7 @@ touchfile3=${megadir}/touch3
jid3=`sbatch <<- INTER0 | egrep -o -e "\b[0-9]+$"
#!/bin/bash -l
#SBATCH -p ${long_queue}
#SBATCH -t 1440
#SBATCH -t ${long_queue_time}
#SBATCH -c 1
#SBATCH --ntasks=1
#SBATCH -o $logdir/inter0-%j.out
@@ -232,7 +265,7 @@ jid3=`sbatch <<- INTER0 | egrep -o -e "\b[0-9]+$"
if [ ! -f "${touchfile2}" ]
then
   echo "***! Sort job failed."
   exit 100;
   exit 1
fi
${juiceDir}/scripts/statistics.pl -q 1 -o${outputdir}/inter.txt -s $site_file -l $ligation ${outputdir}/merged_nodups.txt
touch $touchfile3
@@ -244,7 +277,7 @@ touchfile4=${megadir}/touch4
jid4=`sbatch <<- INTER30 | egrep -o -e "\b[0-9]+$"
#!/bin/bash -l
#SBATCH -p ${long_queue}
#SBATCH -t 1440
#SBATCH -t ${long_queue_time}
#SBATCH -c 1
#SBATCH --ntasks=1
#SBATCH -o $logdir/inter30-%j.out
@@ -254,7 +287,7 @@ jid4=`sbatch <<- INTER30 | egrep -o -e "\b[0-9]+$"
if [ ! -f "${touchfile2}" ]
then
   echo "***! Sort job failed."
   exit 100;
   exit 1
fi
${juiceDir}/scripts/statistics.pl -q 30 -o${outputdir}/inter_30.txt -s $site_file -l $ligation ${outputdir}/merged_nodups.txt 
touch $touchfile4
@@ -266,7 +299,7 @@ touchfile5=${megadir}/touch5
jid5=`sbatch <<- HIC0 | egrep -o -e "\b[0-9]+$"
#!/bin/bash -l
#SBATCH -p ${long_queue}
#SBATCH -t 1440
#SBATCH -t ${long_queue_time}
#SBATCH -c 1
#SBATCH --ntasks=1
#SBATCH -o $logdir/hic0-%j.out
@@ -279,17 +312,12 @@ $load_java
if [ ! -f "${touchfile3}" ]
then
   echo "***! Statistics q=1 job failed."
   exit 100;
   exit 1
fi
if [ -z "$exclude" ]
if [ -z "$exclude" ] &&  ${juiceDir}/scripts/juicer_tools pre -f ${site_file} -s ${outputdir}/inter.txt -g ${outputdir}/inter_hists.m -q 1 ${outputdir}/merged_nodups.txt ${outputdir}/inter.hic ${genomeID} 
then
	${juiceDir}/scripts/juicer_tools pre -f ${site_file} -s ${outputdir}/inter.txt -g ${outputdir}/inter_hists.m -q 1 ${outputdir}/merged_nodups.txt ${outputdir}/inter.hic ${genomeID}
    exitcode=\$?
else
	${juiceDir}/scripts/juicer_tools pre -s ${outputdir}/inter.txt -g ${outputdir}/inter_hists.m -q 1 ${outputdir}/merged_nodups.txt ${outputdir}/inter.hic ${genomeID}
    exitcode=\$?
fi
if [ "\${exitcode}" -eq 0 ]
   touch $touchfile5
elif [ -n "$exclude" ] &&  ${juiceDir}/scripts/juicer_tools pre -s ${outputdir}/inter.txt -g ${outputdir}/inter_hists.m -q 1 ${outputdir}/merged_nodups.txt ${outputdir}/inter.hic ${genomeID} 
then
   touch $touchfile5 
fi
@@ -301,7 +329,7 @@ touchfile6=${megadir}/touch6
jid6=`sbatch <<- HIC30 | egrep -o -e "\b[0-9]+$"
#!/bin/bash -l
#SBATCH -p ${long_queue}
#SBATCH -t 1440
#SBATCH -t ${long_queue_time}
#SBATCH -c 1
#SBATCH --ntasks=1
#SBATCH -o $logdir/hic30-%j.out
@@ -314,17 +342,12 @@ $load_java
if [ ! -f "${touchfile4}" ]
then
   echo "***! Statistics q=30 job failed."
   exit 100;
   exit 1
fi
if [ -z "${exclude}" ]
if [ -z "${exclude}" ] &&  ${juiceDir}/scripts/juicer_tools pre -f ${site_file} -s ${outputdir}/inter_30.txt -g ${outputdir}/inter_30_hists.m -q 30 ${outputdir}/merged_nodups.txt ${outputdir}/inter_30.hic ${genomeID} 
then
	${juiceDir}/scripts/juicer_tools pre -f ${site_file} -s ${outputdir}/inter_30.txt -g ${outputdir}/inter_30_hists.m -q 30 ${outputdir}/merged_nodups.txt ${outputdir}/inter_30.hic ${genomeID}
   exitcode=\$?
else
	${juiceDir}/scripts/juicer_tools pre -s ${outputdir}/inter_30.txt -g ${outputdir}/inter_30_hists.m -q 30 ${outputdir}/merged_nodups.txt ${outputdir}/inter_30.hic ${genomeID}
   exitcode=\$?
fi
if [ "\${exitcode}" -eq 0 ]
   touch $touchfile6
elif [ -n "${exclude}" ] && ${juiceDir}/scripts/juicer_tools pre -s ${outputdir}/inter_30.txt -g ${outputdir}/inter_30_hists.m -q 30 ${outputdir}/merged_nodups.txt ${outputdir}/inter_30.hic ${genomeID} 
then
   touch $touchfile6
fi
@@ -334,6 +357,12 @@ dependhic30only="afterok:$jid6"

# Create loop lists file for MQ > 30
touchfile7=${megadir}/touch7
if [ $isRice -eq 1 ] || [ $isVoltron -eq 1 ]
then
    if [  $isRice -eq 1 ]
    then
	sbatch_req="#SBATCH --gres=gpu:kepler:1"
    fi
    jid7=`sbatch <<- HICCUPS | egrep -o -e "\b[0-9]+$"
	#!/bin/bash -l
	#SBATCH -p ${long_queue}
@@ -341,30 +370,33 @@ jid7=`sbatch <<- HICCUPS | egrep -o -e "\b[0-9]+$"
	#SBATCH -c 2
	#SBATCH --ntasks=1
	#SBATCH --mem-per-cpu=4G 
#SBATCH --gres=gpu:kepler:1
	#SBATCH -o $logdir/hiccups-%j.out
	#SBATCH -e $logdir/hiccups-%j.err
	#SBATCH -J "${groupname}_hiccups"
	#SBATCH -d "${dependhic30only}"
#source $usePath
	${sbatch_req}
	$load_java
	if [ ! -f "${touchfile6}" ]
	then
	   echo "***! HIC maps q=30 job failed."
   exit 100;
	   exit 1
	fi
	${load_gpu}
	${juiceDir}/scripts/juicer_hiccups.sh -j ${juiceDir}/scripts/juicer_tools -i $outputdir/inter_30.hic -m ${juiceDir}/references/motif -g $genomeID
	touch $touchfile7
	HICCUPS`
    dependhiccups="afterok:$jid7"
else
    dependhiccups="afterok"
    touch $touchfile7
fi

touchfile8=${megadir}/touch8
# Create domain lists for MQ > 30
jid8=`sbatch <<- ARROWHEAD | egrep -o -e "\b[0-9]+$"
#!/bin/bash -l
#SBATCH -p ${long_queue}
#SBATCH -t 1440
#SBATCH -t ${long_queue_time}
#SBATCH -c 2
#SBATCH --ntasks=1
#SBATCH --mem-per-cpu=4G 
@@ -377,13 +409,12 @@ $load_java
if [ ! -f "${touchfile6}" ]
then
   echo "***! HIC maps q=30 job failed."
   exit 100;
   exit 1
fi
${juiceDir}/scripts/juicer_arrowhead.sh -j ${juiceDir}/scripts/juicer_tools -i $outputdir/inter_30.hic
touch $touchfile8
ARROWHEAD`
dependarrows="${dependhic0}:$jid8"
dependarrowsonly="afterok:$jid8"
dependarrows="${dependhiccups}:$jid8"

# Final checks
jid9=`sbatch <<- FINAL | egrep -o -e "\b[0-9]+$"
@@ -400,27 +431,29 @@ jid9=`sbatch <<- FINAL | egrep -o -e "\b[0-9]+$"
if [ ! -f "${touchfile5}" ]
then
   echo "***! Failed to make inter.hic."   
   exit 100;
   exit 1
fi
if [ ! -f "${touchfile6}" ]
then
   echo "***! Failed to make inter_30.hic."   
   exit 100;
   exit 1
fi
if [ ! -f "${touchfile7}" ]
then
   echo "***! Failed to create loop lists."   
   exit 100;
   exit 1
fi
if [ ! -f "${touchfile8}" ]
then
   echo "***! Failed to create domain lists."   
   exit 100;
   exit 1
fi
rmdir ${tmpdir}
rm -r ${tmpdir}
rm $touchfile1 $touchfile2 $touchfile3 $touchfile4 $touchfile5 $touchfile6 $touchfile7 $touchfile8
echo "(-: Successfully completed making mega map. Done. :-)"
echo $topDir, $site, $genomeID, $genomePath | mail -r MegaJuicer@rice.edu -s \"Mega Juicer pipeline finished successfully @ Rice" -t $USER@rice.edu;
if [ $isRice -eq 1 ]
then
   echo $topDir, $site, $genomeID, $genomePath | mail -r MegaJuicer@rice.edu -s \"Mega Juicer pipeline finished successfully @ Rice\" -t $USER@rice.edu;
fi
FINAL`
dependfinal="afterok:$jid9"
echo "(-: Finished adding all jobs... please wait while processing."
+3 −8
Changes for SLURM/scripts/relaunch_prep.sh: 3 added lines, 8 removed lines.
Original line number Diff line number Diff line
@@ -22,19 +22,14 @@
#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
#  THE SOFTWARE.
##########
# Helper script for finding what files successfully aligned and preparing the 
# directory for rerunning juicer.sh

# Helper script for finding what files successfully aligned and preparing the directory for
# rerunning juicer.sh
# Juicer version 1.5
ls -l splits > ls_splits

awk '($9 ~/_R1/ && $9 ~/fastq$/) || ($9 ~/_R1/ && $9 ~/gz$/) {split($9, a, "_R1");  print a[1]a[2], $9}($9 ~/_R2/ && $9 ~/fastq$/) || ($9 ~/_R2/ && $9 ~/gz$/){split($9,a,"_R2");print a[1]a[2], $9}' ls_splits > fastq.txt
awk '{name="splits/"$1"_norm.txt.res.txt"; if ((getline line < name) > 0){ split(line, a); if (length(a)<6 || a[2] != a[3]+a[4]+a[5]+a[6] || a[2] == 0){print "mv splits/"$2, "not_done; rm -f splits/"$1"*; rm -f splits/"$2"*;"} close(name);}else {print "mv splits/"$2, "not_done; rm -f splits/"$1"*; rm -f splits/"$2"*;"}}' fastq.txt > mv_me.sh
#for i in splits/*_linecount.txt
#do 
#    j=${i%_*} 
#    paste $i ${j}_norm.txt.res.txt | awk -v fname=$j '{if ($3 != $1/4){print "mv", fname, "not_done"}}'; >> mv_me.sh
#done

mkdir not_done
chmod 755 mv_me.sh
./mv_me.sh
+4 −0
Changes for UGER/scripts/cleanup.sh: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -31,10 +31,14 @@ if [ $total -eq $total2 ]
then 
    rm aligned/merged_sort.txt 
    rm -r splits 
    testname=$(ls -l fastq | awk 'NR==1{print $9}')
    if [ "${testname: -5}" == ".fastq" ]
    then
	for i in fastq/*.fastq
	do
            gzip $i
	done
    fi
    gzip aligned/merged_nodups.txt
    gzip aligned/dups.txt
    gzip aligned/opt_dups.txt
Loading