plot.p4cProfile.Rd
Plot a nearcis profile in the defined genomic scope. Can be applied on a single p4cProfile object or a two object for a comparison plot.
# S3 method for p4cProfile plot(p4c_obj1, p4c_obj2, trend_scale = "adaptive", png_fn = NULL, ...) plotSingleProf( p4c_obj, trend_scale, png_fn, plot.colorbar, add.func, xlim, ylim, trend_only, main, sd, ... ) plotCompProf( p4c_obj1, ref_p4c_obj, trend_scale, png_fn, col, min_win_cov, xlim, zlim, legend.text, ylim, dgram.method, main, sd )
p4c_obj1 | p4cProfile object created by |
---|---|
p4c_obj2 | Optional. A second p4cProfile object that will be compared to p4c_obj1. |
trend_scale | This parameter controls the smoothing method for the trendline. Either 'adaptive' (default), or, for fixed window trend, an integer with the desired size of the window (in restriction fragments units). |
png_fn | File to save the plot to. The default (NULL) will result in plotting on the current graphic device. |
plot.colorbar | Optional. Logical that defines whether a colorbar for the domainogram should be plotted. |
xlim | Similar to R basic graphics. A two elements vector that controls the genomic focus of the plot (X axis). |
ylim | Similar to R basic graphics. A two elements vector that controls the trendline ylim (In units of molecules). |
trend_only | Optional. Logical that defines whether only the trend plot should be displayed. |
main | Plot title. |
sd | Controls the margins of the trendline. The Number of bionomial theoretical standard deviations. |
col | Vector with length 2 that controls the colors of each profile in a comparative plot. |
min_win_cov | If the default smoothing method is used ('adaptive'), this parameter
controls the window size by requiring that no less than |
legend.text | Character vector with length 2. Controls the text in the color legend of the trendline. The default are the names of the profiles. |
filename1 | Optional. File for the bedgraph with the trendline of `p4c_obj1` |
filename2 | Optional. File for the bedgraph with the trendline of `p4c_obj2` |
This function calls two methods depending on whether it is called on a single object or two objects. When it is called on a single p4cProfile object it will produce a nearcis plot with smoothed trendline, and a contact intensity domainogram. Calling this function for two object will produce a comparison plot of where the 4C profiles are normalized for UMI coverage. The two p4cProfile objects must be constructed for the same bait with the same genomic scope.
#> Error in p4cNewProfile("umi4C_example_CMK_ANK1_TSS"): cannot find track umi4C_example_CMK_ANK1_TSS#> Error in plot(fc, xlim = c(41554693, 41754693), ylim = c(0, 5), plot.colorbar = TRUE): object 'fc' not found# Comparing two profiles: # Create a second profile fc_cond2 <- p4cNewProfile("umi4C_example_DND41_ANK1_TSS")#> Error in p4cNewProfile("umi4C_example_DND41_ANK1_TSS"): cannot find track umi4C_example_DND41_ANK1_TSS# Plot profiles plot(fc, fc_cond2, col=c('red', 'blue'), min_win_cov=100, main = '4C figure', png_fn='fig.png')#> Error in plot(fc, fc_cond2, col = c("red", "blue"), min_win_cov = 100, main = "4C figure", png_fn = "fig.png"): object 'fc' not found# }