Skip to content

Commit

Permalink
complete test
Browse files Browse the repository at this point in the history
  • Loading branch information
ptdtan authored and trile965 committed Apr 8, 2019
1 parent 2fe3aa7 commit 0b4b038
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/Harmony.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string> rownames;
oHdf5Util.ReadDatasetVector<std::string>(file, GROUP_NAME, "features", rownames);
// Read the barcode slot since this is the transposed matrix
oHdf5Util.ReadDatasetVector<std::string>(file, GROUP_NAME, "barcodes", rownames);

oHdf5Util.Close(file);

Expand Down
4 changes: 2 additions & 2 deletions test.R
Original file line number Diff line number Diff line change
@@ -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))

0 comments on commit 0b4b038

Please sign in to comment.