RNA-seq脚本备份
hisat2-build建立索引
hisat2-build ./data/Saccharomyces_cerevisiae.R64-1-1.dna_rm.toplevel.fa ./data/yeast_ref
hisat2将read比对到参参考基因组由于sam格式的文本文件过大,一般将其转换为bam格式的文件
hisat2 -x ./data/yeast_ref -U ./data/SRR1916152.fastq | samtools view -bS -| samtools sort - -o ./data/EV_3.bam
hisat2 -x ./data/yeast_ref -U ./data/SRR1916153.fastq | samtools view -bS -| samtools sort - -o ./data/EV_4.bam
hisat2 -x ./data/yeast_ref -U ./data/SRR1916154.fastq | samtools view -bS -| samtools sort - -o ./data/DNMT3B_2.bam
hisat2 -x ./data/yeast_ref -U ./data/SRR1916155.fastq | samtools view -bS -| samtools sort - -o ./data/DNMT3B_3.bam
hisat2 -x ./data/yeast_ref -U ./data/SRR1916156.fastq | samtools view -bS -| samtools sort - -o ./data/DNMT3B_4.bam
建立bam文件的索引
samtools index ./data/EV_3.bam
samtools index ./data/EV_4.bam
samtools index ./data/DNMT3B_2.bam
samtools index ./data/DNMT3B_3.bam
samtools index ./data/DNMT3B_4.bam
安装HTSeq软件,计算每个基因中reads的数目
htseq-count -f bam -r pos ./data/EV_3.bam ./data/Saccharomyces_cerevisiae.R64-1-1.106.gtf > ./data/EV_3.count.tab &
htseq-count -f bam -r pos ./data/EV_4.bam ./data/Saccharomyces_cerevisiae.R64-1-1.106.gtf > ./data/EV_4.count.tab &
htseq-count -f bam -r pos ./DNMT3B_2.bam ./data/Saccharomyces_cerevisiae.R64-1-1.106.gtf > ./data/DNMT3B_2.bam.count.tab &
htseq-count -f bam -r pos ./DNMT3B_3.bam ./data/Saccharomyces_cerevisiae.R64-1-1.106.gtf > ./data/DNMT3B_3.bam.count.tab &
htseq-count -f bam -r pos ./DNMT3B_4.bam ./data/Saccharomyces_cerevisiae.R64-1-1.106.gtf > ./data/DNMT3B_4.bamcount.tab &
统计比对信息
samtools flagstat ./data/EV_3.bam
使用samtools tview查看比对信息
samtools tview ./data/EV_3.bam
测序质量
fastqc ./data/SRR1916152.fastq -o ./data
fastqc ./data/*.fastq -o ./data
去除Shell脚本的\r字符:
sed -i 's/\r//' one-more.sh
评论
发表评论