plotBed R data frame - last line plotted with line 1
1
0
Entering edit mode
waqasnayab • 0
@waqasnayab-10130
Last seen 8.6 years ago

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.

 

 

sushi plotBed data.frame • 1.3k views
ADD COMMENT
0
Entering edit mode
waqasnayab • 0
@waqasnayab-10130
Last seen 8.6 years ago

Hi,

I made it. There is no bug or any formatting issue in the plot. The problem is in my input (column no. 7 – row column). I gave the same numbering to two different transcription factors that’s why they overlapped. Everything sorted now.

Thanks for everyone,

Regards,

Waqas.

ADD COMMENT

Login before adding your answer.

Traffic: 631 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