Question: Omission of final edge in correlationTest
0
gravatar for eertel
4.4 years ago by
eertel0
United States
eertel0 wrote:

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)

 

ADD COMMENTlink modified 4.4 years ago • written 4.4 years ago by eertel0
Answer: Omission of final edge in correlationTest
1
gravatar for Joseph Nathaniel Paulson
4.4 years ago by
United States
Joseph Nathaniel Paulson270 wrote:

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 COMMENTlink written 4.4 years ago by Joseph Nathaniel Paulson270
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 284 users visited in the last hour