Question: Metagene: file import and aesthetic customization
0
gravatar for JunLVI
2.1 years ago by
JunLVI40
Japan
JunLVI40 wrote:

 

 

Hi I was trying to perform a metagene analysis. 

I think I have gotten the files ready : a bed files + n bam files (sorted) 

my questions are somewhat naive:

1. how to import these file in order to perform analysis? 

in the vignette :

bam_files <- get_demo_bam_files()

regions <- get_demo_regions()

then, how about "my_own.bed" (~/current directory/my_own.bed), "my_own.bam" (~/current directory/my_own.bam)? 

2. is there any way to customize the plot? 

p <- plot_metagene(df) 

p + ggplot2::ggtitle("Managing large datasets")

looking at this example I tried: 

p <- mg$plot(title = "Demo metagene plot")

p + ggplot2::ggtitle("Managing large datasets")

it did not work out(error: non-numeric argument to binary operator)

nonetheless, 

p + ggplot2::ggtitle("Managing large datasets")


somehow suggest that ggplot2 maybe use to customize the plot...

 

 

 

R ggplot2 metagene • 382 views
ADD COMMENTlink modified 2.1 years ago by Charles Joly Beauparlant160 • written 2.1 years ago by JunLVI40
Answer: Metagene: file import and aesthetic customization
0
gravatar for Charles Joly Beauparlant
2.1 years ago by
Canada
Charles Joly Beauparlant160 wrote:

Hello JunLVI,

Most function in the metagene object (except those starting with get_) silently returns the object itself to allow chaining. If you wish to extract the plot to customize it you can use the get_plot function after the plot() call.

If you are familiar with ggplot2 and wish to have even more control on the way the data is plotted, you can extract the data.frame (with the get_data_frame function) that is formatted to be used directly by ggplot.

Thank you for your interest in metagene!

Cheers!

Charles.

ADD COMMENTlink written 2.1 years ago by Charles Joly Beauparlant160
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 204 users visited in the last hour