Question: Gviz: add/change bands in ideogram
0
gravatar for Ludwig Geistlinger
4.6 years ago by
USA/NYC/CUNY
Ludwig Geistlinger50 wrote:

Hi,

 

As other users encountered as well: There is no information available on cytobands for my organism.

Specifically, I'm plotting chr12 of bosTau6 giving me an empty ideogram, which is fine.

 

gen <- "bosTau6"

chr <- "chr12"

start <- 71959908

end <- 77206892

ideoTrack <- IdeogramTrack(genome = gen, chromosome = chr)

plotTracks(ideoTrack, from=start, to=end, chromosome=chr)

 

However, I'm now wondering whether I am able draw such information myself in Gviz IdeogramTrack.

To my understanding this can be done via its 'bands' argument, a data.frame which I created according to the instruction on the man page:

> head(bands.df)

chrom chromStart chromEnd      name      gieStain
chr12     794259   801565 R1 darkseagreen3
chr12    1570237  1579468 R2 darkseagreen3
chr12    4293517  4302535 R3 darkseagreen3
chr12    4477103  4484840 R4 darkseagreen3
chr12    4502439  4546010 R5 darkseagreen3
chr12    6351849  6374949 R6 darkseagreen3

 

Creating the track accordingly,

> ideoTrack2 <- IdeogramTrack(genome = gen, chromosome = chr, bands=bands)

> plotTracks(ideoTrack, from=start, to=end, chromosome=chr)

 

keeps me running into that error:

Error in (ol[1] + 1):ol[2] : NA/NaN argument

 

By calling:

> str(ideoTrack2)

 

I tried to fill a necessary slots with appropriate information, but still got that error:

Did I do something obvious wrong and how to resolve this?

 

gviz • 974 views
ADD COMMENTlink modified 4.6 years ago • written 4.6 years ago by Ludwig Geistlinger50
Answer: Gviz: add/change bands in ideogram
0
gravatar for florian.hahne@novartis.com
4.6 years ago by
Switzerland

Hi Ludwig,

there are a couple of things that might go wrong here. The first is that the chromosomal bands table is not expected to contain gaps. If you have unstained bands those still need to be part of your table, with the gieStain set accordingly ('gneg', typically). That should get rid of the error message. In addition, the values in the gieStain section should map into the color vector that is returned by  biovizBase::getBioColor("CYTOBAND"). This is poorly documented, and I will add some more details in the next package version. Hope this gets you a bit further. If you still get stuck please send the whole bands.df data.frame for me to take a closer look.

Florian

ADD COMMENTlink written 4.6 years ago by florian.hahne@novartis.com1.6k
Answer: Gviz: add/change bands in ideogram
0
gravatar for Ludwig Geistlinger
4.6 years ago by
USA/NYC/CUNY
Ludwig Geistlinger50 wrote:

Hi Florian,

BTW: great work on the Gviz package, I found it to be the best among its kind and recommend it also to others!

Your suggestion to fill gaps in the bands df with gneg bands indeed resolved the error, however now the plot looks weird.

Please find the dataframe below. I used the code as above with

ideoTrack <- IdeogramTrack(genome = gen, chromosome = chr, bands=bands, fontsize=14)

instead.

A general remark: although I understand that the typical purpose is to depict the cytogenetic bands, I wonder why to restrict it (also in the color scheme) to it, as it can be very useful to depict other chromosomal features (structural variation, regulatory elements, chromatin type, etc) as well ...

Best,

Ludwig

 

> bands                                                      
    chrom chromStart chromEnd name gieStain                  
