Sorry didn't realize I was using an old version on a remote machine. I will
update the documentation about requirements for DataFrame. The showAsCell
should be optional but it's not very robust. I will work on this. Also, I'll
make DataFrame(I(aln1)) work.

On Tue, Feb 22, 2011 at 8:39 PM, Martin Morgan <mtmorgan@fhcrc.org> wrote:

> On 02/22/2011 08:20 PM, Michael Lawrence wrote:
> > AlignedRead complains when drop=FALSE is passed to [, but it seems like
> this
> > should be allowed. This breaks things like putting an AlignedRead in a
> > DataFrame.
>
> Is this with
>
> > packageDescription("ShortRead")$Version
> [1] "1.9.14"
>
> (which because of build system issues seems only to be in svn at the
> moment)? I have
>
> > example(readAligned)
> > aln1[1, drop=TRUE]
> class: AlignedRead
> length: 1 reads; width: 35 cycles
> chromosome: NA
> position: 2652
> strand: +
> alignQuality: NumericQuality
> alignData varLabels: nMatch nextBestAlignQuality
>
> but also
>
> > df = DataFrame(seq_len(length(aln1)))
> > df[["aln"]] = aln1
> > df1 = df[1:10,]
> > df1[["aln"]]
> class: AlignedRead
> length: 10 reads; width: 35 cycles
> chromosome: NA NA ... NA NA
> position: 2652 2652 ... 353 1498
> strand: + + ... + +
> alignQuality: NumericQuality
> alignData varLabels: nMatch nextBestAlignQuality
> > df1
> DataFrame with 1000 rows and 2 columns
> Error in as.matrix(format(do.call(data.frame, lapply(object, function(x)
> showAsCell(head(x,  :
>  error in evaluating the argument 'x' in selecting a method for
> function 'as.matrix'
>
> and I wasn't sure what the rules were for making a class
> DataFrame-compatible.
>
> Martin
>
>
> >
> > Michael
> >
> >       [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > Bioc-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/bioc-devel
>
>
> --
> Computational Biology
> Fred Hutchinson Cancer Research Center
> 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109
>
> Location: M1-B861
> Telephone: 206 667-2793
>

	[[alternative HTML version deleted]]

