Omission of final edge in correlationTest
1
0
Entering edit mode
eertel • 0
@eertel-7381
Last seen 9.7 years ago
United States

Hi,

I'm having an issue with the network generated via the correlationTest function in metagenomeSeq. The final edge of the network seems to be missing; that is, I attempted to generate a co-abundance network using a subset of the 800 most variable OTUs from msd16s data, which should generate a network of 319600 edges. This is the size of the network generated, but edge 319600 is not listed (it should be an edge between OTU # 477 and 856).

I appreciate your attention to this apparent bug.

Here is the code that I used to generate my network:

source("http://bioconductor.org/biocLite.R")
biocLite()
biocLite("metagenomeSeq")
biocLite("msd16s")
library(metagenomeSeq)
library(msd16s)

dat <- msd16s

cases <- which(pDat$Type == "Case")

counts <- log(MRcounts(dat)+1,base = 2)
vars <- apply(counts,MARGIN = 1,var)
ords <- order(vars[1:800],decreasing=T)
Network <- correlationTest(obj = counts[ords,cases],method = "spearman",cores = 2)

 

metagenomeseq error correlationTest metagenomeseq • 1.6k views
ADD COMMENT
1
Entering edit mode
@joseph-nathaniel-paulson-6442
Last seen 7.6 years ago
United States

Hi! 

Thanks for the interest in metagenomeSeq. I was able to confirm the issue with last edges not maintaining their names (though the code above needs to be tweaked - `pData(dat)$Type=="Case")`. A simpler MRE is:

library(metagenomeSeq)
data(mouseData)
tail(correlationTest(mouseData[1:10,]))

I fixed the code to now include the name of the last edge: https://github.com/nosson/metagenomeSeq/blob/master/R/correlationTest.R#L78-L79

Thanks for the message, this will propagate in the devel version of the package from vs. 1.9.28.

 

Best, 

 

 

ADD COMMENT

Login before adding your answer.

Traffic: 993 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