library(GWASdata)
file <- system.file("extdata", "illumina_qxy.gds", package="GWASdata")
gds <- GdsIntensityReader(file)
# object without annotation
intenData <- IntensityData(gds)
# object with annotation
data(illuminaSnpADF, illuminaScanADF)
intenData <- IntensityData(gds, snpAnnot=illuminaSnpADF, scanAnnot=illuminaScanADF)
# dimensions
nsnp(intenData)
nscan(intenData)
# get snpID and chromosome
snpID <- getSnpID(intenData)
chrom <- getChromosome(intenData)
# get positions only for chromosome 22
pos22 <- getPosition(intenData, index=(chrom == 22))
# get other annotations
if (hasSex(intenData)) sex <- getSex(intenData)
plate <- getScanVariable(intenData, "plate")
rsID <- getSnpVariable(intenData, "rsID")
# get all snps for first scan
x <- getX(intenData, snp=c(1,-1), scan=c(1,1))
# starting at snp 100, get 10 snps for the first 5 scans
x <- getX(intenData, snp=c(100,10), scan=c(1,5))
close(intenData)
Run the code above in your browser using DataLab