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

Add gene-level 'obs_raw' support to 'sleuth_to_matrix' #189

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

apcamargo
Copy link

I added gene-level obs_raw support to sleuth_to_matrix by multiplying the normalized matrix by the size factors if the user request non-normalized values.

@@ -56,5 +50,13 @@ sleuth_to_matrix <- function(obj, which_df, which_units) {
s_data$target_id <- NULL
s_data <- as.matrix(s_data)

if (obj$gene_mode && which_df == "obs_raw") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you still want to issue a warning here to make sure the user understand the drawbacks of what he's doing? 😉

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! I think this is a nice idea to expose the drawbacks.
What do you think that should be warned here?

  • scaled_reads_per_base is a artificial measure to represent the read counts of genes (in this case, the same warning appear when the user requests obs_norm).
  • The raw values of scaled_reads_per_base are not normalized and, therefore, should not be directly compared.

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

Successfully merging this pull request may close these issues.

None yet

2 participants