################################################################################################################## # In this script, we will show you how to analysis NGS data, such as read alignment and peak calling. # SRR1533863 and SRR1533847 are ATAC-seq data for MPP and B cell under GEO accession GSE26328. # We assume that all tools have been installed. ################################################################################################################## ### Reads # Article: http://science.sciencemag.org/content/345/6199/943.long # GEO: http://www.ncbi.nlm.nih.gov/geo/ # Search: GSE26328 ##################################################################### # Section 1: Download Data ##################################################################### ### setup your working directory mkdir ~/Practice cd ~/Practice # Download and unpack our reference sequence wget http://hgdownload.soe.ucsc.edu/goldenPath/mm10/chromosomes/chr19.fa.gz gunzip chr19.fa.gz # Download sequencing reads prefetch SRR1533863 SRR1533847 # Use SRA toolkit to convert SRA to FASTQ fastq-dump ~/ncbi/public/sra/SRR1533863.sra fastq-dump ~/ncbi/public/sra/SRR1533847.sra # Make sense of the filename mv SRR1533863.fastq MPP.fastq mv SRR1533847.fastq B.fastq ##################################################################### # Section 2: Short DNA Sequence Alignment ##################################################################### # Build genome index bowtie2-build chr19.fa chr19 # Align reads to the genome bowtie2 -x ./chr19 -U MPP.fastq -S MPP.sam bowtie2 -x ./chr19 -U B.fastq -S B.sam # we can also use multi-threads to speed up the alignment # bowtie2 -x ./chr19 -U MPP.fastq -S MPP.sam -p 7 # bowtie2 -x ./chr19 -U B.fastq -S B.sam -p 7 # Convert SAM to BAM samtools view -bS MPP.sam > MPP.bam samtools view -bS B.sam > B.bam # Sort BAM file samtools sort MPP.bam MPP.sorted samtools sort B.bam B.sorted # Remove reads with low map quality samtools view -bq 30 MPP.sorted.bam > MPP.final.bam samtools view -bq 30 B.sorted.bam > B.final.bam samtools index B.final.bam samtools index MPP.final.bam ##################################################################### # Section 3: Peak Calling ##################################################################### ### Calling peaks using MACS mkdir PeaksMPP macs2 callpeak -t MPP.final.bam -n MPP --outdir PeaksMPP -g mm mkdir PeaksB macs2 callpeak -t B.final.bam -n B --outdir PeaksB -g mm ##################################################################### # Section 4: Footprinting and motif analysis ##################################################################### rgt-hint footprinting --atac-seq --organism mm10 --output-prefix=MPP MPP.final.bam ./PeaksMPP/MPP_peaks.narrowPeak rgt-hint footprinting --atac-seq --organism mm10 --output-prefix=B B.final.bam ./PeaksB/B_peaks.narrowPeak # Perform motif matching and enrichment using RGT rgt-motifanalysis matching --organism mm10 --rand-proportion 10 --input-files B.bed MPP.bed rgt-motifanalysis enrichment --organism mm10 ./match/random_regions.bed B.bed MPP.bed