查看
bam文件 flags 4代表read未比对上;
samtools view -f 4 *bam|less -S
提取
提取unmapped序列:
samtools view -b -h -f 4 *.bam > unmapped.bam
-h 文件包含header line;-f,提取;-b,输出为bam格式
###-F参数是过滤的意思(filter);类似grep -v
samtools view -b -h -F 4 *.bam > mapped.bam
F意思为过滤掉以4为标签的序列
提取双端序列都mapping到参考序列(4+8)的结果
samtools view -bF 12 *.bam > mapped.bam
3.bam2fastq
bamToFastq -bam file_unmapped.bam -fq1 unmappedR1.fastq -fq2 unmappedR2.fastq
ref:https://www.jianshu.com/p/471a4fbcdd48
wget ftp://ftp.ncbi.nlm.nih.gov/blast/db/FASTA/nt.gz
wget ftp://ftp.ncbi.nlm.nih.gov/blast/db/FASTA/nr.gz
wget ftp://ftp.ncbi.nlm.nih.gov/blast/db/FASTA/nt.gz.md5
wget ftp://ftp.ncbi.nlm.nih.gov/blast/db/FASTA/nr.gz.md5
md5sum -c nt.gz.md5
md5sum -c nr.gz.md5
tar -xzvf nr.gz
tar -xzvf nt.gz
mkdir nr_db
mkdir nt_db
makeblastdb -in nr -dbtype prot -titl

最低0.47元/天 解锁文章
395

被折叠的 条评论
为什么被折叠?



