Skip to content

Commit

Permalink
Better bug info
Browse files Browse the repository at this point in the history
  • Loading branch information
adrientaudiere committed Dec 19, 2024
1 parent d2242d7 commit 7f066cd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/dada_phyloseq.R
Original file line number Diff line number Diff line change
Expand Up @@ -2484,7 +2484,9 @@ physeq_or_string_to_dna <- function(physeq = NULL, dna_seq = NULL) {
#'
#' @examplesIf tolower(Sys.info()[["sysname"]]) != "windows"
#' \dontrun{
#' cutadapt_remove_primers("inst/extdata", "TTC", "GAA",
#' cutadapt_remove_primers(system.file("extdata", package="MiscMetabar"),
#' "TTC",
#' "GAA",
#' folder_output = tempdir()
#' )
#'
Expand Down
7 changes: 7 additions & 0 deletions R/targets_misc.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,14 @@ list_fastq_files <-
pattern_R1 = "_R1_",
pattern_R2 = "_R2_",
nb_files = Inf) {

if(length(list.files(path))==0) {
stop("There is no files in the folder ", path)
}
list_files <- list.files(path, pattern = pattern, full.names = TRUE)
if(length(list_files)==0) {
stop("None file in the folder ", path, " match the pattern ", pattern)
}
if (paired_end) {
fnfs <- sort(list_files[grepl(list_files, pattern = pattern_R1)])
fnrs <-
Expand Down

0 comments on commit 7f066cd

Please sign in to comment.