溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

BIOM微生物數據格式及文件轉換的方法

發(fā)布時間:2022-03-19 15:28:04 來源:億速云 閱讀:1636 作者:iii 欄目:開發(fā)技術

這篇文章主要介紹“BIOM微生物數據格式及文件轉換的方法”,在日常操作中,相信很多人在BIOM微生物數據格式及文件轉換的方法問題上存在疑惑,小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”BIOM微生物數據格式及文件轉換的方法”的疑惑有所幫助!接下來,請跟著小編一起來學習吧!

BIOM目前分為1.0 JSON和2.0 HDF5兩個版本

1.0 JSON是編程語言廣泛支持的格式,類似于散列的鍵值對結果。會根據數據松散程度,選擇不同的存儲結構來節(jié)省空間。

2.0 HDF5是二進制格式,被許多程序語言支持,讀取更高效和節(jié)約空間。

如何節(jié)約存儲:
  • 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文件中過濾方法:

如果系統(tǒng)中安裝了qiime1 ,會有關于biom文件得過濾得腳本,方便我們篩選自己得數用于后續(xù)分析:

# 按樣品數據測序量過濾:選擇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微生物數據格式及文件轉換的方法”的學習就結束了,希望能夠解決大家的疑惑。理論與實踐的搭配能更好的幫助大家學習,快去試試吧!若想繼續(xù)學習更多相關知識,請繼續(xù)關注億速云網站,小編會繼續(xù)努力為大家?guī)砀鄬嵱玫奈恼拢?/p>

向AI問一下細節(jié)

免責聲明:本站發(fā)布的內容(圖片、視頻和文字)以原創(chuàng)、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI