24
Flowchart (b) (c) (d)

Flowchart - UCLA · 2017-04-07 · beta_diversity.py –i otu_tables/ -m weighted_unifrac,unweighted_unifrac -o beta_div/ -t rep_phylo.tre. d) microbiome diversity analyses visualizaons

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Flowchart - UCLA · 2017-04-07 · beta_diversity.py –i otu_tables/ -m weighted_unifrac,unweighted_unifrac -o beta_div/ -t rep_phylo.tre. d) microbiome diversity analyses visualizaons

Flowchart

(b) (c)

(d)

Page 2: Flowchart - UCLA · 2017-04-07 · beta_diversity.py –i otu_tables/ -m weighted_unifrac,unweighted_unifrac -o beta_div/ -t rep_phylo.tre. d) microbiome diversity analyses visualizaons

d)microbiomediversityanalyses Thisworkflowconsistsofthefollowingsteps:

alphadiversity(microbialcommunityevennessandrichness)d1)GeneraterarefiedOTUtables(mulBple_rarefacBons.py)d2)ComputemeasuresofalphadiversityforeachrarefiedOTUtable(alpha_diversity.py)d3)Collatealphadiversityresults(collate_alpha.py)d4)GeneratealphararefacBonplots(make_rarefacBon_plots.py)betadiversity(similaritybetweenindividualmicrobialcommuniBes)d5)RarefyOTUtabletoremovesamplingdepthheterogeneity(single_rarefacBon.py)d6)Computebetadiversity(beta_diversity.py)d7)RunPrincipalCoordinatesAnalysis(principal_coordinates.py)d8)GeneratePCoAplots(make_3d_plots.pyormake_2d_plots.py)d9)StaBsBcalanalyses

Page 3: Flowchart - UCLA · 2017-04-07 · beta_diversity.py –i otu_tables/ -m weighted_unifrac,unweighted_unifrac -o beta_div/ -t rep_phylo.tre. d) microbiome diversity analyses visualizaons

d)microbiomediversityanalyses alphadiversity(microbialcommunityevennessandrichness,orthewithin-sample)AlphadiversitymeasuresinQIIME:(hXp://scikit-bio.org/docs/latest/generated/skbio.diversity.alpha.html)AnumberofalphadiversitymetricsarecurrentlysupportedinQIIME:non-phylogeneBc:Shannon-Wienerdiversityindex

alpha_diversity.py-s

Page 4: Flowchart - UCLA · 2017-04-07 · beta_diversity.py –i otu_tables/ -m weighted_unifrac,unweighted_unifrac -o beta_div/ -t rep_phylo.tre. d) microbiome diversity analyses visualizaons

d)microbiomediversityanalyses alphadiversity(microbialcommunityevennessandrichness,orthewithin-sample)d1)GeneraterarefiedOTUtables,PerformmulBplesubsamplingsonanOTUtable-m,--minMinimumnumberofseqs/sampleforrarefacBon.-x,--maxMaximumnumberofseqs/sample(inclusive)forrarefacBon.-s,--stepSizeofeachstepsbetweenthemin/maxofseqs/sample(e.g.min,min+step...forlevel<=max).-n,--num_repsThenumberofiteraBonsateachstep.[default:10]AnysamplecontainingfewersequencesintheinputfilethantherequestednumberofsequencespersampleisremovedfromtheoutputrarefiedOTUtable.--maxshouldnotbe>numberofsequencesinthesamplewithmostcoverage/depthrarefacBon_##_#.txt:thefirstsetofnumbersrepresentsthenumberofsequencessampled,andthelastnumberrepresentstheiteraBonnumber.Ineachsamplethesumofthecountsequalsthenumberofsamplestaken.

multiple_rarefactions.py -i otu_table.biom -m 100 -x 140 –s 5 -n 2 -o rarefied_otu_tables/

