[BioC] chromosome ordering in cPlot()/cColor()

Martin Morgan mtmorgan at fhcrc.org
Tue Aug 25 18:40:49 CEST 2009


Hi Axel --

Axel.Klenk at Actelion.Com writes:

> Dear Biocore Team,
>
> I'm using cPlot()/cColor() from package annotate to produce chromosome
> plots and
> am very impressed how easily this can be achieved. However, unfortunately,
> the
> chromosomes are plotted in reverse alphabetical order, i.e. 1, 10, 11, etc.
> from bottom
> to top and I would like to reorder them to 1, 2, 3, ... from top to bottom
> but cannot find an
> easy way to do so... am I missing something here?
>
> I managed to get what I want by hacking buildChromLocation() but that's
> ugly and I don't
> want to maintain a modified function if not necessary.
>
> Would it be possible to add a replace method for the chromInfo slot to
> allow e.g.
>
> z <- buildChromLocation("hgug41112a")
> library("gtools") # for mixedsort()
> info <- chromInfo(z)
> chromInfo(z) <- info[rev(mixedsort(names(info)))]
>
> or maybe you can think of a better solution?

As a work-around, you might try

  example(cPlot) # get object z
  idx <- c("1", "5", "10", "X")
  zz <- initialize(z, chromLocs=chromLocs(z)[idx], chromInfo(z)[idx])
  cPlot(zz)
  
I'm not sure whether there are other consequences of this sort of
change, and if there are it would be good if you would let me know
before a more permanent solution is implemented.

Martin

> Thanks in advance,
>
>  - axel
>
>
> Axel Klenk
> Research Informatician
> Actelion Pharmaceuticals Ltd / Gewerbestrasse 16 / CH-4123 Allschwil /
> Switzerland
>
>
>
> The information of this email and in any file transmitted with it is strictly confidential and may be legally privileged.
> It is intended solely for the addressee. If you are not the intended recipient, any copying, distribution or any other use of this email is prohibited and may be unlawful. In such case, you should please notify the sender immediately and destroy this email.
> The content of this email is not legally binding unless confirmed by letter.
> Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of the sender's company. For further information about Actelion please see our website at http://www.actelion.com
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

-- 
Martin Morgan
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793



More information about the Bioconductor mailing list