plotCytoband             package:SNPchip             R Documentation

_A_d_d_s _c_y_t_o_b_a_n_d _t_o _p_l_o_t.

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

     Adds cytobands to views of chromosome copy number and genotype
     plots.

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

     plotCytoband(object, ...)

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

  object: Object of class 'AnnotatedSnpSet'

     ...: Additional arguments to par such as xlim, cex.axis, xaxs, and
          main.

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

     This function is meant to primarily be called by plotSnp and
     displayed beneath copy number and genotype estimates.

_V_a_l_u_e:

     Only recommended when plotting 5 or fewer chromosomes (resolution
     is poor otherwise). It is possible to plot partial views of a
     chromosome and its cytoband as well (see examples).

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

     Robert Scharpf and Jason Ting

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

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

     'plotSnp', 'AnnotatedSnpSet'

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

     data(annSnpset)
     data(cytoband)
     str(cytoband)
     chr1 <- annSnpset[chromosome(annSnpset) == "1", ]

     par(mfrow=c(1, 1), mar=c(0, 0, 3, 0), oma=c(5, 0, 3, 0))
     plotCytoband(object=chr1, chromosome="1", main="chromosome 1")

     plotSnp(chr1, 1, 5, oma=c(6, 4, 0, 3), cex=c(3,3,3),
             cex.axis=1.2, cex.legend=c(1.2, 1.2), addCytoband=TRUE,
             legend.location=c("topleft", "bottomleft"),
             height.cytoband=0.2, width.right=0.2, bty="o", cex.lab=1.5, ncol=1)

     ##The x-axis begins at the first SNP past the centromere
     qarm <- position(chr1) > centromere(chromosomeAnnotation(annSnpset), "1")[[2]] & !is.na(position(chr1))
     plotSnp(chr1[qarm, ], 1, 5, oma=c(6, 4, 0, 3), cex=rep(1,3), pch=rep(20,3),
             cex.axis=1.2, cex.legend=c(1.2, 1.2), addCytoband=TRUE,
             legend.location=c("topleft", "bottomleft"),
             height.cytoband=0.2, width.right=0.2, bty="o", cex.lab=1.5, ncol=1, xaxs="r")

     ##Not equivalent to previous plot because the x-axis begins at the end
     ##of the centromere (note that there are no SNPs close to the centromere).
     qarm <- c(centromere(chromosomeAnnotation(annSnpset), "1")[[2]],
               chromosomeSize(chromosomeAnnotation(annSnpset), "1")[[1]])
     plotSnp(chr1, 1, 5, oma=c(6, 4, 0, 3), cex=c(1, 1, 1), pch=rep(20, 3),
             cex.axis=1.2, cex.legend=c(1.2, 1.2), addCytoband=TRUE,
             legend.location=c("topleft", "bottomleft"),
             height.cytoband=0.2, width.right=0.2, bty="o", cex.lab=1.5, ncol=1, adj=0,
             xlim=qarm)

