#BSUB -L /bin/bash # uses the bash login shell to initialize the job's execution environment. #BSUB -J cuffdiff # job name #BSUB -n 20 # assigns 20 cores for execution #BSUB -R "span[ptile=20]" # assigns 20 cores per node #BSUB -R "rusage[mem=2700]" # reserves 2700MB memory per core #BSUB -M 2700 # sets to 2700MB per process enforceable memory limit. (M * n) #BSUB -W 24:00 # sets to 24 hour the job's runtime wall-clock limit. #BSUB -o stdout.%J # directs the job's standard output to stdout.jobid #BSUB -e stderr.%J # directs the job's standard error to stderr.jobid module load Bowtie2/2.2.6-intel-2015B module load TopHat/2.1.0-intel-2015B module load Cufflinks/2.2.1-intel-2015B < assembly_GTF_list.txt i=0 for sample in "${sample_prefixes[@]}" do sample_file=${sample_file_names[$i]} echo "processing $sample_file" tophat2 --num-threads $threads --output-dir ${sample}_tophat2_out --b2-very-sensitive $ref_genome_prefix $sample_file mkdir ${sample}_cufflinks_out cufflinks --no-update-check --num-threads $threads --output-dir ${sample}_cufflinks_out --GTF $ref_gtf --mask-file $ref_mask_gtf \ --multi-read-correct --frag-bias-correct $ref_genome --label $sample ${sample}_tophat2_out/accepted_hits.bam echo "${sample}_cufflinks_out/transcripts.gtf" >> assembly_GTF_list.txt i=$((i+1)) done cuffmerge --num-threads $threads -o cuffmerge_output --ref-gtf $ref_gtf --ref-sequence $ref_genome assembly_GTF_list.txt > cuffmerge.log cuffdiff --output-dir cuffdiff_output --frag-bias-correct $ref_genome --multi-read-correct \ --mask-file $ref_mask_gtf --num-threads $threads cuffmerge_output/merged.gtf \ ${sample_prefixes[0]}_tophat2_out/accepted_hits.bam,${sample_prefixes[1]}_tophat2_out/accepted_hits.bam \ ${sample_prefixes[2]}_tophat2_out/accepted_hits.bam,${sample_prefixes[3]}_tophat2_out/accepted_hits.bam <