Questions tagged [phyloseq]

phyloseq is an R package with functions and tools to handle and analyze high-throughput microbiome census data

141 questions
1
vote
3 answers

Remove attributes from dataframe

I have the following dataframe (converted from a tax_table object from the phyloseq package). How can i remove the attributes ?? str(DT2_mat) 'data.frame': 5120 obs. of 7 variables: $ : Factor w/ 2 levels "Archaea","Bacteria": 2 2 2 2 2 2 2…
david
  • 805
  • 1
  • 9
  • 21
1
vote
0 answers

bioconductor packages are getting hung up on dependencies

I'm having some trouble installing bioconductor packages on a particular system I am working on. This is an ubuntu system running R through anacondas with conda install r-essential. I am trying to install a bunch of packages. Currently I am having a…
ohnoplus
  • 1,205
  • 1
  • 17
  • 29
1
vote
1 answer

r - phyloseq - ordination of taxa other than species (family, order, etc.)

I have reviewed the phyloseq tutorials, but I can't determine how to determine the stress level and plot the ordination of a specific taxa (other than species), such as family or other classifications. In order to illustrate my point, here is the…
iembry
  • 962
  • 1
  • 7
  • 23
1
vote
0 answers

phyloseq stepwise forward selection

i am working with multivariate data, trying to relate soil bacterial diversity (obtained by metabarcoding) to environmental factors to see which factors explain the most variation of the bacterial diversity. I am using the phyloseq package to do…
Curculio
  • 11
  • 2
1
vote
2 answers

Passing argument to subset() and unique()

I am using the phyloseq package. test <- function( ...){ bar <- unique(sampleData[,'pH']) foo <- subset_samples(phyloseqObject, pH == as.numeric(bar[1]@.Data)) print(foo) } test(pH) I want to pass pH as an argument to test() but unique() won't…
Alexander
  • 480
  • 2
  • 5
  • 21
0
votes
0 answers

otu_table from phyloseq object does not have correct abundance: all asv are "0" for specific group of samples

I have QIIME2 outputs (feature table, tree, taxonomy, and metadata) that I've imported into R using qiime2R (v. 0.99.6) ‘qza_to_phyloseq’ to create a phyloseq object. My QIIME feature table shows reasonable values for ASV abundance across all…
Geomicro
  • 303
  • 3
  • 13
0
votes
0 answers

Hierarchical clustering using phyloseq object has no color

I was trying to make a hierarchical cluster with colors but the figure comes out with no color. The code was working in the past, but now it's not, and I don't know what happened. Any help you could provide would be much appreciated. cplot1 <-…
0
votes
0 answers

Phyloseq - Rarecurve is dominated by a single taxa

vegan::rarecurve: I'm having difficulty interpreting this rarecurve, and understanding if it is acceptable, or implies deeper problems within the data. This is 16S rRNA data that was processed in QIIME2 with DADA2, and imported into RStudio using…
0
votes
1 answer

How to add and specify additional ranks to phyloseq taxonomy?

Is it possible to specify the number and names of taxonomic ranks when reading in data to a phyloseq object? When creating a phyloseq object from qiime output, e.g., ps=qza_to_phyloseq(features="features.qza", taxonomy="taxonomy.qza",…
MockCommunity1
  • 31
  • 1
  • 1
  • 10
0
votes
1 answer

How to merge OTUs that appear in 2/3 replicates?

I am studying the microbiome of an organism and I have sequenced 3 PCR replicates for each sample. I am working with a phyloseq object and my sample_df looks like this (simplified): > df phyloseq-class experiment-level object otu_table() OTU…
0
votes
0 answers

Canonical Correspondence analysis

enter image description here I have different categories of environmental variables such as the biotic factor (temperature, windspeed), spatial factor (longitude and latitude), and soil properties (soil ph) and I would like to perform Canonical…
0
votes
0 answers

Filtering taxa from phyloseq object

Edit: solution Below is how to subset specific taxa from a phyloseq object. I make my phyloseq object, with the dput() posted below for recreation purposes. TAX <- tax_table(as.matrix(tax.table.ex)) ASV <- otu_table(asv.table.ex, taxa_are_rows =…
Geomicro
  • 303
  • 3
  • 13
0
votes
1 answer

Rarefaction curve

I would like to ask why my rarefaction curve both for the rarefied data and non rarefied doesnt seem ideal. What could be a cause to this? This was the script i used: sam.data_soil_rare <- data.frame(bac.unedited@sam_data) sam.data_soil_rare…
0
votes
0 answers

Using a for loop to perform multiple of the same command on a many phyloseq object variable

I am trying to loop the names of a phyloseq objects with the variable otu_table with them. This is my code. ps_groups <- c("ps_10B","ps_10D", "ps_11D", "ps_12D", "ps_13D", "ps_14D", "ps_15D", "ps_16D", "ps_17B", "ps_17D", "ps_18B",…
0
votes
0 answers

Looping the same naming vector multiple times within a command in R

I am attempting to loop a name vector within a command multiple times in R. The traditional command looks like the following: ps_10B <- prune_taxa(colmax>100 & colMeans(data.frame(ps_10B@otu_table@.Data)>0)>2/nsamples(ps_10B), …
1 2
3
9 10