Package 'xmapbridge'

Title: Export plotting files to the xmapBridge for visualisation in X:Map
Description: xmapBridge can plot graphs in the X:Map genome browser. This package exports plotting files in a suitable format.
Authors: Tim Yates <[email protected]> and Crispin J Miller <[email protected]>
Maintainer: Chris Wirth <[email protected]>
License: LGPL-3
Version: 1.63.0
Built: 2024-07-12 04:46:49 UTC
Source: https://github.com/bioc/xmapbridge

Help Index


Export plotting files to the xmapBridge for visualisation in X:Map

Description

The XMapBridge is a Java application which allows you to plot graphs in the X:Map genome browser. This package exports plotting files in a suitable format for the XMapBridge to read.

Details

Package: xmapbridge
Type: Package
Version: 1.0
Date: 2008-08-11
License: LGPL-v3

Author(s)

Tim Yates and Crispin J Miller
Maintainer: Tim Yates <[email protected]>

References

Yates T, Okoniewski MJ, Miller CJ. X:Map: annotation and visualization of genome structure for Affymetrix exon array analysis. Nucleic Acids Res. 2008 Jan;36(Database issue):D780-6. Epub 2007 Oct 11.
http://nar.oxfordjournals.org/cgi/content/full/gkm779v1

See Also

xmap.plot
xmap.points
xmap.col
xmap.project.new
xmap.project.list
xmap.project.load
xmap.project.save
xmap.project.delete
xmap.graph.new
xmap.graph.list
xmap.graph.load
xmap.graph.save
xmap.graph.delete
xmap.plot.new
xmap.plot.list
xmap.plot.load
xmap.plot.save
xmap.plot.delete


Sample exon array dataset

Description

Data frame containing gene,exon and probeset IDs and probeset target locations for a subset of an Affmyetrix exon array dataset comparing two cell lines (mcf7 and mcf10a).

Usage

data(xmapbridge)

Details

The object is a subset (80 genes, 1747 probesets) of RMA processed Exon Array data with associated annotation. It was generated using the exonmap bioconductor package. More details on the original dataset can be found in Okoniewski MJ, Miller CJ. Comprehensive Analysis of Affymetrix Exon Arrays Using BioConductor. PLoS Computational Biology 2008, 4(2): e6 doi:10.1371/journal.pcbi.0040006.

Value

On loading, creates the object exon.data.

Author(s)

Crispin J Miller


Generate a colour integer for the xmapBridge

Description

Convert an R colour into the form 0xAARRGGBB as used by the xmapBridge

Usage

xmap.col(col,alpha)

Arguments

col

The R colour to convert

alpha

Change the colour's alpha value to the one specified

Details

Takes one or more hex strings, possibly with an alpha value, as used by R and converts them to an integer of the form 0xAARRGGBB to be used by the xmapBridge. If alpha is specified, then change the colours' alpha values to this, otherwise leave them as they were.

Author(s)

Crispin J Miller

See Also

xmap.plot
xmap.plot.new

Examples

require( RColorBrewer )
  transparent.greens <- xmap.col( brewer.pal( 5, "Greens" ), alpha=0x22 )

Underlying xmap methods for manipulating projects, graphs, and plots

Description

These methods are used to control xmap.projects, xmap.graphs and xmap.plots

A project contains one or more graphs, and a graph can contain one or more plots (each plot can have a different style)

A simpler method to generate X:Map graphs is to use the xmap.plot and xmap.points methods.

The xmap.debug method was introduced as otherwise the vignette would not print out id values as it was supposed to. For some reason Sweave ignores the show and as.character methods being overridden, and simply does its own thing.

Usage

xmap.debug( idobject, newlines=FALSE )

  xmap.project.new( name )
  xmap.project.list()
  xmap.project.load( projectid )
  xmap.project.save( projectid, data )
  xmap.project.delete( projectid )

  xmap.graph.new( projectid, name, desc, min, max, chr, start, stop, ylab="value",
                  species=c("homo_sapiens", "mus_musculus", "rattus_norvegicus") )
  xmap.graph.list( projectid )
  xmap.graph.load( graphid )
  xmap.graph.save( graphid, data )
  xmap.graph.delete( graphid )

  xmap.plot.new( graphid, name, x, y, 
                 type=c("scatter", "line", "bar", "step", "area", "steparea"),
                 col = NULL, dp = 2 )
  xmap.plot.list( graphid )
  xmap.plot.load( plotid )
  xmap.plot.save( plotid, data, x, y, dp = 2 )
  xmap.plot.delete( plotid )

Arguments

idobject

An id object for an xmapbridge project, graph or plot

newlines

Should the resultant string be nicely formatyted with newline characters?

name

The name for this object (stored in the NAME variable of the list returned by load)