Page 5: Flowchart - UCLA · 2017-04-07 · beta_diversity.py –i otu_tables/ -m weighted_unifrac,unweighted_unifrac -o beta_div/ -t rep_phylo.tre. d) microbiome diversity analyses visualizaons

d)microbiomediversityanalyses alphadiversity(microbialcommunityevennessandrichness,orthewithin-sample)d1)GeneraterarefiedOTUtablesd2)ComputemeasuresofalphadiversityforeachrarefiedOTUtableThisscriptprocessessingleOTUtableThescriptprocessesmulBpleOTUtablesinthegivenfolder

alpha_diversity.py -i otu_table.biom –m observed_otus,shannon,PD_whole_tree –o alpha_div.txt -t rep_phylo.tre

alpha_diversity.py –i rarefied_otu_tables/ –m observed_otus,shannon,PD_whole_tree –o rarefied_otu_tables/ -t rep_phylo.tre

Page 6: Flowchart - UCLA · 2017-04-07 · beta_diversity.py –i otu_tables/ -m weighted_unifrac,unweighted_unifrac -o beta_div/ -t rep_phylo.tre. d) microbiome diversity analyses visualizaons

d)microbiomediversityanalyses alphadiversity(microbialcommunityevennessandrichness,orthewithin-sample)d1)GeneraterarefiedOTUtablesd2)ComputemeasuresofalphadiversityforeachrarefiedOTUtabled3)Collatealphadiversityresultsonefileforeveryalphadiversitymetricused.

collate_alpha.py –i rarefied_otu_tables/ -o rarefied_otu_tables/

Page 7: Flowchart - UCLA · 2017-04-07 · beta_diversity.py –i otu_tables/ -m weighted_unifrac,unweighted_unifrac -o beta_div/ -t rep_phylo.tre. d) microbiome diversity analyses visualizaons

d)microbiomediversityanalyses alphadiversity(microbialcommunityevennessandrichness,orthewithin-sample)d1)GeneraterarefiedOTUtablesd2)ComputemeasuresofalphadiversityforeachrarefiedOTUtabled3)Collatealphadiversityresultsd4)GeneratealphararefacBonplotsmake_rarefacBon_plots.py-irarefied_otu_tables/alpha_div_collated/-mFasBng_Map.txt--generate_average_tables--generate_per_sample_plots-orarefied_otu_tables/alpha_plot/

Page 8: Flowchart - UCLA · 2017-04-07 · beta_diversity.py –i otu_tables/ -m weighted_unifrac,unweighted_unifrac -o beta_div/ -t rep_phylo.tre. d) microbiome diversity analyses visualizaons

d)microbiomediversityanalyses Thisworkflowconsistsofthefollowingsteps:

alphadiversity(microbialcommunityevennessandrichness)d1)GeneraterarefiedOTUtables(mulBple_rarefacBons.py)d2)ComputemeasuresofalphadiversityforeachrarefiedOTUtable(alpha_diversity.py)d3)Collatealphadiversityresults(collate_alpha.py)d4)GeneratealphararefacBonplots(make_rarefacBon_plots.py)betadiversity(similaritybetweenindividualmicrobialcommuniBes)d5)RarefyOTUtabletoremovesamplingdepthheterogeneity(single_rarefacBon.py)d6)Computebetadiversity(beta_diversity.py)d7)RunPrincipalCoordinatesAnalysis(principal_coordinates.py)d8)GeneratePCoAplots(make_3d_plots.pyormake_2d_plots.py)d9)StaBsBcalanalyses

Page 9: Flowchart - UCLA · 2017-04-07 · beta_diversity.py –i otu_tables/ -m weighted_unifrac,unweighted_unifrac -o beta_div/ -t rep_phylo.tre. d) microbiome diversity analyses visualizaons

