markrobinsonuzh / CrispRVariants

23 stars 4 forks source link

Error in readsToTarget - normarg_at2(at, x) #11

Closed damjanmk closed 5 years ago

damjanmk commented 6 years ago

Hi,

I am getting a strange error from readsToTarget(). The method normarg_at2(at, x) throws an error, but I don't understand where this method is from, or what is the cause of the error. Would you be able to help me decrypt it?

Initialising CrisprSet chr6:33635013-33635042 with 1 samples

Error in .normarg_at2(at, x) : 
  some ranges in 'at' are off-limits with respect to their corresponding sequence in 'x'

In addition: Warning messages:
1: In doTryCatch(return(expr), name, parentenv, handler) :
  length of NULL cannot be changed
2: In rcAlns(as.character(strand(target)), orientation) :
  Target does not have a strand
Orienting reads to reference strand.
3: In doTryCatch(return(expr), name, parentenv, handler) :
  length of NULL cannot be changed
4: In rcAlns(as.character(strand(target)), orientation) :
  Target does not have a strand
Orienting reads to reference strand.

Enter a frame number, or 0 to exit   

 1: source("~/Documents/Lorena miSeq/miseq_pipeline-damjan-step3.R")
 2: withVisible(eval(ei, envir))
 3: eval(ei, envir)
 4: eval(ei, envir)
 5: miseq_pipeline-damjan-step3.R#106: readsToTarget(GAlignmentsList(alns), target = gdl, reference = reference, target.loc = tl)
 6: readsToTarget(GAlignmentsList(alns), target = gdl, reference = reference, target.loc = tl)
 7: .local(reads, target, ...)
 8: alnsToCrisprSet(reads, reference, target, reverse.complement, collapse.pairs, names, use.consensus, target.loc, verbose, chimeras = chimeras, mi
 9: do.call(cset$setCigarLabels, cig_labs_defaults)
10: do.call(cset$setCigarLabels, cig_labs_defaults)
11: (new("refMethodDef", .Data = function (labels = NULL, label.func = NULL, verbose = FALSE, ...) 
{
    if (isTRUE(verbose)) 
        message("Ren
12: .defaultCigarLabels(.self, ...)
13: BiocParallel::bplapply(cset$crispr_runs, function(crun) crun$getCigarLabels(target = cset$target, target.loc = target.loc, genome_to_target = g_
14: BiocParallel::bplapply(cset$crispr_runs, function(crun) crun$getCigarLabels(target = cset$target, target.loc = target.loc, genome_to_target = g_
15: lapply(X, FUN, ...)
16: FUN(X[[i]], ...)
17: withCallingHandlers({
    tryCatch({
        FUN(...)
    }, error = handle_error)
}, warning = handle_warning)
18: tryCatch({
    FUN(...)
}, error = handle_error)
19: tryCatchList(expr, classes, parentenv, handlers)
20: tryCatchOne(expr, names, parentenv, handlers[[1]])
21: value[[3]](cond)

Thank you, Damjan

damjanmk commented 5 years ago

The problem was legacy code using CrispRVariants 1.6.0 After installing that version, it works fine. Thanks