-
Notifications
You must be signed in to change notification settings - Fork 94
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
Improvements to shiny and plot functions (solving several open issues) #143
Conversation
+ Gene view adapts to whether `gene_mode` is `TRUE` or not. + Transcript view now displays a message if the sleuth object is in gene mode.
…en in gene mode + added 'gene_to_gene' function, analogous to 'transcripts_from_gene' function + added code to make sure the transcript version of gene viewer does not execute when in gene mode, and vice versa
+ switched to pheatmap package to produce the plot + add ability to cluster the rows and columns + add ability to annotate the columns with covariates
+ add 'scaled_reads_per_base' unit so gene mode can be used with this function + add option to cluster transcripts as well as samples + add ability to use a transformation function (not just a string)
+ add option to cluster targets for transcripts/gene heat map + add option to cluster by sample for sample heat map + add option to add annotations for all possible covariates for sample heat map
+ switch to use of pheatmap + add options to customize the color palette, with low-, medium-, and high-expression colors + add option to adjust x-axis angle, similar to sample heat map + add option to annotate covariates for the samples + add '...' option to customize the pheatmap (e.g. add transcript annotations)
…mall misc changes
Additional note: I added in the |
R/plots.R
Outdated
@@ -318,7 +318,7 @@ plot_pc_variance <- function(obj, | |||
#' @param units either 'est_counts' ('scaled_reads_per_base' for gene_mode) or 'tpm' | |||
#' @param trans a string pointing to a function to use for the transformation. | |||
#' @param grouping a string from the columns of \code{sample_to_covariates} in | |||
#' the sleuth object for which to group and color by | |||
#' the sleuth object for which to group and color by. At this time, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you remember what you were going to type here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, whoops. This comment was originally going to say that "At this time, only one column can be used"; however, I implemented a version that can handle more than one column, as they exist in the table. You can revert this line back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome, thanks!
R/sleuth.R
Outdated
#' Get the \code{target_id} of a gene using other gene identifiers | ||
#' | ||
#' @param obj a \code{sleuth} object | ||
#' @param test a character string denoting which beta to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note to self: remove extra documentation here
…ments + see pull request pachterlab#143 for details on the specific changes
Here is a list of issues solved and enhancements:
#124: this was due to a mistake in how shiny and the plots handled the new sleuth object API when its
obj$gene_mode
wasTRUE
. This is now fixed:extra_bootstrap_summary
— andread_bootstrap_tpm
if they want to see TPM) — which are essential for use withtranscript view
andgene view
.bs_quants
to still haveest_counts
as the label when the unit wasscaled_reads_per_base
. This is likely what was causing the problem for users who used the options above and still had an error. This is now fixed.transcript mode
orgene mode
.In addition to the above changes, several changes were made to the
transcript view
andgene view
to accommodate whengene_mode
isTRUE
:obj$gene_mode
isTRUE
, thegene view
on shiny now acts similarly to the oldtranscript view
, where you can specify a gene ID and you'll get the bootstrap plot for that gene. It correctly can handle eitherTPM
orscaled_reads_per_base
. Similar to thegene view
for transcripts, you can use alternative gene identifiers.obj$gene_mode
isTRUE
,transcript view
is now disabled (since there is no way to access normalized transcript data without rerunningsleuth prep
). I couldn't figure out how to easily hide the tab, so the tab just shows a message.In addition to #124, there were other issues handled in this pull request:
plot_qq
. Thanks to @a-slide for identifying the problem!plot_group_density
to handle more than one covariate, and improved the error reporting for that function.scaled_reads_per_base
unit if the object was ingene mode
:pheatmap
package nowobj$samples_to_covariates
sleuth_live
.Remaining to-dos:
enhance shiny to handle the extra heatmap functionality.