navinlabcode / copykit

Toolkit for single-cell copy number analysis
Other
16 stars 4 forks source link

Issue with creating CopyKit object with external data #101

Open rmapbut opened 1 day ago

rmapbut commented 1 day ago

Hi, I would be very grateful for your help with this:

I am trying to create a CopyKit object using a segment mean ratios matrix and a genomic ranges scaffold (a Granges object made using GenomicRanges). The length of the matrix and GenomicRanges objects are the same.

Below is an example of part of the matrix:

Cell1 Cell2 Cell3 Cell4 Cell5 Cell6 Cell7 Cell8 Cell9 Cell10 Cell11 Cell12 [1,] 2 2 2 2 2 2 2 2 2 2 2 2 [2,] 2 2 2 2 2 2 2 2 2 2 2 2 [3,] 2 2 2 2 2 2 2 2 2 2 2 2

And the code I am using:

obj <- CopyKit(list(segment_ratios = count_matrix), rowRanges = genomic_ranges_scaffold)

And the error I am getting:

Error in validObject(.Object) : invalid class “CopyKit” object: invalid object for slot "consensus" in class "CopyKit": got class "list", should be or extend class "data.frame"

I was wondering if you knew how best to address the error?

Thank you!

darlanminussi commented 17 hours ago

Hi, could you please provide a reproducible example?