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

mark_dominant() deletes normalized_score in experiment@counts$TSSs$raw[sample] #202

Open
perinom opened this issue Jun 29, 2022 · 0 comments

Comments

@perinom
Copy link

perinom commented Jun 29, 2022

Hi,

I just realised that setting use_nomalized = TRUE in plot_seqeunce_logo() results in the following error after TSSs aggregation into TSRs:

Error in eval(jsub, SDenv, parent.frame()) : object 'normalized_score' not found

I traced it back to line 34 of extract_counts() where the function tries to extract the normalized_score column that is indeed not present. The score column is present but contains floating point numbers instead of integers. I guess it went through some kind of processing, but it does not coincide with the normalized_score calculated on TSSs before

As the error does not occur when only TSSs are present in the experiment object I checked the functions in between and this seems to happen during the call to mark_dominant()

------- EDIT -------
it only happens when setting use_normalized = T in mark_dominant()

Full traceback:


13. eval(jsub, SDenv, parent.frame())
12. eval(jsub, SDenv, parent.frame())
11. `[.data.table`(x, , `:=`(score, normalized_score))
10. x[, `:=`(score, normalized_score)]
9.  .f(.x[[i]], ...)
8. map(.x, .f, ...)
7. walk(return_samples, function(x) {
    x[, `:=`(score, normalized_score)]
    x[, `:=`(normalized_score, NULL)]
    return(x) ...
6. extract_counts(., "tss", samples, use_normalized)
5. map(signal_data, function(x) {
    x <- x[score >= threshold]
    return(x)
    })
4. preliminary_filter(., dominant, threshold)
3. experiment %>% extract_counts("tss", samples, use_normalized) %>%
    preliminary_filter(dominant, threshold)
2. .tss_sequences(experiment, samples, genome_assembly, threshold,
    use_normalized, distance, dominant, data_conditions)
1. plot_sequence_logo(exp, samples = "all", genome_assembly = assembly,
    threshold = threshold, use_normalized = TRUE, distance = 6,
    dominant = FALSE, data_conditions = NULL, ncol = 3, font_size = 10,
    base_colors = c(A = "#109649", C = "#255C99", G = "#F7B32C", ...
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

1 participant