Learn R Programming

snpEnrichment (version 1.7.0)

Chromosome-class: Class Chromosome

Description

This class is defined to summarize the enrichment analysis about a chromosome.

Arguments

Objects from the Class

chromosome is defined to build an object of class Chromosome in order to compute an enrichment analysis. A Chromosome object contains the original data, a list of SNPs, some results and resampling data. When created, an Chromosome object is "empty". readEnrichment initializes a Chromosome object with value from PLINK computation and user's files. In this step, only the fields "Data", "LD", "SNP" are filled. reSample fills the fields: Table, EnrichmentRatio, Z, PValue and Resampling of a Chromosome.

Note that if reSample is executed on an Chromosome every new resampling is added to the original ones, pre-existing statistics are erased and computed again with the new resampling set.

Extends

Class EnrichSNP, directly.

See Also

Overview : snpEnrichment-package Classes : Enrichment, Chromosome, EnrichSNP Methods : plot, reSample, getEnrichSNP, excludeSNP, compareEnrichment, enrichment, is.enrichment, chromosome, is.chromosome Functions : initFiles, writeLD, readEnrichment

Examples

Run this code
Data <- structure(
    list(
        SNP = c("rs4970420", "rs3766178",
                "rs10910030", "rs10910036",
                "rs2234167", "rs6661861"),
        PVALUE = c(0.9244, 0.167, 0.01177, 0.4267, 0.9728, 0.4063),
        CHR = c(1, 1, 1, 1, 1, 1),
        POS = c(1106473, 1478180, 2035684, 2183754, 2494330, 3043121),
        MAF = c(0.2149, 0.3117, 0.374, 0.3753, 0.1565, 0.06101),
        eSNP = c(0, 1, 1, 0, 0, 0),
        xSNP = c(0, 1, 1, 0, 0, 0)
    ),
    .Names = c("SNP", "PVALUE", "CHR", "POS", "MAF", "eSNP", "xSNP"),
    row.names = c("rs4970420", "rs3766178",
                  "rs10910030", "rs10910036",
                  "rs2234167", "rs6661861"),
class = "data.frame")

toyChr <- chromosome(Data = Data)
show(toyChr)
toyChr

toyChr <- chromosome()
toyChr["Data"] <- Data
toyChr

is.chromosome(toyChr) # TRUE

Run the code above in your browser using DataLab