d)microbiomediversityanalyses betadiversity(similaritybetweenindividualmicrobialcommuniBes)BetadiversitymetricsassessthedifferencesbetweenmicrobialcommuniBes.Thefundamentaloutputofthesecomparisonsisasquarematrixwherea“distance”ordissimilarityiscalculatedbetweeneverypairofcommunitysamples,reflecBngthedissimilaritybetweenthosesamples.ThedatainthisdistancematrixcanbevisualizedwithanalysessuchasPrincipalCoordinatesAnalysis(PCoA)andhierarchicalclustering.Likealphadiversity,therearemanypossiblebetadiversitymetricsthatcanbecalculatedwithQIIME.Beatdiversitymeasures:phylogeneBc&non-phylogeneBcphylogeneBcmeasures:weighted&unweightedUniFrac,whichareusedextensivelyinrecentprojects.

beta_diversity.py-s

Page 10: Flowchart - UCLA · 2017-04-07 · beta_diversity.py –i otu_tables/ -m weighted_unifrac,unweighted_unifrac -o beta_div/ -t rep_phylo.tre. d) microbiome diversity analyses visualizaons

d)microbiomediversityanalyses betadiversity(similaritybetweenindividualmicrobialcommuniBes)d5)RarefyOTUtabletoremovesamplingdepthheterogeneity(opBonal)Tocomparesamplesatequalsequencingdepth,itcreatesasubsampledOTUtablebyrandomsamplingoftheinputOTUtable.SamplesthathavefewersequencesthantherequestedrarefacBondepthareomiXed.-d,--depthNumberofsequencestosubsamplepersample.ThisisoneBmesubsamplingonOTUtable,differentfrommakingrarefacBoncurve

single_rarefaction.py -i otu_table.biom -o otu_table_even100.biom -d 100

multiple_rarefactions.py -i otu_table.biom -m 100 -x 140 –s 5 -n 2 -o rarefied_otu_tables/

Page 11: Flowchart - UCLA · 2017-04-07 · beta_diversity.py –i otu_tables/ -m weighted_unifrac,unweighted_unifrac -o beta_div/ -t rep_phylo.tre. d) microbiome diversity analyses visualizaons

d)microbiomediversityanalyses betadiversity(similaritybetweenindividualmicrobialcommuniBes)d5)RarefyOTUtabletoremovesamplingdepthheterogeneityd6)ComputebetadiversitySingleFileBetaDiversity(non-phylogeneBc):SingleFileBetaDiversity(phylogeneBc):MulBpleFile(batch)BetaDiversity(phylogeneBc):

beta_diversity.py -i otu_table.biom -m bray_curBs -o beta_div

beta_diversity.py -i otu_table.biom -m weighted_unifrac,unweighted_unifrac -o beta_div -t rep_phylo.tre

beta_diversity.py –i otu_tables/ -m weighted_unifrac,unweighted_unifrac -o beta_div/ -t rep_phylo.tre

Page 12: Flowchart - UCLA · 2017-04-07 · beta_diversity.py –i otu_tables/ -m weighted_unifrac,unweighted_unifrac -o beta_div/ -t rep_phylo.tre. d) microbiome diversity analyses visualizaons

d)microbiomediversityanalysesvisualizaBons betadiversity(similaritybetweenindividualmicrobialcommuniBes)d5)RarefyOTUtabletoremovesamplingdepthheterogeneityd6)Computebetadiversityd7)RunPrincipalCoordinatesAnalysisPCoAisatechniquethathelpstoextractandvisualizeafewhighly-informaBvecomponentsofvariaBonfromcomplex,mulB-dimensionaldata.ThisisatransformaBonthatmapsthesamplespresentinthedistancematrixtoanewsetoforthogonalaxessuchthatamaximumamountofvariaBonisexplainedbythefirstprincipalcoordinate,etc.TheprincipalcoordinatescanbeploXedintwoorthreedimensionstoprovideanintuiBvevisualizaBonofdifferencesbetweensamples.

principal_coordinates.py –i beta_div/-opcoa/

