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)

