Hi,
I am using sushi package for visualizing genome data.
My data frame looks like this:
head (mydata):
chrom start end name score strand row
1 COSN17118087 23 36 AP2D_f1 0 . 1
2 COSN17118087 15 34 BHE41_f1 0 . 2
3 COSN17118087 7 15 COT1_si 0 . 3
4 COSN17118087 6 15 COT2_f1 0 . 4
5 COSN17118087 6 25 HEN1_si 0 . 5
6 COSN17118087 21 29 HTF4_f1 0 . 6
tail (mydata):
chrom start end name score strand row
19 COSN17118087 6 22 THA_f2 0 . 18
20 COSN17118087 3 19 THB_do 0 . 19
21 COSN17118087 7 23 THB_do 0 . 19
22 COSN17118087 7 16 THB_f1 0 . 20
23 COSN17118087 21 30 TWST1_f1 0 . 21
24 COSN17118087 32 40 ZIC3_f1 0 . 22
My R code is:
mydata = read.table ("svlfctrs.bed" , header = T)
> chrom = "COSN17118087"
> chromstart = 1
> chromend = 41
> mydata$color =maptocolors(mydata$row,col=SushiColors(6))
> plotBed(beddata = mydata,chrom = chrom, chromstart = chromstart,chromend =chromend, rownumber = mydata$row, type ="region", color=mydata$color,row="given",plotbg="grey95",rowlabels=unique(mydata$name),rowlabelcol=unique(mydata$color),rowlabelcex=0.75)
> labelgenome(chrom,chromstart,chromend,n=10,scale="bp")
The problem is with the plot. http://s31.postimg.org/chblg444b/waq_biostr_sushi.png
The data point of first line, that is, 1 COSN17118087 23 36 AP2D_f1 0 . 1 merges with the last data point of my data frame, that is, 24 COSN17118087 32 40 ZIC3_f1 0 . 22
Is there any way to solve the issue?
Thanks,
Waqas.