Page 13: Flowchart - UCLA · 2017-04-07 · beta_diversity.py –i otu_tables/ -m weighted_unifrac,unweighted_unifrac -o beta_div/ -t rep_phylo.tre. d) microbiome diversity analyses visualizaons

d)microbiomediversityanalysesvisualizaBons betadiversity(similaritybetweenindividualmicrobialcommuniBes)d5)RarefyOTUtabletoremovesamplingdepthheterogeneityd6)Computebetadiversityd7)RunPrincipalCoordinatesAnalysisd8)GeneratePCoAplotsMake2DPCoAPlotsaspecificcategorytocoloranycombinaBonofcategories

make_2d_plots.py-ipcoa/pcoa_weighted_unifrac_otu_table.txt–mFasBng_Map.txt-o2d_plots/

make_2d_plots.py-ipcoa/pcoa_weighted_unifrac_otu_table.txt–mFasBng_Map.txt-o2d_plots/ -b‘Treatment’

make_2d_plots.py-ipcoa/pcoa_weighted_unifrac_otu_table.txt–mFasBng_Map.txt-o2d_plots/ -b‘Treatment&&DOB’

Page 14: Flowchart - UCLA · 2017-04-07 · beta_diversity.py –i otu_tables/ -m weighted_unifrac,unweighted_unifrac -o beta_div/ -t rep_phylo.tre. d) microbiome diversity analyses visualizaons

d)microbiomediversityanalysesvisualizaBons betadiversity(similaritybetweenindividualmicrobialcommuniBes)d5)RarefyOTUtabletoremovesamplingdepthheterogeneityd6)Computebetadiversityd7)RunPrincipalCoordinatesAnalysisd8)GeneratePCoAplotsMake3DPCoAPlotsmake_emperor.py-ipcoa/pcoa_weighted_unifrac_otu_table.txt–mFasBng_Map.txt–o3d_plots/

Page 15: Flowchart - UCLA · 2017-04-07 · beta_diversity.py –i otu_tables/ -m weighted_unifrac,unweighted_unifrac -o beta_div/ -t rep_phylo.tre. d) microbiome diversity analyses visualizaons

d)microbiomediversityanalyses Thisworkflowconsistsofthefollowingsteps:

alphadiversity(microbialcommunityevennessandrichness)d1)GeneraterarefiedOTUtables(mulBple_rarefacBons.py)d2)ComputemeasuresofalphadiversityforeachrarefiedOTUtable(alpha_diversity.py)d3)Collatealphadiversityresults(collate_alpha.py)d4)GeneratealphararefacBonplots(make_rarefacBon_plots.py)betadiversity(similaritybetweenindividualmicrobialcommuniBes)d5)RarefyOTUtabletoremovesamplingdepthheterogeneity(single_rarefacBon.py)d6)Computebetadiversity(beta_diversity.py)d7)RunPrincipalCoordinatesAnalysis(principal_coordinates.py)d8)GeneratePCoAplots(make_3d_plots.pyormake_2d_plots.py)d9)StaBsBcalanalyses

Page 16: Flowchart - UCLA · 2017-04-07 · beta_diversity.py –i otu_tables/ -m weighted_unifrac,unweighted_unifrac -o beta_div/ -t rep_phylo.tre. d) microbiome diversity analyses visualizaons

d)microbiomediversityanalyses d9.1)StaBsBcalanalysesCreaBngDistanceComparison&PlotsPlosngWithinandBetweenDistances

make_distance_boxplots.py-dweighted_unifrac_otu_table.txt–mFasBng_Map.txt-o./-f'Treatment’--save_raw_data

Comparisonsbasedontwo-sidedStudent'stwo-samplet-test

Page 17: Flowchart - UCLA · 2017-04-07 · beta_diversity.py –i otu_tables/ -m weighted_unifrac,unweighted_unifrac -o beta_div/ -t rep_phylo.tre. d) microbiome diversity analyses visualizaons

