Prior to launching ipython, I started MacQiime by typing macqiime in terminal (or XQuartz/X11)
Note: I am now using qiime instead of MacQIIME
I am following the this tutorial: http://nbviewer.ipython.org/github/biocore/qiime/blob/master/examples/ipynb/illumina_overview_tutorial.ipynb?create=1
Another good tutorial: http://www.wernerlab.org/teaching/qiime/overview
An example of a QIIME 16S Analysis: http://nbviewer.ipython.org/gist/jennomics/c6fe5e113525c6aa8add
The following cell is directly copied from the tutorial:
from os import chdir, mkdir
from os.path import join
# these are only available in the current development branch of IPython
from IPython.display import FileLinks, FileLink
Sequence data was demultiplexed and filtered using an inhouse script available at https://github.com/gjospin/scripts/blob/master/Demul_trim_prep.pl
#The subsequent files containing the merged 16S reads only were concatonated into one file using:
!cat *.M.* > EverythingMerged.fasta.gz
#Then they were unzipped
!gunzip EverythingMerged.fasta.gz
#Then they were reverse complemented (as our reads are in the wrong direction relative to the Greengenes/Unite databases)
!adjust_seq_orientation.py -i EverythingMerged.fasta -o EverythingMerged_RC.fasta
#Note: if there are spaces in your path make sure they have a '\' before them so they are recognized
#16S sequences and mapping file
bactarch_seqs = "/Users/Cassie/Dropbox/Seagrass/Ammonification/EverythingMergedRC.fasta"
bactarch_map = "/Users/Cassie/Dropbox/Seagrass/Ammonification/Ammonification_Experiment_Mapping_File.txt"
#Databases
#Had to install Greengenes 99% and UNITE databases from QIIME and UNITE respectively
otu_base = "/macqiime/greengenes/gg_13_8_otus/"
reference_seqs = join(otu_base,"/macqiime/greengenes/gg_13_8_otus/rep_set/97_otus.fasta")
reference_tree = join(otu_base,"/macqiime/greengenes/gg_13_8_otus/trees/97_otus.tree")
reference_tax = join(otu_base,"/macqiime/greengenes/gg_13_8_otus/taxonomy/97_otu_taxonomy.txt")
#checks mapping file for qiime use
!validate_mapping_file.py \
-m $bactarch_map
Errors and/or warnings detected in mapping file. Please check the log and html file for details.
#replaces original mapping file with new corrected file
!mv Ammonification_Experiment_Mapping_File_corrected.txt Ammonification_Experiment_Mapping_File.txt
!validate_demultiplexed_fasta.py \
-i $bactarch_seqs \
-m $bactarch_map
#check the log file generated to see if any duplicate barcodes/sample names are used; mostly this is a sanity check
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. http://www.drive5.com/usearch/manual/install.html
Code to Install: (repeat for usearch)
sudo mv usearch61 /usr/local/bin/usearch61
sudo chmod a+x /usr/local/bin/usearch61
Ran into memory issues using usearch61
#split fasta for chimera check b/c usearch61 keeps running out of memory on full file
!split_sequence_file_by_sample_ids.py \
-i $bactarch_seqs
-o SplitFasta/ \
#split combined files into blocks for chimera check
!cat SplitFasta/A*.fasta > SplitFasta/BlockA.fasta
!cat SplitFasta/B*.fasta > SplitFasta/BlockB.fasta
!cat SplitFasta/C*.fasta > SplitFasta/BlockC.fasta
!cat SplitFasta/D*.fasta > SplitFasta/BlockD.fasta
!cat SplitFasta/E*.fasta > SplitFasta/BlockE.fasta
!cat SplitFasta/F*.fasta > SplitFasta/BlockF.fasta
!cat SplitFasta/G*.fasta > SplitFasta/BlockG.fasta
!cat SplitFasta/H*.fasta > SplitFasta/BlockH.fasta
!cat SplitFasta/I*.fasta > SplitFasta/BlockI.fasta
!cat SplitFasta/J*.fasta > SplitFasta/BlockJ.fasta
!cat SplitFasta/K*.fasta > SplitFasta/BlockK.fasta
!cat SplitFasta/L*.fasta > SplitFasta/BlockL.fasta
#identifies chimeric sequences using usearch61 in our bacterial data using the 97% OTU databases as the reference
!identify_chimeric_seqs.py \
-i SplitFasta/BlockA.fasta \
-m usearch61 \
-o qiime_ready_chimeras_block_A/ \
-r $reference_seqs
!identify_chimeric_seqs.py \
-i SplitFasta/BlockB.fasta \
-m usearch61 \
-o qiime_ready_chimeras_block_B/ \
-r $reference_seqs
!identify_chimeric_seqs.py \
-i SplitFasta/BlockC.fasta \
-m usearch61 \
-o qiime_ready_chimeras_block_C/ \
-r $reference_seqs
!identify_chimeric_seqs.py \
-i SplitFasta/BlockD.fasta \
-m usearch61 \
-o qiime_ready_chimeras_block_D/ \
-r $reference_seqs
!identify_chimeric_seqs.py \
-i SplitFasta/BlockE.fasta \
-m usearch61 \
-o qiime_ready_chimeras_block_E/ \
-r $reference_seqs
!identify_chimeric_seqs.py \
-i SplitFasta/BlockF.fasta \
-m usearch61 \
-o qiime_ready_chimeras_block_F/ \
-r $reference_seqs
!identify_chimeric_seqs.py \
-i SplitFasta/BlockG.fasta \
-m usearch61 \
-o qiime_ready_chimeras_block_G/ \
-r $reference_seqs
!identify_chimeric_seqs.py \
-i SplitFasta/BlockH.fasta \
-m usearch61 \
-o qiime_ready_chimeras_block_H/ \
-r $reference_seqs
!identify_chimeric_seqs.py \
-i SplitFasta/BlockI.fasta \
-m usearch61 \
-o qiime_ready_chimeras_block_I/ \
-r $reference_seqs
!identify_chimeric_seqs.py \
-i SplitFasta/BlockJ.fasta \
-m usearch61 \
-o qiime_ready_chimeras_block_J/ \
-r $reference_seqs
!identify_chimeric_seqs.py \
-i SplitFasta/BlockK.fasta \
-m usearch61 \
-o qiime_ready_chimeras_block_K/ \
-r $reference_seqs
!identify_chimeric_seqs.py \
-i SplitFasta/BlockL.fasta \
-m usearch61 \
-o qiime_ready_chimeras_block_L/ \
-r $reference_seqs
#filters out chimeric seqs from our fasta file
!filter_fasta.py \
-f SplitFasta/BlockA.fasta \
-o SplitFasta/BlockA_Filtered.fasta \
-s qiime_ready_chimeras_block_A/chimeras.txt \
-n
!filter_fasta.py \
-f SplitFasta/BlockB.fasta \
-o SplitFasta/BlockB_Filtered.fasta \
-s qiime_ready_chimeras_block_B/chimeras.txt \
-n
!filter_fasta.py \
-f SplitFasta/BlockC.fasta \
-o SplitFasta/BlockC_Filtered.fasta \
-s qiime_ready_chimeras_block_C/chimeras.txt \
-n
!filter_fasta.py \
-f SplitFasta/BlockD.fasta \
-o SplitFasta/BlockD_Filtered.fasta \
-s qiime_ready_chimeras_block_D/chimeras.txt \
-n
!filter_fasta.py \
-f SplitFasta/BlockE.fasta \
-o SplitFasta/BlockE_Filtered.fasta \
-s qiime_ready_chimeras_block_E/chimeras.txt \
-n
!filter_fasta.py \
-f SplitFasta/BlockF.fasta \
-o SplitFasta/BlockF_Filtered.fasta \
-s qiime_ready_chimeras_block_F/chimeras.txt \
-n
!filter_fasta.py \
-f SplitFasta/BlockG.fasta \
-o SplitFasta/BlockG_Filtered.fasta \
-s qiime_ready_chimeras_block_G/chimeras.txt \
-n
!filter_fasta.py \
-f SplitFasta/BlockH.fasta \
-o SplitFasta/BlockH_Filtered.fasta \
-s qiime_ready_chimeras_block_H/chimeras.txt \
-n
!filter_fasta.py \
-f SplitFasta/BlockI.fasta \
-o SplitFasta/BlockI_Filtered.fasta \
-s qiime_ready_chimeras_block_I/chimeras.txt \
-n
!filter_fasta.py \
-f SplitFasta/BlockJ.fasta \
-o SplitFasta/BlockJ_Filtered.fasta \
-s qiime_ready_chimeras_block_J/chimeras.txt \
-n
!filter_fasta.py \
-f SplitFasta/BlockK.fasta \
-o SplitFasta/BlockK_Filtered.fasta \
-s qiime_ready_chimeras_block_K/chimeras.txt \
-n
!filter_fasta.py \
-f SplitFasta/BlockL.fasta \
-o SplitFasta/BlockL_Filtered.fasta \
-s qiime_ready_chimeras_block_L/chimeras.txt \
-n
#combine
!cat *Filtered.fasta > EverythingMerged_RC_Filtered.fasta
#16S sequences after chimera filtering
bactarch_seqs = "/Users/Cassie/Dropbox/Seagrass/Ammonification/SplitFasta/EverythingMerged_RC_Filtered.fasta"
Make sure to install BLAST Legacy (http://www.wernerlab.org/software/macqiime/macqiime-installation/installing-blast-in-os-x)
#Pick denovo OTUS for 16S
!pick_de_novo_otus.py \
-o denovo_97_otus_EverythingRCFiltered \
-i $bactarch_seqs \
-p params.txt \
-a -O 6 -f
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...)
!cat /Users/Cassie/Dropbox/Seagrass/Ammonification/params.txt
pick_otus:enable_rev_strand_match True beta_diversity:metrics bray_curtis,euclidean,unweighted_unifrac,weighted_unifrac
For 16S Data:
#summarizes the biom table obtained from running open ref otu picking at 97% with greengenes; sanity check
!biom summarize-table \
-i denovo_97_otus_EverythingRCFiltered/otu_table.biom \
-o denovo_97_otus_EverythingRCFiltered/otu_table_summary.txt
FileLink("denovo_97_otus_EverythingRCFiltered/otu_table_summary.txt")
#filters out all the chloroplasts/mitochondria/singletons (so eukaryotes and seagrass and VERY rare taxa that may just be errors)
!filter_taxa_from_otu_table.py \
-i denovo_97_otus_EverythingRCFiltered/otu_table.biom \
-o denovo_97_otus_EverythingRCFiltered/otu_table_no_euks.biom \
-n c__Chloroplast,f__mitochondria
!filter_otus_from_otu_table.py \
-i denovo_97_otus_EverythingRCFiltered/otu_table_no_euks.biom \
-o denovo_97_otus_EverythingRCFiltered/otu_table_no_euks_no_singletons.biom \
-n 2
!filter_taxa_from_otu_table.py \
-i denovo_97_otus_EverythingRCFiltered/otu_table_no_euks_no_singletons.biom \
-o denovo_97_otus_EverythingRCFiltered/otu_table_no_euks_no_singletons_no_unassigned.biom \
-n Unassigned
#summarizes the biom table obtained above after filtering; sanity check
!biom summarize-table \
-i denovo_97_otus_EverythingRCFiltered/otu_table_no_euks_no_singletons_no_unassigned.biom \
-o denovo_97_otus_EverythingRCFiltered/otu_summary_filtered.txt
FileLink("denovo_97_otus_EverythingRCFiltered/otu_summary_filtered.txt")
#97% 16S OTUs
!biom add-metadata \
-i denovo_97_otus_EverythingRCFiltered/otu_table_no_euks_no_singletons_no_unassigned.biom \
-o denovo_97_otus_EverythingRCFiltered/otu_table_no_euks_no_singletons_no_unassigned_w_metadata.biom \
-m $bactarch_map
#Renaming biom table
!mv denovo_97_otus_EverythingRCFiltered/otu_table_no_euks_no_singletons_no_unassigned_w_metadata.biom denovo_97_otus_EverythingRCFiltered/Ammonia.biom
#Investigating levels of rarification
!alpha_rarefaction.py \
-i denovo_97_otus_EverythingRCFiltered/Ammonia.biom \
-n 25 \
-o denovo_97_otus_EverythingRCFiltered/arare_Ammonia \
-m $bactarch_map \
-t denovo_97_otus_EverythingRCFiltered/rep_set.tre -f
^C
FileLink("denovo_97_otus_EverythingRCFiltered/arare_Ammonia/alpha_rarefaction_plots/rarefaction_plots.html")
#Investigating how rarification to n=3218 would effect PCoA plots
!jackknifed_beta_diversity.py \
-i denovo_97_otus_EverythingRCFiltered/Ammonia.biom \
-o denovo_97_otus_EverythingRCFiltered/jackknifed_betadiv_3218/ \
-e 3218 \
-m $bactarch_map \
-t denovo_97_otus_EverythingRCFiltered/rep_set.tre -f
/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. RuntimeWarning /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. RuntimeWarning /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. RuntimeWarning /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. RuntimeWarning /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. RuntimeWarning /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. RuntimeWarning /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. RuntimeWarning /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. RuntimeWarning /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. RuntimeWarning /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. RuntimeWarning
#Investigating how rarification to n=5000 would effect PCoA plots
!jackknifed_beta_diversity.py \
-i denovo_97_otus_EverythingRCFiltered/Ammonia.biom \
-o denovo_97_otus_EverythingRCFiltered/jackknifed_betadiv_5000/ \
-e 5000 \
-m $bactarch_map \
-t denovo_97_otus_EverythingRCFiltered/rep_set.tre -f
/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. RuntimeWarning /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. RuntimeWarning /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. RuntimeWarning /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. RuntimeWarning /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. RuntimeWarning /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. RuntimeWarning /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. RuntimeWarning /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. RuntimeWarning /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. RuntimeWarning /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. RuntimeWarning
#16S Greengenes 97% OTU Data; rarify to 5000
!single_rarefaction.py \
-i denovo_97_otus_EverythingRCFiltered/Ammonia.biom \
-o denovo_97_otus_EverythingRCFiltered/Ammonia_5000.biom \
-d 5000
#sanity check 16S data
!biom summarize-table \
-i denovo_97_otus_EverythingRCFiltered/Ammonia_5000.biom \
-o denovo_97_otus_EverythingRCFiltered/Ammonia_5000.txt
FileLink("denovo_97_otus_EverythingRCFiltered/Ammonia_5000.txt")
For 16S Data:
#T1
!filter_samples_from_otu_table.py \
-i denovo_97_otus_EverythingRCFiltered/Ammonia.biom \
-o denovo_97_otus_EverythingRCFiltered/Ammonia_T1.biom \
-m $bactarch_map \
-s "TimePoint:1"
#T3
!filter_samples_from_otu_table.py \
-i denovo_97_otus_EverythingRCFiltered/Ammonia.biom \
-o denovo_97_otus_EverythingRCFiltered/Ammonia_T3.biom \
-m $bactarch_map \
-s "TimePoint:3"
#T4
!filter_samples_from_otu_table.py \
-i denovo_97_otus_EverythingRCFiltered/Ammonia.biom \
-o denovo_97_otus_EverythingRCFiltered/Ammonia_T4.biom \
-m $bactarch_map \
-s "TimePoint:4"
#T5
!filter_samples_from_otu_table.py \
-i denovo_97_otus_EverythingRCFiltered/Ammonia.biom \
-o denovo_97_otus_EverythingRCFiltered/Ammonia_T5.biom \
-m $bactarch_map \
-s "TimePoint:5"
#For ALL 16S Data
!core_diversity_analyses.py \
-i denovo_97_otus_EverythingRCFiltered/Ammonia.biom \
-o denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_5000/ \
-m $bactarch_map \
-e 5000 \
-p ../EdgeAnalysis/open_ref_97_otus_EverythingRCFiltered/betadiv_params.txt \
-t denovo_97_otus_EverythingRCFiltered/rep_set.tre
/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. RuntimeWarning /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. RuntimeWarning Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/bin/core_diversity_analyses.py", line 202, in <module> main() File "/Library/Frameworks/Python.framework/Versions/2.7/bin/core_diversity_analyses.py", line 199, in main status_update_callback=status_update_callback) 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 status_update_callback=status_update_callback) 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 close_logger_on_success=close_logger_on_success) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/qiime/workflow/util.py", line 122, in call_commands_serially raise WorkflowError(msg) qiime.workflow.util.WorkflowError: *** ERROR RAISED DURING STEP: Plot Taxonomy Summary Command run was: 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/ Command returned exit status: -15 Stdout: Stderr
#alpha rarefaction
FileLink("denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_5000/arare_max5000/alpha_rarefaction_plots/rarefaction_plots.html")
#bray curtis
FileLink("denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_5000/bdiv_even5000/bray_curtis_emperor_pcoa_plot/index.html")
#weighted unifraq
FileLink("denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_5000/bdiv_even5000/weighted_unifrac_emperor_pcoa_plot/index.html")
#unweighted unifraq
FileLink("denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_5000/bdiv_even5000/unweighted_unifrac_emperor_pcoa_plot/index.html")
#For Just T1
!core_diversity_analyses.py \
-i denovo_97_otus_EverythingRCFiltered/Ammonia_T1.biom \
-o denovo_97_otus_EverythingRCFiltered/core_diversity_analyses_Ammonia_T1_5000/ \
-m $bactarch_map \
-e 5000 \
-p ../EdgeAnalysis/open_ref_97_otus_EverythingRCFiltered/betadiv_params.txt \
-t denovo_97_otus_EverythingRCFiltered/rep_set.tre
#how to convert to json for phyloseq and phinch
!biom convert \
-i table.biom \
-o table_json.biom \
--table-type="OTU table" \
--to-json
#All data
!biom convert \
-i denovo_97_otus_EverythingRCFiltered/Ammonia.biom \
-o denovo_97_otus_EverythingRCFiltered/Ammonia_json.biom \
--table-type="OTU table" \
--to-json
#T1
!biom convert \
-i denovo_97_otus_EverythingRCFiltered/Ammonia_T1.biom \
-o denovo_97_otus_EverythingRCFiltered/Ammonia_T1_json.biom \
--table-type="OTU table" \
--to-json
#T5
!biom convert \
-i denovo_97_otus_EverythingRCFiltered/Ammonia_T5.biom \
-o denovo_97_otus_EverythingRCFiltered/Ammonia_T5_json.biom \
--table-type="OTU table" \
--to-json