GENOVA icon indicating copy to clipboard operation
GENOVA copied to clipboard

how to create CS_discovery objsect from extrenal compartment results?

Open tan5251 opened this issue 2 years ago • 3 comments

how to create CS_discovery object when using extrenal compartment results?

tan5251 avatar Jan 18 '24 08:01 tan5251

Please see https://github.com/robinweide/GENOVA/issues/273#issuecomment-925606754

teunbrand avatar Jan 18 '24 08:01 teunbrand

I do not fullly understand it. Can you help me? here is my code: EDL <- load_contacts(signal_path ='../../hic_files/EDL.juicer.1.0.hic',resolution = 50000,sample_name = "EDL",balancing = "T",colour = "black" cs <- compartment_score(EDL) bdg <- read.table("EDL.50kb.bed",header=T) head(bdg) chrom start end EDL 1 1 0 50000 0.6647921 2 1 50000 100000 0.5358432 3 1 100000 150000 0.5442570 4 1 150000 200000 0.6440792 5 1 200000 250000 0.6039383 6 1 250000 300000 0.5219431 cs$compart_scores <-bdg pdf("2.pdf") saddle_out<- saddle(EDL,CS_discovery=cs,bins=50)

Error in [.data.table(scores, , :=(part, inverse.rle(attr(CS_discovery, : Supplied 47837 items to be assigned to 48714 items of column 'part'. If you wish to 'recycle' the RHS please use rep() to make this intent clear to readers of your code. In addition: Warning message: The 'CS_discovery' object is unsigned. It is strongly recommended that comparment scores are signed with sign_comparmentscore().

tan5251 avatar Jan 18 '24 08:01 tan5251

Thanks. it works.

tan5251 avatar Jan 18 '24 09:01 tan5251