forked from satijalab/seurat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRcppExports.cpp
242 lines (237 loc) · 12 KB
/
RcppExports.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#include <RcppEigen.h>
#include <Rcpp.h>
using namespace Rcpp;
// RunUMISampling
Eigen::SparseMatrix<double> RunUMISampling(Eigen::SparseMatrix<double> data, int sample_val, bool upsample, bool display_progress);
RcppExport SEXP _Seurat_RunUMISampling(SEXP dataSEXP, SEXP sample_valSEXP, SEXP upsampleSEXP, SEXP display_progressSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Eigen::SparseMatrix<double> >::type data(dataSEXP);
Rcpp::traits::input_parameter< int >::type sample_val(sample_valSEXP);
Rcpp::traits::input_parameter< bool >::type upsample(upsampleSEXP);
Rcpp::traits::input_parameter< bool >::type display_progress(display_progressSEXP);
rcpp_result_gen = Rcpp::wrap(RunUMISampling(data, sample_val, upsample, display_progress));
return rcpp_result_gen;
END_RCPP
}
// RunUMISamplingPerCell
Eigen::SparseMatrix<double> RunUMISamplingPerCell(Eigen::SparseMatrix<double> data, NumericVector sample_val, bool upsample, bool display_progress);
RcppExport SEXP _Seurat_RunUMISamplingPerCell(SEXP dataSEXP, SEXP sample_valSEXP, SEXP upsampleSEXP, SEXP display_progressSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Eigen::SparseMatrix<double> >::type data(dataSEXP);
Rcpp::traits::input_parameter< NumericVector >::type sample_val(sample_valSEXP);
Rcpp::traits::input_parameter< bool >::type upsample(upsampleSEXP);
Rcpp::traits::input_parameter< bool >::type display_progress(display_progressSEXP);
rcpp_result_gen = Rcpp::wrap(RunUMISamplingPerCell(data, sample_val, upsample, display_progress));
return rcpp_result_gen;
END_RCPP
}
// RowMergeMatrices
Eigen::SparseMatrix<double> RowMergeMatrices(Eigen::SparseMatrix<double, Eigen::RowMajor> mat1, Eigen::SparseMatrix<double, Eigen::RowMajor> mat2, std::vector< std::string > mat1_rownames, std::vector< std::string > mat2_rownames, std::vector< std::string > all_rownames);
RcppExport SEXP _Seurat_RowMergeMatrices(SEXP mat1SEXP, SEXP mat2SEXP, SEXP mat1_rownamesSEXP, SEXP mat2_rownamesSEXP, SEXP all_rownamesSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Eigen::SparseMatrix<double, Eigen::RowMajor> >::type mat1(mat1SEXP);
Rcpp::traits::input_parameter< Eigen::SparseMatrix<double, Eigen::RowMajor> >::type mat2(mat2SEXP);
Rcpp::traits::input_parameter< std::vector< std::string > >::type mat1_rownames(mat1_rownamesSEXP);
Rcpp::traits::input_parameter< std::vector< std::string > >::type mat2_rownames(mat2_rownamesSEXP);
Rcpp::traits::input_parameter< std::vector< std::string > >::type all_rownames(all_rownamesSEXP);
rcpp_result_gen = Rcpp::wrap(RowMergeMatrices(mat1, mat2, mat1_rownames, mat2_rownames, all_rownames));
return rcpp_result_gen;
END_RCPP
}
// LogNorm
Eigen::SparseMatrix<double> LogNorm(Eigen::SparseMatrix<double> data, int scale_factor, bool display_progress);
RcppExport SEXP _Seurat_LogNorm(SEXP dataSEXP, SEXP scale_factorSEXP, SEXP display_progressSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Eigen::SparseMatrix<double> >::type data(dataSEXP);
Rcpp::traits::input_parameter< int >::type scale_factor(scale_factorSEXP);
Rcpp::traits::input_parameter< bool >::type display_progress(display_progressSEXP);
rcpp_result_gen = Rcpp::wrap(LogNorm(data, scale_factor, display_progress));
return rcpp_result_gen;
END_RCPP
}
// FastMatMult
Eigen::MatrixXd FastMatMult(Eigen::MatrixXd m1, Eigen::MatrixXd m2);
RcppExport SEXP _Seurat_FastMatMult(SEXP m1SEXP, SEXP m2SEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Eigen::MatrixXd >::type m1(m1SEXP);
Rcpp::traits::input_parameter< Eigen::MatrixXd >::type m2(m2SEXP);
rcpp_result_gen = Rcpp::wrap(FastMatMult(m1, m2));
return rcpp_result_gen;
END_RCPP
}
// FastRowScale
Eigen::MatrixXd FastRowScale(Eigen::MatrixXd mat, bool scale, bool center, double scale_max, bool display_progress);
RcppExport SEXP _Seurat_FastRowScale(SEXP matSEXP, SEXP scaleSEXP, SEXP centerSEXP, SEXP scale_maxSEXP, SEXP display_progressSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Eigen::MatrixXd >::type mat(matSEXP);
Rcpp::traits::input_parameter< bool >::type scale(scaleSEXP);
Rcpp::traits::input_parameter< bool >::type center(centerSEXP);
Rcpp::traits::input_parameter< double >::type scale_max(scale_maxSEXP);
Rcpp::traits::input_parameter< bool >::type display_progress(display_progressSEXP);
rcpp_result_gen = Rcpp::wrap(FastRowScale(mat, scale, center, scale_max, display_progress));
return rcpp_result_gen;
END_RCPP
}
// Standardize
Eigen::MatrixXd Standardize(Eigen::MatrixXd mat, bool display_progress);
RcppExport SEXP _Seurat_Standardize(SEXP matSEXP, SEXP display_progressSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Eigen::MatrixXd >::type mat(matSEXP);
Rcpp::traits::input_parameter< bool >::type display_progress(display_progressSEXP);
rcpp_result_gen = Rcpp::wrap(Standardize(mat, display_progress));
return rcpp_result_gen;
END_RCPP
}
// FastSparseRowScale
Eigen::MatrixXd FastSparseRowScale(Eigen::SparseMatrix<double> mat, bool scale, bool center, double scale_max, bool display_progress);
RcppExport SEXP _Seurat_FastSparseRowScale(SEXP matSEXP, SEXP scaleSEXP, SEXP centerSEXP, SEXP scale_maxSEXP, SEXP display_progressSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Eigen::SparseMatrix<double> >::type mat(matSEXP);
Rcpp::traits::input_parameter< bool >::type scale(scaleSEXP);
Rcpp::traits::input_parameter< bool >::type center(centerSEXP);
Rcpp::traits::input_parameter< double >::type scale_max(scale_maxSEXP);
Rcpp::traits::input_parameter< bool >::type display_progress(display_progressSEXP);
rcpp_result_gen = Rcpp::wrap(FastSparseRowScale(mat, scale, center, scale_max, display_progress));
return rcpp_result_gen;
END_RCPP
}
// FastCov
Eigen::MatrixXd FastCov(Eigen::MatrixXd mat, bool center);
RcppExport SEXP _Seurat_FastCov(SEXP matSEXP, SEXP centerSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Eigen::MatrixXd >::type mat(matSEXP);
Rcpp::traits::input_parameter< bool >::type center(centerSEXP);
rcpp_result_gen = Rcpp::wrap(FastCov(mat, center));
return rcpp_result_gen;
END_RCPP
}
// FastCovMats
Eigen::MatrixXd FastCovMats(Eigen::MatrixXd mat1, Eigen::MatrixXd mat2, bool center);
RcppExport SEXP _Seurat_FastCovMats(SEXP mat1SEXP, SEXP mat2SEXP, SEXP centerSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Eigen::MatrixXd >::type mat1(mat1SEXP);
Rcpp::traits::input_parameter< Eigen::MatrixXd >::type mat2(mat2SEXP);
Rcpp::traits::input_parameter< bool >::type center(centerSEXP);
rcpp_result_gen = Rcpp::wrap(FastCovMats(mat1, mat2, center));
return rcpp_result_gen;
END_RCPP
}
// FastRBind
Eigen::MatrixXd FastRBind(Eigen::MatrixXd mat1, Eigen::MatrixXd mat2);
RcppExport SEXP _Seurat_FastRBind(SEXP mat1SEXP, SEXP mat2SEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Eigen::MatrixXd >::type mat1(mat1SEXP);
Rcpp::traits::input_parameter< Eigen::MatrixXd >::type mat2(mat2SEXP);
rcpp_result_gen = Rcpp::wrap(FastRBind(mat1, mat2));
return rcpp_result_gen;
END_RCPP
}
// FastExpMean
Eigen::VectorXd FastExpMean(Eigen::SparseMatrix<double> mat, bool display_progress);
RcppExport SEXP _Seurat_FastExpMean(SEXP matSEXP, SEXP display_progressSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Eigen::SparseMatrix<double> >::type mat(matSEXP);
Rcpp::traits::input_parameter< bool >::type display_progress(display_progressSEXP);
rcpp_result_gen = Rcpp::wrap(FastExpMean(mat, display_progress));
return rcpp_result_gen;
END_RCPP
}
// FastLogVMR
Eigen::VectorXd FastLogVMR(Eigen::SparseMatrix<double> mat, bool display_progress);
RcppExport SEXP _Seurat_FastLogVMR(SEXP matSEXP, SEXP display_progressSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Eigen::SparseMatrix<double> >::type mat(matSEXP);
Rcpp::traits::input_parameter< bool >::type display_progress(display_progressSEXP);
rcpp_result_gen = Rcpp::wrap(FastLogVMR(mat, display_progress));
return rcpp_result_gen;
END_RCPP
}
// ComputeSNN
Eigen::SparseMatrix<double> ComputeSNN(Eigen::MatrixXd nn_ranked, double prune);
RcppExport SEXP _Seurat_ComputeSNN(SEXP nn_rankedSEXP, SEXP pruneSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Eigen::MatrixXd >::type nn_ranked(nn_rankedSEXP);
Rcpp::traits::input_parameter< double >::type prune(pruneSEXP);
rcpp_result_gen = Rcpp::wrap(ComputeSNN(nn_ranked, prune));
return rcpp_result_gen;
END_RCPP
}
// WriteEdgeFile
void WriteEdgeFile(Eigen::SparseMatrix<double> snn, String filename, bool display_progress);
RcppExport SEXP _Seurat_WriteEdgeFile(SEXP snnSEXP, SEXP filenameSEXP, SEXP display_progressSEXP) {
BEGIN_RCPP
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Eigen::SparseMatrix<double> >::type snn(snnSEXP);
Rcpp::traits::input_parameter< String >::type filename(filenameSEXP);
Rcpp::traits::input_parameter< bool >::type display_progress(display_progressSEXP);
WriteEdgeFile(snn, filename, display_progress);
return R_NilValue;
END_RCPP
}
// DirectSNNToFile
Eigen::SparseMatrix<double> DirectSNNToFile(Eigen::MatrixXd nn_ranked, double prune, bool display_progress, String filename);
RcppExport SEXP _Seurat_DirectSNNToFile(SEXP nn_rankedSEXP, SEXP pruneSEXP, SEXP display_progressSEXP, SEXP filenameSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Eigen::MatrixXd >::type nn_ranked(nn_rankedSEXP);
Rcpp::traits::input_parameter< double >::type prune(pruneSEXP);
Rcpp::traits::input_parameter< bool >::type display_progress(display_progressSEXP);
Rcpp::traits::input_parameter< String >::type filename(filenameSEXP);
rcpp_result_gen = Rcpp::wrap(DirectSNNToFile(nn_ranked, prune, display_progress, filename));
return rcpp_result_gen;
END_RCPP
}
static const R_CallMethodDef CallEntries[] = {
{"_Seurat_RunUMISampling", (DL_FUNC) &_Seurat_RunUMISampling, 4},
{"_Seurat_RunUMISamplingPerCell", (DL_FUNC) &_Seurat_RunUMISamplingPerCell, 4},
{"_Seurat_RowMergeMatrices", (DL_FUNC) &_Seurat_RowMergeMatrices, 5},
{"_Seurat_LogNorm", (DL_FUNC) &_Seurat_LogNorm, 3},
{"_Seurat_FastMatMult", (DL_FUNC) &_Seurat_FastMatMult, 2},
{"_Seurat_FastRowScale", (DL_FUNC) &_Seurat_FastRowScale, 5},
{"_Seurat_Standardize", (DL_FUNC) &_Seurat_Standardize, 2},
{"_Seurat_FastSparseRowScale", (DL_FUNC) &_Seurat_FastSparseRowScale, 5},
{"_Seurat_FastCov", (DL_FUNC) &_Seurat_FastCov, 2},
{"_Seurat_FastCovMats", (DL_FUNC) &_Seurat_FastCovMats, 3},
{"_Seurat_FastRBind", (DL_FUNC) &_Seurat_FastRBind, 2},
{"_Seurat_FastExpMean", (DL_FUNC) &_Seurat_FastExpMean, 2},
{"_Seurat_FastLogVMR", (DL_FUNC) &_Seurat_FastLogVMR, 2},
{"_Seurat_ComputeSNN", (DL_FUNC) &_Seurat_ComputeSNN, 2},
{"_Seurat_WriteEdgeFile", (DL_FUNC) &_Seurat_WriteEdgeFile, 3},
{"_Seurat_DirectSNNToFile", (DL_FUNC) &_Seurat_DirectSNNToFile, 4},
{NULL, NULL, 0}
};
RcppExport void R_init_Seurat(DllInfo *dll) {
R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
R_useDynamicSymbols(dll, FALSE);
}