Skip to content

Commit

Permalink
Dev (#48)
Browse files Browse the repository at this point in the history
* Added unit test and created a easy opticluster function

* Release v0.0.1 (#1)

* Fixed the wrapper for Calling Opticluster!

* Fixing the .RD file

* Fixed issue where opticluster was returning a matrix array and not a data.frame.

* Changing documentation

* Fixing the warnings from building the code.

* Update to the test

* Updating the gitignore

* Add cpp test (#3)

* Added Cpp testing structure!

* Added Test Fixture Class

* Forced the cluster to only return OTU data, and created the fix test fixture with test!

* Created all of the test for the optimatrix adapter and removed the .dll from being tracked!

* Created all the test in the testfixture for listvectors and now I am adding them to the test files.

* Created base test for listVector

* Basic test for listVector are completed!

* Created the basic structure and test fixture for cluster commands

* Cluster Testing suite being pushed up!

* Fix cluster algorithm (#2)

* Fixed a slew of issues by adding bidirection distances.

* Fixed the clustering issue, clustering should be working correctly now!

* Generated Definitions for OptiCluster Test

* Finished creating unit test of the cluster command and opticluster

* Added OptiData test fixture

* Started creating the unit test for utils

* Utils command cluster and test work as expected!!

* Removed old code from one of the testing suites.

* Added another test in utils.

* Clustor has a 89% test coverage! Everything should be tested and ready to merge back!

* RMD Check is able to run successfully!

* Correcting the paths of my cpp files, should fix the action errors.

* Update to the cluster command test fixture

* Modifying the test for opticluster

* Ensuring everything works with c++11

* Removing code issues from cluster command

* Adding the build ignore

* Founds some issue where I am using c++ 17 syntax and not 11.

* Github action fixes, needed to update syntax towards cpp 11

* Modified the testing structure by removing the "Opticluster returns proper stats". I appears it is returning incorrect data on different computer architectures. It is also not needed in the code.

* Fix cluster unit test (#5)

* This should be the fix for the failing cluster test.

* Changed the test to look for equivalence rows instead of equal dataframes. Gives the same results, the only differences is that the cluster have different numbers.

* Printing out the metrics after you perform a cluster and added a true/false condition for shuffling

* Release polish (#6)

* Added to build ignore and properly documented the new R code.

* Unstable, have to fix the mismatch header situation, but was able to return a vector with all the metrics!

* Cluster now returns test metrics and added test to support it.

* Added a depends for lazy-loading and other R related issues.

* More cluster features (#7)

* Adding a single, complete, average, and weighted linkage algorithms

* Adding cluster functions

* Added the new clustering methods, but am getting issues when trying to format them.

* Unstable cannot create proper phylip file with matrix data..

* More unstable code, but we are getting closer. The phylip file is correct for a small dataset

* STABLE, the cluster does not fail and will actually cluster. However I am getting incorrect results. Will refactor the code to work.

* All Clusters (Furthest, Nearest, average, and weighted) all work as they should! I just need to clean it up and add test!

* Created R-facing function in R from cpp and cleaned up a bit of the code.

* Cleaning up the main function

* Small optimization to cluster (x2 speed_up)

* Added optimization and cleaned up functions

* Modifications to the namespace file and test!

* Cluster works with windows now!

* Fixing the round point error on windows and in R. It has something to do with the compilation of the objects...most likely it is related to the conversions of data.

* Fixed the floating point issue, now I have to fix an issue where the cutoff amounts are decreasing.

* Fixed the floating point issue! My adjust was not set! Now I need to figure out why the nearest algorithm is not returning any data.

* Small code style changes

* Cluster works as expected! Everything clusters. Now to add tests

* Started adding more test for Clustor

* Created Test fixtures for the new code

* Completed the sparse distance matrix and read phylip test, need to fix some test errors.

* Added test for phylip reader and matrix adapter. Adding the final test for rAbund now.

* Added all the rAbund test, and the cluster feature should be working properly!

* Adding include statements for windows and other operating systems, this should work as expected. RCMD check works.

* The fix for github actions.

* Change to the include file.

* Removing srand from Utils, going to attempt to set seeds inside of R.

* Fix for race condition issue.

* Fix for RCMD check warnings

* The fix for the windows version of RMD Check!

* Adding dependency for time.

* Make shared (#9)

* Adding a count table variation

* Update Makevars

* Preparation to Create a Shared File for the clustering output.

* Added a simple make shared functionality. It works without the group information. Count_table + list_file = shared_file

* Small changes, going to need to modify the make shared code soon.

* Modifying the way cluster result data is stored.

* Add a datastructure for returning and generating cluster data.

* Cluster export works for Traditional Cluster Methods

* Progress on making a shared file without a group. Have to make test soon.

* Created a pseudo shared file successfully!

* Changes to the abundance output

* Delete F:\Opticluster\output_rabund.txt

* Delete tests/testthat/F:\Opticluster\output_rabund.txt

Removing werid paths.

* Some example data and count table creation

* Pushing lots of temp test files, and small changes

* Adding the count table!

* Count table structure has been created

* Shared File with count tables and without work!

* Count table can now be added to the cluster functions and will produce an output of abundance and clusters in dataframes.

- Removed the exchanged of strings and read table between r and c++ and added a more modifiable approach.

* Fixed test, now we have to add more test.

* Fixes for linux and other computer architectures.

* Removing dependencies that are not used.

* Created test fixtures for unit test

* Removed all of the negligent files that are not needed and added test to all of the new functions!

---------

Co-authored-by: YoungKrug <[email protected]>

* Forgot a unit test. (#10)

* Fix results (#11)

* Adding example data for mothur results.

* Added support for similarity matrix functionality

* Updates to phylip writing, and fixes to incorrect clustering!

* Stable, Classic cluster and opticluster both are identical to that of mothur! + Names can be added

* Results are the same as they are in mothur!

* All the unit test work, and clustur prints out expected results!

* Removing and fixing check issues.

* Fix compilation warnings (#12)

* No warnings on mac!

* Still fixing clang-tidy errors. Lots of comparisons between longs and ints that will cause problems.

* Half way done, modified a lot of deduced type conversions. May need to go back in the future to remove them.

* Should fix all the warnings on linux and windows.

* Pushing through more deduced type fixes.

* Should be the final fix for linux.

* Fix for negative index value

* Cleaning up build notes.

* lintr fixes

* Fix for lintr

* Read phylip files (#14)

* Looking to add a function to replace the entry point.

* Added support for phylip file reading!

* Initial push

* Adding r documentation about mothur and clustur

* Added functionality for column distance file reading!

* Column distance files work!

* Adding read column feature (#15)

* Added reading of column files, but result arent correct.

* Correct Column file

* Column Reader works as expected!

* Added test for column reading, and it all works as expected.

* Fixed check issues

* Documentation (#16)

* Initial push

* Adding r documentation about mothur and clustur

* Added functionality for column distance file reading!

* Column distance files work!

* Adding read column feature (#15)

* Added reading of column files, but result arent correct.

* Correct Column file

* Column Reader works as expected!

* Added test for column reading, and it all works as expected.

* Fixed check issues

* Fix for opticluster clustering.

* Fixing up the documentation

* I am getting the same number of bins!

* example data

* Fix for test error

* Testing values to RMD file

* Small changes

* Added sorting by bin size to cluster output and fixed the clustering issue!

* Modification to the test!

* Updates to test file

* Cleaning up test

* Small change

* Method to check if each cluster exist in the dataframe

* Using content paths instead of absolutes

* Create 96_sq_column_results_mac.list

* Pushing results for different operating systems

* Updating documentation

* Added inst folders

* Update Cluster.R

* Pushing the temporary fix!

* Pushing spare_matrix data file

* Squashed commit of the following:

commit dfd9b2d83c4ab60a95b1585995482ac176fc1114
Author: YoungKrug <[email protected]>
Date:   Tue Sep 24 15:42:56 2024 -0400

    Big error in readPhylip matrix. I was never checking whether the matrix was a square or not!

* Creating vignettes

* Created base pkgdown structure

* Base structure of documentation and website

* Small optimzation to clustur

* Fixing unit test

* Removing comments

* Changed the name of the package to clustur

* Removing unneeded data and fixing issue to validate count_table

* Fixing check errors.

* Consistent randomization (#17)

* Have to fix test, but this is the basic framework for randomization

* Squashed commit of the following:

commit 3f2d3995c30894a457bd860379243aa5329f52cd
Author: GregJohnsonJr <[email protected]>
Date:   Wed Sep 25 17:52:00 2024 -0400

    Fixing check errors.

commit 3f04170d4897e243a2a87847f39d8f4fe1307be0
Author: GregJohnsonJr <[email protected]>
Date:   Wed Sep 25 17:43:06 2024 -0400

    Removing unneeded data and fixing issue to validate count_table

commit 2c642f300cf9fedb6ade3b46eab053c691c26f45
Author: GregJohnsonJr <[email protected]>
Date:   Wed Sep 25 17:31:56 2024 -0400

    Changed the name of the package to clustur

commit 1251c3c63a7d6fca99ddf1373633e3281d0472e2
Author: GregJohnsonJr <[email protected]>
Date:   Wed Sep 25 16:53:16 2024 -0400

    Removing comments

* Changes to the utils class to allow for randomization and added a seed to the functions

* Adding another test

* Fix for note

* Randomization has been added and we changed the way we create sparse matrices!

* Consistent randomization (#18)

* Have to fix test, but this is the basic framework for randomization

* Squashed commit of the following:

commit 3f2d3995c30894a457bd860379243aa5329f52cd
Author: GregJohnsonJr <[email protected]>
Date:   Wed Sep 25 17:52:00 2024 -0400

    Fixing check errors.

commit 3f04170d4897e243a2a87847f39d8f4fe1307be0
Author: GregJohnsonJr <[email protected]>
Date:   Wed Sep 25 17:43:06 2024 -0400

    Removing unneeded data and fixing issue to validate count_table

commit 2c642f300cf9fedb6ade3b46eab053c691c26f45
Author: GregJohnsonJr <[email protected]>
Date:   Wed Sep 25 17:31:56 2024 -0400

    Changed the name of the package to clustur

commit 1251c3c63a7d6fca99ddf1373633e3281d0472e2
Author: GregJohnsonJr <[email protected]>
Date:   Wed Sep 25 16:53:16 2024 -0400

    Removing comments

* Changes to the utils class to allow for randomization and added a seed to the functions

* Adding another test

* Fix for note

* Randomization has been added and we changed the way we create sparse matrices!

* Forgot to include the updated namesapce!

* Squashed commit of the following:

commit 45ba179f6b2e63687229c042be92a6f4cae2c786
Author: Gregory Johnson <[email protected]>
Date:   Thu Sep 26 18:17:22 2024 -0400

    Consistent randomization (#18)

    * Have to fix test, but this is the basic framework for randomization

    * Squashed commit of the following:

    commit 3f2d3995c30894a457bd860379243aa5329f52cd
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 17:52:00 2024 -0400

        Fixing check errors.

    commit 3f04170d4897e243a2a87847f39d8f4fe1307be0
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 17:43:06 2024 -0400

        Removing unneeded data and fixing issue to validate count_table

    commit 2c642f300cf9fedb6ade3b46eab053c691c26f45
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 17:31:56 2024 -0400

        Changed the name of the package to clustur

    commit 1251c3c63a7d6fca99ddf1373633e3281d0472e2
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 16:53:16 2024 -0400

        Removing comments

    * Changes to the utils class to allow for randomization and added a seed to the functions

    * Adding another test

    * Fix for note

    * Randomization has been added and we changed the way we create sparse matrices!

    * Forgot to include the updated namesapce!

commit 10c2ad9915d63dac5fee47d5385b91e711a8b16a
Author: Gregory Johnson <[email protected]>
Date:   Thu Sep 26 18:15:33 2024 -0400

    Consistent randomization (#17)

    * Have to fix test, but this is the basic framework for randomization

    * Squashed commit of the following:

    commit 3f2d3995c30894a457bd860379243aa5329f52cd
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 17:52:00 2024 -0400

        Fixing check errors.

    commit 3f04170d4897e243a2a87847f39d8f4fe1307be0
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 17:43:06 2024 -0400

        Removing unneeded data and fixing issue to validate count_table

    commit 2c642f300cf9fedb6ade3b46eab053c691c26f45
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 17:31:56 2024 -0400

        Changed the name of the package to clustur

    commit 1251c3c63a7d6fca99ddf1373633e3281d0472e2
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 16:53:16 2024 -0400

        Removing comments

    * Changes to the utils class to allow for randomization and added a seed to the functions

    * Adding another test

    * Fix for note

    * Randomization has been added and we changed the way we create sparse matrices!

commit 3f2d3995c30894a457bd860379243aa5329f52cd
Author: GregJohnsonJr <[email protected]>
Date:   Wed Sep 25 17:52:00 2024 -0400

    Fixing check errors.

commit 3f04170d4897e243a2a87847f39d8f4fe1307be0
Author: GregJohnsonJr <[email protected]>
Date:   Wed Sep 25 17:43:06 2024 -0400

    Removing unneeded data and fixing issue to validate count_table

commit 2c642f300cf9fedb6ade3b46eab053c691c26f45
Author: GregJohnsonJr <[email protected]>
Date:   Wed Sep 25 17:31:56 2024 -0400

    Changed the name of the package to clustur

commit 1251c3c63a7d6fca99ddf1373633e3281d0472e2
Author: GregJohnsonJr <[email protected]>
Date:   Wed Sep 25 16:53:16 2024 -0400

    Removing comments

commit e87319e3bfdb1c1657fc399af778e1c6bd17fc37
Author: GregJohnsonJr <[email protected]>
Date:   Wed Sep 25 12:04:03 2024 -0400

    Fixing unit test

commit 8c648bd5dce04613d5fb11b2f8133dda762d8507
Author: GregJohnsonJr <[email protected]>
Date:   Wed Sep 25 11:51:15 2024 -0400

    Small optimzation to clustur

commit 05c8a0738991359f6ef9f69f3de180fd6173ee44
Author: GregJohnsonJr <[email protected]>
Date:   Wed Sep 25 11:38:43 2024 -0400

    Base structure of documentation and website

commit 4a4fcfa4ed154804a9574323d1a56f76d958c24f
Author: GregJohnsonJr <[email protected]>
Date:   Wed Sep 25 10:43:40 2024 -0400

    Created base pkgdown structure

commit a714b7d0a7c9390c30eb723d4135b980a052d387
Author: YoungKrug <[email protected]>
Date:   Tue Sep 24 23:01:44 2024 -0400

    Creating vignettes

commit 6a5df2035a1de3f206a1bcd9ddc0d4bb9b763a83
Author: YoungKrug <[email protected]>
Date:   Tue Sep 24 15:43:09 2024 -0400

    Squashed commit of the following:

    commit dfd9b2d83c4ab60a95b1585995482ac176fc1114
    Author: YoungKrug <[email protected]>
    Date:   Tue Sep 24 15:42:56 2024 -0400

        Big error in readPhylip matrix. I was never checking whether the matrix was a square or not!

commit 63d515ed9dac7370abd579ec1a3d9c3a69f589d2
Author: GregJohnsonJr <[email protected]>
Date:   Tue Sep 24 15:02:02 2024 -0400

    Pushing spare_matrix data file

commit 7eec4fbf6ba4b4c881d65cabf86eb9c4b344ca1b
Author: GregJohnsonJr <[email protected]>
Date:   Tue Sep 24 14:43:12 2024 -0400

    Pushing the temporary fix!

commit 0b5a145cc3ee1db43d4c7472940568324f48cacf
Author: YoungKrug <[email protected]>
Date:   Tue Sep 24 13:56:47 2024 -0400

    Update Cluster.R

commit 7c694e39687ccd62d63fbaa6f3d8713606f5b633
Author: YoungKrug <[email protected]>
Date:   Tue Sep 24 12:51:01 2024 -0400

    Added inst folders

commit 3cb0ba458c6fb35c963a4ee2b6000ee4137a6442
Author: YoungKrug <[email protected]>
Date:   Tue Sep 24 12:02:56 2024 -0400

    Updating documentation

commit 5af269d6bf15db5c96e1c6b676ad57a9b9793eeb
Author: YoungKrug <[email protected]>
Date:   Mon Sep 23 19:45:19 2024 -0400

    Pushing results for different operating systems

commit a745510b856aa3259400c65a4566e98d61a643a8
Author: GregJohnsonJr <[email protected]>
Date:   Mon Sep 23 19:36:29 2024 -0400

    Create 96_sq_column_results_mac.list

commit d08a209b9ac4419e64313312497be6a83acd562f
Author: YoungKrug <[email protected]>
Date:   Sat Sep 21 12:03:56 2024 -0400

    Using content paths instead of absolutes

commit 1623601703cf96bf75a0dd36ecee49c75b2084f9
Author: YoungKrug <[email protected]>
Date:   Sat Sep 21 09:49:11 2024 -0400

    Method to check if each cluster exist in the dataframe

commit 585736ef751b407d397925269788600c83521942
Author: YoungKrug <[email protected]>
Date:   Wed Sep 18 13:51:36 2024 -0400

    Small change

commit acfbc9a008e215a4822265d89a224ff9973a475f
Author: YoungKrug <[email protected]>
Date:   Wed Sep 18 13:50:29 2024 -0400

    Cleaning up test

commit 60d16f54feff027ecdfa641ff99f65399781a1b3
Author: YoungKrug <[email protected]>
Date:   Wed Sep 18 13:49:41 2024 -0400

    Updates to test file

commit d89afb52f6e2daf8ab6491fbcadde43a96147914
Author: YoungKrug <[email protected]>
Date:   Wed Sep 18 13:47:32 2024 -0400

    Modification to the test!

commit d48660439a99d0352960e00eb060228fa6293c3f
Author: GregJohnsonJr <[email protected]>
Date:   Wed Sep 18 13:21:11 2024 -0400

    Added sorting by bin size to cluster output and fixed the clustering issue!

commit 3bddc53b063b8439a0485cc31e3064f7082d7a2a
Author: GregJohnsonJr <[email protected]>
Date:   Tue Sep 17 20:05:22 2024 -0400

    Small changes

commit 0d3e798422ff9d11e2bc0dee51d741263f6d2a9b
Author: GregJohnsonJr <[email protected]>
Date:   Tue Sep 17 15:20:47 2024 -0400

    Testing values to RMD file

commit 58a7e8e612730f991c10e17f5629120899a71caf
Author: GregJohnsonJr <[email protected]>
Date:   Tue Sep 17 13:55:31 2024 -0400

    Fix for test error

commit 4c63f8ca1fe110d484914c0663a12bac7273240b
Author: GregJohnsonJr <[email protected]>
Date:   Tue Sep 17 13:06:52 2024 -0400

    example data

commit 48a0f38462b12e3cc1ca4c3c2b11c7d672643f61
Author: GregJohnsonJr <[email protected]>
Date:   Mon Sep 16 19:21:22 2024 -0400

    I am getting the same number of bins!

commit 37cdb7e40373f455f3497f019d80d1baace40762
Author: GregJohnsonJr <[email protected]>
Date:   Mon Sep 16 17:29:51 2024 -0400

    Fixing up the documentation

commit d7dc2948ca5adc2f7033348492549d277db2e3c4
Author: GregJohnsonJr <[email protected]>
Date:   Mon Sep 16 16:43:10 2024 -0400

    Fix for opticluster clustering.

commit 3d8015fe6918bc3c36047abe0551596f51927726
Author: Gregory Johnson <[email protected]>
Date:   Mon Sep 16 15:01:11 2024 -0400

    Adding read column feature (#15)

    * Added reading of column files, but result arent correct.

    * Correct Column file

    * Column Reader works as expected!

    * Added test for column reading, and it all works as expected.

    * Fixed check issues

commit 6f830c6aa435260c84627946281b10f5a8d03353
Author: GregJohnsonJr <[email protected]>
Date:   Fri Sep 13 17:02:03 2024 -0400

    Column distance files work!

commit e6f00a816e9778b1dd4a8b9c1ec92818c93e3249
Author: GregJohnsonJr <[email protected]>
Date:   Fri Sep 13 12:38:20 2024 -0400

    Added functionality for column distance file reading!

commit 25a357dccce0f4d0b9e1ec198ced4f98a3653163
Author: GregJohnsonJr <[email protected]>
Date:   Thu Sep 12 17:37:58 2024 -0400

    Adding r documentation about mothur and clustur

commit fa25af7f600e7feb97aa97b963ec27ae6f0abdac
Author: GregJohnsonJr <[email protected]>
Date:   Thu Sep 12 16:44:32 2024 -0400

    Initial push

* Documentation (#16) (#19) (#20)

* Documentation (#16)

* Initial push

* Adding r documentation about mothur and clustur

* Added functionality for column distance file reading!

* Column distance files work!

* Adding read column feature (#15)

* Added reading of column files, but result arent correct.

* Correct Column file

* Column Reader works as expected!

* Added test for column reading, and it all works as expected.

* Fixed check issues

* Squashed commit of the following:

commit 45ba179f6b2e63687229c042be92a6f4cae2c786
Author: Gregory Johnson <[email protected]>
Date:   Thu Sep 26 18:17:22 2024 -0400

    Consistent randomization (#18)

    * Have to fix test, but this is the basic framework for randomization

    * Squashed commit of the following:

    commit 3f2d3995c30894a457bd860379243aa5329f52cd
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 17:52:00 2024 -0400

        Fixing check errors.

    commit 3f04170d4897e243a2a87847f39d8f4fe1307be0
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 17:43:06 2024 -0400

        Removing unneeded data and fixing issue to validate count_table

    commit 2c642f300cf9fedb6ade3b46eab053c691c26f45
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 17:31:56 2024 -0400

        Changed the name of the package to clustur

    commit 1251c3c63a7d6fca99ddf1373633e3281d0472e2
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 16:53:16 2024 -0400

        Removing comments

    * Changes to the utils class to allow for randomization and added a seed to the functions

    * Adding another test

    * Fix for note

    * Randomization has been added and we changed the way we create sparse matrices!

    * Forgot to include the updated namesapce!

commit 10c2ad9915d63dac5fee47d5385b91e711a8b16a
Author: Gregory Johnson <[email protected]>
Date:   Thu Sep 26 18:15:33 2024 -0400

    Consistent randomization (#17)

    * Have to fix test, but this is the basic framework for randomization

    * Squashed commit of the following:

    commit 3f2d3995c30894a457bd860379243aa5329f52cd
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 17:52:00 2024 -0400

        Fixing check errors.

    commit 3f04170d4897e243a2a87847f39d8f4fe1307be0
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 17:43:06 2024 -0400

        Removing unneeded data and fixing issue to validate count_table

    commit 2c642f300cf9fedb6ade3b46eab053c691c26f45
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 17:31:56 2024 -0400

        Changed the name of the package to clustur

    commit 1251c3c63a7d6fca99ddf1373633e3281d0472e2
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 16:53:16 2024 -0400

        Removing comments

    * Changes to the utils class to allow for randomization and added a seed to the functions

    * Adding another test

    * Fix for note

    * Randomization has been added and we changed the way we create sparse matrices!

commit 3f2d3995c30894a457bd860379243aa5329f52cd
Author: GregJohnsonJr <[email protected]>
Date:   Wed Sep 25 17:52:00 2024 -0400

    Fixing check errors.

commit 3f04170d4897e243a2a87847f39d8f4fe1307be0
Author: GregJohnsonJr <[email protected]>
Date:   Wed Sep 25 17:43:06 2024 -0400

    Removing unneeded data and fixing issue to validate count_table

commit 2c642f300cf9fedb6ade3b46eab053c691c26f45
Author: GregJohnsonJr <[email protected]>
Date:   Wed Sep 25 17:31:56 2024 -0400

    Changed the name of the package to clustur

commit 1251c3c63a7d6fca99ddf1373633e3281d0472e2
Author: GregJohnsonJr <[email protected]>
Date:   Wed Sep 25 16:53:16 2024 -0400

    Removing comments

commit e87319e3bfdb1c1657fc399af778e1c6bd17fc37
Author: GregJohnsonJr <[email protected]>
Date:   Wed Sep 25 12:04:03 2024 -0400

    Fixing unit test

commit 8c648bd5dce04613d5fb11b2f8133dda762d8507
Author: GregJohnsonJr <[email protected]>
Date:   Wed Sep 25 11:51:15 2024 -0400

    Small optimzation to clustur

commit 05c8a0738991359f6ef9f69f3de180fd6173ee44
Author: GregJohnsonJr <[email protected]>
Date:   Wed Sep 25 11:38:43 2024 -0400

    Base structure of documentation and website

commit 4a4fcfa4ed154804a9574323d1a56f76d958c24f
Author: GregJohnsonJr <[email protected]>
Date:   Wed Sep 25 10:43:40 2024 -0400

    Created base pkgdown structure

commit a714b7d0a7c9390c30eb723d4135b980a052d387
Author: YoungKrug <[email protected]>
Date:   Tue Sep 24 23:01:44 2024 -0400

    Creating vignettes

commit 6a5df2035a1de3f206a1bcd9ddc0d4bb9b763a83
Author: YoungKrug <[email protected]>
Date:   Tue Sep 24 15:43:09 2024 -0400

    Squashed commit of the following:

    commit dfd9b2d83c4ab60a95b1585995482ac176fc1114
    Author: YoungKrug <[email protected]>
    Date:   Tue Sep 24 15:42:56 2024 -0400

        Big error in readPhylip matrix. I was never checking whether the matrix was a square or not!

commit 63d515ed9dac7370abd579ec1a3d9c3a69f589d2
Author: GregJohnsonJr <[email protected]>
Date:   Tue Sep 24 15:02:02 2024 -0400

    Pushing spare_matrix data file

commit 7eec4fbf6ba4b4c881d65cabf86eb9c4b344ca1b
Author: GregJohnsonJr <[email protected]>
Date:   Tue Sep 24 14:43:12 2024 -0400

    Pushing the temporary fix!

commit 0b5a145cc3ee1db43d4c7472940568324f48cacf
Author: YoungKrug <[email protected]>
Date:   Tue Sep 24 13:56:47 2024 -0400

    Update Cluster.R

commit 7c694e39687ccd62d63fbaa6f3d8713606f5b633
Author: YoungKrug <[email protected]>
Date:   Tue Sep 24 12:51:01 2024 -0400

    Added inst folders

commit 3cb0ba458c6fb35c963a4ee2b6000ee4137a6442
Author: YoungKrug <[email protected]>
Date:   Tue Sep 24 12:02:56 2024 -0400

    Updating documentation

commit 5af269d6bf15db5c96e1c6b676ad57a9b9793eeb
Author: YoungKrug <[email protected]>
Date:   Mon Sep 23 19:45:19 2024 -0400

    Pushing results for different operating systems

commit a745510b856aa3259400c65a4566e98d61a643a8
Author: GregJohnsonJr <[email protected]>
Date:   Mon Sep 23 19:36:29 2024 -0400

    Create 96_sq_column_results_mac.list

commit d08a209b9ac4419e64313312497be6a83acd562f
Author: YoungKrug <[email protected]>
Date:   Sat Sep 21 12:03:56 2024 -0400

    Using content paths instead of absolutes

commit 1623601703cf96bf75a0dd36ecee49c75b2084f9
Author: YoungKrug <[email protected]>
Date:   Sat Sep 21 09:49:11 2024 -0400

    Method to check if each cluster exist in the dataframe

commit 585736ef751b407d397925269788600c83521942
Author: YoungKrug <[email protected]>
Date:   Wed Sep 18 13:51:36 2024 -0400

    Small change

commit acfbc9a008e215a4822265d89a224ff9973a475f
Author: YoungKrug <[email protected]>
Date:   Wed Sep 18 13:50:29 2024 -0400

    Cleaning up test

commit 60d16f54feff027ecdfa641ff99f65399781a1b3
Author: YoungKrug <[email protected]>
Date:   Wed Sep 18 13:49:41 2024 -0400

    Updates to test file

commit d89afb52f6e2daf8ab6491fbcadde43a96147914
Author: YoungKrug <[email protected]>
Date:   Wed Sep 18 13:47:32 2024 -0400

    Modification to the test!

commit d48660439a99d0352960e00eb060228fa6293c3f
Author: GregJohnsonJr <[email protected]>
Date:   Wed Sep 18 13:21:11 2024 -0400

    Added sorting by bin size to cluster output and fixed the clustering issue!

commit 3bddc53b063b8439a0485cc31e3064f7082d7a2a
Author: GregJohnsonJr <[email protected]>
Date:   Tue Sep 17 20:05:22 2024 -0400

    Small changes

commit 0d3e798422ff9d11e2bc0dee51d741263f6d2a9b
Author: GregJohnsonJr <[email protected]>
Date:   Tue Sep 17 15:20:47 2024 -0400

    Testing values to RMD file

commit 58a7e8e612730f991c10e17f5629120899a71caf
Author: GregJohnsonJr <[email protected]>
Date:   Tue Sep 17 13:55:31 2024 -0400

    Fix for test error

commit 4c63f8ca1fe110d484914c0663a12bac7273240b
Author: GregJohnsonJr <[email protected]>
Date:   Tue Sep 17 13:06:52 2024 -0400

    example data

commit 48a0f38462b12e3cc1ca4c3c2b11c7d672643f61
Author: GregJohnsonJr <[email protected]>
Date:   Mon Sep 16 19:21:22 2024 -0400

    I am getting the same number of bins!

commit 37cdb7e40373f455f3497f019d80d1baace40762
Author: GregJohnsonJr <[email protected]>
Date:   Mon Sep 16 17:29:51 2024 -0400

    Fixing up the documentation

commit d7dc2948ca5adc2f7033348492549d277db2e3c4
Author: GregJohnsonJr <[email protected]>
Date:   Mon Sep 16 16:43:10 2024 -0400

    Fix for opticluster clustering.

commit 3d8015fe6918bc3c36047abe0551596f51927726
Author: Gregory Johnson <[email protected]>
Date:   Mon Sep 16 15:01:11 2024 -0400

    Adding read column feature (#15)

    * Added reading of column files, but result arent correct.

    * Correct Column file

    * Column Reader works as expected!

    * Added test for column reading, and it all works as expected.

    * Fixed check issues

commit 6f830c6aa435260c84627946281b10f5a8d03353
Author: GregJohnsonJr <[email protected]>
Date:   Fri Sep 13 17:02:03 2024 -0400

    Column distance files work!

commit e6f00a816e9778b1dd4a8b9c1ec92818c93e3249
Author: GregJohnsonJr <[email protected]>
Date:   Fri Sep 13 12:38:20 2024 -0400

    Added functionality for column distance file reading!

commit 25a357dccce0f4d0b9e1ec198ced4f98a3653163
Author: GregJohnsonJr <[email protected]>
Date:   Thu Sep 12 17:37:58 2024 -0400

    Adding r documentation about mothur and clustur

commit fa25af7f600e7feb97aa97b963ec27ae6f0abdac
Author: GregJohnsonJr <[email protected]>
Date:   Thu Sep 12 16:44:32 2024 -0400

    Initial push

* Removing old vignette

* Adding additional documentation

* Adding links (#22)

* Moving RDS file

* Small changes to test

* Adding a vignette, fixed the test that were failing, and removed old data.

* Small change to test

* Pushing lintr fixes

* Distance files to sparse matrix (#23)

* Added the conversion from distance files (phylip, column) to sparse matrix.

* Removing unneeded data and cleaning up files.

* Unify clustering (#25)

* added documentation

* Check works on mac-os

* Edit getting started vignette

* Small changes to the test and removing unneeded data.

---------

Co-authored-by: Pat Schloss <[email protected]>

* Refactor package methods (#26)

* Added functionality to determine if the file is a phylip or column and allowed for the creation of a distance matrix object in r.

* Getters and Setters for distance processing work!

* Created a abstract class to unify the column and phylip reader class.

* Process Sparse Data aswell!

* Added cluster functionality!

* Created R function for the c++ functionality

* Added the copy constructors and fixed issues with data not being maintained.

* Added documentation, need to fix read sparse matrices

* Added new functions and removed old functionality

* Count table can now read sparse data files

* added documentation to all of the functions and created new 'light-weight' test for the clustering test. Im using smaller csv's. .

* Test work, just need to fix check errors!

* Added new functionality, created test and examples for all of the functions and refactored the current siting test to be faster and use smaller csv files.

* Removing DS_Store object from tracking

* Updating git ignore

* Forgot to include the queue header!

* Linted the package

* Small Change to examples

* Added tests for the validate_count_table function

* Removing R profile from tracking

* Delete .Rprofile

* Fix lintr and pkgdown issues

* Fix for pkgdown and lintr

* Change to test in cluster_object-getters.

* Squashed commit of the following:

commit 744dfb7bad358dd57303fec4dd492e5320a6a3a9
Author: Gregory Johnson <[email protected]>
Date:   Sun Oct 13 11:18:40 2024 -0400

    Update check-full.yml

    Removed devel tag from github action

commit dcb9b49b790155ecaef76ca142c2210c86b587a6
Author: Gregory Johnson <[email protected]>
Date:   Sun Oct 13 10:54:44 2024 -0400

    Dev (#28)

    * Added unit test and created a easy opticluster function

    * Release v0.0.1 (#1)

    * Fixed the wrapper for Calling Opticluster!

    * Fixing the .RD file

    * Fixed issue where opticluster was returning a matrix array and not a data.frame.

    * Changing documentation

    * Fixing the warnings from building the code.

    * Update to the test

    * Updating the gitignore

    * Add cpp test (#3)

    * Added Cpp testing structure!

    * Added Test Fixture Class

    * Forced the cluster to only return OTU data, and created the fix test fixture with test!

    * Created all of the test for the optimatrix adapter and removed the .dll from being tracked!

    * Created all the test in the testfixture for listvectors and now I am adding them to the test files.

    * Created base test for listVector

    * Basic test for listVector are completed!

    * Created the basic structure and test fixture for cluster commands

    * Cluster Testing suite being pushed up!

    * Fix cluster algorithm (#2)

    * Fixed a slew of issues by adding bidirection distances.

    * Fixed the clustering issue, clustering should be working correctly now!

    * Generated Definitions for OptiCluster Test

    * Finished creating unit test of the cluster command and opticluster

    * Added OptiData test fixture

    * Started creating the unit test for utils

    * Utils command cluster and test work as expected!!

    * Removed old code from one of the testing suites.

    * Added another test in utils.

    * Clustor has a 89% test coverage! Everything should be tested and ready to merge back!

    * RMD Check is able to run successfully!

    * Correcting the paths of my cpp files, should fix the action errors.

    * Update to the cluster command test fixture

    * Modifying the test for opticluster

    * Ensuring everything works with c++11

    * Removing code issues from cluster command

    * Adding the build ignore

    * Founds some issue where I am using c++ 17 syntax and not 11.

    * Github action fixes, needed to update syntax towards cpp 11

    * Modified the testing structure by removing the "Opticluster returns proper stats". I appears it is returning incorrect data on different computer architectures. It is also not needed in the code.

    * Fix cluster unit test (#5)

    * This should be the fix for the failing cluster test.

    * Changed the test to look for equivalence rows instead of equal dataframes. Gives the same results, the only differences is that the cluster have different numbers.

    * Printing out the metrics after you perform a cluster and added a true/false condition for shuffling

    * Release polish (#6)

    * Added to build ignore and properly documented the new R code.

    * Unstable, have to fix the mismatch header situation, but was able to return a vector with all the metrics!

    * Cluster now returns test metrics and added test to support it.

    * Added a depends for lazy-loading and other R related issues.

    * More cluster features (#7)

    * Adding a single, complete, average, and weighted linkage algorithms

    * Adding cluster functions

    * Added the new clustering methods, but am getting issues when trying to format them.

    * Unstable cannot create proper phylip file with matrix data..

    * More unstable code, but we are getting closer. The phylip file is correct for a small dataset

    * STABLE, the cluster does not fail and will actually cluster. However I am getting incorrect results. Will refactor the code to work.

    * All Clusters (Furthest, Nearest, average, and weighted) all work as they should! I just need to clean it up and add test!

    * Created R-facing function in R from cpp and cleaned up a bit of the code.

    * Cleaning up the main function

    * Small optimization to cluster (x2 speed_up)

    * Added optimization and cleaned up functions

    * Modifications to the namespace file and test!

    * Cluster works with windows now!

    * Fixing the round point error on windows and in R. It has something to do with the compilation of the objects...most likely it is related to the conversions of data.

    * Fixed the floating point issue, now I have to fix an issue where the cutoff amounts are decreasing.

    * Fixed the floating point issue! My adjust was not set! Now I need to figure out why the nearest algorithm is not returning any data.

    * Small code style changes

    * Cluster works as expected! Everything clusters. Now to add tests

    * Started adding more test for Clustor

    * Created Test fixtures for the new code

    * Completed the sparse distance matrix and read phylip test, need to fix some test errors.

    * Added test for phylip reader and matrix adapter. Adding the final test for rAbund now.

    * Added all the rAbund test, and the cluster feature should be working properly!

    * Adding include statements for windows and other operating systems, this should work as expected. RCMD check works.

    * The fix for github actions.

    * Change to the include file.

    * Removing srand from Utils, going to attempt to set seeds inside of R.

    * Fix for race condition issue.

    * Fix for RCMD check warnings

    * The fix for the windows version of RMD Check!

    * Adding dependency for time.

    * Make shared (#9)

    * Adding a count table variation

    * Update Makevars

    * Preparation to Create a Shared File for the clustering output.

    * Added a simple make shared functionality. It works without the group information. Count_table + list_file = shared_file

    * Small changes, going to need to modify the make shared code soon.

    * Modifying the way cluster result data is stored.

    * Add a datastructure for returning and generating cluster data.

    * Cluster export works for Traditional Cluster Methods

    * Progress on making a shared file without a group. Have to make test soon.

    * Created a pseudo shared file successfully!

    * Changes to the abundance output

    * Delete F:\Opticluster\output_rabund.txt

    * Delete tests/testthat/F:\Opticluster\output_rabund.txt

    Removing werid paths.

    * Some example data and count table creation

    * Pushing lots of temp test files, and small changes

    * Adding the count table!

    * Count table structure has been created

    * Shared File with count tables and without work!

    * Count table can now be added to the cluster functions and will produce an output of abundance and clusters in dataframes.

    - Removed the exchanged of strings and read table between r and c++ and added a more modifiable approach.

    * Fixed test, now we have to add more test.

    * Fixes for linux and other computer architectures.

    * Removing dependencies that are not used.

    * Created test fixtures for unit test

    * Removed all of the negligent files that are not needed and added test to all of the new functions!

    ---------

    Co-authored-by: YoungKrug <[email protected]>

    * Forgot a unit test. (#10)

    * Fix results (#11)

    * Adding example data for mothur results.

    * Added support for similarity matrix functionality

    * Updates to phylip writing, and fixes to incorrect clustering!

    * Stable, Classic cluster and opticluster both are identical to that of mothur! + Names can be added

    * Results are the same as they are in mothur!

    * All the unit test work, and clustur prints out expected results!

    * Removing and fixing check issues.

    * Fix compilation warnings (#12)

    * No warnings on mac!

    * Still fixing clang-tidy errors. Lots of comparisons between longs and ints that will cause problems.

    * Half way done, modified a lot of deduced type conversions. May need to go back in the future to remove them.

    * Should fix all the warnings on linux and windows.

    * Pushing through more deduced type fixes.

    * Should be the final fix for linux.

    * Fix for negative index value

    * Cleaning up build notes.

    * lintr fixes

    * Fix for lintr

    * Read phylip files (#14)

    * Looking to add a function to replace the entry point.

    * Added support for phylip file reading!

    * Initial push

    * Adding r documentation about mothur and clustur

    * Added functionality for column distance file reading!

    * Column distance files work!

    * Adding read column feature (#15)

    * Added reading of column files, but result arent correct.

    * Correct Column file

    * Column Reader works as expected!

    * Added test for column reading, and it all works as expected.

    * Fixed check issues

    * Documentation (#16)

    * Initial push

    * Adding r documentation about mothur and clustur

    * Added functionality for column distance file reading!

    * Column distance files work!

    * Adding read column feature (#15)

    * Added reading of column files, but result arent correct.

    * Correct Column file

    * Column Reader works as expected!

    * Added test for column reading, and it all works as expected.

    * Fixed check issues

    * Fix for opticluster clustering.

    * Fixing up the documentation

    * I am getting the same number of bins!

    * example data

    * Fix for test error

    * Testing values to RMD file

    * Small changes

    * Added sorting by bin size to cluster output and fixed the clustering issue!

    * Modification to the test!

    * Updates to test file

    * Cleaning up test

    * Small change

    * Method to check if each cluster exist in the dataframe

    * Using content paths instead of absolutes

    * Create 96_sq_column_results_mac.list

    * Pushing results for different operating systems

    * Updating documentation

    * Added inst folders

    * Update Cluster.R

    * Pushing the temporary fix!

    * Pushing spare_matrix data file

    * Squashed commit of the following:

    commit dfd9b2d83c4ab60a95b1585995482ac176fc1114
    Author: YoungKrug <[email protected]>
    Date:   Tue Sep 24 15:42:56 2024 -0400

        Big error in readPhylip matrix. I was never checking whether the matrix was a square or not!

    * Creating vignettes

    * Created base pkgdown structure

    * Base structure of documentation and website

    * Small optimzation to clustur

    * Fixing unit test

    * Removing comments

    * Changed the name of the package to clustur

    * Removing unneeded data and fixing issue to validate count_table

    * Fixing check errors.

    * Consistent randomization (#17)

    * Have to fix test, but this is the basic framework for randomization

    * Squashed commit of the following:

    commit 3f2d3995c30894a457bd860379243aa5329f52cd
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 17:52:00 2024 -0400

        Fixing check errors.

    commit 3f04170d4897e243a2a87847f39d8f4fe1307be0
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 17:43:06 2024 -0400

        Removing unneeded data and fixing issue to validate count_table

    commit 2c642f300cf9fedb6ade3b46eab053c691c26f45
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 17:31:56 2024 -0400

        Changed the name of the package to clustur

    commit 1251c3c63a7d6fca99ddf1373633e3281d0472e2
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 16:53:16 2024 -0400

        Removing comments

    * Changes to the utils class to allow for randomization and added a seed to the functions

    * Adding another test

    * Fix for note

    * Randomization has been added and we changed the way we create sparse matrices!

    * Consistent randomization (#18)

    * Have to fix test, but this is the basic framework for randomization

    * Squashed commit of the following:

    commit 3f2d3995c30894a457bd860379243aa5329f52cd
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 17:52:00 2024 -0400

        Fixing check errors.

    commit 3f04170d4897e243a2a87847f39d8f4fe1307be0
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 17:43:06 2024 -0400

        Removing unneeded data and fixing issue to validate count_table

    commit 2c642f300cf9fedb6ade3b46eab053c691c26f45
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 17:31:56 2024 -0400

        Changed the name of the package to clustur

    commit 1251c3c63a7d6fca99ddf1373633e3281d0472e2
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 16:53:16 2024 -0400

        Removing comments

    * Changes to the utils class to allow for randomization and added a seed to the functions

    * Adding another test

    * Fix for note

    * Randomization has been added and we changed the way we create sparse matrices!

    * Forgot to include the updated namesapce!

    * Squashed commit of the following:

    commit 45ba179f6b2e63687229c042be92a6f4cae2c786
    Author: Gregory Johnson <[email protected]>
    Date:   Thu Sep 26 18:17:22 2024 -0400

        Consistent randomization (#18)

        * Have to fix test, but this is the basic framework for randomization

        * Squashed commit of the following:

        commit 3f2d3995c30894a457bd860379243aa5329f52cd
        Author: GregJohnsonJr <[email protected]>
        Date:   Wed Sep 25 17:52:00 2024 -0400

            Fixing check errors.

        commit 3f04170d4897e243a2a87847f39d8f4fe1307be0
        Author: GregJohnsonJr <[email protected]>
        Date:   Wed Sep 25 17:43:06 2024 -0400

            Removing unneeded data and fixing issue to validate count_table

        commit 2c642f300cf9fedb6ade3b46eab053c691c26f45
        Author: GregJohnsonJr <[email protected]>
        Date:   Wed Sep 25 17:31:56 2024 -0400

            Changed the name of the package to clustur

        commit 1251c3c63a7d6fca99ddf1373633e3281d0472e2
        Author: GregJohnsonJr <[email protected]>
        Date:   Wed Sep 25 16:53:16 2024 -0400

            Removing comments

        * Changes to the utils class to allow for randomization and added a seed to the functions

        * Adding another test

        * Fix for note

        * Randomization has been added and we changed the way we create sparse matrices!

        * Forgot to include the updated namesapce!

    commit 10c2ad9915d63dac5fee47d5385b91e711a8b16a
    Author: Gregory Johnson <[email protected]>
    Date:   Thu Sep 26 18:15:33 2024 -0400

        Consistent randomization (#17)

        * Have to fix test, but this is the basic framework for randomization

        * Squashed commit of the following:

        commit 3f2d3995c30894a457bd860379243aa5329f52cd
        Author: GregJohnsonJr <[email protected]>
        Date:   Wed Sep 25 17:52:00 2024 -0400

            Fixing check errors.

        commit 3f04170d4897e243a2a87847f39d8f4fe1307be0
        Author: GregJohnsonJr <[email protected]>
        Date:   Wed Sep 25 17:43:06 2024 -0400

            Removing unneeded data and fixing issue to validate count_table

        commit 2c642f300cf9fedb6ade3b46eab053c691c26f45
        Author: GregJohnsonJr <[email protected]>
        Date:   Wed Sep 25 17:31:56 2024 -0400

            Changed the name of the package to clustur

        commit 1251c3c63a7d6fca99ddf1373633e3281d0472e2
        Author: GregJohnsonJr <[email protected]>
        Date:   Wed Sep 25 16:53:16 2024 -0400

            Removing comments

        * Changes to the utils class to allow for randomization and added a seed to the functions

        * Adding another test

        * Fix for note

        * Randomization has been added and we changed the way we create sparse matrices!

    commit 3f2d3995c30894a457bd860379243aa5329f52cd
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 17:52:00 2024 -0400

        Fixing check errors.

    commit 3f04170d4897e243a2a87847f39d8f4fe1307be0
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 17:43:06 2024 -0400

        Removing unneeded data and fixing issue to validate count_table

    commit 2c642f300cf9fedb6ade3b46eab053c691c26f45
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 17:31:56 2024 -0400

        Changed the name of the package to clustur

    commit 1251c3c63a7d6fca99ddf1373633e3281d0472e2
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 16:53:16 2024 -0400

        Removing comments

    commit e87319e3bfdb1c1657fc399af778e1c6bd17fc37
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 12:04:03 2024 -0400

        Fixing unit test

    commit 8c648bd5dce04613d5fb11b2f8133dda762d8507
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 11:51:15 2024 -0400

        Small optimzation to clustur

    commit 05c8a0738991359f6ef9f69f3de180fd6173ee44
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 11:38:43 2024 -0400

        Base structure of documentation and website

    commit 4a4fcfa4ed154804a9574323d1a56f76d958c24f
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 10:43:40 2024 -0400

        Created base pkgdown structure

    commit a714b7d0a7c9390c30eb723d4135b980a052d387
    Author: YoungKrug <[email protected]>
    Date:   Tue Sep 24 23:01:44 2024 -0400

        Creating vignettes

    commit 6a5df2035a1de3f206a1bcd9ddc0d4bb9b763a83
    Author: YoungKrug <[email protected]>
    Date:   Tue Sep 24 15:43:09 2024 -0400

        Squashed commit of the following:

        commit dfd9b2d83c4ab60a95b1585995482ac176fc1114
        Author: YoungKrug <[email protected]>
        Date:   Tue Sep 24 15:42:56 2024 -0400

            Big error in readPhylip matrix. I was never checking whether the matrix was a square or not!

    commit 63d515ed9dac7370abd579ec1a3d9c3a69f589d2
    Author: GregJohnsonJr <[email protected]>
    Date:   Tue Sep 24 15:02:02 2024 -0400

        Pushing spare_matrix data file

    commit 7eec4fbf6ba4b4c881d65cabf86eb9c4b344ca1b
    Author: GregJohnsonJr <[email protected]>
    Date:   Tue Sep 24 14:43:12 2024 -0400

        Pushing the temporary fix!

    commit 0b5a145cc3ee1db43d4c7472940568324f48cacf
    Author: YoungKrug <[email protected]>
    Date:   Tue Sep 24 13:56:47 2024 -0400

        Update Cluster.R

    commit 7c694e39687ccd62d63fbaa6f3d8713606f5b633
    Author: YoungKrug <[email protected]>
    Date:   Tue Sep 24 12:51:01 2024 -0400

        Added inst folders

    commit 3cb0ba458c6fb35c963a4ee2b6000ee4137a6442
    Author: YoungKrug <[email protected]>
    Date:   Tue Sep 24 12:02:56 2024 -0400

        Updating documentation

    commit 5af269d6bf15db5c96e1c6b676ad57a9b9793eeb
    Author: YoungKrug <[email protected]>
    Date:   Mon Sep 23 19:45:19 2024 -0400

        Pushing results for different operating systems

    commit a745510b856aa3259400c65a4566e98d61a643a8
    Author: GregJohnsonJr <[email protected]>
    Date:   Mon Sep 23 19:36:29 2024 -0400

        Create 96_sq_column_results_mac.list

    commit d08a209b9ac4419e64313312497be6a83acd562f
    Author: YoungKrug <[email protected]>
    Date:   Sat Sep 21 12:03:56 2024 -0400

        Using content paths instead of absolutes

    commit 1623601703cf96bf75a0dd36ecee49c75b2084f9
    Author: YoungKrug <[email protected]>
    Date:   Sat Sep 21 09:49:11 2024 -0400

        Method to check if each cluster exist in the dataframe

    commit 585736ef751b407d397925269788600c83521942
    Author: YoungKrug <[email protected]>
    Date:   Wed Sep 18 13:51:36 2024 -0400

        Small change

    commit acfbc9a008e215a4822265d89a224ff9973a475f
    Author: YoungKrug <[email protected]>
    Date:   Wed Sep 18 13:50:29 2024 -0400

        Cleaning up test

    commit 60d16f54feff027ecdfa641ff99f65399781a1b3
    Author: YoungKrug <[email protected]>
    Date:   Wed Sep 18 13:49:41 2024 -0400

        Updates to test file

    commit d89afb52f6e2daf8ab6491fbcadde43a96147914
    Author: YoungKrug <[email protected]>
    Date:   Wed Sep 18 13:47:32 2024 -0400

        Modification to the test!

    commit d48660439a99d0352960e00eb060228fa6293c3f
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 18 13:21:11 2024 -0400

        Added sorting by bin size to cluster output and fixed the clustering issue!

    commit 3bddc53b063b8439a0485cc31e3064f7082d7a2a
    Author: GregJohnsonJr <[email protected]>
    Date:   Tue Sep 17 20:05:22 2024 -0400

        Small changes

    commit 0d3e798422ff9d11e2bc0dee51d741263f6d2a9b
    Author: GregJohnsonJr <[email protected]>
    Date:   Tue Sep 17 15:20:47 2024 -0400

        Testing values to RMD file

    commit 58a7e8e612730f991c10e17f5629120899a71caf
    Author: GregJohnsonJr <[email protected]>
    Date:   Tue Sep 17 13:55:31 2024 -0400

        Fix for test error

    commit 4c63f8ca1fe110d484914c0663a12bac7273240b
    Author: GregJohnsonJr <[email protected]>
    Date:   Tue Sep 17 13:06:52 2024 -0400

        example data

    commit 48a0f38462b12e3cc1ca4c3c2b11c7d672643f61
    Author: GregJohnsonJr <[email protected]>
    Date:   Mon Sep 16 19:21:22 2024 -0400

        I am getting the same number of bins!

    commit 37cdb7e40373f455f3497f019d80d1baace40762
    Author: GregJohnsonJr <[email protected]>
    Date:   Mon Sep 16 17:29:51 2024 -0400

        Fixing up the documentation

    commit d7dc2948ca5adc2f7033348492549d277db2e3c4
    Author: GregJohnsonJr <[email protected]>
    Date:   Mon Sep 16 16:43:10 2024 -0400

        Fix for opticluster clustering.

    commit 3d8015fe6918bc3c36047abe0551596f51927726
    Author: Gregory Johnson <[email protected]>
    Date:   Mon Sep 16 15:01:11 2024 -0400

        Adding read column feature (#15)

        * Added reading of column files, but result arent correct.

        * Correct Column file

        * Column Reader works as expected!

        * Added test for column reading, and it all works as expected.

        * Fixed check issues

    commit 6f830c6aa435260c84627946281b10f5a8d03353
    Author: GregJohnsonJr <[email protected]>
    Date:   Fri Sep 13 17:02:03 2024 -0400

        Column distance files work!

    commit e6f00a816e9778b1dd4a8b9c1ec92818c93e3249
    Author: GregJohnsonJr <[email protected]>
    Date:   Fri Sep 13 12:38:20 2024 -0400

        Added functionality for column distance file reading!

    commit 25a357dccce0f4d0b9e1ec198ced4f98a3653163
    Author: GregJohnsonJr <[email protected]>
    Date:   Thu Sep 12 17:37:58 2024 -0400

        Adding r documentation about mothur and clustur

    commit fa25af7f600e7feb97aa97b963ec27ae6f0abdac
    Author: GregJohnsonJr <[email protected]>
    Date:   Thu Sep 12 16:44:32 2024 -0400

        Initial push

    * Documentation (#16) (#19) (#20)

    * Documentation (#16)

    * Initial push

    * Adding r documentation about mothur and clustur

    * Added functionality for column distance file reading!

    * Column distance files work!

    * Adding read column feature (#15)

    * Added reading of column files, but result arent correct.

    * Correct Column file

    * Column Reader works as expected!

    * Added test for column reading, and it all works as expected.

    * Fixed check issues

    * Squashed commit of the following:

    commit 45ba179f6b2e63687229c042be92a6f4cae2c786
    Author: Gregory Johnson <[email protected]>
    Date:   Thu Sep 26 18:17:22 2024 -0400

        Consistent randomization (#18)

        * Have to fix test, but this is the basic framework for randomization

        * Squashed commit of the following:

        commit 3f2d3995c30894a457bd860379243aa5329f52cd
        Author: GregJohnsonJr <[email protected]>
        Date:   Wed Sep 25 17:52:00 2024 -0400

            Fixing check errors.

        commit 3f04170d4897e243a2a87847f39d8f4fe1307be0
        Author: GregJohnsonJr <[email protected]>
        Date:   Wed Sep 25 17:43:06 2024 -0400

            Removing unneeded data and fixing issue to validate count_table

        commit 2c642f300cf9fedb6ade3b46eab053c691c26f45
        Author: GregJohnsonJr <[email protected]>
        Date:   Wed Sep 25 17:31:56 2024 -0400

            Changed the name of the package to clustur

        commit 1251c3c63a7d6fca99ddf1373633e3281d0472e2
        Author: GregJohnsonJr <[email protected]>
        Date:   Wed Sep 25 16:53:16 2024 -0400

            Removing comments

        * Changes to the utils class to allow for randomization and added a seed to the functions

        * Adding another test

        * Fix for note

        * Randomization has been added and we changed the way we create sparse matrices!

        * Forgot to include the updated namesapce!

    commit 10c2ad9915d63dac5fee47d5385b91e711a8b16a
    Author: Gregory Johnson <[email protected]>
    Date:   Thu Sep 26 18:15:33 2024 -0400

        Consistent randomization (#17)

        * Have to fix test, but this is the basic framework for randomization

        * Squashed commit of the following:

        commit 3f2d3995c30894a457bd860379243aa5329f52cd
        Author: GregJohnsonJr <[email protected]>
        Date:   Wed Sep 25 17:52:00 2024 -0400

            Fixing check errors.

        commit 3f04170d4897e243a2a87847f39d8f4fe1307be0
        Author: GregJohnsonJr <[email protected]>
        Date:   Wed Sep 25 17:43:06 2024 -0400

            Removing unneeded data and fixing issue to validate count_table

        commit 2c642f300cf9fedb6ade3b46eab053c691c26f45
        Author: GregJohnsonJr <[email protected]>
        Date:   Wed Sep 25 17:31:56 2024 -0400

            Changed the name of the package to clustur

        commit 1251c3c63a7d6fca99ddf1373633e3281d0472e2
        Author: GregJohnsonJr <[email protected]>
        Date:   Wed Sep 25 16:53:16 2024 -0400

            Removing comments

        * Changes to the utils class to allow for randomization and added a seed to the functions

        * Adding another test

        * Fix for note

        * Randomization has been added and we changed the way we create sparse matrices!

    commit 3f2d3995c30894a457bd860379243aa5329f52cd
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 17:52:00 2024 -0400

        Fixing check errors.

    commit 3f04170d4897e243a2a87847f39d8f4fe1307be0
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 17:43:06 2024 -0400

        Removing unneeded data and fixing issue to validate count_table

    commit 2c642f300cf9fedb6ade3b46eab053c691c26f45
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 17:31:56 2024 -0400

        Changed the name of the package to clustur

    commit 1251c3c63a7d6fca99ddf1373633e3281d0472e2
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 16:53:16 2024 -0400

        Removing comments

    commit e87319e3bfdb1c1657fc399af778e1c6bd17fc37
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 12:04:03 2024 -0400

        Fixing unit test

    commit 8c648bd5dce04613d5fb11b2f8133dda762d8507
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 11:51:15 2024 -0400

        Small optimzation to clustur

    commit 05c8a0738991359f6ef9f69f3de180fd6173ee44
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 11:38:43 2024 -0400

        Base structure of documentation and website

    commit 4a4fcfa4ed154804a9574323d1a56f76d958c24f
    Author: GregJohnsonJr <[email protected]>
    Date:   Wed Sep 25 10:43:40 2024 -0400

        Created base pkgdown structure

    commit a714b7d0a7c9390c30eb723d4135b980a052d387
    Author: YoungKrug <[email protected]>
    Date:   Tue Sep 24 23:01:44 2024 -0400

        Creating vignettes

    commit 6a5df2035a1de3f206a1bcd9ddc0d4bb9b763a83
    Author: YoungKrug <[email protected]>
    Date:   Tue Sep 24 15:43:09 2024 -0400

        Squashed commit of the following:

        commit dfd9b2d83c4ab60a95b1585995482ac176fc1114
        Author: YoungKrug <[email protected]>
        Date:   Tue Sep 24 15:42:56 2024 -0400

            Big error in readPhylip matrix. I was never checking whether the matrix was a square or not!

    commit 63d515ed9dac7370abd579ec1a3d9c3a69f589d2
    Author: GregJohnsonJr <[email protected]>
    Date:   Tue Sep 24 15:02:02 2024 -0400

        Pushing spare_matrix data file

    commit 7eec4fbf6ba4b4c881d65cabf86eb9c4b344ca1b
    Author: GregJohnsonJr <[email protected]>
    Date:   Tue Sep 24 14:43:12 2024 -0400

        Pushing the temporary fix!

    commit 0b5a145cc3ee1db43d4c7472940568324f48cacf
    Author: YoungKrug <[email protected]>
    Date:   Tue Sep 24 13:56:47 2024 -0400

        Update Cluster.R

    commit 7c694e39687ccd62d63fbaa6f3d8713606f5b633
    Author: YoungKrug <[email protected]>
    Date:   Tue Sep 24 12:51:01 2024 -0400

        Added inst folders

    commit 3cb0ba458c6fb35c963a4ee2b6000ee4137a6442
    Author: YoungKrug <[email protected]>
    Date:   Tue Sep 24 12:02:56 2024 -0400

        Updating documentation

    commit 5af269d6bf15db5c96e1c6b676ad57a9b9793eeb
    Author: YoungKrug <[email protected]>
    Date:   Mon Sep 23 19:45:19 2024 -0400

        Pushing results for different operating systems

    commit a745510b856aa3259400c65a4566e98d61a643a8
    Author: GregJohnsonJr <[email protected]>
    Date:   Mon Sep 23 19:36:29 2024 -0400

        Create 96_sq_column_results_mac.list

    commit d08a209b9ac4419e64313312497be6a83acd5…
  • Loading branch information
3 people authored Nov 8, 2024
1 parent 8559964 commit f491408
Show file tree
Hide file tree
Showing 36 changed files with 84 additions and 557 deletions.
12 changes: 2 additions & 10 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

WritePhylipFile <- function(xPosition, yPosition, data, cutoff, countTable, saveLocation) {
invisible(.Call('_clustur_WritePhylipFile', PACKAGE = 'clustur', xPosition, yPosition, data, cutoff, countTable, saveLocation))
}

WriteColumnFile <- function(xPosition, yPosition, data, cutoff, countTable, saveLocation) {
invisible(.Call('_clustur_WriteColumnFile', PACKAGE = 'clustur', xPosition, yPosition, data, cutoff, countTable, saveLocation))
}

DetermineIfPhylipOrColumnFile <- function(filePath) {
.Call('_clustur_DetermineIfPhylipOrColumnFile', PACKAGE = 'clustur', filePath)
}
Expand Down Expand Up @@ -37,7 +29,7 @@ OptiCluster <- function(DistanceData, featureColumnName, binColumnName, cutoff)
.Call('_clustur_OptiCluster', PACKAGE = 'clustur', DistanceData, featureColumnName, binColumnName, cutoff)
}

CreateDataFrameFromSparse <- function(countTable) {
.Call('_clustur_CreateDataFrameFromSparse', PACKAGE = 'clustur', countTable)
CreateDataFrameFromSparseCountTable <- function(countTable) {
.Call('_clustur_CreateDataFrameFromSparseCountTable', PACKAGE = 'clustur', countTable)
}

3 changes: 2 additions & 1 deletion R/cluster.R
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ read_count <- function(count_table_path) {
if (grepl("#", test_read[1, 1], fixed = TRUE)) {
count_table_sparse <- read.delim(count_table_path, sep = "\t", skip = 2)
count_table_sparse <- lapply(count_table_sparse, as.character)
return(validate_count_table(CreateDataFrameFromSparse(count_table_sparse)))
ct <- CreateDataFrameFromSparseCountTable(count_table_sparse)
return(validate_count_table(ct))
}
return(validate_count_table(read.delim(count_table_path, sep = "\t")))
}
Expand Down
1 change: 0 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,3 @@ To get started, look at the ["Getting started"](www.schlosslab.org/clustur/) pag

For feature request please visit the issue page in github and use the feature
tag. If you would like to contribute pull request are welcomed!

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ library(clustur)
## Getting Started

To get started, look at the [“Getting
started”](https:://www.schlosslab.org/clustur/) page.
started”](www.schlosslab.org/clustur/) page.

## Contributions

Expand Down
3 changes: 1 addition & 2 deletions src/Adapters/CountTableAdapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <queue>
#include <set>

#include "../RowData.h"


class CountTableAdapter {
public:
Expand All @@ -29,7 +29,6 @@ class CountTableAdapter {
std::vector<std::string> GetGroups() const;
Rcpp::DataFrame GetCountTable() const {return countTable;}
Rcpp::DataFrame ReCreateDataFrame() const;
std::set<std::string> CheckDistanceFileOnlyHasNamesInCount(const std::vector<RowData>&) const;
private:
void CreateNameToIndex();
struct IndexAbundancePair {
Expand Down
4 changes: 1 addition & 3 deletions src/Adapters/DistanceFileReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#include "CountTableAdapter.h"
#include "../MothurDependencies/ListVector.h"
#include "../RowData.h"
#include "../MothurDependencies/SparseDistanceMatrix.h"

class DistanceFileReader {
Expand All @@ -18,12 +17,11 @@ class DistanceFileReader {
// We need to deduce type, the easy way to do that is to see if there is a number for the first item read.
// Phylip files have a number of sequences located at the top. We can use that to our advantage.
virtual bool Read(const std::string& filePath) {return false;}
DistanceFileReader(SparseDistanceMatrix*, ListVector*, bool);
DistanceFileReader(SparseDistanceMatrix*, ListVector*, double, bool);
DistanceFileReader() = default;
// Phylip files do not need a count table
SparseDistanceMatrix* GetSparseMatrix() const {return new SparseDistanceMatrix(*sparseMatrix);}
ListVector* GetListVector() const {return new ListVector(*list);}
void SetRowDataMatrix(const std::vector<RowData>& data);
void SetCountTable(CountTableAdapter data);
Rcpp::DataFrame SparseMatrixToDataFrame() const;
Rcpp::DataFrame GetCountTable() const;
Expand Down
2 changes: 0 additions & 2 deletions src/Adapters/MatrixAdapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ class MatrixAdapter {
MatrixAdapter(const std::vector<int> &iIndexes, const std::vector<int> &jIndexes,
const std::vector<double> &dataValues, double cutOff, bool isSimularity, CountTableAdapter table);
~MatrixAdapter() = default;
bool CreatePhylipFile(const std::string &saveFileLocation);
bool CreateColumnDataFile(const std::string &saveFileLocation);
SparseDistanceMatrix CreateSparseMatrix();
ListVector CreateListVector() const;

Expand Down
9 changes: 0 additions & 9 deletions src/Adapters/OptimatrixAdapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
#include <unordered_map>
#include <sstream>

#include "../RowData.h"


class OptimatrixAdapter {
///Closeness is the data represntation, it is a vector of sets that tells us which values are closes to it ->
/// So, close[0], if Namemap[0] = A, then close[0] is the values that are within the cutoff to A.
Expand All @@ -28,14 +25,8 @@ class OptimatrixAdapter {
explicit OptimatrixAdapter(const double cutoff) {
this->cutoff = cutoff;
}
OptiMatrix* ConvertToOptimatrix(const std::vector<int>
&xPosition, const std::vector<int>& yPosition, const std::vector<double>& data);
OptiMatrix* ConvertToOptimatrix(const std::vector<RowData>&, bool);
OptiMatrix* ConvertToOptimatrix(const SparseDistanceMatrix* matrixData,
const ListVector* listVector, bool sim);
std::vector<std::unordered_set<long long>> GetCloseness() {return {};}
std::vector<std::string> GetNameList() {return {};}
std::vector<std::string> GetSingletons() {return {};}
private:
double cutoff;
//TODO Get rid of values inside of the adapter, it should not care about them
Expand Down
8 changes: 2 additions & 6 deletions src/ClusterCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,7 @@ ClusterExport* ClusterCommand::runOptiCluster(OptiMatrix *optiMatrix, const doub
}
util.AddRowToDataFrameMap(dataframeMapClusterMetrics, clusterMetrics, clusterMetricsHeaders);
std::chrono::time_point<std::chrono::system_clock> start, end;
//m->mothurOutEndLine();
// Stable Metric -> Keep the data stable, to prevent errors (rounding errors)
// The difference between what the current and last metric (delta)
// MaxIters -> is an exit condition

while ((delta > stableMetric) && (iters < maxIters)) {
//long start = std::time(nullptr);
double oldMetric = listVectorMetric;
Expand Down Expand Up @@ -126,7 +123,6 @@ ClusterExport* ClusterCommand::runOptiCluster(OptiMatrix *optiMatrix, const doub
clusterInformation.clusterBins = list->print(listFile);
data->AddToData(clusterInformation);
data->SetListVector(*list, std::to_string(cutoff));
// clusterMatrixOutput = list->print(listFile);
stats = cluster.getStats(tp, tn, fp, fn);

sensFile += std::to_string(cutoff) + ',' + std::to_string(cutoff) + ',' + std::to_string(tp) + ',' +
Expand Down Expand Up @@ -157,7 +153,7 @@ ClusterExport* ClusterCommand::runMothurCluster(const std::string &clusterMethod
float previousDist = 0.00000;
float rndPreviousDist = 0.00000;
oldList = *list;
bool printHeaders = false;
constexpr bool printHeaders = false;
std::string clusterResult;
double highestDistLabel = -1;
std::string binResults;
Expand Down
20 changes: 0 additions & 20 deletions src/ClusterCommandTestFixture.cpp

This file was deleted.

10 changes: 0 additions & 10 deletions src/CountTableAdapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,16 +147,6 @@ Rcpp::DataFrame CountTableAdapter::ReCreateDataFrame() const {
return countTable;
}

std::set<std::string> CountTableAdapter::CheckDistanceFileOnlyHasNamesInCount(const std::vector<RowData>& data) const {
std::set<std::string> names;
for(const auto& value : data) {
if(nameToRowIndex.find(value.name) == nameToRowIndex.end()) {
names.insert(value.name);
}
}
return names;
}


void CountTableAdapter::CreateNameToIndex() {
for(size_t i = 0; i < sampleNames.size(); i++) {
Expand Down
3 changes: 2 additions & 1 deletion src/DistanceFileReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@


DistanceFileReader::DistanceFileReader(SparseDistanceMatrix *sparseDistanceMatrix,
ListVector *listVector, const bool isSim):sparseMatrix(sparseDistanceMatrix), list(listVector), sim(isSim){}
ListVector *listVector, const double cutoff, const bool isSim):sparseMatrix(sparseDistanceMatrix),
list(listVector), cutoff(cutoff), sim(isSim){}

Rcpp::DataFrame DistanceFileReader::SparseMatrixToDataFrame() const {
const size_t size = sparseMatrix->seqVec.size();
Expand Down
2 changes: 0 additions & 2 deletions src/Makevars.txt

This file was deleted.

46 changes: 0 additions & 46 deletions src/MatrixAdapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,52 +11,6 @@ MatrixAdapter::MatrixAdapter(const std::vector<int> &iIndexes, const std::vector
data(dataValues) {
}


bool MatrixAdapter::CreatePhylipFile(const std::string &saveFileLocation) {
// if(saveFileLocation.empty())
// return false;
// const auto matrix = DistanceMatrixToSquareMatrix();
// int count = 0;
// const size_t size = matrixNames.size();
// std::string distanceString = "\t" + std::to_string(size) + "\n";
// for (const auto &cells: matrix) {
// distanceString += matrixNames[count];
// for (int i = 0; i < count; i++) {
// distanceString += "\t" + std::to_string(cells.rowValues[i]);
// }
// distanceString += "\n";
// count++;
// }
// std::ofstream writeOut(saveFileLocation);
// if (!writeOut.is_open()) {
// TestHelper::Print("Failed to open: \n");
// }
// writeOut << distanceString;
// writeOut.close();
return true;
}

bool MatrixAdapter::CreateColumnDataFile(const std::string &saveFileLocation) {
if(saveFileLocation.empty())
return false;
const auto matrix = CreateSparseMatrix();
std::string data;
for (size_t i = 0; i < matrix.seqVec.size(); i++) {
std::string firstCellName = matrixNames[i];
for(size_t j = 0; j < matrixNames[i].size(); j++) {
std::string otherCell = matrixNames[matrix.seqVec[i][j].index];
data += firstCellName + "\t" + otherCell + "\t" + std::to_string(matrix.seqVec[i][j].dist) + "\n";
}
}
std::ofstream writeOut(saveFileLocation);
if (!writeOut.is_open()) {
Rcpp::Rcout << "Failed to open: \n";
}
writeOut << data;
writeOut.close();
return true;
}

SparseDistanceMatrix MatrixAdapter::CreateSparseMatrix() {
// The indexes are +1, i need to push them back so that 1 -> 0, 2-> 1, etc (name map maybe?)
std::set<std::string> names;
Expand Down
7 changes: 0 additions & 7 deletions src/MatrixAdapterTestFixture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ bool MatrixAdapterTestFixture::TestCreateSparseMatrix(const size_t expectedResul
return result == expectedResult;
}

bool MatrixAdapterTestFixture::TestCreatePhylipFile(const bool expectedResult) {
Setup();
const auto result = matrixAdapter->CreatePhylipFile("");
TearDown();
return result == expectedResult;
}

bool MatrixAdapterTestFixture::TestGetListVector(const bool createSparseFirst, const bool expectedResult) {
Setup();
if(createSparseFirst) matrixAdapter->CreateSparseMatrix();
Expand Down
1 change: 0 additions & 1 deletion src/MothurDependencies/ColumnDistanceMatrixReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <vector>
#include "ListVector.h"
#include "SparseDistanceMatrix.h"
#include "../RowData.h"
#include "../Adapters/CountTableAdapter.h"
#include "../Adapters/DistanceFileReader.h"

Expand Down
6 changes: 3 additions & 3 deletions src/MothurDependencies/OptiMatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ class OptiMatrix final : public OptiData{

public:
OptiMatrix(const std::vector<std::unordered_set<long long>>& close, const std::vector<std::string>& name,
const std::vector<std::string>& single, const double c): OptiData(c)
const std::vector<std::string>& singleton, const double c): OptiData(c)
{
closeness = close;
nameMap = name;
singletons = single;
singletons = singleton;
}//closeness, namemap, singleton, cutoff
~OptiMatrix(){}
~OptiMatrix() override = default;
std::vector<std::unordered_set<long long>> GetCloseness() {return closeness;}
std::vector<std::string> GetNameList() {return nameMap;}
std::vector<std::string> GetSingletons() {return singletons;}
Expand Down
31 changes: 0 additions & 31 deletions src/MothurDependencies/RSparseMatrix.h

This file was deleted.

1 change: 0 additions & 1 deletion src/MothurDependencies/ReadPhylipMatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <fstream>
#include <string>
#include <vector>
#include "../RowData.h"
#include <unordered_set>
#include "ListVector.h"
#include "SparseDistanceMatrix.h"
Expand Down
1 change: 0 additions & 1 deletion src/MothurDependencies/SharedFileBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

#include "ClusterExport.h"
#include "ListVector.h"
#include "RSparseMatrix.h"
#include "SharedFile.h"
#include "OtuAbundancePair.h"
#include "../Adapters/CountTableAdapter.h"
Expand Down
3 changes: 2 additions & 1 deletion src/MothurDependencies/SparseDistanceMatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "PDistCell.h"

#include <vector>

#include <Rcpp.h>
#include "Utils.h"


Expand Down Expand Up @@ -44,6 +44,7 @@ class SparseDistanceMatrix {
int addCellSorted(unsigned long, PDistCell);
std::vector<std::vector<PDistCell> > seqVec;
bool print() const;
void FilterSparseMatrix(float cutoff);

private:
PDistCell smallCell; //The cell with the smallest distance
Expand Down
22 changes: 18 additions & 4 deletions src/OptiClusterTestFixture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,26 @@ bool OptiClusterTestFixture::OptiClusterGetsTheCorrectNumberOfBins(const long lo


void OptiClusterTestFixture::Setup() {
const auto xVals = std::vector<int>{0,0,0,1,1,2,3};
const auto yVals = std::vector<int>{1,2,4,2,4,4,4};
const auto data = std::vector<double>{0.02,0.04,0.025,0.01,0.028,0.045,0.05};
const auto xVals = std::vector<int>{0,0,0,1,1};
const auto yVals = std::vector<int>{1,2,4,2,4};
const auto data = std::vector<float>{0.02,0.04,0.025,0.01,0.028};
SparseDistanceMatrix sparse;
ListVector vec;
vec.push_back("0");
vec.push_back("1");
vec.push_back("2");
vec.push_back("3");
vec.push_back("4");
const size_t size = xVals.size();
sparse.resize(size);
for(size_t i = 0; i < size; i++) {
sparse.addCell(xVals[i], PDistCell(yVals[i], data[i]));
}
OptimatrixAdapter adapter(0.03);
OptiData *matrix = adapter.ConvertToOptimatrix(xVals, yVals, data);
OptiData *matrix = adapter.ConvertToOptimatrix(&sparse, &vec, false);
optiCluster = new OptiCluster(matrix, new MCC(), 0);;
double value = 0;
optiCluster->initialize(value, false, "");
}

void OptiClusterTestFixture::TearDown() {
Expand Down
Loading

0 comments on commit f491408

Please sign in to comment.