RNA-seq 比对软件STAR——(2)使用

RNA-seq 比对软件STAR——(2)使用

一、参数说明

详见——>manual
(1) readFilesIn
要映射序列文件的名称(带路径),如果文件是压缩的文件使用readFilesCommand参数进行解压缩。如果是(*.gz)使用 --readFilesCommand zcat或 --readFilesCommand gunzip -c,对于bzip2压缩文件,使用–readFilesCommand bunzip2 -c

(2) outFileNamePrefix
输出文件的前缀(包含路径)

(3) outFilterMultimapNmax
一个read允许最多对齐数,超过认为read没有映射
max number of multiple alignments allowed for a read: if exceeded, the read is considered unmapped
(4) outSAMtype BAM SortedByCoordinate
生成的BAM文件排序
output sorted by coordinate Aligned.sortedByCoord.out.bam file, similar to samtools sort command. If this option causes problems, it is recommended to reduce
–outBAMsortingThreadN from the default 6 to lower values (as low as 1).
(5) outSAMattributes

  • NH:number of loci the reads maps to: =1 for unique mappers, >1 for multimappers. Standard SAM tag.
  • HI:multiple alignment index, starts with –outSAMattrIHstart (=1 by default). Standard SAM tag
  • NM:edit distance to the reference (number of mismatched + inserted +deleted bases) for each mate. Standard SAM tag.
  • MD:string encoding mismatched and deleted reference bases (see standard SAM specifications). Standard SAM tag.
  • XS:alignment strand according to –outSAMstrandField.
  • AS:multiple alignment index, starts with –outSAMattrIHstart (=1 by default). Standard SAM tag

二、index

STAR --runMode genomeGenerate --runThreadN 20 \
--genomeDir /share2/pub/yangjy/yangjy/database/STAR_index69 \
--outTmpDir /share2/pub/yangjy/yangjy/database/tmp \
--genomeFastaFiles /share/pub/wangxy/software/genome/ucsc/hg38/hg38.fa \
--sjdbGTFfile /share/pub/wangxy/Annotation/hg38/gencode.v34.annotation.gtf \
--sjdbOverhang 69

error 1
在这里插入图片描述
新版的STAR 需要写tmp路径,即增加参数 --outTmpDir ,而且这个路径必须不存在的!!,上面的STAR_index69必须是提前创建好的!!
error 2
在这里插入图片描述
如果想要像我上面这种方式写脚本,一定要注意在每个反斜杠后面不能有空格或者其他字符!否则它认不得!其实可以直接写一行,但是为了方便看参数,我习惯这样写了,你们根据自己的习惯!

result
在这里插入图片描述

三、mapping

for file in 'SRR11296675' 'SRR11296676' 'SRR11296677' 'SRR11296678' 'SRR11296679' 'SRR11296680' 'SRR11296681' 'SRR11296682'
do
echo $file
STAR  \
--runThreadN  40 \
--genomeDir /share2/pub/yangjy/yangjy/database/STAR_index69 \
--readFilesIn /share2/pub/yangjy/yangjy/rna-seq-data/GSE146887/fastq_data/$file.fastq \
--outFileNamePrefix /share2/pub/yangjy/yangjy/rna-seq-data/GSE146887/bbam/$file \
--outFilterMultimapNmax 500 \
--outSAMtype BAM SortedByCoordinate \
--outSAMattributes NH HI NM MD XS AS     
done

result
在这里插入图片描述
用过老版本的,新版本真的快很多很多~

  • 1
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

柚子味的羊

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值