So I'm running into an issue with putting in my taxonomy data, for some reason it woun't pick up the names or counts and this makes making an MRexperiment impossible
My code:
```# clear all rm(list = ls())
set working directory to fasta-qual-mapping-files-NOTRIM on my desktop
setwd("/home/laura/Desktop/Thesis/fasta-qual-mapping-files-NOTRIM")
install packages
BiocManager::install("metagenomeSeq")
load packages
library(vegan) library(biomformat) library(BiocManager) library(metagenomeSeq)
loading count data
dataDirectory <- system.file("extdata", package = "metagenomeSeq") table.euks.alpha <- loadMeta("./biom-111920EFNillcus515F/feature-table.txt", sep = "\t") table.bact.alpha <- loadMeta("./biom-111920EFNeuk1391F/feature-table.txt", sep = "\t") dim(table.euks.alpha$counts) dim(table.bact.alpha$counts)
loading taxonomy
taxabact = read.delim("./taxonomy-exported-111920EFNillcus515F/taxonomy.tsv", sep = "\t", stringsAsFactors = FALSE) taxaeuk = read.delim("./taxpnpmy-silva-exported-11920EFNeuk1391F/taxonomy.tsv", sep = "\t", stringsAsFactors = FALSE)
creating MRexperiment object
sampledatabacttaxa = AnnotatedDataFrame(taxabact) sampledataeuktaxa = AnnotatedDataFrame(taxaeuk) sampledatabacttaxa sampledataeuktaxa obj = newMRexperiment(table.bact.alpha$counts, featureData = sampledatabacttaxa)
```
Here's the MRexperiment error: Error in validObject(.Object) : invalid class “MRexperiment” object: 1: feature numbers differ between assayData and featureData invalid class “MRexperiment” object: 2: featureNames differ between assayData and featureData
and when I use taxabactnames It returns NULL, same with taxaeuknames
Here is a pastebin of my eukaryotic OTU counts for an example of formatting: https://pastebin.com/zbxB5RR5
and my taxonomy: https://pastebin.com/VtykYigR