温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

BIOM微生物数据格式及文件转换的方法

发布时间:2022-03-19 15:28:04 来源:亿速云 阅读:1555 作者:iii 栏目:开发技术

这篇文章主要介绍“BIOM微生物数据格式及文件转换的方法”,在日常操作中,相信很多人在BIOM微生物数据格式及文件转换的方法问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”BIOM微生物数据格式及文件转换的方法”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!

BIOM目前分为1.0 JSON和2.0 HDF5两个版本

1.0 JSON是编程语言广泛支持的格式,类似于散列的键值对结果。会根据数据松散程度,选择不同的存储结构来节省空间。

2.0 HDF5是二进制格式,被许多程序语言支持,读取更高效和节约空间。

如何节约存储:
  • biom格式转换常用命令:


  • 转换经典表格为HDF5或JSON格式

biom convert -i table.txt -o table.from_txt_json.biom --table-type="OTU table" --to-json
biom convert -i table.txt -o table.from_txt_hdf5.biom --table-type="OTU table" --to-hdf5
  • 转换biom为经典格式

biom convert -i table.biom -o table.from_biom.txt --to-tsv
  • 转换biom为经典格式,并在最后列包括物种注释信息

biom convert -i table.biom -o table.from_biom_w_taxonomy.txt --to-tsv --header-key taxonomy
  • 转换biom为经典格式,并在最后列包括物种注释信息,并改名为ConsensusLineage

  • 此功能对于一些软件要求指定的列名有很有用。

- biom convert -i table.biom -o table.from_biom_w_consensuslineage.txt --to-tsv --header-key taxonomy --output-metadata-id "ConsensusLineage"
  • 带物种注释表格互转

biom convert -i table.biom -o table_tax.txt --to-tsv --header-key taxonomy
biom convert -i table_tax.txt -o new_table.biom --to-hdf5 --table-type="OTU table" --process-obs-metadata taxonomy
biom convert -i table_tax.txt -o new_table.biom --to-json --table-type="OTU table" --process-obs-metadata taxonomy

取子集亚组进行分析;

biom subset-table -i otu_table.biom -a sample -s samples_list.txt -o otu_table_subset.biom

samples_list.txt 为单列样品名称;

biom文件中过滤方法:

如果系统中安装了qiime1 ,会有关于biom文件得过滤得脚本,方便我们筛选自己得数用于后续分析:

# 按样品数据测序量过滤:选择counts>30000的样品
filter_samples_from_otu_table.py -i otu_table.biom -o otu_table1.biom -n 30000
# 查看过滤后结果:
biom summarize-table -i otu_table1.biom
# 按样品数据测序量过滤:选择counts<10000的样品
filter_samples_from_otu_table.py -i otu_table.biom -o otu_table_no_high_coverage_samples.biom -x 10000

# 按OTU丰度过滤:选择相对丰度均值大于十万分之一的OTU
filter_otus_from_otu_table.py --min_count_fraction 0.00001 -i otu_table.biom -o otu_table1.biom


# 按物种过滤OTU表:去除p__Chloroflexi菌门等 
filter_taxa_from_otu_table.py -i otu_table.biom -o otu_table1.biom
#Split otu_table.biom into per-study OTU tables, and store the results in ./per_study_otu_tables/
 split_otu_table.py -i otu_table.biom -m Fasting_Map.txt -f Treatment -o per_study_otu_tables
#Split otu_table.biom into multiple biom tables based on the Treatment and Color of the samples
 split_otu_table.py -i otu_table.biom -m Fasting_Map.txt -f Treatment,Color -o ./per_study_otu_tables/

到此,关于“BIOM微生物数据格式及文件转换的方法”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注亿速云网站,小编会继续努力为大家带来更多实用的文章!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI