You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Start tophat-cufflinks by submitting to lonestar

0. Make sure all the required modules are loaded.

module load bowtie
module load tophat
module load cufflinks/2.0.2

1. Copy over the directory $BI/ngs_course/tophat_cufflinks_enrichment to $SCRATCH and cd into that directory.

cp -r $BI/ngs_course/tophat_cufflinks_enrichment/ $SCRATCH
cd $SCRATCH/tophat_cufflinks_enrichment
ls


2. Create a file called tophat.commands with tophat commands. You can use your favorite editor (like nano or emacs) to open and edit a file.

nano tophat.commands

Use ctrl+x to quit. Say yes when asked whether you want to save the modifications.

tophat -p 8 -G reference/genes.gtf -o C1_R1_thout reference/genome data/GSM794483_C1_R1_1.fq data/GSM794483_C1_R1_2.fq
tophat -p 8 -G reference/genes.gtf -o C1_R2_thout reference/genome data/GSM794484_C1_R2_1.fq data/GSM794484_C1_R2_2.fq
tophat -p 8 -G reference/genes.gtf -o C1_R3_thout reference/genome data/GSM794485_C1_R3_1.fq data/GSM794485_C1_R3_2.fq
tophat -p 8 -G reference/genes.gtf -o C2_R1_thout reference/genome data/GSM794486_C2_R1_1.fq data/GSM794486_C2_R1_2.fq
tophat -p 8 -G reference/genes.gtf -o C2_R2_thout reference/genome data/GSM794487_C2_R2_1.fq data/GSM794487_C2_R2_2.fq
tophat -p 8 -G reference/genes.gtf -o C2_R3_thout reference/genome data/GSM794488_C2_R3_1.fq data/GSM794488_C2_R3_2.fq

3. Create a file called cufflinks.commands with cufflinks commands. You can use your favorite editor (like nano or emacs) to open and edit a file.

cufflinks -p 8 -o C1_R1_clout C1_R1_thout/accepted_hits.bam
cufflinks -p 8 -o C1_R2_clout C1_R2_thout/accepted_hits.bam
cufflinks -p 8 -o C1_R3_clout C1_R3_thout/accepted_hits.bam
cufflinks -p 8 -o C2_R1_clout C2_R1_thout/accepted_hits.bam
cufflinks -p 8 -o C2_R2_clout C2_R2_thout/accepted_hits.bam
cufflinks -p 8 -o C2_R3_clout C2_R3_thout/accepted_hits.bam

4. Alternatively, lets put tophat and cufflinks in one command file and make sure they run sequentially. Lets call this file tc.commands

tophat -p 8 -G reference/genes.gtf -o C1_R1_thout reference/genome data/GSM794483_C1_R1_1.fq data/GSM794483_C1_R1_2.fq && cufflinks -p 8 -o C1_R1_clout C1_R1_thout/accepted_hits.bam
tophat -p 8 -G reference/genes.gtf -o C1_R2_thout reference/genome data/GSM794484_C1_R2_1.fq data/GSM794484_C1_R2_2.fq && cufflinks -p 8 -o C1_R2_clout C1_R2_thout/accepted_hits.bam
tophat -p 8 -G reference/genes.gtf -o C1_R3_thout reference/genome data/GSM794485_C1_R3_1.fq data/GSM794485_C1_R3_2.fq && cufflinks -p 8 -o C1_R3_clout C1_R3_thout/accepted_hits.bam
tophat -p 8 -G reference/genes.gtf -o C2_R1_thout reference/genome data/GSM794486_C2_R1_1.fq data/GSM794486_C2_R1_2.fq && cufflinks -p 8 -o C2_R1_clout C2_R1_thout/accepted_hits.bam
tophat -p 8 -G reference/genes.gtf -o C2_R2_thout reference/genome data/GSM794487_C2_R2_1.fq data/GSM794487_C2_R2_2.fq && cufflinks -p 8 -o C2_R2_clout C2_R2_thout/accepted_hits.bam
tophat -p 8 -G reference/genes.gtf -o C2_R3_thout reference/genome data/GSM794488_C2_R3_1.fq data/GSM794488_C2_R3_2.fq && cufflinks -p 8 -o C2_R3_clout C2_R3_thout/accepted_hits.bam

5. We have a commands file. We need a launcher file to submit this to the lonestar queue. Use launcher_creator.py to create a launcher file.

launcher_creator.py -n tophat_cufflinks -q normal -t 12:00:00 -j tc.commands -l tc_launcher.sge

6. Submit this job to the queue.

qsub tc_launcher.sge

7. Create a file called cuffmerge.commands to run cuffmerge on results from step 6.

nano cuffmerge.commands
cuffmerge -g reference/genes.gtf -s reference/genome.fa -p 8 assembly_list.txt

8. Use launcher_creator to create a launcher for this cuffmerge job and submit it to the queue such that it runs after the previous job completes.

launcher_creator.py -n cuffmerge -q normal -t 6:00:00 -j cuffmerge.commands -l cuffmerge_launcher.sge
qstat 
qsub -hold_jid <jobid> cuffmerge_launcher.sge

9. Create a file called cuffdiff.commands to run cuffdiff on results from step 7.

nano cuffdiff.commands
cuffdiff -o diff_out -b reference/genome.fa -p 8 -L C1,C2 -u merged_asm/merged.gtf C1_R1_thout/accepted_hits.bam,C1_R2_thout/accepted_hits.bam,C1_R3_thout/accepted_hits.bam C2_R1_thout/accepted_hits.bam,C2_R2_thout/accepted_hits.bam,C2_R3_thout/accepted_hits.bam

10. Use launcher_creator to create a launcher for this cuffdiff job and submit it to the queue such that it runs after the previous job completes.

launcher_creator.py -n cuffdiff -q normal -t 6:00:00 -j cuffdiff.commands -l cuffdiff_launcher.sge
qsub -hold_jid <jobid> cuffdiff_launcher.sge
  • No labels