Metagene: file import and aesthetic customization
1
0
Entering edit mode
JunLVI ▴ 40
@junlvi-8996
Last seen 6.3 years ago
Japan

 

 

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...

 

 

 

metagene R ggplot2 • 1.5k views
ADD COMMENT
0
Entering edit mode
@charles-joly-beauparlant-4777
Last seen 5.6 years ago
Canada

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 COMMENT

Login before adding your answer.

Traffic: 503 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6