Description Usage Arguments Value Examples
View source: R/getSnpWeights.R
This is a very simple function that extracts for a number of SNPs their p-value from an association result file, e.g. generated by PLINK.
| 1 2 3 4 5 6 | getSnpWeights(
  snps, 
  gwas.resultfile, 
  pColname = "P", 
  snpColname = "SNP"
) 
 | 
| snps | character. A vector of SNP identifiers for that p-values are extracted from  | 
| gwas.resultfile | character. Path/filename to the file containing SNPs and p-values. Has to contain a column header line and be readable by the  | 
| pColname | character. Name of the column containing p-values. | 
| snpColname | character. Name of the column containing SNP identifiers. | 
A vector containing wheights which are 1 plus the difference to the smallest log P among all SNPs requested. Names of the elements are the according SNP IDs.
| 1 2 3 4 | ## path to example data
gwas.resultfile <- system.file("extdata", "example.gwas", package = "boostSeq")
getSnpWeights(snps = c("rs8411", "rs7960808"), gwas.resultfile)  
 | 
Loading required package: genetics
Loading required package: combinat
Attaching package: 'combinat'
The following object is masked from 'package:utils':
    combn
Loading required package: gdata
sh: 1: cannot create /dev/null: Permission denied
gdata: Unable to locate valid perl interpreter
gdata: 
gdata: read.xls() will be unable to read Excel XLS and XLSX files
gdata: unless the 'perl=' argument is used to specify the location of a
gdata: valid perl intrpreter.
gdata: 
gdata: (To avoid display of this message in the future, please ensure
gdata: perl is installed and available on the executable search path.)
sh: 1: cannot create /dev/null: Permission denied
gdata: Unable to load perl libaries needed by read.xls()
gdata: to support 'XLX' (Excel 97-2004) files.
gdata: Unable to load perl libaries needed by read.xls()
gdata: to support 'XLSX' (Excel 2007+) files.
gdata: Run the function 'installXLSXsupport()'
gdata: to automatically download and install the perl
gdata: libaries needed to support Excel XLS and XLSX formats.
Attaching package: 'gdata'
The following object is masked from 'package:stats':
    nobs
The following object is masked from 'package:utils':
    object.size
The following object is masked from 'package:base':
    startsWith
Loading required package: gtools
Loading required package: MASS
Loading required package: mvtnorm
NOTE: THIS PACKAGE IS NOW OBSOLETE.
  The R-Genetics project has developed an set of enhanced genetics
  packages to replace 'genetics'. Please visit the project homepage
  at http://rgenetics.org for informtion.
Attaching package: 'genetics'
The following objects are masked from 'package:base':
    %in%, as.factor, order
Loading required package: lpSolveAPI
rs7960808    rs8411 
 1.000000  1.485491 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.