From 0b4b03877124c528d4af920190996846ee0f7714 Mon Sep 17 00:00:00 2001 From: Tan Date: Mon, 8 Apr 2019 00:13:02 +0700 Subject: [PATCH] complete test --- src/Harmony.cpp | 3 ++- test.R | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Harmony.cpp b/src/Harmony.cpp index bfab607..3dce0e8 100644 --- a/src/Harmony.cpp +++ b/src/Harmony.cpp @@ -365,7 +365,8 @@ DataFrame HarmonyMarkerH5(const std::string &hdf5Path, const Rcpp::NumericVector HarmonyTest(oHdf5Util, file, cluster, res, total_cnt); Rcout << "Done calculate" << std::endl; std::vector rownames; - oHdf5Util.ReadDatasetVector(file, GROUP_NAME, "features", rownames); + // Read the barcode slot since this is the transposed matrix + oHdf5Util.ReadDatasetVector(file, GROUP_NAME, "barcodes", rownames); oHdf5Util.Close(file); diff --git a/test.R b/test.R index 2cb09af..5149b2b 100644 --- a/test.R +++ b/test.R @@ -1,7 +1,7 @@ download.file("https://www.dropbox.com/s/jukonxw5g04n8ra/sim2.row.h5?dl=1", "sim2.row.h5") +download.file("https://www.dropbox.com/s/lyyr2pnzup5aw6v/sim2.col.h5?dl=1", "sim2.col.h5") cluster <- rep(2, 2499) cluster[1:500] <- 1 system.time(dfrow <- Signac:::HarmonyMarkerH5("sim2.row.h5", cluster)) -mat <- Signac::ReadSpMtAsS4("sim2.row.h5", "bioturing") -mat <- t(mat) +mat <- Signac::ReadSpMtAsS4("sim2.col.h5", "bioturing") system.time(dfcol <- Signac:::HarmonyMarker(mat, cluster))