getSnpAnnotation           package:SNPchip           R Documentation

_R_e_t_r_i_e_v_e_s _S_N_P-_l_e_v_e_l _a_n_n_o_t_a_t_i_o_n

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

     SNP-level annotation currently includes the db SNP identifier,
     chromosome, physical position, strand, and fragment length.

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

     getSnpAnnotation(object, ...)

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

  object: An object derived from 'eSet'.  

     ...: Additional arguments

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

     Currently, this function supports only the Affymetrix 100k and
     500k SNP chips.  The 'featureNames' in the 'eSet' object must be
     valid Affymetrix identifiers.  Two options exist for adding
     SNP-level annotation to an object:

     1. The default method is to use the annotation packages maintained
     by Bioconductor.   This is the preferred method as the annotation
     packages are continuously updated.  Using the default method
     requires that the annotation slot in the 'eSet' object be exactly
     identical to 1 of the 4 annotation packages currently provided:

     a. pd.mapping50k.hind240 b. pd.mapping50k.xba240 c.
     pd.mapping250k.nsp d. pd.mapping250k.sty

     Note that if the R package oligo was used to summarize genotype
     calls in the 'eSet' object, the annotation slot is already
     provided.

     2. Manually download the annotation provided by NetAffx and
     convert the file to an object of class 'AnnotatedDataFrame'.  The
     SNPs in the 'AnnotatedDataFrame' must be in the same order as the
     SNPs in the object derivied from 'eSet'.

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

     An object of class 'AnnotatedDataFrame'

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

     Robert Scharpf

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

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

     'oligoSnpSet', 'AnnotatedDataFrame', 'annotation'

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

     ##Default method for adding SNP-level annotation
       data(sample.snpset)
     ## Not run: 
     ##Requires pd.mapping50k.xba240 annotation package
       snp.annotation <- getSnpAnnotation(sample.snpset)
       snp.annotation
       class(snp.annotation)
       identical(featureNames(obj), featureNames(snp.annotation))
       featureData(sample.snpset) <- snp.annotation
       fvarLabels(sample.snpset)
     ## End(Not run)

     ##Using NetAffx annotation (already saved as a data.frame)
     ## Not run: 
       
       try(load(url("http://biostat.jhsph.edu/~iruczins/publications/sm/2006.scharpf.bioinfo/mapping/mapping50kXba240.rda")))
       reorderRows <- match(featureNames(sample.snpset), as.character(mapping50kXba240$Probe.Set.ID))
       netaffx.annotation <- mapping50kXba240[reorderRows, ]
       fD <- as(netaffx.annotation, "AnnotatedDataFrame")
       featureData(sample.snpset) <- fD
       varLabels(featureData(sample.snpset))
     ## End(Not run)

