HCBravoLab / metagenomeSeq

Statistical analysis for sparse high-throughput sequencing
64 stars 20 forks source link

metagenomeSeq for denovo assembled contigs and creating the MRexperiment object #84

Closed josephhughes closed 1 year ago

josephhughes commented 1 year ago

Hi,

I have a set of samples that have been sequenced using a non-target approach for which I have produced de-novo contigs and assigned taxonomic classification using DIAMOND blastx. I would like to analyse this dataset using metagenomeSeq, however I'm not sure how best to format the input files to create an MRexperiment object. Currently, some of my contigs are assigned to species, others genus, others family level. Would each contig correspond to an OTU in the examples provided in the tutorial? When I do this, I get the following error:

> obj =newMRexperiment(as.data.frame(mat),phenoData=phenotypeData,featureData=OTUdata)
Error in validObject(.Object) : 
  invalid class “MRexperiment” object: featureNames differ between assayData and featureData

Thanks for your advice, Joseph

josephhughes commented 1 year ago

I solved this issue by making sure that the order of the OTU names was the same in the matrix of counts and in the taxonomy table.