-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Dear PLACO developer,
Thank you for this nice software. Below is my script to run PLACO on HPC. It is running for many hours. Is it normal to take long time or it just stuck somewhere. Could you please advice any idea on running it faster?
Thank you much for your help.
Kind regards
Reza
Script:
run_placo.R
setwd("/mnt/lustre/working/lab_michellel/rezanurR/placo_analysis")
source("PLACO_v0.2.0.R")
library(data.table)
Load harmonized file
load("merged_harmonized.RData")
Filter out extreme Z
merged_harmonized <- merged_harmonized[(Z1^2 <= 80) & (Z2^2 <= 80)]
Z.matrix <- as.matrix(merged_harmonized[, .(Z1, Z2)])
P.matrix <- as.matrix(merged_harmonized[, .(p1, p2)])
colnames(P.matrix) <- c("P1", "P2")
VarZ <- var.placo(Z.matrix, P.matrix, p.threshold = 1e-4)
out <- sapply(1:nrow(Z.matrix), function(i) placo(Z = Z.matrix[i, ], VarZ = VarZ))
merged_harmonized[, :=(
T_placo = as.numeric(out["T.placo", ]),
p_placo = as.numeric(out["p.placo", ])
)]
Save results
save(merged_harmonized, file = "placo_output.RData")