Skip to content

Commit

Permalink
Cleaned up the README, bumped the version for a new release.
Browse files Browse the repository at this point in the history
  • Loading branch information
LTLA committed Dec 26, 2024
1 parent c0447ce commit 90aa29a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.14)

project(singlepp
VERSION 2.0.0
VERSION 2.0.1
DESCRIPTION "C++ port of the SingleR algorithm"
LANGUAGES CXX)

Expand Down
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# C++ port of SingleR

![Unit tests](https://github.com/singler-inc/singlepp/actions/workflows/run-tests.yaml/badge.svg)
![Documentation](https://github.com/singler-inc/singlepp/actions/workflows/doxygenate.yaml/badge.svg)
![R comparison](https://github.com/singler-inc/singlepp/actions/workflows/compare-r.yaml/badge.svg)
[![codecov](https://codecov.io/gh/singler-inc/singlepp/branch/master/graph/badge.svg?token=OYTGM9IRSE)](https://codecov.io/gh/singler-inc/singlepp)
![Unit tests](https://github.com/SingleR-inc/singlepp/actions/workflows/run-tests.yaml/badge.svg)
![Documentation](https://github.com/SingleR-inc/singlepp/actions/workflows/doxygenate.yaml/badge.svg)
![R comparison](https://github.com/SingleR-inc/singlepp/actions/workflows/compare-r.yaml/badge.svg)
[![codecov](https://codecov.io/gh/SingleR-inc/singlepp/branch/master/graph/badge.svg?token=OYTGM9IRSE)](https://codecov.io/gh/SingleR-inc/singlepp)

## Overview

Expand All @@ -30,7 +30,7 @@ ref_labels;
// Prepare a vector of vectors of markers for pairwise comparisons between labels.
ref_markers;

// Building the classifier.
// Training the classifier.
singlepp::TrainSingleOptions train_opt;
auto trained = singlepp::train_single(
ref_mat,
Expand All @@ -39,7 +39,7 @@ auto trained = singlepp::train_single(
train_opt
);

// Running the classification on the test matrix.
// Classifying cells in the test matrix.
singlepp::ClassifySingleOptions class_opt;
auto res = singlepp::classify_single(test_mat, trained, class_opt);
```
Expand Down Expand Up @@ -85,7 +85,7 @@ as the top set will not be contaminated by genes that are not present in the tes
## Intersecting feature sets

Often the reference dataset will not have the same genes as the test dataset.
To handle this case, users should use `train_single_intersect()` with identifiers for the rows of the reference and test matrices.
To handle this case, users should call `train_single_intersect()` with the row identifiers of the reference and test matrices.

```cpp
test_names; // vector of feature IDs for the test data
Expand All @@ -102,7 +102,7 @@ auto trained_intersect = singlepp::train_single_intersect(
);
```

Then, `classify_single_intersect()` will perform classification using only the intersection of genes:
Then, `classify_single_intersect()` will perform classification using only the intersection of genes between the two datasets:

```cpp
auto res_intersect = singlepp::classify_single_intersect(
Expand Down Expand Up @@ -134,6 +134,8 @@ We build the integrated classifier:
std::vector<singlepp::TrainIntegratedInput<> > inputs;
inputs.push_back(singlepp::prepare_integrated_input(refA_mat, refA_labels.data(), preA));
inputs.push_back(singlepp::prepare_integrated_input(refB_mat, refB_labels.data(), preB));
// If the genes are different between the test and reference datasets, use
// prepare_integrated_input_intersect() instead.

singlepp::TrainIntegratedOptions ti_opt;
auto train_integrated = singlepp::train_integrated(inputs, ti_opt);
Expand All @@ -159,7 +161,7 @@ include(FetchContent)
FetchContent_Declare(
singlepp
GIT_REPOSITORY https://github.com/singler-inc/singlepp
GIT_REPOSITORY https://github.com/SingleR-inc/singlepp
GIT_TAG master # or any version of interest
)
Expand Down Expand Up @@ -198,7 +200,7 @@ See the tags in [`extern/CMakeLists.txt`](extern/CMakeLists.txt) to find compati
### Manual

If you're not using CMake, the simple approach is to just copy the files in `include/` - either directly or with Git submodules - and include their path during compilation with, e.g., GCC's `-I`.
This requires the external dependencies listed in [`extern/CMakeLists.txt`](extern/CMakeLists.txt), which also need to be made available during compilation.
This assumes that the external dependencies listed in [`extern/CMakeLists.txt`](extern/CMakeLists.txt) are available during compilation.

## References

Expand Down

0 comments on commit 90aa29a

Please sign in to comment.