- 一般都可以通过 conda install 安装,如果不行,再考虑其他方法
质控
FastQC
#安装
#从conda直接安装
conda isntall fastqc
#如果实在没办法,方法二,从官网下载
wget https://www.bioinformatics.babraham.ac.uk/projects/fastqc/fastqc_v0.11.9.zip
unzip fastqc*.zip -d .
cd FastQC
chmod 755 fastqc
fastqc -h
#使用
fastqc [-o output dir] [-f fastq|bam|sam] [-t threads] seqfile1 seqfile2 ... seqfileN
Multiqc
#安装
conda install -c bioconda -c conda-forge multiqc
#使用
multiqc .
比对
STAR
#安装
conda insall STAR
which STAR #看一下安装成功了没
#使用
#先建立索引
STAR --runThreadN 4 --runMode genomeGenerate --genomeDir . --genomeFastaFiles GRCh38.fa --sjdbGTFfile GRCh38.gtf
#对GRCh38建立索引,约需内存32G,4线程下约需要1.5h
#比对
STAR --runMode alignReads --runThreadN 4 --readFilesIn seq_1.fastq.gz seq_2.fastq.gz --outFileNamePrefix ../alignment_result/ID. --genomeDir ../ref --readFilesCommand zcat
#3514个单细胞,10线程36小时,内存约32G
Samtools
#安装
conda install -c bioconda samtools
#.sam转换成.bam
samtools view -@ 10 -S SRR0011223344.sam -b > SRR0011223344.bam
#.bam排序,默认按照染色体位置
samtools sort SRR0011223344.bam -o SRR0011223344.sorted.bam
#索引
samtools index SRR0011223344.sorted.bam
报错踩坑
Parse Error
Truncated File.
- 文件里混入了一些莫名其妙的东西,有可能是Standard error 和 Stardard output 的问题。应该检查一下具体的代码时怎么跑的,pipeline是怎么样的,比较直接的办法就是不要贪图简便,把转换和sort的步骤分开跑。
生成表达矩阵
FeatureCounts
#安装
wget -c https://sourceforge.net/projects/subread/files/subread-2.0.0/subread-2.0.0-Linux-x86_64.tar.gz
tar -zxvf subread-2.0.0-Linux-x86_64.tar.gz
#统计conts
../app/subread-2.0.0-Linux-x86_64/bin/featureCounts -T 6 -t exon -g gene_id -a ../ref/GRCh38_ERCC.gtf -o CountsRaw.txt *.sorted.bam 1>FeatureCounts.log 2>&1