SorenKarst / longread_umi

GNU General Public License v3.0
76 stars 29 forks source link

R qc pipeline - file not found #56

Closed givdieri closed 1 year ago

givdieri commented 1 year ago

R qc script throws an error for not finding a file at linecode #166 The filename should be something like "umi_consensus _ssu_reference".

Such a file was not generated during the longread_umi nanopore pipeline - should it have been?

The command: lu_compile_qc( data_dir = "umi_out/qc", umi_consensus = "consensus_raconx3_medakax1.fa", reference = "zymo-ref-uniq_2019-10-28.fa", read_orientation = "read_orientation.txt", silva = "ssu_silva_db.fa", out_path = "validation/ONT_R9_ZYMO_rRNA_qc.Rdata"

The traceback: 15. h(simpleError(msg, call)) 14. .handleSimpleError(function (cond) .Internal(C_tryCatchHelper(addr, 1L, cond)), "'qc/consensus_raconx3_medakax1_ssu_zymo-ref-uniq_2019-10-28.sam' does not exist in current working directory ('~/test_umi/r9_zym-rRNA/umi_out').", base::quote(NULL)) 13. stop("'", path, "' does not exist", if (!is_absolute_path(path)) paste0(" in current working directory ('", getwd(), "')"), ".", call. = FALSE) 12. check_path(path) 11. standardise_path(file) 10. read_delimited(file, tokenizer, col_names = col_names, col_types = col_types, locale = locale, skip = skip, skip_empty_rows = skip_empty_rows, comment = comment, n_max = n_max, guess_max = guess_max, progress = progress) 9. readr::read_delim(file = paste(data_dir, "/", ref_ssu_sam, sep = ""), delim = "\t", col_names = sam_names) 8. stri_extract_all_regex(string, pattern, simplify = simplify, omit_no_match = TRUE, opts_regex = opts(pattern)) 7. str_extract_all(samdata$CIGAR, "\d+|[MIDS]") 6. do.call(rbind, .) 5. str_extract_all(samdata$CIGAR, "\d+|[MIDS]") %>% { lapply(., function(x) { m <- matrix(x, ncol = 2, byrow = T) MID <- sum(as.integer(m[, 1][m[, 2] != "S"])) ... at validation_functions.R#25 4. lu_cigar_err(.) 3. dplyr::transmute(., umi = gsub(";.", "", umi), ref_ssu_error = error, ref_ssu_tax = target) 2. readr::read_delim(file = paste(data_dir, "/", ref_ssu_sam, sep = ""), delim = "\t", col_names = sam_names) %>% lu_cigar_err() %>% dplyr::transmute(umi = gsub(";.", "", umi), ref_ssu_error = error, ref_ssu_tax = target) at validation_functions.R#166 1. lu_compile_qc(data_dir = "qc", umi_consensus = "consensus_raconx3_medakax1.fa", reference = "zymo-ref-uniq_2019-10-28.fa", read_orientation = "read_orientation.txt", silva = "ssu_silva_db.fa", out_path = "validation/ONT_R10_ZYMO_rRNA_qc.Rdata")