Presentation is loading. Please wait.

Presentation is loading. Please wait.

RNA-seq data analysis Project

Similar presentations


Presentation on theme: "RNA-seq data analysis Project"— Presentation transcript:

1 RNA-seq data analysis Project
QI LIU

2 From reads to differential expression
Raw Sequence Data FASTQ Files QC by FastQC Reads Mapping Unspliced Mapping BWA, Bowtie Spliced mapping TopHat, MapSplice Mapped Reads SAM/BAM Files Expression Quantification Summarize read counts FPKM/RPKM Cufflinks QC by RNA-SeQC DE testing DEseq, edgeR, etc Cuffdiff List of DE Functional Interpretation Function enrichment Infer networks Integrate with other data Biological Insights & hypothesis

3 Tools Read alignment: TopHat2 ( Bowtie2 ( Tools for manipulating SAM files: SAMTOOLS ( Counting reads in gene level: htseq-count ( Downstream analysis: The R statistical computing environment ( R package: edgeR ( Visualization: IGV (

4 /home/igptest/path.txt setpkgs -a python
BOWTIE2=/scratch/liuq6/software/bowtie2 TOPHAT2=/scratch/liuq6/software/tophat2 export PYTHONPATH=/scratch/liuq6/software/htseqlib:$PYTHONPATH export PATH=/home/igptest/exomesequencing/software/:$BOWTIE2:$TOPHAT2:$PATH transcriptomeindex=/scratch/liuq6/reference/gtfindex/Homo_sapiens.GRCh37.75 genomeindex=/scratch/liuq6/reference/bowtie2_index/hg19 gtffile=/scratch/liuq6/reference/Homo_sapiens.GRCh37.75_chr1-22-X-Y-M.gtf reference=/home/igptest/exomesequencing/reference/hg19/hg19_chr.fa VarScan=/home/igptest/exomesequencing/software/VarScan.v jar

5 Environment Variables
The PATH is an environment variable. It is a colon delimited list of directories that your shell searches through when you enter a command. All executables are kept in different directories on the Linux and Unix like operating systems. PYTHONPATH is an environment variable which you can set to add additional directories where python will look for modules and packages

6 Two ways source path.txt 2. put the scripts in .bashrc
source is a bash shell built-in command that executes the content of the file passed as argument. 2. put the scripts in .bashrc .bashrc is a file from which bash reads and executes command automatically when you log in. /home/yourusername/.bashrc

7 Practice Before and after you load all the environment echo $SHELL (the name of the current shell) env (the existing environment variables) echo $HOME echo $PATH echo $gtffile

8 Reads alignment

9 1. un-spliced mapping to transcriptome and then genome (bowtie)
TopHat 1. un-spliced mapping to transcriptome and then genome (bowtie) 2. “Contiguously unmappable" reads are used to predict possible splice junctions.

10 Tophat2 The basename of the genome index to be searched tophat2 [options]* <genome_index_base> PE_reads_1.fq.gz PE_reads_2.fq.gz Options: -o/--output-dir <string> Sets the name of the directory in which TopHat will write all of its output. The default is "./tophat_out". -G/--GTF <GTF/GFF3 file> Supply TopHat with a set of gene model annotations and/or known transcripts, as a GTF 2.2 or GFF3 formatted file --transcriptome-index <dir/prefix> use the previously built transcriptome index files

11 TopHat output accepted_hits.bam. A list of read alignments in SAM format. junctions.bed. A UCSC BED track of junctions reported by TopHat. Each junction consists of two connected BED blocks, where each block is as long as the maximal overhang of any read spanning the junction. The score is the number of alignments spanning the junction. insertions.bed and deletions.bed. UCSC BED tracks of insertions and deletions reported by TopHat.

12 Practice tophat2 --transcriptome-index=$transcriptomeindex -o ctrl1 $genomeindex /scratch/igptest/RNAseq/data/ctrl1.fastq Add --transcriptome-only to save time tophat2 --transcriptome-index=$transcriptomeindex -o ctrl1 --transcriptome-only $genomeindex /scratch/igptest/RNAseq/data/ctrl1.fastq

13 SAMTOOLS samtools view samtools sort samtools index

14 Practice View the header section of bam file
samtools view -h accepted_hits.bam Extract the alignments with MAPQ>10 samtools view -q 10 accepted_hits.bam

15 Practice Extract the alignments mapped to reverse strand
samtools view -f 16 accepted_hits.bam

16 Practice Index the alignment file (.bai file)
samtools index accepted_hits.bam Use samtools to get all the reads mapped to tp53 and myc. How many reads? Any junction reads? TP53, 17:7,571,720-7,590,868 MYC, 8:128,748, ,753,680

17 Homework Install IGV https://www.broadinstitute.org/igv/download
Use IGV to view the bam file (need the bam and index files) Take a look at the reads mapped to genes MYC and TP53

18 Homework Align ER1.fastq
How many reads mapped to MYC and TP53? Are there any junction reads? Visualize the results in IGV Extract the alignments mapped to MYC and generate a new BAM file Extract the alignments with MAPQ>10 and generate a new BAM file and index the file

19 Ht-seq Given a file with aligned sequencing reads and a list of genomic features, a common task is to count how many reads map to each feature. Deal with reads that overlap more than one features

20 Ht-seq Options

21 Ht-seq htseq-count [options] <alignment_file> <gff_file>
Output: a table with counts for each feature, followed by the special counters, which count reads that were not counted for any feature for various reasons. The names of the special counters all start with a double underscore, to facilitate filtering. __no_feature: reads (or read pairs) which could not be assigned to any feature (set S as described above was empty). __ambiguous: reads (or read pairs) which could have been assigned to more than one feature and hence were not counted for any of these (set Shad mroe than one element). __too_low_aQual: reads (or read pairs) which were skipped due to the –a option __not_aligned: reads (or read pairs) in the SAM file without alignment __alignment_not_unique: reads (or read pairs) with more than one reported alignment. These reads are recognized from the NH optional SAM field tag. (If the aligner does not set this field, multiply aligned reads will be counted multiple times, unless they getv filtered out by due to the -a option.)

22 Practice htseq-count -s no -f bam -i gene_name ctrl1/accepted_hits.bam $gtffile > ctrl1.count

23 Homework Summarize the read counts to the gene level for ER1
Summarize the read counts to the exon level for ctrl1

24 edgeR Install R in your laptop Install edgeR package
source(" biocLite("edgeR")

25 edgeR Raw counts Small sample size Complicated experimental design

26 Negative binomial distribution
Technical replicates –Poisson distribution var(ygi)=𝜇gi Biological variances var(ygi)=𝜇gi+ ∅ 𝑔 𝜇gi 2

27 Normalization TMM (a trimmed mean of M-values)
minimize the log-fold changes between the samples for most genes.

28 Normalization RNA-seq measures the relative abundance of each gene in each RNA sample, but RNA output per cell FPKM: g2-g10 TMM: g1 N T g1 1 1000 g2 g3 g4 g5 g6 g7 g8 g9 g10

29 Differential analysis
Read Data DGEList preprocess Normalization MDS calcNormFactors visualize PCA estimateGLMCommonDisp Estimate the dispersion estimateGLMTrendedDisp Heatmap estimateGLMTagwiseDisp glmFit Differential expression glmLRT


Download ppt "RNA-seq data analysis Project"

Similar presentations


Ads by Google