projectid

The projectid (returned by xmap.project.new and as a list from xmap.project.list)

data

This is a list object for this particular object type

desc

The description for this item

min

The minimum y value for the graph

max

The maximum y value for the graph

chr

A string representing the chromosome this graph is to be drawn on

start

The BP that this graph should start on

stop

The BP that this graph reaches until. Must be greater than start

ylab

The label for the yaxis of this graph

species

The species that this graph is to be drawn on

graphid

The graphid returned by xmap.graph.new or xmap.graph.list

type

The type of graph you wish to draw

col

The colour of the graph defined as an integer in the format 0xAARRGGBB. See xmap.col

x

The points for the x-axis of this plot. These points must be offsets from the start of the graph, and not their actual chromosomal location

y

The points for the y-axis of this plot. Points where min>y or y >max will not be displayed

dp

The number of decimal places you want to save for the y-coordinates

plotid

The plotid which is returned by xmap.plot.new or xmap.plot.list

Value

xmap.graph.new returns the graphid of the created graph xmap.graph.list returns a vector of all graphs contained within the given project xmap.graph.load returns a list containing the parameters for the given graph xmap.graph.save

Author(s)

Tim Yates

See Also

xmap.plot
xmap.points
xmap.col
http://xmap.picr.man.ac.uk

Examples

# Create a new project
  projectid <- xmap.project.new( "A quick project" )

  # Create a graph in this project covering 100K bases on chromosome 1
  graphid <- xmap.graph.new( projectid, "A quick graph", "This is a quick graph", 
                            -10, 10, "1", 5000, 105000, species="homo_sapiens" )

  # Make our datasets
  x <- seq( 1000, 100000, by = 1000 )
  y <- runif( length( x ), -10, 10 )

  # Then add a plot to this graph
  xmap.plot.new( graphid, "Graph 1", x, y, type="area", col=0xAAFFEE00 )

  # And another one, in a different colour  
  a <- xmap.plot.new( graphid, "Graph 2", x, y, type="scatter", col=0xAA0000FF )
  
  cat( xmap.debug( a, newlines=TRUE ) )

  # At this point, we should be able to see the graphs using the XMapBridge application

  # Clean up our project file...
  xmap.project.delete( projectid )

Utility methods for quick graph generation

Description

These methods attempt to provide a simpler interface for generating X:Map graphs.

Usage

xmap.plot( x, y, species=c("homo_sapiens","mus_musculus","rattus_norvegicus"), 
             chr, xlim, ylim, main, sub, 
             type=c("scatter", "line", "bar", "step", "area", "steparea"), 
             xlab, ylab = "value", col, dp=2, projectid )
  xmap.points( x, y, type=c("scatter", "line", "bar", "step", "area", "steparea"),
             xlab, col, dp=2, graphid )

Arguments

x

The points for the x-axis of this plot. These points must be offsets from the start of the graph, and not their actual chromosomal location

y

The points for the y-axis of this plot. Points where min>y or y >max will not be displayed

species

The species that this graph is to be drawn on

chr

A string representing the chromosome this graph is to be drawn on

xlim

A range object describing the min and max BP for this graph. If ommitted, we call range on the x parameter

ylim

The maximum and minimum Y value for the graph. If ommitted, we call range on the y parameter

main

The main title

sub

A sub-title for this graph

type

The type of graph you wish to draw

xlab

The label for this plot

ylab

The label for the yaxis of this graph

col

The colour of the graph defined as an integer in the format 0xAARRGGBB. See xmap.col

dp

The number of decimal places you want to save for the y-coordinates

projectid

The projectid (returned by xmap.project.new and as a list from xmap.project.list. If this is not passed, on the first time of calling a new project will be created, and will be used on all subsequent calls)

graphid

The graphid returned by xmap.graph.new or xmap.graph.list. If this is not passed, it will use the last graph generated by xmap.plot.

Author(s)

Tim Yates

See Also

xmap.col
xmap.project.new
xmap.project.list
xmap.project.load
xmap.project.save
xmap.project.delete
xmap.graph.new
xmap.graph.list
xmap.graph.load
xmap.graph.save
xmap.graph.delete
xmap.plot.new
xmap.plot.list
xmap.plot.load
xmap.plot.save
xmap.plot.delete

Examples

x <- seq( 1000, 100000, by = 1000 )
  y <- runif( length( x ), -10, 10 )

  # This will create a new project, and graph, and add a plot to it
  xmap.plot( x, y, species="homo_sapiens", "1", main="A quick graph", 
             sub="Sub heading", type="area", xlab="Plot 1", col=0xAAFFBB00 )

  # This will add another plot to the same graph
  xmap.points( x, y, type="area", xlab="Plot 2", col=0xAA0000FF )