STAR安裝與使用

首先,先回顧一下STAR的使用流程:


安裝最新版本的STAR可以使用conda

conda install -c bioconda star
conda install -c bioconda/label/cf201901 star

但是當我使用最新版本的STAR跑之前版本STAR建立的index時,遇到這樣的報錯:


因此,我需要重新安裝舊版本的STAR.下載網址:https://github.com/alexdobin/STAR/releases/tag/STAR_2.4.2a

wget https://github.com/alexdobin/STAR/releases/tag/STAR_2.4.2a
tar -xzf STAR_2.4.2a.tar.gz
cd STAR_2.4.2a
# Build STAR
cd source
make STAR
STAR 建立index
STAR --runThreadN 6 --runMode genomeGenerate \
 --genomeDir ~/reference/index/STAR/mm10/ \
 --genomeFastaFiles ~/reference/genome/mm10/GRCm38.p5.genome.fa \ 
 --sjdbGTFfile ~/annotation/mm10/gencode.vM13.annotation.gtf \
 --sjdbOverhang 100

--runThreadN :線程數
--genomeDir :index輸出的路徑
--genomeFastaFiles :參考基因組
--sjdbGTFfile :參考基因組註釋文件
--sjdbOverhang :這個是reads長度的最大值減1,默認是100

STAR比對
STAR --runThreadN 20 --genomeDir ~/reference/index/STAR/mm10/ \
 --readFilesIn  test_1.fastq test_2.fastq \
 --outSAMtype BAM SortedByCoordinate \
 --outFileNamePrefix ./test

--readFilesIn :paired reads文件
--outSAMtype :表示輸出默認排序的bam文件
--outFileNamePrefix :前綴
參考:https://www.pellegrini.mcdb.ucla.edu/pellegrini/pellegrinilabscps/SCP_RNAseq_STAR.pdf
https://www.bioinfo-scrounger.com/archives/288/

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章