環(huán)境配置
conda create -n rna python=3.9
conda activate rna
conda install -y multiqc trim-galore subread hisat2
質(zhì)檢
fastqc *.fastq.gz
multiqc *.zip
去接頭
vim fastq_list.txt ### 構(gòu)建自己的文件列表
cat fastq_list.txt | while read id;
do (trim_galore -q 20 \
--phred33 --stringency 3 \
--length 20 -e 0.1 \
--paired ${id}_L002_R1_001.fastq.gz ${id}_L002_R2_001.fastq.gz \
--gzip -o ./clean ); done
比對(duì)
mkdir aligned
cat ./fastq_list.txt | while read id;
do (hisat2 -t -p 20 -x ~/ref/hg38/genome \
-1 ./clean/${id}_L002_R1_001_val_1.fq.gz -2 ./clean/${id}_L002_R2_001_val_2.fq.gz \
-S ./aligned/${id}.sam); done
得到count值
mkdir counts
cat ./fastq_list.txt | while read id;
do (featureCounts -T 5 \
-t exon \
-g gene_id \
-a ~/ref/Homo_sapiens.GRCh38.107.chr.gtf \
-o ./counts/${id}_counts.txt \
./aligned/${id}.sam); done
最終會(huì)在目標(biāo)文件夾下面獲得兩個(gè)文件唱蒸,counts.txt和counts.txt.summary凯楔。在R中進(jìn)行ID轉(zhuǎn)換即可禀横。