1.qiime1
1.1 给分好的序列改名成所需要的,使用python,shell不会这么简单的操作。。。:
# -*- coding: UTF-8 -*-
import os
for a in os.listdir('./'):
if '_1_S0_L007_R2_001.fastq.gz' in a:
fq1 = a
fq2 = a.split('_1_S0_L007_R2_001.fastq.gz')[0] + '_2_S0_L007_R2_001.fastq.gz'
name = a.split('_1_S0_L007_R2_001.fastq.gz')[0]
cmd = 'fastp -f 24 -F 23 \
-i %s -I %s -o primer_trimmed_fastqs/%s_1_S0_L007_R2_001.fastq.gz \
-O primer_trimmed_fastqs/%s_2_S0_L007_R2_001.fastq.gz' % (fq1, fq2, name, name)
os.system(cmd)
1.2 直接合并序列,有点简单粗暴,暂不确定科学性
import os
for a in os.listdir('./'):
if '_1_S0_L007_R2_001.fastq.gz' in a:
fq1 = a
fq2 = a.split('_1_S0_L007_R2_001.fastq.gz')[0] + '_2_S0_L007_R2_001.fastq.gz'
name = a.split('_1_S0_L007_R2_001.fastq.gz')[0]
cmd = 'zcat %s* >> combine/%s_1_S0_L007_R1_001.fastq' % (name, name)
os.system(cmd)
os.system('gzip combine/*')
1.3 进入qiime和usearch的流程,参考公众号宏基因组的教程推文
这里把导入数据的命令再次放在这:
multiple_split_libraries_fastq.py -i ./combine -o qiime1
1.4 画柱状组,看结果
2. qiime的继续测试
qiime2代表未来,一定要努力掌握,否则就跟不上时代,qiime2现在发布的版本已经足够可用了,加油学习!
2.1 导入数据
qiime tools import \
--type 'SampleData[SequencesWithQuality]' \
--input-path casava-18-single-end-demultiplexed \
--input-format CasavaOneEightSingleLanePerSampleDirFmt \
--output-path demux-single-end.qza
2.2 统计样本测序质量QC
qiime demux summarize \
--i-data demux.qza \
--o-visualization demux.qzv
2.3 质控和特征表构建(dada2)
qiime dada2 denoise-single --i-demultiplexed-seqs demux-se.qza --p-trim-left 0 --p-trunc-len 126 --o-representative-sequences rep-seqs-dada2.qza --o-table table-dada2.qza --o-denoising-stats stats-dada2.qza