#激活环境
conda activate qiime2-2019.7
#按拷贝数标准化OTU表,处理自己数据成picrust1所需
##安装好qiime2,然后导入成qiime2格式,方便后面使用
#feature-table.biom文件
#qiime tools import --input-path ../97_otus.fasta --output-path ref-sequences.qza --type 'FeatureData[Sequence]' \
qiime vsearch cluster-features-closed-reference --i-sequences rep-seqs.qza --output-dir closed-ref-otu/ --i-table table.qza --i-reference-sequences ref-sequences.qza --p-perc-identity 0.97
qiime tools export --input-path closed-ref-otu/clustered_table.qza --output-path closed-ref-otu
#激活环境
conda activate picrust1
#biom convert -i otu_table.biom -o otu_table_json.biom --to-json
#normalize_by_copy_number.py -i otu_table_json.biom -o normalized_otus.biom
#按拷贝数标准化OTU表,处理自己数据成picrust1所需
normalize_by_copy_number.py -i closed-ref-otu/feature-table.biom -o normalized_otus.biom
#biom convert --to-tsv -i closed-ref-otu/feature-table.biom -o closed_reference_otu_table.tsv
#normalize_by_copy_number.py -i feature-table.biom -o normalized_otus.biom
#预测宏基因组
predict_metagenomes.py -i normalized_otus.biom -o metagenome_predictions.biom
# 转换格式为txt
biom convert -i metagenome_predictions.biom -o metagenome_predictions.txt --table-type="OTU table" --to-tsv
#调整为标准表格
#sed -i '/# Const/d;s/#OTU //g' metagenome_predictions.txt 我是黑苹果,可能mac sed命令有所差别,没有#完成这个命令。
#按功能级别分类汇总,-c指输出类型,有KEGG_Pathways, COG_Category,RFAM三种,-l是级别,分3级
categorize_by_function.py -i metagenome_predictions.biom -c KEGG_Pathways -l 3 -o metagenome_predictions.L3.biom
#summarize_taxa.py -i metagenome_predictions.L3.biom -o sum_taxa_level3/ --absolute_abundance --md_identifier #"KEGG_Pathways" --level 3
# 转换格式为txt,然后就可以看结果了,使用excel打开即可清楚查看。
biom convert -i metagenome_predictions.L3.biom -o metagenome_predictions.L3.txt --table-type="OTU table" --to-tsv
#同样没有完成 sed -i '/# Const/d;s/#OTU //g' metagenome_predictions.L3.txt
#按功能级别分类汇总,-c指输出类型,有KEGG_Pathways, COG_Category,RFAM三种,-l是级别,2级时
categorize_by_function.py -i metagenome_predictions.biom -c KEGG_Pathways -l 2 -o metagenome_predictions.L2.biom
# 转换格式为txt,然后就可以看结果了,使用excel打开即可清楚查看。
biom convert -i metagenome_predictions.L2.biom -o metagenome_predictions.L2.txt --table-type="OTU table" --to-tsv
#效果Li S, You J, Wang Z, Liu Y, Wang B, Du M, Zou T. Curcumin alleviates high-fat diet-induced hepatic steatosis and obesity in association with modulation of gut microbiota in mice. Food Res Int. 2021 May;143:110270. doi: 10.1016/j.foodres.2021.110270. Epub 2021 Mar 9. PMID: 33992371.
暂无评论