1.featureCounts
#路径
~/project/Human-16-Asthma-Trans/Expression/featureCounts
## 定义输入输出文件夹
gtf=~/database/genome/Ensembl/Homo_sapiens/GRCh38_release95/GRCh38_release95/Homo_sapiens.GRCh38.95.gtf.gz
inputdir=~/project/Human-16-Asthma-Trans/mapping/Hisat2
# featureCounts对bam文件进行计数
featureCounts -T 10 -p -t exon -g gene_id -a $gtf -o all.id.txt $inputdir/*.sorted.bam
# 对定量结果质控
multiqc all.id.txt.summary
# 得到表达矩阵
cat all.id.txt | cut -f1,7- > counts.txt
1.1 官网:http://bioinf.wehi.edu.au/featureCounts/
1.2
1.3
1.4
2. salmon定量
#路径
~/project/Human-16-Asthma-Trans/Expression/salmon
# 构建salmon索引
time salmon index -t Homo_sapiens.GRCh38.cdna.all.fa.gz -i Homo_sapiens.GRCh38.cdna.all.salmon
# 定义文件夹
index=~/database/genome/Ensembl/Homo_sapiens/GRCh38_release95/GRCh38_release95/Homo_sapiens.GRCh38.cdna.all.salmon/
input=~/project/Human-16-Asthma-Trans/data/cleandata/trim_galore
outdir=~/project/Human-16-Asthma-Trans/Expression/salmon
# 单样本测试
salmon quant -i $index -l A \
-1 $input/SRR1039510_1_val_1.fq.gz \
-2 $input/SRR1039510_2_val_2.fq.gz \
-p 10 -o $outdir/SRR1039510.quant
# 编写脚本,使用salmon批量对目录下所有fastq文件进行定量
cat /teach/project/Human-16-Asthma-Trans/data/rawdata/sra/sampleId.txt |while read id
do
echo "salmon quant -i ${index} -l A -1 ${input}/${id}_1_val_1.fq.gz -2 ${input}/${id}_2_val_2.fq.gz -p 5 -o ${outdir}/${id}.quant"
done >salmon.sh
# 后台运行脚本
nohup bash salmon.sh 1>salmon.log 2>&1 &
2.1
2.2
2.3
网友评论