1、cutadapt去接头
#参考前文
https://zhuanlan.zhihu.com/p/232038797zhuanlan.zhihu.com2、hisat2建索引
cd /data2/xxx/data3/3hisat2
hisat2-build -p
![074d89c3c8a15200bdf640a0b6f9abcf.png](https://i-blog.csdnimg.cn/blog_migrate/a5fe982fcba16e97536c5810215b7b19.jpeg)
#-x 索引文件,第二步hisat2建立的索引文件前缀
![d4a70347428189a971189ac004a43fc3.png](https://i-blog.csdnimg.cn/blog_migrate/c11c35840c3af9c0bcb7050b8fe56038.png)
#使用samtools view 把sam转换为bam
![22f36a54b166e7cd70b7755ce3a7a24e.png](https://i-blog.csdnimg.cn/blog_migrate/36bf3e09f5d38b044a142c9be596ed18.png)
#samtools sort 排序
![597d9f69709e49df137a347d9b0c71a4.png](https://i-blog.csdnimg.cn/blog_migrate/d381791340aeafbd13722b03acc264f4.png)
3、htseq-count计数
#-f 输入的比对结果文件格式
![47d66397dfb720bac34ad5f1317b9250.png](https://i-blog.csdnimg.cn/blog_migrate/67ef5ce1c58e2b1461bbe0eadc34f570.png)
![9702c4c134457bb1c28ec0323a17a165.png](https://i-blog.csdnimg.cn/blog_migrate/b83cc55af7b95219b658a3adaa42eccd.jpeg)