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

Importing data from .hic and pyramid plot #335

Open
ionas23 opened this issue Aug 1, 2023 · 2 comments
Open

Importing data from .hic and pyramid plot #335

ionas23 opened this issue Aug 1, 2023 · 2 comments

Comments

@ionas23
Copy link

ionas23 commented Aug 1, 2023

Hello! I have a problem making pyramid plots.

I am loading the contacts using a large .hic file (33 GB):

Bonev_ESC_hic <- load_contacts(signal_path = '.../ES_mapq30.hic',
sample_name = "ESC",
resolution = 10e3,
balancing = 'KR', # this is the default
colour = "black")

But when I try to make a pyramid plot using this code

pyramid(exp = Bonev_ESC_hic,
chrom = 'chr7',
start = 5e6,
end=5.1e6,
colour = c(0, 50))

I get this error:

Warning message in min(x):
“no non-missing arguments to min; returning Inf”
Warning message in max(x):
“no non-missing arguments to max; returning -Inf”
Error in if (head(edge$y, 1) != 0) {: missing value where TRUE/FALSE needed
Traceback:

1. pyramid(exp = Bonev_ESC_hic, chrom = "chr7", start = 5e+06, end = 5100000, 
 .     colour = c(0, 50))
2. pyramid.contacts(exp = Bonev_ESC_hic, chrom = "chr7", start = 5e+06, 
 .     end = 5100000, colour = c(0, 50))
3. pyramid(y, colour = colour, ...)
4. pyramid.contacts_matrix(y, colour = colour, ...)
5. .core_pyramid(x = rowcoord[as.vector(row(exp$z))], y = colcoord[as.vector(col(exp$z))], 
 .     z = as.vector(exp$z), location = location, resolution = res, 
 .     ...)
6. .build_triangle_edge(edge, location, crop_x, crop_y)

Any help would be appreciated!
Thanks!

@teunbrand
Copy link
Collaborator

Does using pyramid(..., edge = NULL) help in any fashion?

@ionas23
Copy link
Author

ionas23 commented Aug 1, 2023

I forgot to mention that when I load contacts, I get

Reading data...

and then nothing else,

When I use pyramid(..., edge = NULL) I get this error

Warning message in min(x):
“no non-missing arguments to min; returning Inf”
Warning message in max(x):
“no non-missing arguments to max; returning -Inf”
Warning message in min(x):
“no non-missing arguments to min; returning Inf”
Warning message in max(x):
“no non-missing arguments to max; returning -Inf”
Warning message in min(x):
“no non-missing arguments to min; returning Inf”
Warning message in max(x):
“no non-missing arguments to max; returning -Inf”
Warning message in min(x):
“no non-missing arguments to min; returning Inf”
Warning message in max(x):
“no non-missing arguments to max; returning -Inf”
ERROR while rich displaying an object: Error in combine_vars():
! Faceting variables must have at least one value

Traceback:

  1. tryCatch(withCallingHandlers({
    . if (!mime %in% names(repr::mime2repr))
    . stop("No repr_* for mimetype ", mime, " in repr::mime2repr")
    . rpr <- repr::mime2repr[mime]
    . if (is.null(rpr))
    . return(NULL)
    . prepare_content(is.raw(rpr), rpr)
    . }, error = error_handler), error = outer_handler)
  2. tryCatchList(expr, classes, parentenv, handlers)
  3. tryCatchOne(expr, names, parentenv, handlers[[1L]])
  4. doTryCatch(return(expr), name, parentenv, handler)
  5. withCallingHandlers({
    . if (!mime %in% names(repr::mime2repr))
    . stop("No repr_* for mimetype ", mime, " in repr::mime2repr")
    . rpr <- repr::mime2repr[mime]
    . if (is.null(rpr))
    . return(NULL)
    . prepare_content(is.raw(rpr), rpr)
    . }, error = error_handler)
  6. repr::mime2repr[mime]
  7. repr_text.default(obj)
  8. paste(capture.output(print(obj)), collapse = "\n")
  9. capture.output(print(obj))
  10. withVisible(...elt(i))
  11. print(obj)
  12. print.ggplot(obj)
  13. ggplot_build(x)
  14. ggplot_build.ggplot(x)
  15. layout$setup(data, plot$data, plot$plot_env)
  16. setup(..., self = self)
  17. self$facet$compute_layout(data, self$facet_params)
  18. compute_layout(..., self = self)
  19. combine_vars(data, params$plot_env, rows, drop = params$drop)
  20. cli::cli_abort("Faceting variables must have at least one value")
  21. rlang::abort(message, ..., call = call, use_cli_format = TRUE,
    . .frame = .frame)
  22. signal_abort(cnd, .file)
    Error in file(con, "rb"): cannot open the connection
    Traceback:
    plot without title

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