d)microbiomediversityanalyses d9.2)StaBsBcalanalysesComparingDistanceMatricesbasedontheManteltest,anon-parametricstaBsBcalmethodthatcomputesthecorrelaBonbetweentwodistancematrices.OnecommonapplicaBonofdistancematrixcomparisonistodetermineifcorrelaBonexistsbetweenacommunitydistancematrix(e.g.UniFracdistancematrix)andasecondmatrixderivedfromanenvironmentalparameter(e.g.differenceinpH).IfcommuniBesthatareatdissimilarpHlevelsaremoredifferentfromoneanotherthancommuniBesthatareatverysimilarpHlevels.Ifso,thiswouldindicateposiBvecorrelaBonbetweenthetwodistancematrices.nonparametricmeanstheyusepermutaBonstodeterminethep-value,orstaBsBcalsignificance.

compare_distance_matrices.py --method=mantel –i weighted_unifrac_dm.txt,PH_dm.txt –o ./ -n 999

Page 18: Flowchart - UCLA · 2017-04-07 · beta_diversity.py –i otu_tables/ -m weighted_unifrac,unweighted_unifrac -o beta_div/ -t rep_phylo.tre. d) microbiome diversity analyses visualizaons

d)microbiomediversityanalyses d9.3)StaBsBcalanalysesComparingCategorieswithstaBsBcalmethods:AnalyzesstaBsBcalsignificanceofsamplegroupingsusingdistancematricesAmajorityofthecomparisonarebasedontheANOVAfamily,determinewhetherthegroupingofsamplesbyagivencategoryisstaBsBcallysignificant.ANOSIMisnonparametric,staBsBcalsignificanceisdeterminedthroughpermutaBons.Itonlyworkswithacategoricalvariable.Thep-valueof0.001indicatesthatatanalphaof0.05,thegroupingofsamplesbyindividualisstaBsBcallysignificant.TheRvalueof0.794isfairlycloseto+1,indicaBngdissimilaritybetweenthegroups.

compare_categories.py --method anoism -i weighted_unifrac_dm.txt -m map.txt -c Treatment –o ./ -n 999

Page 19: Flowchart - UCLA · 2017-04-07 · beta_diversity.py –i otu_tables/ -m weighted_unifrac,unweighted_unifrac -o beta_div/ -t rep_phylo.tre. d) microbiome diversity analyses visualizaons

d)microbiomediversityanalyses d9.4)StaBsBcalanalysesComparingCategorieswithstaBsBcalmethodsAdoniscreatesasetbyfirstidenBfyingtherelevantcentroidsofdataandthencalculaBngthesquareddeviaBonsfromthesepoints.ItcanaccepteithercategoricalorconBnuousvariablesinthemetadatamappingfile.SignificancetestsareperformedusingF-testsbasedonsequenBalsumsofsquaresfrompermutaBonsoftherawdata.

compare_categories.py --method adonis -i weighted_unifrac_dm.txt -m map.txt -c Treatment –o ./ -n 999

Page 20: Flowchart - UCLA · 2017-04-07 · beta_diversity.py –i otu_tables/ -m weighted_unifrac,unweighted_unifrac -o beta_div/ -t rep_phylo.tre. d) microbiome diversity analyses visualizaons

d)microbiomediversityanalyses d9.5)StaBsBcalanalysesSupervisedclassificaBonSupervisedclassificaBonistoclassifyunlabeledcommuniBesbasedonasetoflabeledtrainingcommuniBesusingtheRandomForests(R“randomForest”packageneeded).OTUtablesrarefiedatanevendepthandcollatetheresultsintoasinglefile-e,--errortypeTypeoferroresBmaBon.Validchoicesare:oob,loo,cv5,cv10.[defaultoob]oob:out-of-bag,fastest,onlybuildsoneclassifier,useforquickesBmatesloo:leave-one-outcrossvalidaBon,useforsmalldatasets(<~30-50samples)cv10:10-foldcrossvalidaBon,providesmeanandstandarddeviaBonoferror,useforbestesBmates

