Debian Codegraph @

pgenlibr/src/RcppExports.cpp

raw
1 // Generated by using Rcpp::compileAttributes() -> do not edit by hand
2 // Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
3
4 #include <Rcpp.h>
5
6 using namespace Rcpp;
7
8 #ifdef RCPP_USE_GLOBAL_ROSTREAM
9 Rcpp::Rostream<true>& Rcpp::Rcout = Rcpp::Rcpp_cout_get();
10 Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
11 #endif
12
13 // NewPgen
14 SEXP NewPgen(String filename, Nullable<List> pvar, Nullable<int> raw_sample_ct, Nullable<IntegerVector> sample_subset);
15 RcppExport SEXP _pgenlibr_NewPgen(SEXP filenameSEXP, SEXP pvarSEXP, SEXP raw_sample_ctSEXP, SEXP sample_subsetSEXP) {
16 BEGIN_RCPP
17 Rcpp::RObject rcpp_result_gen;
18 Rcpp::RNGScope rcpp_rngScope_gen;
19 Rcpp::traits::input_parameter< String >::type filename(filenameSEXP);
20 Rcpp::traits::input_parameter< Nullable<List> >::type pvar(pvarSEXP);
21 Rcpp::traits::input_parameter< Nullable<int> >::type raw_sample_ct(raw_sample_ctSEXP);
22 Rcpp::traits::input_parameter< Nullable<IntegerVector> >::type sample_subset(sample_subsetSEXP);
23 rcpp_result_gen = Rcpp::wrap(NewPgen(filename, pvar, raw_sample_ct, sample_subset));
24 return rcpp_result_gen;
25 END_RCPP
26 }
27 // GetRawSampleCt
28 int GetRawSampleCt(List pgen);
29 RcppExport SEXP _pgenlibr_GetRawSampleCt(SEXP pgenSEXP) {
30 BEGIN_RCPP
31 Rcpp::RObject rcpp_result_gen;
32 Rcpp::RNGScope rcpp_rngScope_gen;
33 Rcpp::traits::input_parameter< List >::type pgen(pgenSEXP);
34 rcpp_result_gen = Rcpp::wrap(GetRawSampleCt(pgen));
35 return rcpp_result_gen;
36 END_RCPP
37 }
38 // GetVariantCt
39 int GetVariantCt(List pvar_or_pgen);
40 RcppExport SEXP _pgenlibr_GetVariantCt(SEXP pvar_or_pgenSEXP) {
41 BEGIN_RCPP
42 Rcpp::RObject rcpp_result_gen;
43 Rcpp::RNGScope rcpp_rngScope_gen;
44 Rcpp::traits::input_parameter< List >::type pvar_or_pgen(pvar_or_pgenSEXP);
45 rcpp_result_gen = Rcpp::wrap(GetVariantCt(pvar_or_pgen));
46 return rcpp_result_gen;
47 END_RCPP
48 }
49 // GetAlleleCt
50 int GetAlleleCt(List pvar_or_pgen, int variant_num);
51 RcppExport SEXP _pgenlibr_GetAlleleCt(SEXP pvar_or_pgenSEXP, SEXP variant_numSEXP) {
52 BEGIN_RCPP
53 Rcpp::RObject rcpp_result_gen;
54 Rcpp::RNGScope rcpp_rngScope_gen;
55 Rcpp::traits::input_parameter< List >::type pvar_or_pgen(pvar_or_pgenSEXP);
56 Rcpp::traits::input_parameter< int >::type variant_num(variant_numSEXP);
57 rcpp_result_gen = Rcpp::wrap(GetAlleleCt(pvar_or_pgen, variant_num));
58 return rcpp_result_gen;
59 END_RCPP
60 }
61 // GetMaxAlleleCt
62 int GetMaxAlleleCt(List pvar_or_pgen);
63 RcppExport SEXP _pgenlibr_GetMaxAlleleCt(SEXP pvar_or_pgenSEXP) {
64 BEGIN_RCPP
65 Rcpp::RObject rcpp_result_gen;
66 Rcpp::RNGScope rcpp_rngScope_gen;
67 Rcpp::traits::input_parameter< List >::type pvar_or_pgen(pvar_or_pgenSEXP);
68 rcpp_result_gen = Rcpp::wrap(GetMaxAlleleCt(pvar_or_pgen));
69 return rcpp_result_gen;
70 END_RCPP
71 }
72 // HardcallPhasePresent
73 bool HardcallPhasePresent(List pgen);
74 RcppExport SEXP _pgenlibr_HardcallPhasePresent(SEXP pgenSEXP) {
75 BEGIN_RCPP
76 Rcpp::RObject rcpp_result_gen;
77 Rcpp::RNGScope rcpp_rngScope_gen;
78 Rcpp::traits::input_parameter< List >::type pgen(pgenSEXP);
79 rcpp_result_gen = Rcpp::wrap(HardcallPhasePresent(pgen));
80 return rcpp_result_gen;
81 END_RCPP
82 }
83 // Buf
84 NumericVector Buf(List pgen);
85 RcppExport SEXP _pgenlibr_Buf(SEXP pgenSEXP) {
86 BEGIN_RCPP
87 Rcpp::RObject rcpp_result_gen;
88 Rcpp::RNGScope rcpp_rngScope_gen;
89 Rcpp::traits::input_parameter< List >::type pgen(pgenSEXP);
90 rcpp_result_gen = Rcpp::wrap(Buf(pgen));
91 return rcpp_result_gen;
92 END_RCPP
93 }
94 // AlleleCodeBuf
95 NumericVector AlleleCodeBuf(List pgen);
96 RcppExport SEXP _pgenlibr_AlleleCodeBuf(SEXP pgenSEXP) {
97 BEGIN_RCPP
98 Rcpp::RObject rcpp_result_gen;
99 Rcpp::RNGScope rcpp_rngScope_gen;
100 Rcpp::traits::input_parameter< List >::type pgen(pgenSEXP);
101 rcpp_result_gen = Rcpp::wrap(AlleleCodeBuf(pgen));
102 return rcpp_result_gen;
103 END_RCPP
104 }
105 // IntBuf
106 IntegerVector IntBuf(List pgen);
107 RcppExport SEXP _pgenlibr_IntBuf(SEXP pgenSEXP) {
108 BEGIN_RCPP
109 Rcpp::RObject rcpp_result_gen;
110 Rcpp::RNGScope rcpp_rngScope_gen;
111 Rcpp::traits::input_parameter< List >::type pgen(pgenSEXP);
112 rcpp_result_gen = Rcpp::wrap(IntBuf(pgen));
113 return rcpp_result_gen;
114 END_RCPP
115 }
116 // IntAlleleCodeBuf
117 IntegerVector IntAlleleCodeBuf(List pgen);
118 RcppExport SEXP _pgenlibr_IntAlleleCodeBuf(SEXP pgenSEXP) {
119 BEGIN_RCPP
120 Rcpp::RObject rcpp_result_gen;
121 Rcpp::RNGScope rcpp_rngScope_gen;
122 Rcpp::traits::input_parameter< List >::type pgen(pgenSEXP);
123 rcpp_result_gen = Rcpp::wrap(IntAlleleCodeBuf(pgen));
124 return rcpp_result_gen;
125 END_RCPP
126 }
127 // BoolBuf
128 LogicalVector BoolBuf(List pgen);
129 RcppExport SEXP _pgenlibr_BoolBuf(SEXP pgenSEXP) {
130 BEGIN_RCPP
131 Rcpp::RObject rcpp_result_gen;
132 Rcpp::RNGScope rcpp_rngScope_gen;
133 Rcpp::traits::input_parameter< List >::type pgen(pgenSEXP);
134 rcpp_result_gen = Rcpp::wrap(BoolBuf(pgen));
135 return rcpp_result_gen;
136 END_RCPP
137 }
138 // ReadHardcalls
139 void ReadHardcalls(List pgen, SEXP buf, int variant_num, int allele_num);
140 RcppExport SEXP _pgenlibr_ReadHardcalls(SEXP pgenSEXP, SEXP bufSEXP, SEXP variant_numSEXP, SEXP allele_numSEXP) {
141 BEGIN_RCPP
142 Rcpp::RNGScope rcpp_rngScope_gen;
143 Rcpp::traits::input_parameter< List >::type pgen(pgenSEXP);
144 Rcpp::traits::input_parameter< SEXP >::type buf(bufSEXP);
145 Rcpp::traits::input_parameter< int >::type variant_num(variant_numSEXP);
146 Rcpp::traits::input_parameter< int >::type allele_num(allele_numSEXP);
147 ReadHardcalls(pgen, buf, variant_num, allele_num);
148 return R_NilValue;
149 END_RCPP
150 }
151 // HasSparseHardcalls
152 bool HasSparseHardcalls(List pgen, int variant_num, int allele_num);
153 RcppExport SEXP _pgenlibr_HasSparseHardcalls(SEXP pgenSEXP, SEXP variant_numSEXP, SEXP allele_numSEXP) {
154 BEGIN_RCPP
155 Rcpp::RObject rcpp_result_gen;
156 Rcpp::RNGScope rcpp_rngScope_gen;
157 Rcpp::traits::input_parameter< List >::type pgen(pgenSEXP);
158 Rcpp::traits::input_parameter< int >::type variant_num(variant_numSEXP);
159 Rcpp::traits::input_parameter< int >::type allele_num(allele_numSEXP);
160 rcpp_result_gen = Rcpp::wrap(HasSparseHardcalls(pgen, variant_num, allele_num));
161 return rcpp_result_gen;
162 END_RCPP
163 }
164 // ReadSparseHardcalls
165 List ReadSparseHardcalls(List pgen, int variant_num, int allele_num, bool return_ints);
166 RcppExport SEXP _pgenlibr_ReadSparseHardcalls(SEXP pgenSEXP, SEXP variant_numSEXP, SEXP allele_numSEXP, SEXP return_intsSEXP) {
167 BEGIN_RCPP
168 Rcpp::RObject rcpp_result_gen;
169 Rcpp::RNGScope rcpp_rngScope_gen;
170 Rcpp::traits::input_parameter< List >::type pgen(pgenSEXP);
171 Rcpp::traits::input_parameter< int >::type variant_num(variant_numSEXP);
172 Rcpp::traits::input_parameter< int >::type allele_num(allele_numSEXP);
173 Rcpp::traits::input_parameter< bool >::type return_ints(return_intsSEXP);
174 rcpp_result_gen = Rcpp::wrap(ReadSparseHardcalls(pgen, variant_num, allele_num, return_ints));
175 return rcpp_result_gen;
176 END_RCPP
177 }
178 // Read
179 void Read(List pgen, NumericVector buf, int variant_num, int allele_num);
180 RcppExport SEXP _pgenlibr_Read(SEXP pgenSEXP, SEXP bufSEXP, SEXP variant_numSEXP, SEXP allele_numSEXP) {
181 BEGIN_RCPP
182 Rcpp::RNGScope rcpp_rngScope_gen;
183 Rcpp::traits::input_parameter< List >::type pgen(pgenSEXP);
184 Rcpp::traits::input_parameter< NumericVector >::type buf(bufSEXP);
185 Rcpp::traits::input_parameter< int >::type variant_num(variant_numSEXP);
186 Rcpp::traits::input_parameter< int >::type allele_num(allele_numSEXP);
187 Read(pgen, buf, variant_num, allele_num);
188 return R_NilValue;
189 END_RCPP
190 }
191 // ReadAlleles
192 void ReadAlleles(List pgen, SEXP acbuf, int variant_num, Nullable<LogicalVector> phasepresent_buf);
193 RcppExport SEXP _pgenlibr_ReadAlleles(SEXP pgenSEXP, SEXP acbufSEXP, SEXP variant_numSEXP, SEXP phasepresent_bufSEXP) {
194 BEGIN_RCPP
195 Rcpp::RNGScope rcpp_rngScope_gen;
196 Rcpp::traits::input_parameter< List >::type pgen(pgenSEXP);
197 Rcpp::traits::input_parameter< SEXP >::type acbuf(acbufSEXP);
198 Rcpp::traits::input_parameter< int >::type variant_num(variant_numSEXP);
199 Rcpp::traits::input_parameter< Nullable<LogicalVector> >::type phasepresent_buf(phasepresent_bufSEXP);
200 ReadAlleles(pgen, acbuf, variant_num, phasepresent_buf);
201 return R_NilValue;
202 END_RCPP
203 }
204 // ReadIntList
205 IntegerMatrix ReadIntList(List pgen, IntegerVector variant_subset);
206 RcppExport SEXP _pgenlibr_ReadIntList(SEXP pgenSEXP, SEXP variant_subsetSEXP) {
207 BEGIN_RCPP
208 Rcpp::RObject rcpp_result_gen;
209 Rcpp::RNGScope rcpp_rngScope_gen;
210 Rcpp::traits::input_parameter< List >::type pgen(pgenSEXP);
211 Rcpp::traits::input_parameter< IntegerVector >::type variant_subset(variant_subsetSEXP);
212 rcpp_result_gen = Rcpp::wrap(ReadIntList(pgen, variant_subset));
213 return rcpp_result_gen;
214 END_RCPP
215 }
216 // ReadList
217 NumericMatrix ReadList(List pgen, IntegerVector variant_subset, bool meanimpute);
218 RcppExport SEXP _pgenlibr_ReadList(SEXP pgenSEXP, SEXP variant_subsetSEXP, SEXP meanimputeSEXP) {
219 BEGIN_RCPP
220 Rcpp::RObject rcpp_result_gen;
221 Rcpp::RNGScope rcpp_rngScope_gen;
222 Rcpp::traits::input_parameter< List >::type pgen(pgenSEXP);
223 Rcpp::traits::input_parameter< IntegerVector >::type variant_subset(variant_subsetSEXP);
224 Rcpp::traits::input_parameter< bool >::type meanimpute(meanimputeSEXP);
225 rcpp_result_gen = Rcpp::wrap(ReadList(pgen, variant_subset, meanimpute));
226 return rcpp_result_gen;
227 END_RCPP
228 }
229 // VariantScores
230 NumericVector VariantScores(List pgen, NumericVector weights, Nullable<IntegerVector> variant_subset);
231 RcppExport SEXP _pgenlibr_VariantScores(SEXP pgenSEXP, SEXP weightsSEXP, SEXP variant_subsetSEXP) {
232 BEGIN_RCPP
233 Rcpp::RObject rcpp_result_gen;
234 Rcpp::RNGScope rcpp_rngScope_gen;
235 Rcpp::traits::input_parameter< List >::type pgen(pgenSEXP);
236 Rcpp::traits::input_parameter< NumericVector >::type weights(weightsSEXP);
237 Rcpp::traits::input_parameter< Nullable<IntegerVector> >::type variant_subset(variant_subsetSEXP);
238 rcpp_result_gen = Rcpp::wrap(VariantScores(pgen, weights, variant_subset));
239 return rcpp_result_gen;
240 END_RCPP
241 }
242 // ClosePgen
243 void ClosePgen(List pgen);
244 RcppExport SEXP _pgenlibr_ClosePgen(SEXP pgenSEXP) {
245 BEGIN_RCPP
246 Rcpp::RNGScope rcpp_rngScope_gen;
247 Rcpp::traits::input_parameter< List >::type pgen(pgenSEXP);
248 ClosePgen(pgen);
249 return R_NilValue;
250 END_RCPP
251 }
252 // NewPvar
253 SEXP NewPvar(String filename, bool omit_chrom, bool omit_pos);
254 RcppExport SEXP _pgenlibr_NewPvar(SEXP filenameSEXP, SEXP omit_chromSEXP, SEXP omit_posSEXP) {
255 BEGIN_RCPP
256 Rcpp::RObject rcpp_result_gen;
257 Rcpp::RNGScope rcpp_rngScope_gen;
258 Rcpp::traits::input_parameter< String >::type filename(filenameSEXP);
259 Rcpp::traits::input_parameter< bool >::type omit_chrom(omit_chromSEXP);
260 Rcpp::traits::input_parameter< bool >::type omit_pos(omit_posSEXP);
261 rcpp_result_gen = Rcpp::wrap(NewPvar(filename, omit_chrom, omit_pos));
262 return rcpp_result_gen;
263 END_RCPP
264 }
265 // GetVariantChrom
266 String GetVariantChrom(List pvar, int variant_num);
267 RcppExport SEXP _pgenlibr_GetVariantChrom(SEXP pvarSEXP, SEXP variant_numSEXP) {
268 BEGIN_RCPP
269 Rcpp::RObject rcpp_result_gen;
270 Rcpp::RNGScope rcpp_rngScope_gen;
271 Rcpp::traits::input_parameter< List >::type pvar(pvarSEXP);
272 Rcpp::traits::input_parameter< int >::type variant_num(variant_numSEXP);
273 rcpp_result_gen = Rcpp::wrap(GetVariantChrom(pvar, variant_num));
274 return rcpp_result_gen;
275 END_RCPP
276 }
277 // GetVariantPos
278 int GetVariantPos(List pvar, int variant_num);
279 RcppExport SEXP _pgenlibr_GetVariantPos(SEXP pvarSEXP, SEXP variant_numSEXP) {
280 BEGIN_RCPP
281 Rcpp::RObject rcpp_result_gen;
282 Rcpp::RNGScope rcpp_rngScope_gen;
283 Rcpp::traits::input_parameter< List >::type pvar(pvarSEXP);
284 Rcpp::traits::input_parameter< int >::type variant_num(variant_numSEXP);
285 rcpp_result_gen = Rcpp::wrap(GetVariantPos(pvar, variant_num));
286 return rcpp_result_gen;
287 END_RCPP
288 }
289 // GetVariantId
290 String GetVariantId(List pvar, int variant_num);
291 RcppExport SEXP _pgenlibr_GetVariantId(SEXP pvarSEXP, SEXP variant_numSEXP) {
292 BEGIN_RCPP
293 Rcpp::RObject rcpp_result_gen;
294 Rcpp::RNGScope rcpp_rngScope_gen;
295 Rcpp::traits::input_parameter< List >::type pvar(pvarSEXP);
296 Rcpp::traits::input_parameter< int >::type variant_num(variant_numSEXP);
297 rcpp_result_gen = Rcpp::wrap(GetVariantId(pvar, variant_num));
298 return rcpp_result_gen;
299 END_RCPP
300 }
301 // GetVariantsById
302 IntegerVector GetVariantsById(List pvar, String id);
303 RcppExport SEXP _pgenlibr_GetVariantsById(SEXP pvarSEXP, SEXP idSEXP) {
304 BEGIN_RCPP
305 Rcpp::RObject rcpp_result_gen;
306 Rcpp::RNGScope rcpp_rngScope_gen;
307 Rcpp::traits::input_parameter< List >::type pvar(pvarSEXP);
308 Rcpp::traits::input_parameter< String >::type id(idSEXP);
309 rcpp_result_gen = Rcpp::wrap(GetVariantsById(pvar, id));
310 return rcpp_result_gen;
311 END_RCPP
312 }
313 // GetAlleleCode
314 String GetAlleleCode(List pvar, int variant_num, int allele_num);
315 RcppExport SEXP _pgenlibr_GetAlleleCode(SEXP pvarSEXP, SEXP variant_numSEXP, SEXP allele_numSEXP) {
316 BEGIN_RCPP
317 Rcpp::RObject rcpp_result_gen;
318 Rcpp::RNGScope rcpp_rngScope_gen;
319 Rcpp::traits::input_parameter< List >::type pvar(pvarSEXP);
320 Rcpp::traits::input_parameter< int >::type variant_num(variant_numSEXP);
321 Rcpp::traits::input_parameter< int >::type allele_num(allele_numSEXP);
322 rcpp_result_gen = Rcpp::wrap(GetAlleleCode(pvar, variant_num, allele_num));
323 return rcpp_result_gen;
324 END_RCPP
325 }
326 // ClosePvar
327 void ClosePvar(List pvar);
328 RcppExport SEXP _pgenlibr_ClosePvar(SEXP pvarSEXP) {
329 BEGIN_RCPP
330 Rcpp::RNGScope rcpp_rngScope_gen;
331 Rcpp::traits::input_parameter< List >::type pvar(pvarSEXP);
332 ClosePvar(pvar);
333 return R_NilValue;
334 END_RCPP
335 }
336
337 static const R_CallMethodDef CallEntries[] = {
338 {"_pgenlibr_NewPgen", (DL_FUNC) &_pgenlibr_NewPgen, 4},
339 {"_pgenlibr_GetRawSampleCt", (DL_FUNC) &_pgenlibr_GetRawSampleCt, 1},
340 {"_pgenlibr_GetVariantCt", (DL_FUNC) &_pgenlibr_GetVariantCt, 1},
341 {"_pgenlibr_GetAlleleCt", (DL_FUNC) &_pgenlibr_GetAlleleCt, 2},
342 {"_pgenlibr_GetMaxAlleleCt", (DL_FUNC) &_pgenlibr_GetMaxAlleleCt, 1},
343 {"_pgenlibr_HardcallPhasePresent", (DL_FUNC) &_pgenlibr_HardcallPhasePresent, 1},
344 {"_pgenlibr_Buf", (DL_FUNC) &_pgenlibr_Buf, 1},
345 {"_pgenlibr_AlleleCodeBuf", (DL_FUNC) &_pgenlibr_AlleleCodeBuf, 1},
346 {"_pgenlibr_IntBuf", (DL_FUNC) &_pgenlibr_IntBuf, 1},
347 {"_pgenlibr_IntAlleleCodeBuf", (DL_FUNC) &_pgenlibr_IntAlleleCodeBuf, 1},
348 {"_pgenlibr_BoolBuf", (DL_FUNC) &_pgenlibr_BoolBuf, 1},
349 {"_pgenlibr_ReadHardcalls", (DL_FUNC) &_pgenlibr_ReadHardcalls, 4},
350 {"_pgenlibr_HasSparseHardcalls", (DL_FUNC) &_pgenlibr_HasSparseHardcalls, 3},
351 {"_pgenlibr_ReadSparseHardcalls", (DL_FUNC) &_pgenlibr_ReadSparseHardcalls, 4},
352 {"_pgenlibr_Read", (DL_FUNC) &_pgenlibr_Read, 4},
353 {"_pgenlibr_ReadAlleles", (DL_FUNC) &_pgenlibr_ReadAlleles, 4},
354 {"_pgenlibr_ReadIntList", (DL_FUNC) &_pgenlibr_ReadIntList, 2},
355 {"_pgenlibr_ReadList", (DL_FUNC) &_pgenlibr_ReadList, 3},
356 {"_pgenlibr_VariantScores", (DL_FUNC) &_pgenlibr_VariantScores, 3},
357 {"_pgenlibr_ClosePgen", (DL_FUNC) &_pgenlibr_ClosePgen, 1},
358 {"_pgenlibr_NewPvar", (DL_FUNC) &_pgenlibr_NewPvar, 3},
359 {"_pgenlibr_GetVariantChrom", (DL_FUNC) &_pgenlibr_GetVariantChrom, 2},
360 {"_pgenlibr_GetVariantPos", (DL_FUNC) &_pgenlibr_GetVariantPos, 2},
361 {"_pgenlibr_GetVariantId", (DL_FUNC) &_pgenlibr_GetVariantId, 2},
362 {"_pgenlibr_GetVariantsById", (DL_FUNC) &_pgenlibr_GetVariantsById, 2},
363 {"_pgenlibr_GetAlleleCode", (DL_FUNC) &_pgenlibr_GetAlleleCode, 3},
364 {"_pgenlibr_ClosePvar", (DL_FUNC) &_pgenlibr_ClosePvar, 1},
365 {NULL, NULL, 0}
366 };
367
368 RcppExport void R_init_pgenlibr(DllInfo *dll) {
369 R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
370 R_useDynamicSymbols(dll, FALSE);
371 }