Skip to content
Snippets Groups Projects
Commit f80f60f3 authored by Vincent  LAVILLE's avatar Vincent LAVILLE
Browse files

Update correlationMatrix.R

parent ce27f6dd
No related branches found
No related tags found
No related merge requests found
...@@ -138,9 +138,11 @@ getGenoCorMatrix <- function(lrsid, lchr, lpos, lrefall, pop, path = NULL, web = ...@@ -138,9 +138,11 @@ getGenoCorMatrix <- function(lrsid, lchr, lpos, lrefall, pop, path = NULL, web =
lind <- lind[lind$Paternal.ID == 0 & lind$Maternal.ID == 0, 2] lind <- lind[lind$Paternal.ID == 0 & lind$Maternal.ID == 0, 2]
testMat <- getAdditivelyCodedMatrix(genoMat,lind) testMat <- getAdditivelyCodedMatrix(genoMat,lind)
to_remove <- which(apply(testMat, 1, sd) == 0) to_remove <- which(apply(testMat, 1, sd) == 0))
testMat <- testMat[-to_remove, ] if (length(to_remove) > 0) {
genoMap <- genoMap[-to_remove, ] testMat <- testMat[-to_remove, ]
genoMap <- genoMap[-to_remove, ]
}
to_remove <- NULL to_remove <- NULL
for (i in 1:nrow(testMat)) { for (i in 1:nrow(testMat)) {
if (!(rownames(testMat)[i] %in% lrsid)) { if (!(rownames(testMat)[i] %in% lrsid)) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment