Description Usage Arguments Details Author(s) References See Also Examples
This function calculates the B allele frequency and the log R ratio values for samples by either plate or by study.
1 2 3 4 5 6 7 8 | BAFfromGenotypes(intenData, genoData,
filename, file.type = c("gds", "ncdf"),
min.n.genotypes = 2,
call.method = c("by.plate", "by.study"),
plate.name = "plate",
block.size = 5000,
precision="single", compress="LZMA_RA:1M",
verbose = TRUE)
|
intenData |
|
genoData |
|
filename |
The name of the genotype GDS or netCDF file to create |
file.type |
The type of file to create ("gds" or "ncdf") |
min.n.genotypes |
The minimum number of samples for each genotype at any SNP in order to have non-missing B allele freqency and log R ratio. Setting this parameter to 2 or a similar value is recommended. |
call.method |
If call.method is 'by.plate', the B allele frequency and log R ratio are calculated for samples delineated by plates. This is the default method. If call.method is 'by.study', the calculation uses all samples at once. If a study does not have plate specifications, 'by.study' is the call.method that must be used. |
plate.name |
Character string specifying the name of the plate variable in intenData or genoData. By default, the plate.name is simply 'plate' but oftentimes there are variations, such as 'plateID' or 'plate.num'. |
block.size |
An integer specifying the number of SNPs to be loaded at one time. The recommended value is around 1000, but should vary depending on computing power. |
precision |
A character value indicating whether floating point numbers should be stored as "double" or "single" precision. |
compress |
The compression level for variables in a GDS file (see
|
verbose |
Logical value specifying whether to show progress information. |
Because this function can take a considerable amount of time and space, sufficient attention should be given to the value used for block.size
.
Caitlin McHugh
Peiffer D.A., Le J.M., Steemers F.J., Chang W., Jenniges T., and et al. High-resolution genomic profiling of chromosomal aberrations using infinium whole-genome genotyping. Genome Research, 16:1136-1148, 2006.
IntensityData
, GenotypeData
,
chromIntensityPlot
, BAFfromClusterMeans
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | ## Not run:
# create IntensityData and GenotypeData objects from netCDF
library(GWASdata)
data(affySnpADF)
data(affyScanADF)
nsamp <- nrow(affyScanADF)
xyfile <- system.file("extdata", "affy_qxy.nc", package="GWASdata")
xyNC <- NcdfIntensityReader(xyfile)
xyData <- IntensityData(xyNC, snpAnnot=affySnpADF, scanAnnot=affyScanADF)
genofile <- system.file("extdata", "affy_geno.nc", package="GWASdata")
genoNC <- NcdfGenotypeReader(genofile)
genoData <- GenotypeData(genoNC, snpAnnot=affySnpADF, scanAnnot=affyScanADF)
# calculate BAF and LRR
blfile <- tempfile()
BAFfromGenotypes(xyData, genoData, blfile, file.type="ncdf", min.n.genotypes=2,
call.method="by.plate", plate.name="plate")
blNC <- NcdfIntensityReader(blfile)
baf <- getBAlleleFreq(blNC)
lrr <- getLogRRatio(blNC)
close(xyData)
close(genoData)
close(blNC)
file.remove(blfile)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.