plot.peaksDataset           package:flagme           R Documentation

_P_l_o_t_t_i_n_g _f_u_n_c_t_i_o_n_s _f_o_r _G_C_M_S _d_a_t_a _o_b_j_e_c_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     Store the raw data and optionally, information regarding signal
     peaks for a number of GCMS runs

_U_s_a_g_e:

     .plotpD(object,runs=1:length(object@rawdata),mzind=1:nrow(object@rawdata[[1]]),
                    mind=NULL,plotSampleLabels=TRUE,calcGlobalMax=FALSE,peakCex = 0.8,plotPeaks=TRUE,
                                plotPeakBoundaries=FALSE,plotPeakLabels=FALSE,plotMergedPeakLabels=TRUE,mlwd=3,
                                usePeaks=TRUE,plotAcrossRuns=FALSE,overlap=F,rtrange=NULL,cols=NULL,thin=1,
                                max.near=median(object@rawrt[[1]]),how.near=50,scale.up=1,...)
                                
     .plotpA(object,xlab="Peaks - run 1",ylab="Peaks - run 2",plotMatches=TRUE,matchPch=19,matchLwd=3,
                    matchCex=.5,matchCol="black",col=colorpanel(50,"black","blue","white"),
                                breaks=seq(0,1,length=51),...)
                                
     .plotcA(object,alignment=1,...)

_A_r_g_u_m_e_n_t_s:

  object: a 'peaksDataset', 'peaksAlignment' or 'clusterAlignment'
          object.

    runs: for 'peaksDataset' only: set of run indices to plot

   mzind: for 'peaksDataset' only: set of mass-to-charge indices to sum
          over (default, all)

    mind: for 'peaksDataset' only: matrix of aligned indices

plotSampleLabels: for 'peaksDataset' only: logical, whether to display
          sample labels

calcGlobalMax: for 'peaksDataset' only: logical, whether to calculate
          an overall maximum for scaling

 peakCex: character expansion factor for peak labels

plotPeaks: for 'peaksDataset' only: logical, whether to plot hashes for
          each peak

plotPeakBoundaries: for 'peaksDataset' only: logical, whether to
          display peak boundaries

plotPeakLabels: for 'peaksDataset' only: logical, whether to display
          peak labels

plotMergedPeakLabels: for 'peaksDataset' only: logical, whether to
          display 'merged' peak labels

    mlwd: for 'peaksDataset' only: line width of lines indicating the
          alignment

usePeaks: for 'peaksDataset' only: logical, whether to plot alignment
          of peaks (otherwise, scans)

plotAcrossRuns: for 'peaksDataset' only: logical, whether to plot
          across peaks when unmatched peak is given

 overlap: for 'peaksDataset' only: logical, whether to plot TIC/XICs
          overlapping

 rtrange: for 'peaksDataset' only: vector of length 2 giving start and
          end of the X-axis

    cols: for 'peaksDataset' only: vector of colours (same length as
          the length of runs)

    thin: for 'peaksDataset' only: when 'usePeaks=FALSE', plot the
          alignment lines every 'thin' values

max.near: for 'peaksDataset' only: where to look for maximum

how.near: for 'peaksDataset' only: how far away from 'max.near' to look

scale.up: for 'peaksDataset' only: a constant factor to scale the TICs

plotMatches: for 'peaksDataset' only: logical, whether to plot matches

    xlab: for 'peaksAlignment' and 'clusterAlignment' only: x-axis
          label

    ylab: for 'peaksAlignment' and 'clusterAlignment' only: y-axis
          label

matchPch: for 'peaksAlignment' and 'clusterAlignment' only: match
          plotting character

matchLwd: for 'peaksAlignment' and 'clusterAlignment' only: match line
          width

matchCex: for 'peaksAlignment' and 'clusterAlignment' only: match
          character expansion factor

matchCol: for 'peaksAlignment' and 'clusterAlignment' only: match
          colour

     col: for 'peaksAlignment' and 'clusterAlignment' only: vector of
          colours for colourscale

  breaks: for 'peaksAlignment' and 'clusterAlignment' only: vector of
          breaks for colourscale

alignment: for 'peaksAlignment' and 'clusterAlignment' only: the set of
          alignments to plot

     ...: further arguments passed to the 'plot' or 'image' command

_D_e_t_a_i_l_s:

     For 'peakDataset' objects, each TIC is scale to the maximum value
     (as specified by the 'how.near' and 'max.near' values).  The many
     parameters gives considerable flexibility of how the TICs can be
     visualized.

     For 'peakAlignment' objects, the similarity matrix is plotted and
     optionally, the set of matching peaks.  'clusterAlignment' objects
     are just a collection of all pairwise 'peakAlignment' objects.

_A_u_t_h_o_r(_s):

     Mark Robinson

_R_e_f_e_r_e_n_c_e_s:

     Mark D Robinson (2008).  Methods for the analysis of gas
     chromatography - mass spectrometry data _PhD dissertation_
     University of Melbourne.

_S_e_e _A_l_s_o:

     'plotImage', 'peaksDataset'

_E_x_a_m_p_l_e_s:

     require(gcspikelite)

     # paths and files
     gcmsPath<-paste(.find.package("gcspikelite"),"data",sep="/")
     cdfFiles<-dir(gcmsPath,"CDF",full=TRUE)
     eluFiles<-dir(gcmsPath,"ELU",full=TRUE)

     # read data
     pd<-peaksDataset(cdfFiles[1:3],mz=seq(50,550),rtrange=c(7.5,8.5))

     # image plot
     plot(pd,rtrange=c(7.5,8.5),plotPeaks=TRUE,plotPeakLabels=TRUE)

