Processing another sample with TopHat and HTSeqΒΆ

Rather typing all of this in - let’s put this in a text file, so we can run the TopHat and HTSeq commands all at once! This is called a “script”.


cd /mnt/work
cat > <<EOF

and then paste this in:

# go to the working directory
cd /mnt/work

# now run Tophat!
tophat \
    -G cuffmerge_all/nostrand.gtf \
    --transcriptome-index=/mnt/genome/tophat/merged \
    -o tophat_female_repl2 \
    /mnt/genome/Gallus_gallus/UCSC/galGal3/Sequence/Bowtie2Index/genome \
    female_repl2_R1.qc.fq.gz female_repl2_R2.qc.fq.gz

htseq-count --format=bam --stranded=no --order=pos \
    tophat_female_repl2/accepted_hits.bam \
    cuffmerge_all/nostrand.gtf > female_repl2_counts.txt


(Be sure to press the Enter or Return key after pasting this in!) This is called a ‘heredoc’ and it gives a way to write a shell script via copy-paste ;).

Next, type:


This will run all of the commands in the file ‘’.

You can use the ‘nano’ editor to modify this file – type:


Next: Setting up more scripts

LICENSE: This documentation and all textual/graphic site content is licensed under the Creative Commons - 0 License (CC0) -- fork @ github. Presentations (PPT/PDF) and PDFs are the property of their respective owners and are under the terms indicated within the presentation.