// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#include <Rcpp.h>

using namespace Rcpp;

// compute_Top_statistic_from_ranks
Rcpp::IntegerVector compute_Top_statistic_from_ranks(Rcpp::List Ranks, double prop);
RcppExport SEXP _scran_compute_Top_statistic_from_ranks(SEXP RanksSEXP, SEXP propSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< Rcpp::List >::type Ranks(RanksSEXP);
    Rcpp::traits::input_parameter< double >::type prop(propSEXP);
    rcpp_result_gen = Rcpp::wrap(compute_Top_statistic_from_ranks(Ranks, prop));
    return rcpp_result_gen;
END_RCPP
}
// choose_middle_effect_size
Rcpp::NumericVector choose_middle_effect_size(Rcpp::List Pvals, Rcpp::List Effects, double prop);
RcppExport SEXP _scran_choose_middle_effect_size(SEXP PvalsSEXP, SEXP EffectsSEXP, SEXP propSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< Rcpp::List >::type Pvals(PvalsSEXP);
    Rcpp::traits::input_parameter< Rcpp::List >::type Effects(EffectsSEXP);
    Rcpp::traits::input_parameter< double >::type prop(propSEXP);
    rcpp_result_gen = Rcpp::wrap(choose_middle_effect_size(Pvals, Effects, prop));
    return rcpp_result_gen;
END_RCPP
}
// combine_rho
Rcpp::List combine_rho(int Ngenes, Rcpp::IntegerVector first, Rcpp::IntegerVector second, Rcpp::NumericVector Rho, Rcpp::NumericVector Pval, Rcpp::IntegerVector Order);
RcppExport SEXP _scran_combine_rho(SEXP NgenesSEXP, SEXP firstSEXP, SEXP secondSEXP, SEXP RhoSEXP, SEXP PvalSEXP, SEXP OrderSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< int >::type Ngenes(NgenesSEXP);
    Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type first(firstSEXP);
    Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type second(secondSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type Rho(RhoSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type Pval(PvalSEXP);
    Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type Order(OrderSEXP);
    rcpp_result_gen = Rcpp::wrap(combine_rho(Ngenes, first, second, Rho, Pval, Order));
    return rcpp_result_gen;
END_RCPP
}
// compute_blocked_stats_lognorm
Rcpp::List compute_blocked_stats_lognorm(Rcpp::RObject mat, Rcpp::IntegerVector block, int nblocks, Rcpp::NumericVector sf, double pseudo);
RcppExport SEXP _scran_compute_blocked_stats_lognorm(SEXP matSEXP, SEXP blockSEXP, SEXP nblocksSEXP, SEXP sfSEXP, SEXP pseudoSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< Rcpp::RObject >::type mat(matSEXP);
    Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type block(blockSEXP);
    Rcpp::traits::input_parameter< int >::type nblocks(nblocksSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type sf(sfSEXP);
    Rcpp::traits::input_parameter< double >::type pseudo(pseudoSEXP);
    rcpp_result_gen = Rcpp::wrap(compute_blocked_stats_lognorm(mat, block, nblocks, sf, pseudo));
    return rcpp_result_gen;
END_RCPP
}
// compute_blocked_stats_norm
Rcpp::List compute_blocked_stats_norm(Rcpp::RObject mat, Rcpp::IntegerVector block, int nblocks, Rcpp::NumericVector sf);
RcppExport SEXP _scran_compute_blocked_stats_norm(SEXP matSEXP, SEXP blockSEXP, SEXP nblocksSEXP, SEXP sfSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< Rcpp::RObject >::type mat(matSEXP);
    Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type block(blockSEXP);
    Rcpp::traits::input_parameter< int >::type nblocks(nblocksSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type sf(sfSEXP);
    rcpp_result_gen = Rcpp::wrap(compute_blocked_stats_norm(mat, block, nblocks, sf));
    return rcpp_result_gen;
END_RCPP
}
// compute_blocked_stats_none
Rcpp::List compute_blocked_stats_none(Rcpp::RObject mat, Rcpp::IntegerVector block, int nblocks);
RcppExport SEXP _scran_compute_blocked_stats_none(SEXP matSEXP, SEXP blockSEXP, SEXP nblocksSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< Rcpp::RObject >::type mat(matSEXP);
    Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type block(blockSEXP);
    Rcpp::traits::input_parameter< int >::type nblocks(nblocksSEXP);
    rcpp_result_gen = Rcpp::wrap(compute_blocked_stats_none(mat, block, nblocks));
    return rcpp_result_gen;
END_RCPP
}
// compute_residual_stats_lognorm
Rcpp::List compute_residual_stats_lognorm(Rcpp::NumericMatrix qr, Rcpp::NumericVector qraux, Rcpp::RObject inmat, Rcpp::NumericVector sf, double pseudo);
RcppExport SEXP _scran_compute_residual_stats_lognorm(SEXP qrSEXP, SEXP qrauxSEXP, SEXP inmatSEXP, SEXP sfSEXP, SEXP pseudoSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type qr(qrSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type qraux(qrauxSEXP);
    Rcpp::traits::input_parameter< Rcpp::RObject >::type inmat(inmatSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type sf(sfSEXP);
    Rcpp::traits::input_parameter< double >::type pseudo(pseudoSEXP);
    rcpp_result_gen = Rcpp::wrap(compute_residual_stats_lognorm(qr, qraux, inmat, sf, pseudo));
    return rcpp_result_gen;
END_RCPP
}
// compute_residual_stats_none
Rcpp::List compute_residual_stats_none(Rcpp::NumericMatrix qr, Rcpp::NumericVector qraux, Rcpp::RObject inmat);
RcppExport SEXP _scran_compute_residual_stats_none(SEXP qrSEXP, SEXP qrauxSEXP, SEXP inmatSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type qr(qrSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type qraux(qrauxSEXP);
    Rcpp::traits::input_parameter< Rcpp::RObject >::type inmat(inmatSEXP);
    rcpp_result_gen = Rcpp::wrap(compute_residual_stats_none(qr, qraux, inmat));
    return rcpp_result_gen;
END_RCPP
}
// get_null_rho
Rcpp::NumericVector get_null_rho(int Ncells, int Niters, Rcpp::List Seeds, Rcpp::IntegerVector Streams);
RcppExport SEXP _scran_get_null_rho(SEXP NcellsSEXP, SEXP NitersSEXP, SEXP SeedsSEXP, SEXP StreamsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< int >::type Ncells(NcellsSEXP);
    Rcpp::traits::input_parameter< int >::type Niters(NitersSEXP);
    Rcpp::traits::input_parameter< Rcpp::List >::type Seeds(SeedsSEXP);
    Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type Streams(StreamsSEXP);
    rcpp_result_gen = Rcpp::wrap(get_null_rho(Ncells, Niters, Seeds, Streams));
    return rcpp_result_gen;
END_RCPP
}
// get_null_rho_design
Rcpp::NumericVector get_null_rho_design(Rcpp::NumericMatrix qr, Rcpp::NumericVector qraux, int Niters, Rcpp::List Seeds, Rcpp::IntegerVector Streams);
RcppExport SEXP _scran_get_null_rho_design(SEXP qrSEXP, SEXP qrauxSEXP, SEXP NitersSEXP, SEXP SeedsSEXP, SEXP StreamsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type qr(qrSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type qraux(qrauxSEXP);
    Rcpp::traits::input_parameter< int >::type Niters(NitersSEXP);
    Rcpp::traits::input_parameter< Rcpp::List >::type Seeds(SeedsSEXP);
    Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type Streams(StreamsSEXP);
    rcpp_result_gen = Rcpp::wrap(get_null_rho_design(qr, qraux, Niters, Seeds, Streams));
    return rcpp_result_gen;
END_RCPP
}
// cyclone_scores
Rcpp::NumericVector cyclone_scores(Rcpp::RObject exprs, Rcpp::IntegerVector marker1, Rcpp::IntegerVector marker2, Rcpp::IntegerVector indices, int niters, int miniters, int minpairs, Rcpp::List seeds, Rcpp::IntegerVector streams);
RcppExport SEXP _scran_cyclone_scores(SEXP exprsSEXP, SEXP marker1SEXP, SEXP marker2SEXP, SEXP indicesSEXP, SEXP nitersSEXP, SEXP minitersSEXP, SEXP minpairsSEXP, SEXP seedsSEXP, SEXP streamsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< Rcpp::RObject >::type exprs(exprsSEXP);
    Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type marker1(marker1SEXP);
    Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type marker2(marker2SEXP);
    Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type indices(indicesSEXP);
    Rcpp::traits::input_parameter< int >::type niters(nitersSEXP);
    Rcpp::traits::input_parameter< int >::type miniters(minitersSEXP);
    Rcpp::traits::input_parameter< int >::type minpairs(minpairsSEXP);
    Rcpp::traits::input_parameter< Rcpp::List >::type seeds(seedsSEXP);
    Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type streams(streamsSEXP);
    rcpp_result_gen = Rcpp::wrap(cyclone_scores(exprs, marker1, marker2, indices, niters, miniters, minpairs, seeds, streams));
    return rcpp_result_gen;
END_RCPP
}
// overlap_exprs
Rcpp::List overlap_exprs(Rcpp::RObject exprs, Rcpp::List groups, double lfc);
RcppExport SEXP _scran_overlap_exprs(SEXP exprsSEXP, SEXP groupsSEXP, SEXP lfcSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< Rcpp::RObject >::type exprs(exprsSEXP);
    Rcpp::traits::input_parameter< Rcpp::List >::type groups(groupsSEXP);
    Rcpp::traits::input_parameter< double >::type lfc(lfcSEXP);
    rcpp_result_gen = Rcpp::wrap(overlap_exprs(exprs, groups, lfc));
    return rcpp_result_gen;
END_RCPP
}
// overlap_exprs_paired
Rcpp::NumericMatrix overlap_exprs_paired(Rcpp::RObject exprs, Rcpp::IntegerVector left, Rcpp::IntegerVector right, Rcpp::List groups, double lfc);
RcppExport SEXP _scran_overlap_exprs_paired(SEXP exprsSEXP, SEXP leftSEXP, SEXP rightSEXP, SEXP groupsSEXP, SEXP lfcSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< Rcpp::RObject >::type exprs(exprsSEXP);
    Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type left(leftSEXP);
    Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type right(rightSEXP);
    Rcpp::traits::input_parameter< Rcpp::List >::type groups(groupsSEXP);
    Rcpp::traits::input_parameter< double >::type lfc(lfcSEXP);
    rcpp_result_gen = Rcpp::wrap(overlap_exprs_paired(exprs, left, right, groups, lfc));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_scran_compute_Top_statistic_from_ranks", (DL_FUNC) &_scran_compute_Top_statistic_from_ranks, 2},
    {"_scran_choose_middle_effect_size", (DL_FUNC) &_scran_choose_middle_effect_size, 3},
    {"_scran_combine_rho", (DL_FUNC) &_scran_combine_rho, 6},
    {"_scran_compute_blocked_stats_lognorm", (DL_FUNC) &_scran_compute_blocked_stats_lognorm, 5},
    {"_scran_compute_blocked_stats_norm", (DL_FUNC) &_scran_compute_blocked_stats_norm, 4},
    {"_scran_compute_blocked_stats_none", (DL_FUNC) &_scran_compute_blocked_stats_none, 3},
    {"_scran_compute_residual_stats_lognorm", (DL_FUNC) &_scran_compute_residual_stats_lognorm, 5},
    {"_scran_compute_residual_stats_none", (DL_FUNC) &_scran_compute_residual_stats_none, 3},
    {"_scran_get_null_rho", (DL_FUNC) &_scran_get_null_rho, 4},
    {"_scran_get_null_rho_design", (DL_FUNC) &_scran_get_null_rho_design, 5},
    {"_scran_cyclone_scores", (DL_FUNC) &_scran_cyclone_scores, 9},
    {"_scran_overlap_exprs", (DL_FUNC) &_scran_overlap_exprs, 3},
    {"_scran_overlap_exprs_paired", (DL_FUNC) &_scran_overlap_exprs_paired, 5},
    {NULL, NULL, 0}
};

RcppExport void R_init_scran(DllInfo *dll) {
    R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
    R_useDynamicSymbols(dll, FALSE);
}
