Skip to content

Instantly share code, notes, and snippets.

@casett
Created January 4, 2017 22:14
Show Gist options
  • Save casett/a42c64ca4b74b1d414f59eb5362e63a3 to your computer and use it in GitHub Desktop.
Save casett/a42c64ca4b74b1d414f59eb5362e63a3 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"# Seagrass Ammonification Analysis"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### This notebook is for the analysis of 16S PCR libraries produced from DNA extracted from samples collected by Susan Williams and Jessica Abbott at Bodega Bay. Sediment from <i> Zostera marina </i> beds was sampled. I am using MacQiime/Qiime 1.9.0 http://www.wernerlab.org/software/macqiime <br> <br> I am also using ipython, which can be install via http://ipython.org/ipython-doc/dev/install/install.html<br> sudo easy_install ipython[all]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Prior to launching ipython, I started MacQiime by typing macqiime in terminal (or XQuartz/X11)\n",
"\n",
"<b> Note: I am now using qiime instead of MacQIIME</b>\n",
"\n",
"I am following the this tutorial: http://nbviewer.ipython.org/github/biocore/qiime/blob/master/examples/ipynb/illumina_overview_tutorial.ipynb?create=1\n",
"\n",
"Another good tutorial: http://www.wernerlab.org/teaching/qiime/overview\n",
"\n",
"An example of a QIIME 16S Analysis: http://nbviewer.ipython.org/gist/jennomics/c6fe5e113525c6aa8add\n",
"\n",
"The following cell is directly copied from the tutorial:"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"from os import chdir, mkdir\n",
"from os.path import join\n",
"# these are only available in the current development branch of IPython\n",
"from IPython.display import FileLinks, FileLink"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Demultiplex Data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Sequence data was demultiplexed and filtered using an inhouse script available at https://github.com/gjospin/scripts/blob/master/Demul_trim_prep.pl"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"#The subsequent files containing the merged 16S reads only were concatonated into one file using:\n",
"!cat *.M.* > EverythingMerged.fasta.gz\n",
"\n",
"#Then they were unzipped\n",
"!gunzip EverythingMerged.fasta.gz\n",
"\n",
"#Then they were reverse complemented (as our reads are in the wrong direction relative to the Greengenes/Unite databases)\n",
"!adjust_seq_orientation.py -i EverythingMerged.fasta -o EverythingMerged_RC.fasta"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Defining Useful Variables"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"#Note: if there are spaces in your path make sure they have a '\\' before them so they are recognized\n",
"\n",
"#16S sequences and mapping file\n",
"bactarch_seqs = \"/Users/Cassie/Dropbox/Seagrass/Ammonification/EverythingMergedRC.fasta\"\n",
"bactarch_map = \"/Users/Cassie/Dropbox/Seagrass/Ammonification/Ammonification_Experiment_Mapping_File.txt\"\n",
"\n",
"#Databases\n",
"#Had to install Greengenes 99% and UNITE databases from QIIME and UNITE respectively\n",
"otu_base = \"/macqiime/greengenes/gg_13_8_otus/\"\n",
"reference_seqs = join(otu_base,\"/macqiime/greengenes/gg_13_8_otus/rep_set/97_otus.fasta\")\n",
"reference_tree = join(otu_base,\"/macqiime/greengenes/gg_13_8_otus/trees/97_otus.tree\")\n",
"reference_tax = join(otu_base,\"/macqiime/greengenes/gg_13_8_otus/taxonomy/97_otu_taxonomy.txt\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Validate Mapping File"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Errors and/or warnings detected in mapping file. Please check the log and html file for details.\r\n"
]
}
],
"source": [
"#checks mapping file for qiime use\n",
"!validate_mapping_file.py \\\n",
"-m $bactarch_map"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"#replaces original mapping file with new corrected file \n",
"!mv Ammonification_Experiment_Mapping_File_corrected.txt Ammonification_Experiment_Mapping_File.txt"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Validate Demultiplexing"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"!validate_demultiplexed_fasta.py \\\n",
"-i $bactarch_seqs \\ \n",
"-m $bactarch_map\n",
"#check the log file generated to see if any duplicate barcodes/sample names are used; mostly this is a sanity check"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Check for Chimeras"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"http://qiime.org/tutorials/chimera_checking.html"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"There are two versions of USEARCH and you will need both in QIIME 1.9.0: USEARCH v5.2.236 and USEARCH 6.1, each required for DIFFERENT scripts, unfortunately. Name the 5.2.236 executable \"usearch\" and the 6.1 executable \"usearch61\" and make sure they're in your path.\n",
"http://www.drive5.com/usearch/manual/install.html\n",
"\n",
"<u> Code to Install: </u> (repeat for usearch) <br>\n",
"sudo mv usearch61 /usr/local/bin/usearch61 <br>\n",
"sudo chmod a+x /usr/local/bin/usearch61 \n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<b> Ran into memory issues using usearch61 </b>"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"#split fasta for chimera check b/c usearch61 keeps running out of memory on full file\n",
"!split_sequence_file_by_sample_ids.py \\\n",
"-i $bactarch_seqs\n",
"-o SplitFasta/ \\ "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"#split combined files into blocks for chimera check\n",
"!cat SplitFasta/A*.fasta > SplitFasta/BlockA.fasta\n",
"!cat SplitFasta/B*.fasta > SplitFasta/BlockB.fasta\n",
"!cat SplitFasta/C*.fasta > SplitFasta/BlockC.fasta\n",
"!cat SplitFasta/D*.fasta > SplitFasta/BlockD.fasta\n",
"!cat SplitFasta/E*.fasta > SplitFasta/BlockE.fasta\n",
"!cat SplitFasta/F*.fasta > SplitFasta/BlockF.fasta\n",
"!cat SplitFasta/G*.fasta > SplitFasta/BlockG.fasta\n",
"!cat SplitFasta/H*.fasta > SplitFasta/BlockH.fasta\n",
"!cat SplitFasta/I*.fasta > SplitFasta/BlockI.fasta\n",
"!cat SplitFasta/J*.fasta > SplitFasta/BlockJ.fasta\n",
"!cat SplitFasta/K*.fasta > SplitFasta/BlockK.fasta\n",
"!cat SplitFasta/L*.fasta > SplitFasta/BlockL.fasta"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"#identifies chimeric sequences using usearch61 in our bacterial data using the 97% OTU databases as the reference\n",
"!identify_chimeric_seqs.py \\\n",
"-i SplitFasta/BlockA.fasta \\\n",
"-m usearch61 \\\n",
"-o qiime_ready_chimeras_block_A/ \\\n",
"-r $reference_seqs \n",
"\n",
"!identify_chimeric_seqs.py \\\n",
"-i SplitFasta/BlockB.fasta \\\n",
"-m usearch61 \\\n",
"-o qiime_ready_chimeras_block_B/ \\\n",
"-r $reference_seqs \n",
"\n",
"!identify_chimeric_seqs.py \\\n",
"-i SplitFasta/BlockC.fasta \\\n",
"-m usearch61 \\\n",
"-o qiime_ready_chimeras_block_C/ \\\n",
"-r $reference_seqs \n",
"\n",
"!identify_chimeric_seqs.py \\\n",
"-i SplitFasta/BlockD.fasta \\\n",
"-m usearch61 \\\n",
"-o qiime_ready_chimeras_block_D/ \\\n",
"-r $reference_seqs \n",
"\n",
"!identify_chimeric_seqs.py \\\n",
"-i SplitFasta/BlockE.fasta \\\n",
"-m usearch61 \\\n",
"-o qiime_ready_chimeras_block_E/ \\\n",
"-r $reference_seqs \n",
"\n",
"!identify_chimeric_seqs.py \\\n",
"-i SplitFasta/BlockF.fasta \\\n",
"-m usearch61 \\\n",
"-o qiime_ready_chimeras_block_F/ \\\n",
"-r $reference_seqs \n",
"\n",
"!identify_chimeric_seqs.py \\\n",
"-i SplitFasta/BlockG.fasta \\\n",
"-m usearch61 \\\n",
"-o qiime_ready_chimeras_block_G/ \\\n",
"-r $reference_seqs \n",
"\n",
"!identify_chimeric_seqs.py \\\n",
"-i SplitFasta/BlockH.fasta \\\n",
"-m usearch61 \\\n",
"-o qiime_ready_chimeras_block_H/ \\\n",
"-r $reference_seqs \n",
"\n",
"!identify_chimeric_seqs.py \\\n",
"-i SplitFasta/BlockI.fasta \\\n",
"-m usearch61 \\\n",
"-o qiime_ready_chimeras_block_I/ \\\n",
"-r $reference_seqs \n",
"\n",
"!identify_chimeric_seqs.py \\\n",
"-i SplitFasta/BlockJ.fasta \\\n",
"-m usearch61 \\\n",
"-o qiime_ready_chimeras_block_J/ \\\n",
"-r $reference_seqs \n",
"\n",
"!identify_chimeric_seqs.py \\\n",
"-i SplitFasta/BlockK.fasta \\\n",
"-m usearch61 \\\n",
"-o qiime_ready_chimeras_block_K/ \\\n",
"-r $reference_seqs \n",
"\n",
"!identify_chimeric_seqs.py \\\n",
"-i SplitFasta/BlockL.fasta \\\n",
"-m usearch61 \\\n",
"-o qiime_ready_chimeras_block_L/ \\\n",
"-r $reference_seqs "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"#filters out chimeric seqs from our fasta file\n",
"!filter_fasta.py \\\n",
"-f SplitFasta/BlockA.fasta \\\n",
"-o SplitFasta/BlockA_Filtered.fasta \\\n",
"-s qiime_ready_chimeras_block_A/chimeras.txt \\\n",
"-n\n",
"\n",
"!filter_fasta.py \\\n",
"-f SplitFasta/BlockB.fasta \\\n",
"-o SplitFasta/BlockB_Filtered.fasta \\\n",
"-s qiime_ready_chimeras_block_B/chimeras.txt \\\n",
"-n\n",
"\n",
"!filter_fasta.py \\\n",
"-f SplitFasta/BlockC.fasta \\\n",
"-o SplitFasta/BlockC_Filtered.fasta \\\n",
"-s qiime_ready_chimeras_block_C/chimeras.txt \\\n",
"-n\n",
"\n",
"!filter_fasta.py \\\n",
"-f SplitFasta/BlockD.fasta \\\n",
"-o SplitFasta/BlockD_Filtered.fasta \\\n",
"-s qiime_ready_chimeras_block_D/chimeras.txt \\\n",
"-n\n",
"\n",
"!filter_fasta.py \\\n",
"-f SplitFasta/BlockE.fasta \\\n",
"-o SplitFasta/BlockE_Filtered.fasta \\\n",
"-s qiime_ready_chimeras_block_E/chimeras.txt \\\n",
"-n\n",
"\n",
"!filter_fasta.py \\\n",
"-f SplitFasta/BlockF.fasta \\\n",
"-o SplitFasta/BlockF_Filtered.fasta \\\n",
"-s qiime_ready_chimeras_block_F/chimeras.txt \\\n",
"-n\n",
"\n",
"!filter_fasta.py \\\n",
"-f SplitFasta/BlockG.fasta \\\n",
"-o SplitFasta/BlockG_Filtered.fasta \\\n",
"-s qiime_ready_chimeras_block_G/chimeras.txt \\\n",
"-n\n",
"\n",
"!filter_fasta.py \\\n",
"-f SplitFasta/BlockH.fasta \\\n",
"-o SplitFasta/BlockH_Filtered.fasta \\\n",
"-s qiime_ready_chimeras_block_H/chimeras.txt \\\n",
"-n\n",
"\n",
"!filter_fasta.py \\\n",
"-f SplitFasta/BlockI.fasta \\\n",
"-o SplitFasta/BlockI_Filtered.fasta \\\n",
"-s qiime_ready_chimeras_block_I/chimeras.txt \\\n",
"-n\n",
"\n",
"!filter_fasta.py \\\n",
"-f SplitFasta/BlockJ.fasta \\\n",
"-o SplitFasta/BlockJ_Filtered.fasta \\\n",
"-s qiime_ready_chimeras_block_J/chimeras.txt \\\n",
"-n\n",
"\n",
"!filter_fasta.py \\\n",
"-f SplitFasta/BlockK.fasta \\\n",
"-o SplitFasta/BlockK_Filtered.fasta \\\n",
"-s qiime_ready_chimeras_block_K/chimeras.txt \\\n",
"-n\n",
"\n",
"!filter_fasta.py \\\n",
"-f SplitFasta/BlockL.fasta \\\n",
"-o SplitFasta/BlockL_Filtered.fasta \\\n",
"-s qiime_ready_chimeras_block_L/chimeras.txt \\\n",
"-n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"#combine\n",
"!cat *Filtered.fasta > EverythingMerged_RC_Filtered.fasta"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Redefining Useful Variables"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"#16S sequences after chimera filtering\n",
"bactarch_seqs = \"/Users/Cassie/Dropbox/Seagrass/Ammonification/SplitFasta/EverythingMerged_RC_Filtered.fasta\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Picking OTU's"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Make sure to install BLAST Legacy (http://www.wernerlab.org/software/macqiime/macqiime-installation/installing-blast-in-os-x)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"#Pick denovo OTUS for 16S\n",
"!pick_de_novo_otus.py \\\n",
"-o denovo_97_otus_EverythingRCFiltered \\\n",
"-i $bactarch_seqs \\\n",
"-p params.txt \\\n",
"-a -O 6 -f"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"I used the following parameter file which makes sure that \"enable_rev_strand_match == True\" meaning that the pick_open_reference_otus.py script will check if the query sequence matches the reference database in both sequence directions (NOTE: This shouldn't be necessary as we oriented our sequences so they matched the database orientation at the beginning of this workflow, however, just in case...)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"pick_otus:enable_rev_strand_match True\r\n",
"\r\n",
"beta_diversity:metrics bray_curtis,euclidean,unweighted_unifrac,weighted_unifrac\r\n",
"\r\n"
]
}
],
"source": [
"!cat /Users/Cassie/Dropbox/Seagrass/Ammonification/params.txt"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Making & Filtering Biom Tables"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<b>For 16S Data:</b>"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<a href='denovo_97_otus_EverythingRCFiltered/otu_table_summary.txt' target='_blank'>denovo_97_otus_EverythingRCFiltered/otu_table_summary.txt</a><br>"
],
"text/plain": [
"/Users/Cassie/Dropbox/Seagrass/Ammonification/denovo_97_otus_EverythingRCFiltered/otu_table_summary.txt"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#summarizes the biom table obtained from running open ref otu picking at 97% with greengenes; sanity check \n",
"!biom summarize-table \\\n",
"-i denovo_97_otus_EverythingRCFiltered/otu_table.biom \\\n",
"-o denovo_97_otus_EverythingRCFiltered/otu_table_summary.txt\n",
"\n",
"FileLink(\"denovo_97_otus_EverythingRCFiltered/otu_table_summary.txt\")"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"#filters out all the chloroplasts/mitochondria/singletons (so eukaryotes and seagrass and VERY rare taxa that may just be errors)\n",
"!filter_taxa_from_otu_table.py \\\n",
"-i denovo_97_otus_EverythingRCFiltered/otu_table.biom \\\n",
"-o denovo_97_otus_EverythingRCFiltered/otu_table_no_euks.biom \\\n",
"-n c__Chloroplast,f__mitochondria\n",
"\n",
"!filter_otus_from_otu_table.py \\\n",
"-i denovo_97_otus_EverythingRCFiltered/otu_table_no_euks.biom \\\n",
"-o denovo_97_otus_EverythingRCFiltered/otu_table_no_euks_no_singletons.biom \\\n",
"-n 2\n",
"\n",
"!filter_taxa_from_otu_table.py \\\n",
"-i denovo_97_otus_EverythingRCFiltered/otu_table_no_euks_no_singletons.biom \\\n",
"-o denovo_97_otus_EverythingRCFiltered/otu_table_no_euks_no_singletons_no_unassigned.biom \\\n",
"-n Unassigned"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<a href='denovo_97_otus_EverythingRCFiltered/otu_summary_filtered.txt' target='_blank'>denovo_97_otus_EverythingRCFiltered/otu_summary_filtered.txt</a><br>"
],
"text/plain": [
"/Users/Cassie/Dropbox/Seagrass/Ammonification/denovo_97_otus_EverythingRCFiltered/otu_summary_filtered.txt"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#summarizes the biom table obtained above after filtering; sanity check \n",
"!biom summarize-table \\\n",
"-i denovo_97_otus_EverythingRCFiltered/otu_table_no_euks_no_singletons_no_unassigned.biom \\\n",
"-o denovo_97_otus_EverythingRCFiltered/otu_summary_filtered.txt\n",
"\n",
"FileLink(\"denovo_97_otus_EverythingRCFiltered/otu_summary_filtered.txt\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Adding Metadata to biom tables"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"#97% 16S OTUs\n",
"!biom add-metadata \\\n",
"-i denovo_97_otus_EverythingRCFiltered/otu_table_no_euks_no_singletons_no_unassigned.biom \\\n",
"-o denovo_97_otus_EverythingRCFiltered/otu_table_no_euks_no_singletons_no_unassigned_w_metadata.biom \\\n",
"-m $bactarch_map\n"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"#Renaming biom table\n",
"!mv denovo_97_otus_EverythingRCFiltered/otu_table_no_euks_no_singletons_no_unassigned_w_metadata.biom denovo_97_otus_EverythingRCFiltered/Ammonia.biom"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Investigating Rarefaction"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"^C\r\n"
]
},
{
"data": {
"text/html": [
"Path (<tt>denovo_97_otus_EverythingRCFiltered/arare_Ammonia/alpha_rarefaction_plots/rarefaction_plots.html</tt>) doesn't exist. It may still be in the process of being generated, or you may have the incorrect path."
],
"text/plain": [
"/Users/Cassie/Dropbox/Seagrass/Ammonification/denovo_97_otus_EverythingRCFiltered/arare_Ammonia/alpha_rarefaction_plots/rarefaction_plots.html"
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Investigating levels of rarification \n",
"!alpha_rarefaction.py \\\n",
"-i denovo_97_otus_EverythingRCFiltered/Ammonia.biom \\\n",
"-n 25 \\\n",
"-o denovo_97_otus_EverythingRCFiltered/arare_Ammonia \\\n",
"-m $bactarch_map \\\n",
"-t denovo_97_otus_EverythingRCFiltered/rep_set.tre -f"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<a href='denovo_97_otus_EverythingRCFiltered/arare_Ammonia/alpha_rarefaction_plots/rarefaction_plots.html' target='_blank'>denovo_97_otus_EverythingRCFiltered/arare_Ammonia/alpha_rarefaction_plots/rarefaction_plots.html</a><br>"
],
"text/plain": [
"/Users/Cassie/Dropbox/Seagrass/Ammonification/denovo_97_otus_EverythingRCFiltered/arare_Ammonia/alpha_rarefaction_plots/rarefaction_plots.html"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"FileLink(\"denovo_97_otus_EverythingRCFiltered/arare_Ammonia/alpha_rarefaction_plots/rarefaction_plots.html\")"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/skbio/stats/ordination/_principal_coordinate_analysis.py:107: RuntimeWarning: The result contains negative eigenvalues. Please compare their magnitude with the magnitude of some of the largest positive eigenvalues. If the negative ones are smaller, it's probably safe to ignore them, but if they are large in magnitude, the results won't be useful. See the Notes section for more details. The smallest eigenvalue is -0.0528807397816 and the largest is 2.20871223703.\r\n",
" RuntimeWarning\r\n",
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/skbio/stats/ordination/_principal_coordinate_analysis.py:107: RuntimeWarning: The result contains negative eigenvalues. Please compare their magnitude with the magnitude of some of the largest positive eigenvalues. If the negative ones are smaller, it's probably safe to ignore them, but if they are large in magnitude, the results won't be useful. See the Notes section for more details. The smallest eigenvalue is -0.0504254111014 and the largest is 2.20188726427.\r\n",
" RuntimeWarning\r\n",
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/skbio/stats/ordination/_principal_coordinate_analysis.py:107: RuntimeWarning: The result contains negative eigenvalues. Please compare their magnitude with the magnitude of some of the largest positive eigenvalues. If the negative ones are smaller, it's probably safe to ignore them, but if they are large in magnitude, the results won't be useful. See the Notes section for more details. The smallest eigenvalue is -0.0500996647029 and the largest is 2.20514522014.\r\n",
" RuntimeWarning\r\n",
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/skbio/stats/ordination/_principal_coordinate_analysis.py:107: RuntimeWarning: The result contains negative eigenvalues. Please compare their magnitude with the magnitude of some of the largest positive eigenvalues. If the negative ones are smaller, it's probably safe to ignore them, but if they are large in magnitude, the results won't be useful. See the Notes section for more details. The smallest eigenvalue is -0.0546377657593 and the largest is 2.18418408358.\r\n",
" RuntimeWarning\r\n",
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/skbio/stats/ordination/_principal_coordinate_analysis.py:107: RuntimeWarning: The result contains negative eigenvalues. Please compare their magnitude with the magnitude of some of the largest positive eigenvalues. If the negative ones are smaller, it's probably safe to ignore them, but if they are large in magnitude, the results won't be useful. See the Notes section for more details. The smallest eigenvalue is -0.0583052134005 and the largest is 2.20208391119.\r\n",
" RuntimeWarning\r\n",
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/skbio/stats/ordination/_principal_coordinate_analysis.py:107: RuntimeWarning: The result contains negative eigenvalues. Please compare their magnitude with the magnitude of some of the largest positive eigenvalues. If the negative ones are smaller, it's probably safe to ignore them, but if they are large in magnitude, the results won't be useful. See the Notes section for more details. The smallest eigenvalue is -0.0514658591384 and the largest is 2.21595797818.\r\n",
" RuntimeWarning\r\n",
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/skbio/stats/ordination/_principal_coordinate_analysis.py:107: RuntimeWarning: The result contains negative eigenvalues. Please compare their magnitude with the magnitude of some of the largest positive eigenvalues. If the negative ones are smaller, it's probably safe to ignore them, but if they are large in magnitude, the results won't be useful. See the Notes section for more details. The smallest eigenvalue is -0.0484149983321 and the largest is 2.16240301124.\r\n",
" RuntimeWarning\r\n",
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/skbio/stats/ordination/_principal_coordinate_analysis.py:107: RuntimeWarning: The result contains negative eigenvalues. Please compare their magnitude with the magnitude of some of the largest positive eigenvalues. If the negative ones are smaller, it's probably safe to ignore them, but if they are large in magnitude, the results won't be useful. See the Notes section for more details. The smallest eigenvalue is -0.0457806682627 and the largest is 2.19729946138.\r\n",
" RuntimeWarning\r\n",
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/skbio/stats/ordination/_principal_coordinate_analysis.py:107: RuntimeWarning: The result contains negative eigenvalues. Please compare their magnitude with the magnitude of some of the largest positive eigenvalues. If the negative ones are smaller, it's probably safe to ignore them, but if they are large in magnitude, the results won't be useful. See the Notes section for more details. The smallest eigenvalue is -0.0530840501316 and the largest is 2.19989678923.\r\n",
" RuntimeWarning\r\n",
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/skbio/stats/ordination/_principal_coordinate_analysis.py:107: RuntimeWarning: The result contains negative eigenvalues. Please compare their magnitude with the magnitude of some of the largest positive eigenvalues. If the negative ones are smaller, it's probably safe to ignore them, but if they are large in magnitude, the results won't be useful. See the Notes section for more details. The smallest eigenvalue is -0.0505954109231 and the largest is 2.18193368748.\r\n",
" RuntimeWarning\r\n"
]
}
],
"source": [
"#Investigating how rarification to n=3218 would effect PCoA plots\n",
"!jackknifed_beta_diversity.py \\\n",
"-i denovo_97_otus_EverythingRCFiltered/Ammonia.biom \\\n",
"-o denovo_97_otus_EverythingRCFiltered/jackknifed_betadiv_3218/ \\\n",
"-e 3218 \\\n",
"-m $bactarch_map \\\n",
"-t denovo_97_otus_EverythingRCFiltered/rep_set.tre -f"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/skbio/stats/ordination/_principal_coordinate_analysis.py:107: RuntimeWarning: The result contains negative eigenvalues. Please compare their magnitude with the magnitude of some of the largest positive eigenvalues. If the negative ones are smaller, it's probably safe to ignore them, but if they are large in magnitude, the results won't be useful. See the Notes section for more details. The smallest eigenvalue is -0.0528807397816 and the largest is 2.20871223703.\r\n",
" RuntimeWarning\r\n",
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/skbio/stats/ordination/_principal_coordinate_analysis.py:107: RuntimeWarning: The result contains negative eigenvalues. Please compare their magnitude with the magnitude of some of the largest positive eigenvalues. If the negative ones are smaller, it's probably safe to ignore them, but if they are large in magnitude, the results won't be useful. See the Notes section for more details. The smallest eigenvalue is -0.0504254111014 and the largest is 2.20188726427.\r\n",
" RuntimeWarning\r\n",
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/skbio/stats/ordination/_principal_coordinate_analysis.py:107: RuntimeWarning: The result contains negative eigenvalues. Please compare their magnitude with the magnitude of some of the largest positive eigenvalues. If the negative ones are smaller, it's probably safe to ignore them, but if they are large in magnitude, the results won't be useful. See the Notes section for more details. The smallest eigenvalue is -0.0500996647029 and the largest is 2.20514522014.\r\n",
" RuntimeWarning\r\n",
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/skbio/stats/ordination/_principal_coordinate_analysis.py:107: RuntimeWarning: The result contains negative eigenvalues. Please compare their magnitude with the magnitude of some of the largest positive eigenvalues. If the negative ones are smaller, it's probably safe to ignore them, but if they are large in magnitude, the results won't be useful. See the Notes section for more details. The smallest eigenvalue is -0.0546377657593 and the largest is 2.18418408358.\r\n",
" RuntimeWarning\r\n",
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/skbio/stats/ordination/_principal_coordinate_analysis.py:107: RuntimeWarning: The result contains negative eigenvalues. Please compare their magnitude with the magnitude of some of the largest positive eigenvalues. If the negative ones are smaller, it's probably safe to ignore them, but if they are large in magnitude, the results won't be useful. See the Notes section for more details. The smallest eigenvalue is -0.0583052134005 and the largest is 2.20208391119.\r\n",
" RuntimeWarning\r\n",
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/skbio/stats/ordination/_principal_coordinate_analysis.py:107: RuntimeWarning: The result contains negative eigenvalues. Please compare their magnitude with the magnitude of some of the largest positive eigenvalues. If the negative ones are smaller, it's probably safe to ignore them, but if they are large in magnitude, the results won't be useful. See the Notes section for more details. The smallest eigenvalue is -0.0514658591384 and the largest is 2.21595797818.\r\n",
" RuntimeWarning\r\n",
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/skbio/stats/ordination/_principal_coordinate_analysis.py:107: RuntimeWarning: The result contains negative eigenvalues. Please compare their magnitude with the magnitude of some of the largest positive eigenvalues. If the negative ones are smaller, it's probably safe to ignore them, but if they are large in magnitude, the results won't be useful. See the Notes section for more details. The smallest eigenvalue is -0.0484149983321 and the largest is 2.16240301124.\r\n",
" RuntimeWarning\r\n",
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/skbio/stats/ordination/_principal_coordinate_analysis.py:107: RuntimeWarning: The result contains negative eigenvalues. Please compare their magnitude with the magnitude of some of the largest positive eigenvalues. If the negative ones are smaller, it's probably safe to ignore them, but if they are large in magnitude, the results won't be useful. See the Notes section for more details. The smallest eigenvalue is -0.0457806682627 and the largest is 2.19729946138.\r\n",
" RuntimeWarning\r\n",
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/skbio/stats/ordination/_principal_coordinate_analysis.py:107: RuntimeWarning: The result contains negative eigenvalues. Please compare their magnitude with the magnitude of some of the largest positive eigenvalues. If the negative ones are smaller, it's probably safe to ignore them, but if they are large in magnitude, the results won't be useful. See the Notes section for more details. The smallest eigenvalue is -0.0530840501316 and the largest is 2.19989678923.\r\n",
" RuntimeWarning\r\n",
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/skbio/stats/ordination/_principal_coordinate_analysis.py:107: RuntimeWarning: The result contains negative eigenvalues. Please compare their magnitude with the magnitude of some of the largest positive eigenvalues. If the negative ones are smaller, it's probably safe to ignore them, but if they are large in magnitude, the results won't be useful. See the Notes section for more details. The smallest eigenvalue is -0.0505954109231 and the largest is 2.18193368748.\r\n",
" RuntimeWarning\r\n"
]
}
],
"source": [
"#Investigating how rarification to n=5000 would effect PCoA plots\n",
"!jackknifed_beta_diversity.py \\\n",
"-i denovo_97_otus_EverythingRCFiltered/Ammonia.biom \\\n",
"-o denovo_97_otus_EverythingRCFiltered/jackknifed_betadiv_5000/ \\\n",
"-e 5000 \\\n",
"-m $bactarch_map \\\n",
"-t denovo_97_otus_EverythingRCFiltered/rep_set.tre -f"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Rarefying the OTU Table"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"#16S Greengenes 97% OTU Data; rarify to 5000\n",
"!single_rarefaction.py \\\n",
"-i denovo_97_otus_EverythingRCFiltered/Ammonia.biom \\\n",
"-o denovo_97_otus_EverythingRCFiltered/Ammonia_5000.biom \\\n",
"-d 5000"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<a href='denovo_97_otus_EverythingRCFiltered/Ammonia_5000.txt' target='_blank'>denovo_97_otus_EverythingRCFiltered/Ammonia_5000.txt</a><br>"
],
"text/plain": [
"/Users/Cassie/Dropbox/Seagrass/Ammonification/denovo_97_otus_EverythingRCFiltered/Ammonia_5000.txt"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#sanity check 16S data\n",
"!biom summarize-table \\\n",
"-i denovo_97_otus_EverythingRCFiltered/Ammonia_5000.biom \\\n",
"-o denovo_97_otus_EverythingRCFiltered/Ammonia_5000.txt\n",
"\n",
"FileLink(\"denovo_97_otus_EverythingRCFiltered/Ammonia_5000.txt\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Splitting of Unrarified Biom Table By TimePoint"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<b> For 16S Data: </b>"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"#T1\n",
"!filter_samples_from_otu_table.py \\\n",
"-i denovo_97_otus_EverythingRCFiltered/Ammonia.biom \\\n",
"-o denovo_97_otus_EverythingRCFiltered/Ammonia_T1.biom \\\n",
"-m $bactarch_map \\\n",
"-s \"TimePoint:1\"\n",
"\n",
"#T3\n",
"!filter_samples_from_otu_table.py \\\n",
"-i denovo_97_otus_EverythingRCFiltered/Ammonia.biom \\\n",
"-o denovo_97_otus_EverythingRCFiltered/Ammonia_T3.biom \\\n",
"-m $bactarch_map \\\n",
"-s \"TimePoint:3\"\n",
"\n",
"#T4\n",
"!filter_samples_from_otu_table.py \\\n",
"-i denovo_97_otus_EverythingRCFiltered/Ammonia.biom \\\n",
"-o denovo_97_otus_EverythingRCFiltered/Ammonia_T4.biom \\\n",
"-m $bactarch_map \\\n",
"-s \"TimePoint:4\"\n",
"\n",
"#T5\n",
"!filter_samples_from_otu_table.py \\\n",
"-i denovo_97_otus_EverythingRCFiltered/Ammonia.biom \\\n",
"-o denovo_97_otus_EverythingRCFiltered/Ammonia_T5.biom \\\n",
"-m $bactarch_map \\\n",
"-s \"TimePoint:5\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exploratory Diversity Analyses"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/skbio/stats/ordination/_principal_coordinate_analysis.py:107: RuntimeWarning: The result contains negative eigenvalues. Please compare their magnitude with the magnitude of some of the largest positive eigenvalues. If the negative ones are smaller, it's probably safe to ignore them, but if they are large in magnitude, the results won't be useful. See the Notes section for more details. The smallest eigenvalue is -0.0736769029689 and the largest is 5.4038787886.\n",
" RuntimeWarning\n",
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/skbio/stats/ordination/_principal_coordinate_analysis.py:107: RuntimeWarning: The result contains negative eigenvalues. Please compare their magnitude with the magnitude of some of the largest positive eigenvalues. If the negative ones are smaller, it's probably safe to ignore them, but if they are large in magnitude, the results won't be useful. See the Notes section for more details. The smallest eigenvalue is -0.00137886311005 and the largest is 7.16524618668.\n",
" RuntimeWarning\n",
"Traceback (most recent call last):\n",
" File \"/Library/Frameworks/Python.framework/Versions/2.7/bin/core_diversity_analyses.py\", line 202, in <module>\n",
" main()\n",
" File \"/Library/Frameworks/Python.framework/Versions/2.7/bin/core_diversity_analyses.py\", line 199, in main\n",
" status_update_callback=status_update_callback)\n",
" File \"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/qiime/workflow/core_diversity_analyses.py\", line 399, in run_core_diversity_analyses\n",
" status_update_callback=status_update_callback)\n",
" File \"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/qiime/workflow/downstream.py\", line 711, in run_summarize_taxa_through_plots\n",
" close_logger_on_success=close_logger_on_success)\n",
" File \"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/qiime/workflow/util.py\", line 122, in call_commands_serially\n",
" raise WorkflowError(msg)\n",
"qiime.workflow.util.WorkflowError: \n",
"\n",
"*** ERROR RAISED DURING STEP: Plot Taxonomy Summary\n",
"Command run was:\n",
" plot_taxa_summary.py -i denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_5000//taxa_plots/table_mc5000_sorted_L2.txt,denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_5000//taxa_plots/table_mc5000_sorted_L3.txt,denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_5000//taxa_plots/table_mc5000_sorted_L4.txt,denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_5000//taxa_plots/table_mc5000_sorted_L5.txt,denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_5000//taxa_plots/table_mc5000_sorted_L6.txt -o denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_5000//taxa_plots//taxa_summary_plots/ \n",
"Command returned exit status: -15\n",
"Stdout:\n",
"\n",
"Stderr\n",
"\n",
"\n"
]
},
{
"data": {
"text/html": [
"Path (<tt>denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_5000/index.html</tt>) doesn't exist. It may still be in the process of being generated, or you may have the incorrect path."
],
"text/plain": [
"/Users/Cassie/Dropbox/Seagrass/Ammonification/denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_5000/index.html"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#For ALL 16S Data\n",
"!core_diversity_analyses.py \\\n",
"-i denovo_97_otus_EverythingRCFiltered/Ammonia.biom \\\n",
"-o denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_5000/ \\\n",
"-m $bactarch_map \\\n",
"-e 5000 \\\n",
"-p ../EdgeAnalysis/open_ref_97_otus_EverythingRCFiltered/betadiv_params.txt \\\n",
"-t denovo_97_otus_EverythingRCFiltered/rep_set.tre"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<a href='denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_5000/arare_max5000/alpha_rarefaction_plots/rarefaction_plots.html' target='_blank'>denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_5000/arare_max5000/alpha_rarefaction_plots/rarefaction_plots.html</a><br>"
],
"text/plain": [
"/Users/Cassie/Dropbox/Seagrass/Ammonification/denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_5000/arare_max5000/alpha_rarefaction_plots/rarefaction_plots.html"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#alpha rarefaction\n",
"FileLink(\"denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_5000/arare_max5000/alpha_rarefaction_plots/rarefaction_plots.html\")"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<a href='denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_5000/bdiv_even5000/bray_curtis_emperor_pcoa_plot/index.html' target='_blank'>denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_5000/bdiv_even5000/bray_curtis_emperor_pcoa_plot/index.html</a><br>"
],
"text/plain": [
"/Users/Cassie/Dropbox/Seagrass/Ammonification/denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_5000/bdiv_even5000/bray_curtis_emperor_pcoa_plot/index.html"
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#bray curtis\n",
"FileLink(\"denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_5000/bdiv_even5000/bray_curtis_emperor_pcoa_plot/index.html\")"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<a href='denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_5000/bdiv_even5000/weighted_unifrac_emperor_pcoa_plot/index.html' target='_blank'>denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_5000/bdiv_even5000/weighted_unifrac_emperor_pcoa_plot/index.html</a><br>"
],
"text/plain": [
"/Users/Cassie/Dropbox/Seagrass/Ammonification/denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_5000/bdiv_even5000/weighted_unifrac_emperor_pcoa_plot/index.html"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#weighted unifraq\n",
"FileLink(\"denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_5000/bdiv_even5000/weighted_unifrac_emperor_pcoa_plot/index.html\")"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<a href='denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_5000/bdiv_even5000/unweighted_unifrac_emperor_pcoa_plot/index.html' target='_blank'>denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_5000/bdiv_even5000/unweighted_unifrac_emperor_pcoa_plot/index.html</a><br>"
],
"text/plain": [
"/Users/Cassie/Dropbox/Seagrass/Ammonification/denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_5000/bdiv_even5000/unweighted_unifrac_emperor_pcoa_plot/index.html"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#unweighted unifraq\n",
"FileLink(\"denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_5000/bdiv_even5000/unweighted_unifrac_emperor_pcoa_plot/index.html\")"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"#For Just T1\n",
"!core_diversity_analyses.py \\\n",
"-i denovo_97_otus_EverythingRCFiltered/Ammonia_T1.biom \\\n",
"-o denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_T1_5000/ \\\n",
"-m $bactarch_map \\\n",
"-e 5000 \\\n",
"-p ../EdgeAnalysis/open_ref_97_otus_EverythingRCFiltered/betadiv_params.txt \\\n",
"-t denovo_97_otus_EverythingRCFiltered/rep_set.tre"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Exporting Biom Tables for Further Analysis"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"#how to convert to json for phyloseq and phinch\n",
"!biom convert \\\n",
"-i table.biom \\\n",
"-o table_json.biom \\\n",
"--table-type=\"OTU table\" \\\n",
"--to-json"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"#All data\n",
"!biom convert \\\n",
"-i denovo_97_otus_EverythingRCFiltered/Ammonia.biom \\\n",
"-o denovo_97_otus_EverythingRCFiltered/Ammonia_json.biom \\\n",
"--table-type=\"OTU table\" \\\n",
"--to-json"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"#T1 \n",
"!biom convert \\\n",
"-i denovo_97_otus_EverythingRCFiltered/Ammonia_T1.biom \\\n",
"-o denovo_97_otus_EverythingRCFiltered/Ammonia_T1_json.biom \\\n",
"--table-type=\"OTU table\" \\\n",
"--to-json"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"#T5\n",
"!biom convert \\\n",
"-i denovo_97_otus_EverythingRCFiltered/Ammonia_T5.biom \\\n",
"-o denovo_97_otus_EverythingRCFiltered/Ammonia_T5_json.biom \\\n",
"--table-type=\"OTU table\" \\\n",
"--to-json"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment