提取未比对序列

将reads比对到参考序列

bwa index R1.fa
bwa mem -t 4 R1.fa /mnt/e/SCN/FULL/full_k65_cov_TSLR/SCN_tr_1.00.0_0.cor.fastq.gz /mnt/e/SCN/FULL/full_k65_cov_TSLR/SCN_tr_2.00.0_0.cor.fastq.gz > R1_FULL.sam
samtools view -bS -1 R1_FULL.sam > R1_FULL.bam
samtools sort -@ 4 -O bam -o R1_FULL.sorted.bam R1_FULL.bam
samtools view -b -f 4 R1_FULL.sorted.bam > R1_FULL.sorted.unmapped.bam
samtools sort -@ 4 -O bam -n -o R1_FULL.nsorted.unmapped.bam R1_FULL.sorted.unmapped.bam
bedtools bamtofastq -i R1_FULL.nsorted.unmapped.bam -fq R2_FULL.1.fq -fq2 R2_FULL.2.fq

http://www.biotrainee.com/thread-766-1-1.html
https://bedtools.readthedocs.io/en/latest/content/tools/bamtofastq.html
https://blog.csdn.net/weixin_34346099/article/details/86399364
https://www.plob.org/article/1697.html

你可能感兴趣的:(提取未比对序列)