Analysis on the 6-tree Alpha Beta diversity, alphabeta

Source: Internet
Author: User

Analysis on the 6-tree Alpha Beta diversity, alphabeta
Preparations before analysis

# Go To The working directory cd example_PE250
Review in the previous section: Our OTU obtains the species annotation and learns the various operations of the OTU table-adding information, format conversion, and filtering information. Next we will learn how to analyze the evolution of the OTU sequence and calculate the Alpha and Beta diversity values at the same time. 16. The tree building tree is based on the multi-sequence comparison results, which can display a wealth of information. We will explain it in detail in the R plot. This is just an input file for Alpha and Beta diversity analysis.
# Clustalo multi-sequence comparison, if not, install Clustal Omegaclustalo-I result/rep_seqs4.fa-o temp/empty -- seqtype = DNA -- full -- force -- threads = 30 # conservative sequence and conservative region filter_alignment.py-I in the filter results temp/rep_seqs_align.fa-o temp/# rep_seqs_align_pfiltered.fa, only very short conserved region saved # make_phylogeny.py-I temp/rep_seqs_align_pfiltered.fasta-o result/rep_seqs.tree # generate tree by fasttree Based on FastTree
17. Alpha diversity is used to calculate the composition of species in the sample, including quantity and richness. The specific explanation is as follows: the expansion sub-chart interprets a box of line charts: The OTU table needs to be standardized Before Alpha diversity computing, because the number of detected species varies with the sequencing depth. We re-sample The OTU table to the same data volume to fairly compare the species of each sample. The method is as follows:
# View the minimum data size of a sample biom summarize-table-I result/otu_table4.biom # standardize single_rarefaction.py-I result/otu_table4.biom-o temp/daily-d 2797 # commonly used computing four Alpha diversity indexes: alpha_diversity.py-I temp/otu_table_rare.biom-o result/alpha.txt-t result/rep_seqs.tree-m shannon, chao1, observed_otus, PD_whole_tree
18. Beta diversity is calculated for the same or different samples, and OTU tables also need to be standardized. Too much information is lost using the sampling method, which is not conducive to statistics. In this step, we select the CSS standardization method.
# CSS standardization OTU table normalize_table.py-I result/otu_table4.biom-o temp/otu_table_css.biom-a CSS # convert the standardized OTU table to text, used to draw biom convert-I temp/otu_table_css.biom-o result/otu_table_css.txt -- table-type = "OTU table" -- to-tsv # Delete unnecessary table information, it is convenient for R to read sed-I '/# Const/d; s/# OTU // g; s/ID. // g'result/otu_table_css.txt # Calculate the Beta diversity beta_diversity.py-I temp/otu_table_css.biom-o result/beta/-t result/rep_seqs.tree-m bray_curtis, weighted_unirac, unweighted_unifrac # Sort the Beta diversity distance files to facilitate R reading sed-I's/^ \ t // G' result/beta /*

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.