1   chr12          0    60757   R1     gneg                  
2   chr12      60758    97774   R2     acen                  
3   chr12      97775   166653   R3     gneg                  
4   chr12     166654   220568   R4     acen                  
5   chr12     220569   480554   R5     gneg                  
6   chr12     480555   499746   R6     acen                  
7   chr12     499747   532189   R7     gneg                  
8   chr12     532190   554012   R8     acen                  
9   chr12     554013   794258   R9     gneg                  
10  chr12     794259   801565  R10     acen                  
11  chr12     801566  1020126  R11     gneg                  
12  chr12    1020127  1048061  R12     acen                  
13  chr12    1048062  1162139  R13     gneg                  
14  chr12    1162140  1189469  R14     acen                  
15  chr12    1189470  1570236  R15     gneg                  
16  chr12    1570237  1579468  R16     acen                  
17  chr12    1579469  2282082  R17     gneg                  
18  chr12    2282083  2287414  R18     acen                  
19  chr12    2287415  2405193  R19     gneg                  
20  chr12    2405194  2411488  R20     acen                  
21  chr12    2411489  3313343  R21     gneg                  
22  chr12    3313344  3331493  R22     acen                  
23  chr12    3331494  3628354  R23     gneg                  
24  chr12    3628355  3643630  R24     acen                  
25  chr12    3643631  3933207  R25     gneg                  
26  chr12    3933208  3944561  R26     acen                  
27  chr12    3944562  4293516  R27     gneg                  
28  chr12    4293517  4302535  R28     acen                  
29  chr12    4302536  4477102  R29     gneg                  
30  chr12    4477103  4484840  R30     acen                  
31  chr12    4484841  4502438  R31     gneg                  
32  chr12    4502439  4546010  R32     acen                  
33  chr12    4546011  5413601  R33     gneg                  
34  chr12    5413602  5445066  R34     acen                  
35  chr12    5445067  5563754  R35     gneg                  
36  chr12    5563755  5587219  R36     acen                  
37  chr12    5587220  5806820  R37     gneg                  
38  chr12    5806821  5825451  R38     acen                  
39  chr12    5825452  6351848  R39     gneg                  
40  chr12    6351849  6374949  R40     acen                  
41  chr12    6374950  6761924  R41     gneg                  
42  chr12    6761925  6768490  R42     acen                  
43  chr12    6768491  7461103  R43     gneg                  
44  chr12    7461104  7499536  R44     acen                  
45  chr12    7499537  7648556  R45     gneg                  
46  chr12    7648557  7658832  R46     acen                  
47  chr12    7658833  7839205  R47     gneg                  
48  chr12    7839206  7855707  R48     acen                  
49  chr12    7855708  8146206  R49     gneg                  
50  chr12    8146207  8153991  R50     acen                  
51  chr12    8153992  8902021  R51     gneg                  
52  chr12    8902022  8926999  R52     acen                  
53  chr12    8927000  9123860  R53     gneg                  
54  chr12    9123861  9131032  R54     acen                  
55  chr12    9131033  9236463  R55     gneg                  
56  chr12    9236464  9273807  R56     acen                  
57  chr12    9273808  9318403  R57     gneg                  
58  chr12    9318404  9329498  R58     acen                  
59  chr12    9329499  9469855  R59     gneg                  
60  chr12    9469856  9479684  R60     acen                  
61  chr12    9479685 12090640  R61     gneg                  
62  chr12   12090641 12110002  R62     acen                  
63  chr12   12110003 12258900  R63     gneg                  
64  chr12   12258901 12264224  R64     acen                  
65  chr12   12264225 13159180  R65     gneg                  
66  chr12   13159181 13172924  R66     acen                  
67  chr12   13172925 19001087  R67     gneg                  
68  chr12   19001088 19087121  R68     acen                  
69  chr12   19087122 21264984  R69     gneg                  
70  chr12   21264985 21315343  R70     acen                  
71  chr12   21315344 21537798  R71     gneg                  
72  chr12   21537799 21554335  R72     acen                  
73  chr12   21554336 21966621  R73     gneg                  
74  chr12   21966622 21988137  R74     acen                  
75  chr12   21988138 22779993  R75     gneg                  
76  chr12   22779994 22786782  R76     acen                  
77  chr12   22786783 22855220  R77     gneg                  
78  chr12   22855221 22878192  R78     acen                  
79  chr12   22878193 23879994  R79     gneg                  
80  chr12   23879995 23890317  R80     acen                  
81  chr12   23890318 25874686  R81     gneg                  
82  chr12   25874687 25890155  R82     acen                  
83  chr12   25890156 26316052  R83     gneg                  
84  chr12   26316053 26405287  R84     acen                  
85  chr12   26405288 29463244  R85     gneg                  
86  chr12   29463245 29499088  R86     acen                  
87  chr12   29499089 30503902  R87     gneg                  
88  chr12   30503903 30518899  R88     acen                  
89  chr12   30518900 33029222  R89     gneg                  
90  chr12   33029223 33049169  R90     acen                  
91  chr12   33049170 33383868  R91     gneg                  
92  chr12   33383869 33389994  R92     acen                  
93  chr12   33389995 36612575  R93     gneg                  
94  chr12   36612576 36621026  R94     acen                  
95  chr12   36621027 38701629  R95     gneg                  
96  chr12   38701630 38818250  R96     acen                  
97  chr12   38818251 38882154  R97     gneg                  
98  chr12   38882155 38904964  R98     acen                  
99  chr12   38904965 38970996  R99     gneg                  
100 chr12   38970997 39022698 R100     acen                  
101 chr12   39022699 39056073 R101     gneg                  
102 chr12   39056074 39090987 R102     acen                  
103 chr12   39090988 39419159 R103     gneg                  
104 chr12   39419160 39443074 R104     acen                  
105 chr12   39443075 39734678 R105     gneg                  
106 chr12   39734679 39760293 R106     acen                  
107 chr12   39760294 39908763 R107     gneg                  
108 chr12   39908764 39925909 R108     acen                  
109 chr12   39925910 41970237 R109     gneg                  
110 chr12   41970238 42035077 R110     acen                  
111 chr12   42035078 42137656 R111     gneg                  
112 chr12   42137657 42229797 R112     acen                  
113 chr12   42229798 42513398 R113     gneg                  
114 chr12   42513399 42547666 R114     acen                  
115 chr12   42547667 42581530 R115     gneg                  
116 chr12   42581531 42649654 R116     acen                  
117 chr12   42649655 42704767 R117     gneg                  
118 chr12   42704768 42788042 R118     acen                  
119 chr12   42788043 43152867 R119     gneg                  
120 chr12   43152868 43271072 R120     acen                  
121 chr12   43271073 43878040 R121     gneg                  
122 chr12   43878041 43947769 R122     acen                  
123 chr12   43947770 45248032 R123     gneg                  
124 chr12   45248033 45297046 R124     acen                  
125 chr12   45297047 45557692 R125     gneg                  
126 chr12   45557693 45608128 R126     acen                  
127 chr12   45608129 45721076 R127     gneg                  
128 chr12   45721077 45752359 R128     acen                  
129 chr12   45752360 45800924 R129     gneg                  
130 chr12   45800925 45870499 R130     acen                  
131 chr12   45870500 46011658 R131     gneg                  
132 chr12   46011659 46029503 R132     acen                  
133 chr12   46029504 47862157 R133     gneg                  
134 chr12   47862158 47897912 R134     acen                  
135 chr12   47897913 47953449 R135     gneg                  
136 chr12   47953450 48005081 R136     acen                  
137 chr12   48005082 55322606 R137     gneg                  
138 chr12   55322607 55333531 R138     acen                  
139 chr12   55333532 56286812 R139     gneg                  
140 chr12   56286813 56309328 R140     acen                  
141 chr12   56309329 57003561 R141     gneg                  
142 chr12   57003562 57031460 R142     acen                  
143 chr12   57031461 57094159 R143     gneg                  
144 chr12   57094160 57237795 R144     acen                  
145 chr12   57237796 57907889 R145     gneg                  
146 chr12   57907890 57983987 R146     acen                  
147 chr12   57983988 58170768 R147     gneg                  
148 chr12   58170769 58193089 R148     acen                  
149 chr12   58193090 58828602 R149     gneg                  
150 chr12   58828603 58866062 R150     acen                  
151 chr12   58866063 59422897 R151     gneg                  
152 chr12   59422898 59433745 R152     acen                  
153 chr12   59433746 59608048 R153     gneg                  
154 chr12   59608049 59802195 R154     acen                  
155 chr12   59802196 60008601 R155     gneg                  
156 chr12   60008602 60030780 R156     acen
157 chr12   60030781 60607399 R157     gneg
158 chr12   60607400 60657478 R158     acen
159 chr12   60657479 62053006 R159     gneg
160 chr12   62053007 62086589 R160     acen
161 chr12   62086590 62774301 R161     gneg
162 chr12   62774302 62792301 R162     acen
163 chr12   62792302 62797023 R163     gneg
164 chr12   62797024 62813820 R164     acen
165 chr12   62813821 62940301 R165     gneg
166 chr12   62940302 62971996 R166     acen
167 chr12   62971997 63552566 R167     gneg
168 chr12   63552567 63560427 R168     acen
169 chr12   63560428 63967024 R169     gneg
170 chr12   63967025 63973118 R170     acen
171 chr12   63973119 64248797 R171     gneg
172 chr12   64248798 64265529 R172     acen
173 chr12   64265530 64485641 R173     gneg
174 chr12   64485642 64499888 R174     acen
175 chr12   64499889 65602531 R175     gneg
176 chr12   65602532 65617153 R176     acen
177 chr12   65617154 66623658 R177     gneg
178 chr12   66623659 66633840 R178     acen
179 chr12   66633841 66787560 R179     gneg
180 chr12   66787561 66802839 R180     acen
181 chr12   66802840 67869764 R181     gneg
182 chr12   67869765 67881293 R182     acen
183 chr12   67881294 67893525 R183     gneg
184 chr12   67893526 67906929 R184     acen
185 chr12   67906930 67975406 R185     gneg
186 chr12   67975407 67988132 R186     acen
187 chr12   67988133 70260456 R187     gneg
188 chr12   70260457 70274214 R188     acen
189 chr12   70274215 76881129 R189     gneg
190 chr12   76881130 76899347 R190     acen
191 chr12   76899348 77979450 R191     gneg
192 chr12   77979451 77989383 R192     acen
193 chr12   77989384 79733508 R193     gneg
194 chr12   79733509 79757037 R194     acen
195 chr12   79757038 82637053 R195     gneg
196 chr12   82637054 82708432 R196     acen
197 chr12   82708433 83062025 R197     gneg
198 chr12   83062026 83067339 R198     acen
199 chr12   83067340 86202918 R199     gneg
200 chr12   86202919 86211589 R200     acen
201 chr12   86211590 87582772 R201     gneg
202 chr12   87582773 87604411 R202     acen
203 chr12   87604412 89135898 R203     gneg
204 chr12   89135899 89184617 R204     acen
205 chr12   89184618 89284706 R205     gneg
206 chr12   89284707 89344542 R206     acen
207 chr12   89344543 89495989 R207     gneg
208 chr12   89495990 89602385 R208     acen
209 chr12   89602386 89729719 R209     gneg
210 chr12   89729720 89750607 R210     acen
211 chr12   89750608 90015694 R211     gneg
212 chr12   90015695 90049212 R212     acen
213 chr12   90049213 90121759 R213     gneg
214 chr12   90121760 90222650 R214     acen
215 chr12   90222651 90273761 R215     gneg
216 chr12   90273762 90281598 R216     acen
217 chr12   90281599 90375088 R217     gneg
218 chr12   90375089 90545697 R218     acen
219 chr12   90545698 90610642 R219     gneg
220 chr12   90610643 90974783 R220     acen
221 chr12   90974783 91163125 R221     gneg

 
 
 
ADD COMMENTlink written 4.6 years ago by Ludwig Geistlinger50
Answer: Gviz: add/change bands in ideogram
0
gravatar for florian.hahne@novartis.com
4.6 years ago by
Switzerland

"acen" is reserved to demark centromers, and thus receive a bit of special treatment. Try using "gpos50" instead. At least for me this produces a band pattern.

I will take a look at the code to see whether we can bake the whole concept a bit more generic. At least allowing for arbitrary color qualifiers should not be hard to implement.

ADD COMMENTlink written 4.6 years ago by florian.hahne@novartis.com1.6k
Answer: Gviz: add/change bands in ideogram
0
gravatar for Ludwig Geistlinger
4.6 years ago by
USA/NYC/CUNY
Ludwig Geistlinger50 wrote:

that works. great! thank you!

ADD COMMENTlink written 4.6 years ago by Ludwig Geistlinger50
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 269 users visited in the last hour