Learn R Programming

solarius

Note: Manuscript of the package entitled as "solarius: an R interface to SOLAR for variance component analysis in pedigrees" is under revision in Bioinformatics journal.

R package wrapper to SOLAR

Install package

library(devtools)
install_github("ugcd/solarius")

References

Motivation

  • do not automate things in R, which SOLAR has already automated

    • call SOLAR from system.call with options and settings parameters
  • make it more R self-content and independent on other programs

    • phenotypes format as data.frame
    • make use of R plots like plotting pedigrees
    • make use of parallelization insfrastructure available in R
    • do not rely on tcl scripts anymore
  • get rid of salamboR artifacts (ancestor of solarius)

    • GAIT-specific functions
    • interface with other programs than SOLAR
    • lost version-control traces
    • dependence on old-school code from previous mantainers
    • dependence on (many) tcl scripts
  • get rid of SOLAR artifacts

    • store models/phenos in folders/files
  • make use of github infrastructure: collaborative coding, issues, gh-pages, etc

On the SOLAR side

  • Designed for the family-based studies (HHID, PROBND, FAMID)
    • support for extended pedigrees
  • Optimization routines for computing VC
  • Advanced polygenic models
    • support for multivariate models
    • liability threshold model
    • LRT applied to both covariates and variance components
  • Elaborated linkage models
    • Multi-pass
    • Multivariate
    • Adjustment of LOD scores
  • Association models
    • Speed-up with residuals
  • Advanced VC models
    • Sex-specificity (custom scripts)
    • Longitudinal (custom scripts)

On the R side

  • Interactive environment for data manipulation
  • Graphics
    • Plot residuals, QQ-plot, Manhattan plot
  • Parallel computing

Quick start

# load library
library(solarius)

# load data set for running polygenic and linkage models
data(dat30)

# univariate polygenic model
mod1 <- solarPolygenic(trait1 ~ age + sex, dat30, covtest = TRUE)
 
# bivariate polygenic model
mod2 <- solarPolygenic(trait1 + trait2 ~ 1, dat30,
  polygenic.options = '-testrhoe -testrhog')

# specify directory with IBD matrices and run linkage model
mibddir <- system.file('extdata', 'solarOutput',
  'solarMibdsCsv', package = 'solarius') 
link <- solarMultipoint(trait1 ~ 1, dat30,
  mibddir = mibddir, chr = 5)

# load data set and run association model in parallel
data(dat50)
assoc <- solarAssoc(trait ~ age + sex, phenodata,
  kinship = kin, snpdata = genodata, cores = 2)

Copy Link

Version

Install

install.packages('solarius')

Monthly Downloads

27

Version

0.3.0.2

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Last Published

December 13th, 2015

Functions in solarius (0.3.0.2)

matchIdNames

Match ID column names
snpdata2solar

Export snp genotypes, genotype covariates and amp to SOLAR
availableTransforms

Get a list of available transforms.
plotManh

Plot the association results
df2solar

Export phenotype and pedigree data into SOLAR files
solarPolyAssoc

S3 class solarPolyAssoc.
readPhen

Read plain-text table files phen and ped
package.file

Alternative to system.file
solarAssoc

Run association analysis.
dat30

dat30 data set adapted from multic R package
matchMapNames

Match map column names
plotPed

Plot the pedigree
solar

Call SOLAR program from R
annotate

Annotate SNPs in association study
modelPar

Get a parameter value from solarius models.
getFormulaStr

Get formula string from a solarPolygenic object
plotKinship2

Plot the double kinship matrix
solarMultipoint

Run multipoint linkage analysis.
solarReadFiles

Read SOLAR output files in a directory
solarAssocClass

S3 class solarAssoc.
solarBaeysAvgPolygenicClass

S3 class solarBaeysAvgPolygenic
solarMultivarClass

S3 class solarMultivar.
solarKinship2

Compute empirical double kinship matrix by SOLAR
phenodata

dat50 data set adapted from FFBSKAT R package
explainedVarProp

Get explained variances for a group of SOLAR models.
solarPolygenic

Run polygenic analysis.
transformTrait

Transform a trait.
tabplot

S3 method tabplot
loadExamplesPhen

Load the example data (GAW10) from SOLAR.
solarPar

Get a parameter value from SOLAR model files.
solarPolygenicClass

S3 class solarPolygenic.
solarMultipointClass

S3 class solarMultipoint.
transformData

Apply transforms to a data set.
annotateSNPs

Annotate SNPs
loadMulticPhen

Load the complete data set from R package multic
plotRes

Plot the residuals of a polygenic model