外部数据导入qiime2软件
序列、OTU(Feature) Table导入qiime2较为简单,可以按官方推荐方式进行导入。其中,OTU table输入方法如下:
biom convert -i table.txt -o table.from_txt_json.biom --table-type="OTU table" --to-json
qiime tools import \
--input-path table.from_txt_json.biom \
--type 'FeatureTable[Frequency]' \
--input-format BIOMV100Format \
--output-path table.qza
下面重点介绍taxonomy导入方式:
1. TSV格式
创建TSV表格,切记不能含有表头(qiime2会自己生成headline),内容按照OTUID和taxonomy两列排列。代码如下:
qiime tools import \
--input-path taxonomy.txt \
--input-format HeaderlessTSVTaxonomyFormat \
--type FeatureData[Taxonomy] \
--output-path taxonomy.qza
2. Biom格式
- 首先创建.txt文件,必须含有表头 Feature ID 和taxon,按照ID和taxonomy两列排列。
- 利用biom将其转换为biom格式文档。
biom convert -i taxonomy.txt -o taxonomy.biom --table-type="OTU table" --to-hdf5
需要注意的是,这里必须是hdf5格式,不能为json格式。
- 此后,按照如下代码导入:
qiime tools import \
--input-path taxonomy.biom \
--input-format BIOMV210Format \
--type FeatureData[Taxonomy] \
--output-path taxonomy.qza