转载:https://mp.weixin.qq.com/s?__biz=MzI1MjU5MjMzNA==&mid=2247484731&idx=1&sn=b15fbee5910b36341bf366860ee5df53&scene=21#wechat_redirect
这次给大家带来的是ENCODE project的御用比对软件STAR,ENCODE项目是一个由美国国家人类基因组研究所(NHGRI)在2003年9月发起的一项公共联合研究项目,旨在找出人类基因组中所有功能组件[。这是既完成人类基因组计划后国家人类基因组研究所开始的最重要的项目之一。所有在该项目中产生的数据都会被迅速的在公共数据库中公开。
在我之前的那篇RNA-seq数据分析—-方法学文章的实战练习文章里关于比对软件的比较中STAR也展现了不俗的表现。所以在处理比对时我也考虑了将HISAT2与STAR共同使用,查看它们的表现情况,选取适合的比对工具。
STAR的安装
cd biosoft && mkdir STAR && cd STAR
wget https://github.com/alexdobin/STAR/archive/2.5.3a.tar.gz
tar -xzf 2.5.3a.tar.gz
cd STAR-2.5.3a
# for easy use, add bin/ to your PATH
下载需要参考基因组并进行index构建
# downloading dna index fasta file
nohup wget -r -np -nH -nd -R index.html -L ftp://ftp.ensembl.org/pub/release-90/fasta/homo_sapiens/dna_index/ &
# download gft annotation file
nohup wget ftp://ftp.ensembl.org/pub/release-90/gtf/homo_sapiens/Homo_sapiens.GRCh38.90.chr_patch_hapl_scaff.gtf.gz &
mkdir STAR_index && cd STAR_index
STAR --runMode genomeGenerate --genomeDir ~/reference/STAR_index/ --genomeFastaFiles ~/reference/genome/hg38/Homo_sapiens.GRCh38.dna.toplevel.fa --sjdbGTFfile ~/reference/genome/hg38/Homo_sapiens.GRCh38.90.chr_patch_hapl_scaff.gtf --sjdbOverhang 199
# --sjdbOverhang 数值为reads长度-1
# Mode 为generate
# --genomeFastaFiles --sjdbGTFfile 分别对应fasta文件和GTF文件
STAR的使用
# STAR的manual里面给了最基本的比对参数示例
STAR
--runThreadN NumberOfThreads
--genomeDir /path/to/genomeDir
--readFilesIn /path/to/read1 [/path/to/read2 ]
# 基本示例,
针对fastq.gz文件增加--readFilesCommand gunzip -c 参数/--readFilesCommand zcat参数,针对bzip2文件使用--readFilesCommand bunzip2 -c参数
STAR --runThreadN 20 --genomeDir ~/reference/STAR_index/ --readFilesCommand zcat --readFilesIn ~/RNA-seq/LiuPing_data/RNA-seq/SC_w2q20m35_N_1.fq.gz ~/RNA-seq/LiuPing_data/RNA-seq/SC_w2q20m35_N_2.fq.gz
# 输出unsorted or sorted bam file
--outSAMtype BAM Unsorted 实际上就是-name 的sort,下游可以直接接HTSeq
--outSAMtype BAM SortedByCoordinate
--outSAMtype BAM Unsorted SortedByCoordinate 两者都输出