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

Genomic visualization function #38

Open
rcavalcante opened this issue Mar 13, 2020 · 1 comment
Open

Genomic visualization function #38

rcavalcante opened this issue Mar 13, 2020 · 1 comment
Projects

Comments

@rcavalcante
Copy link
Member

Issues to resolve before implementation

A couple of questions come to mind:

  • Should we support visualization of a BSseq object without differential methylation tests?
  • Should we change the diff_ functions to include a flag like include_sample_meth which would be TRUE/FALSE and would append columns for sample-wise methylation to the diff_ function results?
    • There is value in doing that outside of plotting (we'll end up doing it in EpiCore pipelines anyway).
    • If we don't add an include_sample_meth flag, we would also need to require the BSseq object to append that data anyway.
  • Is this the kind of plotting function that requires wrapping in png() ... dev.off()?

Function call

plot_methylation(bs, diff_result, ...)

Description

A function to plot the result of diff_binomial(), diff_methylsig(), or diff_dss_test() on a genome track. Users may pass options through this function to GViz::plotTracks() to visualize other tracks alongside the methylation data.

Arguments

  • bs a BSseq object.
  • diff_result a GRanges object obtained from diff_binomial(), diff_methylsig(), or diff_dss_test().
  • ... parameters passed to GViz::plotTracks().

Values

An image (?) or an object (?).

Tests

If a file of the plot is returned, not sure. If an object, check correct class.

@rcavalcante rcavalcante added this to To do in Development via automation Mar 13, 2020
@rcavalcante rcavalcante moved this from To do to In progress in Development Mar 15, 2020
@rcavalcante
Copy link
Member Author

rcavalcante commented Mar 16, 2020

All plots will have some constant components:

  • GenomeAxisTrack()
  • IdeogramTrack(genome=gen, chromosome=chr)
    • We'll need to either pass a genome build to use with GenomeInfoDb::Seqinfo(), or make sure to grab the seqinfo from the object we're plotting.
  • GeneRegionTrack(geneModels, genome=gen, chromosome=chr, name="Gene Model")
  • plotTracks(dTrack, groups=rep(c("control", "treated"), each=3), type=c("a", "p"), legend=TRUE) does grouping and has many plotting type choices here. For group methylation data, it feels like a boxplot grouped by case and control is most appropriate.
    • We can either include -log10(p-value) track, or it would be really nice to include some sort of significance identifier (*, **, ***, for example), like we often see in papers.

@rcavalcante rcavalcante moved this from In progress to To do in Development Mar 17, 2020
@rcavalcante rcavalcante moved this from To do to Ideas in Development Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development
  
Ideas
Development

No branches or pull requests

1 participant