CIM 'by hand' with sgcca

Issue #50 resolved
Kim-Anh Le Cao repo owner created an issue

->we dont have the data. Can you just explain those differences between old and new patch version. Or should I ask for data?

Email from Bernard Wone

The CIM are attached. The one with "test" is from the newest version.

At one point you helped me generate a CIM from sGCCA results, please see code below.

# have a look at selected variables #loadings.x = select.var(wrap.result.sgcca, block = 1, comp = 1) loadings.x = wrap.result.sgcca$loadings1 rownames(loadings.x) = colnames(WT)

loadings.z = wrap.result.sgcca$loadings2 rownames(loadings.z) = colnames(MT)

select.x1 = names(sort(abs(loadings.x[,1]), decreasing = TRUE)[1:length(which(wrap.result.sgcca $loadings1[,1] != 0))]) select.x2 = names(sort(abs(loadings.x[,2]), decreasing = TRUE)[1:length(which(wrap.result.sgcca $loadings1[,2] != 0))]) select.z1 = names(sort(abs(loadings.z[,1]), decreasing = TRUE)[1:length(which(wrap.result.sgcca $loadings2[,1] != 0))]) select.z2 = names(sort(abs(loadings.z[,2]), decreasing = TRUE)[1:length(which(wrap.result.sgcca $loadings2[,2] != 0))])

#CIM simMat2 = cor(WT[, select.x1], MT[, select.z1])

pdf('CIMcomp1test.pdf') cim(simMat2, xlab = 'MT Metabolites', ylab = 'WT Metabolites',margins = c(5, 6)) dev.off()

With your newest version 5.1.2 of mixOmics, CIM generates a totally different pattern, is it because the cor is now built into CIM? I tried various changes to the code but can't seem to get it to work, suggestions?

Comments (1)

  1. Log in to comment