生信喵 发表于 2022-6-30 16:06:49

短序列比对练习

一、比对练习
mkdir 52.bwa
#1 bwa比对
#建立索引
ln -s /share/home/xiehs/05.assembly/data/MGH78578.fasta .

#bwa比对
bwa mem MGH78578.fasta /share/home/xiehs/05.assembly/data/illumina_1.fastq.gz /share/home/xiehs/05.assembly/data/illumina_2.fastq.gz >MGH78578.sam

#bwa-mem2比对
bwa-mem2 index MGH78578.fasta
time bwa-mem2 mem MGH78578.fasta /share/home/xiehs/05.assembly/data/illumina_1.fastq.gz /share/home/xiehs/05.assembly/data/illumina_2.fastq.gz >MGH78578.sam

#bwa+samtools一条命令
bwa-mem2 mem -t 12 MGH78578.fasta /share/home/xiehs/05.assembly/data/illumina_1.fastq.gz /share/home/xiehs/05.assembly/data/illumina_2.fastq.gz | samtools sort -O bam - >MGH78578.sorted.bam
#拟南芥比对
ln -s /share/home/xiehs/05.assembly/ninanjie/tair10.fna
bwa-mem2 index tair10.fna
bwa-mem2 mem -t 12 tair10.fna /share/home/xiehs/05.assembly/ninanjie/illumina/il_1.fq.gz /share/home/xiehs/05.assembly/ninanjie/illumina/il_2.fq.gz >tair10.sam 2>bwa.log


二、split比对
       针对人基因组RNA-Seq,read跨越外显子,此时要使用支持切除read的软件,例如tophat2,升级的hisat2.而bowtie2则不行。下面我们可以来对比下。
#bowtie2与hisat2比较
ln -s /share/home/xiehs/07.aligment/data/chrX.fa .
bowtie2-build chrX.fa chrX
bowtie2 -x chrX -p 12 -1 /share/home/xiehs/07.aligment/data/ERR188044_chrX_1.fastq.gz -2 /share/home/xiehs/07.aligment/data/ERR188044_chrX_2.fastq.gz >bowtie2.sam 2> bowtie2.log

hisat2-build chrX.fa chrX
hisat2 -p 12 --dta -xchrX -1 /share/home/xiehs/07.aligment/data/ERR188044_chrX_1.fastq.gz -2 /share/home/xiehs/07.aligment/data/ERR188044_chrX_2.fastq.gz -S hisat2.sam 2> hisat2.log

bowtie2.sam 680M
hisat2.sam 737M       hisat2支持split比对,可以看到文件大小比bowtie2的结果更多了。
       其他的软件还有soap软件,但是很久没有更新了。STAR也是做RNA-Seq的,参数比较多。
页: [1]
查看完整版本: 短序列比对练习