Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cran release patch fixes #51

Merged
merged 5 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: clustur
Type: Package
Title: Clustering
Version: 0.1.0
Date: 2024-10-18
Version: 0.1.1
Date: 2024-11-25
Authors@R: c(
person("Gregory", "Johnson", , "[email protected]", role = c("aut"),
comment = c(ORCID = "0009-0008-3890-0297")),
Expand Down
2 changes: 1 addition & 1 deletion R/cluster.R
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ validate_count_table <- function(count_table_df) {
#' This function was created as a helper function to generate file paths to our
#' internal data. You should use this function if you
#' want to follow along with the example, or interact with the data
#' @param file The file name of the data; leave as NULL (default) to get full
#' @param The file name of the data; leave as NULL (default) to get full
#' list of example files
#' @examples
#' example_path("amazon_phylip.dist")
Expand Down
3 changes: 1 addition & 2 deletions cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@

0 errors | 0 warnings | 1 note

* This is a new release.
* All of our projects use C++ 11 so we can continue to support older architectures.
* This should be the patch for clustur's build error on debian.
* Build checks for macos-latest (devel), ubuntu-lastest (devel), windows-latest (devel), windows latest (4.1), ubuntu-latest (release), ubuntu-latest (oldrel-1), ubuntu-latest (oldrel-2), and ubuntu-latest (oldrel-3) are currently passing via GitHub Actions.
1 change: 0 additions & 1 deletion src/ClusterCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ ClusterExport* ClusterCommand::runOptiCluster(OptiMatrix *optiMatrix, const doub
clusterMetrics += (std::to_string(result) + ",");
}
util.AddRowToDataFrameMap(dataframeMapClusterMetrics, clusterMetrics, clusterMetricsHeaders);
std::chrono::time_point<std::chrono::system_clock> start, end;

while ((delta > stableMetric) && (iters < maxIters)) {
//long start = std::time(nullptr);
Expand Down
10 changes: 5 additions & 5 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Rcpp::DataFrame CreateSharedDataFrame(const CountTableAdapter& countTable, const

//[[Rcpp::export]]
bool DetermineIfPhylipOrColumnFile(const std::string& filePath) {
std::fstream data(filePath);
std::ifstream data(filePath);

if(!data.is_open()) {
Rcpp::Rcout << "Please enter a valid file path\n";
Expand Down Expand Up @@ -96,17 +96,17 @@ Rcpp::List Cluster(const SEXP& DistanceData,const std::string& method, const std
ClusterCommand command;
const auto lastCutoff = distanceData.get()->GetCutoff();
const auto listVector = distanceData.get()->GetListVector(); // Going to have to make a copy of list vector, this two values are definitely being changed
auto sparseMatix = distanceData.get()->GetSparseMatrix(); // Going to have to make a copy of sparse matrix
auto sparseMatrix = distanceData.get()->GetSparseMatrix(); // Going to have to make a copy of sparse matrix
if(cutoff < lastCutoff)
sparseMatix->FilterSparseMatrix(cutoff);
const auto result = command.runMothurCluster(method, sparseMatix, cutoff, listVector);
sparseMatrix->FilterSparseMatrix(cutoff);
const auto result = command.runMothurCluster(method, sparseMatrix, cutoff, listVector);
const auto label = result->GetListVector().label;
const Rcpp::DataFrame clusterDataFrame = result->GetListVector().listVector->CreateDataFrameFromList(
featureColumnName, binColumnName);
const Rcpp::DataFrame tidySharedDataFrame = CreateSharedDataFrame(countTableAdapter, result);
delete(result);
delete(listVector);
delete(sparseMatix);
delete(sparseMatrix);
return Rcpp::List::create(Rcpp::Named("label") = std::stod(label),
Rcpp::Named("abundance") = tidySharedDataFrame,
Rcpp::Named("cluster") = clusterDataFrame);
Expand Down
Loading