Problems with creating phyloseq bar plots from a table with species data
0
0
Entering edit mode
lm795 ▴ 10
@lm795-17736
Last seen 4.5 years ago
United Kingdom

I am trying to plot species abundance for intestinal bacteria analysed using a 16S RNA sequencing method. I am using RStudio (1.1.456) and R 3.5.1 My input is a file called "Speciespercentagestest.csv", here. I was following the tutorial on "Importing phyloseq Data", more specifically, loading the table into phyloseq using the sample_data command. Here is my code:

BiocManager::install('phyloseq')
library(readr)
library(phyloseq)
library(ggplot2)
species_analysis <- read_csv("Species_percentages_test.csv")
theme_set(theme_bw())
species_p <- sample_data(species_analysis, errorIfNULL=TRUE)
taxa_are_rows(species_p)
plot_bar(species_p)

My issue is with the "taxaarerows" function. I believe I need to use it to specify the orientation of operational taxonomic units (OTUs), in my case "species" but I am none the wiser on how to apply this function in my specific example. I am sure this is a rookie question but this is the first time I deal with microbiome data. Your help is truly appreciated!

phyloseq microbiome analysis • 816 views
ADD COMMENT

Login before adding your answer.

Traffic: 765 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6