Skip to content

Commit

Permalink
Made a couple fixes to the compute_regmap_kinship.R script.
Browse files Browse the repository at this point in the history
  • Loading branch information
pcarbo committed Aug 23, 2021
1 parent d391e21 commit 78794f5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions compute_regmap_kinship.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ library("data.table")
# --------------------
# Here the genotype data are loaded as a matrix of floating-point numbers.
cat("Reading genotype data.\n")
geno <- fread("geno.csv.gz",sep = ",",header = TRUE)
geno <- fread("geno.csv",sep = ",",header = TRUE)
geno <- as.matrix(geno)
storage.mode(geno) <- "double"

Expand All @@ -19,5 +19,7 @@ storage.mode(geno) <- "double"
# genotype matrix.
n <- nrow(geno)
cat(sprintf("Computing %d x %d kinship matrix.\n",n,n))
timing <- system.time(K <- tcrossprod(geno))
print(timing)
t0 <- proc.time()
K <- tcrossprod(geno)
t1 <- proc.time()
print(t1 - t0)

0 comments on commit 78794f5

Please sign in to comment.