supervised_learning.py -i otu_table.biom -m Fasting_Map.txt -c Treatment -o ./

supervised_learning.py –i rarefied_tables/ -m Fasting_Map.txt -c Treatment -o ./ -w sl_cv10.txt

Page 21: Flowchart - UCLA · 2017-04-07 · beta_diversity.py –i otu_tables/ -m weighted_unifrac,unweighted_unifrac -o beta_div/ -t rep_phylo.tre. d) microbiome diversity analyses visualizaons

d)microbiomediversityanalyses d9.5)StaBsBcalanalysesSupervisedclassificaBonOutputs:1)summary.txt:includingthepredictedclasslabels,theexpectedgeneralizaBonerroroftheclassifier,theraBoofthebaselineerrortotheesBmatedgeneralizaBonerror.AreasonablecriterionforgoodclassificaBonisthatthisraBo>2,i.e.,theclassifierdoesatleasttwiceaswellasrandomguessing.2)cv_probabiliBes.txt:Cross-validaBonesBmatesofclassprobabiliBesforsamplestoavoidoverfisng.3)mislabeling.txt:esBmatedprobabilityoftheknownclass,andprobabilityformostlikelyotherclass.4)feature_importance_scores.txt:alistofdiscriminaBveOTUswiththeirassociatedimportancescoresForRandomForests,theimportanceisexpectedmeandecreaseinaccuracywhenfeatureisignored.5)confusion_matrix.txt:thenumberofsampleswhosetrueclasswasithatwereclassifiedinclassj.

Page 22: Flowchart - UCLA · 2017-04-07 · beta_diversity.py –i otu_tables/ -m weighted_unifrac,unweighted_unifrac -o beta_div/ -t rep_phylo.tre. d) microbiome diversity analyses visualizaons

d)microbiomediversityanalyses d9.6)StaBsBcalanalysesTrackingthesourceofmicrobes(SourceTrackerneeded)1)  FilterOTUspresentinlessthan1%ofthesamplesfromtheOTUtable

2)ConverttablefromBIOMtotab-separatedtextformat3)RunSourceTracker

filter_otus_from_otu_table.py -i otu_table.biom -o filtered_otu_table.biom –s xx

biom convert -i filtered_otu_table.biom -o filtered_otu_table.txt -b

R --slave --vanilla --args -i filtered_otu_table.txt -m map.txt -o ./ < sourcetracker_for_qiime.r

Page 23: Flowchart - UCLA · 2017-04-07 · beta_diversity.py –i otu_tables/ -m weighted_unifrac,unweighted_unifrac -o beta_div/ -t rep_phylo.tre. d) microbiome diversity analyses visualizaons

TaxonomicclassificaBonsofsingle-andpaired-endsequences

TheRTAXproceduretakesadvantageofmate-pairinformaBonwhenperformingtaxonomicclassificaBon.TheaddiBonalinformaBonfromasecondreadmayallowamoreprecisetaxonomyassignmenttobemade.TheprocedureistoperformOTUpickingononereadonly,butthentoobtainaddiBonalinformaBonfromthesecondreadatthetaxonomicclassificaBonstep.

assign_taxonomy.py -i otus_rep_set/forward_read.fasta -m rtax --read_1_seqs_fp forward_read.fna --read_2_seqs_fp reverse_read.fna -r gg_97_otus.fasta -t gg_otus_tax.txt --single_ok

Page 24: Flowchart - UCLA · 2017-04-07 · beta_diversity.py –i otu_tables/ -m weighted_unifrac,unweighted_unifrac -o beta_div/ -t rep_phylo.tre. d) microbiome diversity analyses visualizaons

BaochenShi

CNSI4338,UCLA

[email protected]