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

Blank bedgraph plot! #18

Open
Faylasoof opened this issue Jun 11, 2019 · 2 comments
Open

Blank bedgraph plot! #18

Faylasoof opened this issue Jun 11, 2019 · 2 comments

Comments

@Faylasoof
Copy link

I'm using the R "Sushi package to plot CTCF ChIPseq peaks (after MACS calling) in a bedgraph file. The file has been loaded and read by R:

A1 <-read.delim("CTCF_ChIPseq_MACSPeaks_mm9.bedgraph")
head(A1)
chrom chromstart chromend value
1 chr1 3002401 3003150 1.828043
2 chr1 3258151 3258900 1.546266
3 chr1 3315001 3315900 1.731632
4 chr1 3434551 3435300 1.581921
5 chr1 3438001 3438900 1.843272
6 chr1 3601051 3601950 10.541419
Plotting for mouse CTCF peaks (mm9) chrom12 as follows:
chrom = "12"
chromstart = 41402356
chromend = 41412356
Plotting command is below, where A1 = CTCF_ChIPSeq_MACsPeaks_mm9genome.bedgraph file which for all chromosomes:
plotBedgraph(A1, chrom, chromstart, chromend, range = NULL, color = SushiColors(2)(2)[1], lwd = 1, linecolor = NA, addscale = FALSE, overlay = FALSE, rescaleoverlay = FALSE, transparency = 0.5, flip = FALSE, xaxt = "none", yaxt = "none", xlab = "Chrom 12 mm9", ylab = "CTCF ChIPSeq Peaks", xaxs = "i", yaxs = "i", bty = "n", ymax = 1.04, colorbycol = NULL)

Error received is: [1] "not enough data within range to plot"

The plot is BLANK! Not even the x-axis or the y-axis, only the xlab as "Chrom 12 mm9" and the ylab as CTCF ChIPSeq Peaks". Using Rstudio Version 1.1.463 in Ubuntu 14.04 or 16.04 environments. What do I need to do now to get the plot I wish? Thanks in advance!

@Faylasoof
Copy link
Author

I think I've solved this issue, which I note is reported elsewhere too. I set the following: range= c(n, m) [e.g. range = c (0 ,10)] , addscale=TRUE , xaxt="s" , yaxt=" s" . Then I see the plot!

@Dunya-8a
Copy link

Thanks for leaving how you solved it! Still does not work for me but anyway great practice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants