Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to create CS_discovery objsect from extrenal compartment results? #341

Open
tan5251 opened this issue Jan 18, 2024 · 3 comments
Open

Comments

@tan5251
Copy link

tan5251 commented Jan 18, 2024

how to create CS_discovery object when using extrenal compartment results?

@teunbrand
Copy link
Collaborator

Please see #273 (comment)

@tan5251
Copy link
Author

tan5251 commented Jan 18, 2024

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
Copy link
Author

tan5251 commented Jan 18, 2024

Thanks. it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants