Skip to content

Commit 9bac795

Browse files
Fixed error with primersearch and primersearch_raw when there is a single match to a single query
1 parent 898475a commit 9bac795

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
## Current
44

55
* When an ordered factor is supplied to the `groups` argument of `compare_groups`, the order of levels is used to arrange the results. This can be used to change the order of groups when the output is used with `heat_tree_matrix` (issue [#323](https://github.com/grunwaldlab/metacoder/issues/323)).
6+
* Added `calc_diff_abund_deseq2` function to use DESeq2 to produce output like `compare_group` useful for `heat_tree_matrix`
7+
* Fixed error with `primersearch` and `primersearch_raw` when there is a single match to a single query (issue [#326](https://github.com/grunwaldlab/metacoder/issues/326))
68

79
## metacoder 0.3.5
810

R/primersearch.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ parse_primersearch <- function(file_path) {
8989
"\tAmplimer length: ([0-9]+) bp", sep = '\n')
9090
primer_data <- stringr::str_match_all(primer_chunks, pattern)
9191
primer_data <- as.data.frame(cbind(rep(names(primer_chunks), vapply(primer_data, nrow, numeric(1))),
92-
do.call(rbind, primer_data)[, -1]), stringsAsFactors = FALSE)
92+
do.call(rbind, primer_data)[, -1, drop = FALSE]), stringsAsFactors = FALSE)
9393
# Reformat amplicon data
9494
colnames(primer_data) <- c("pair_name", "amplimer", "input", "name", "f_primer", "f_start",
9595
"f_mismatch", "r_primer", "r_start", "r_mismatch")

src/RcppExports.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55

66
using namespace Rcpp;
77

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+
813
// euclid
914
double euclid(NumericVector a, NumericVector b);
1015
RcppExport SEXP _metacoder_euclid(SEXP aSEXP, SEXP bSEXP) {

0 commit comments

Comments
 (0)