ealeelab / rtea

2 stars 2 forks source link

File '/rtea/brainvar/rtea/precount_HSB272.rtea.txt' does not exist or is non-readable #4

Open Lynuxoo opened 3 months ago

Lynuxoo commented 3 months ago

Hello,

I tried to run the pipeline in my conda environment. In the beginning, it worked successfully. When it reached ctea stage, I got the following error messages.

1: filterSimpleSite(ctea)
Error: File '/rtea/brainvar/rtea/precount_HSB272.rtea.txt' does not exist or is non-readable. getwd()=='/rd/huangfl/rtea'
3: stop(gettextf(fmt, ..., domain = domain), domain = NA, call. = FALSE)
2: stopf("File '%s' does not exist or is non-readable. getwd()=='%s'", 
       file, getwd())
1: fread(precntfile)

Exit status: 1

I don't know why it occured and how I can solve it. The following is my command line.

bash rtea.sh /rd/data/brainvar/rnaseq/fastq/272.R1.merged.fastq.gz /rd/data/brainvar/rnaseq/fastq/272.R2.merged.fastq.gz HSB272 /rd/reference/grch38_snp_tran 16 /rd/rtea/brainvar hg38 resume

Thanks for your help!

Lynuxoo commented 3 months ago

I rechecked the error message and discovered that the source of the error is the filterSimpleSite(ctea) function.

Error in `stringr::str_count()`:
! `string` must be a vector, not a <DNAStringSet> object.
Backtrace:
    ▆
 1. ├─filterSimpleSite(ctea)
 2. │ └─stringr::str_count(refrootseq, "A")
 3. │   └─stringr:::check_lengths(string, pattern)
 4. │     └─vctrs::vec_size_common(...)
 5. └─vctrs:::stop_scalar_type(`<fn>`(`<DNAStrnS>`), "string", `<env>`)
 6.   └─vctrs:::stop_vctrs(...)
 7.     └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)

To fix this, I transformed refrootseq to the expected type using as.character(refrootseq). This resolved the initial error, but a new set of errors appeared:

Error: BiocParallel errors
  4 remote errors, element index: 5, 6, 14, 17
  2872 unevaluated and other errors
  first remote error:
Error in subsample && mrecords > maxReads: 'length = 2' in coercion to 'logical(1)'

[2024-07-23 04:43:50 PM CST] Counting done.
Error in rbindlist(lcnt): Item 1 of input is not a data.frame, data.table or list

Error in cntdt[, .N] : incorrect number of dimensions
Calls: countClippedReads.ctea -> stopifnot
In addition: Warning message: 
call dbDisconnect() when finished working with a connection
2: stopifnot(ctea[, .N] == cntdt[, .N])
1: countClippedReads.ctea(ctea, bamfile, threads = threads)

Exit status: 1

These errors are quite complex and I'm having trouble understanding their origin and how to resolve them. Any help or insights would be greatly appreciated.

Many thanks!