Good day,

Although the documentation states "Generally not used directly", I'm trying it. 
A small example fails because the input is evaluated to be in the wrong format, 
but it doesn't seem so when I look at the variable type of strand.

debug(GAlignments)
GAlignments("chr1", 1L, strand = Rle(factor('+')), cigar = "10M")

debug: new("GAlignments", NAMES = names, seqnames = seqnames, 
    start = pos, cigar = cigar, strand = strand, elementMetadata = 
elementMetadata, 
    seqinfo = seqinfo)
Browse[2]> strand
factor-Rle of length 1 with 1 run
  Lengths: 1
  Values : +
Levels(1): +
Browse[2]> n
Error in validObject(.Object) : 
  invalid class “GAlignments” object: 'strand(x)' must be an unnamed 'factor' 
Rle with no NAs (and with levels +, - and *)

This looks like a false-positive to me. Also, it would increase readability if 
the constructor didn't run off the edge of the PDF page in the reference manual 
by using \preformatted. Also, I wonder why seqnames is automatically converted 
into a factor Rle, but strand isn't. Couldn't strand also use .asFactorRle?

--------------------------------------
Dario Strbenac
University of Sydney
Camperdown NSW 2050
Australia

_______________________________________________
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel

Reply via email to