Git Product home page Git Product logo

solarius's Introduction

cran version downloads total downloads research software impact

Table of content

About solarius

SOLAR is known as the old-school player in the quantitative trait loci (QTLs) mapping field (>2600 citations), which variance components or linear mixed models are implemented especially for the analysis of related individuals in pedigrees.

solarius is an R package to interface SOLAR and to run its main models: polygenic, association and linkage.

Model SOLAR cmd solarius function Input data format
Polygenic polygenic solarPolygenic phen: R data.frame (ID/FA/MO pedigree-fields)
Linkage multipoint solarMultipoint MIBD: SOLAR
Association mga solarAssoc SNP: R matrix, SOLAR, PLINK (markers/imputed)

The solarius package also enables parallel computation of association / linkage models to make genome-wide scans more efficient.

solarius references

Install

To install the official release from CRAN:

install.packages("solarius")

To install the latest development version from source on GitHub (master branch):

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

Note 1: Starting from version 3.*, solarius is not supported for Windows. DESCRIPTION file has a special line OS_type: unix. This is a clear limitation of the solarius package that comes from the dependency on SOLAR. See also the SOLAR FAQ and the question 4 "Can SOLAR-Eclipse only be downloaded in the linux version?".

Note 2: The solarius user needs to install and register SOLAR, that might be the most annoying part of the installation process. Please see the Installation section of the tutorial vignette.

Quick start

Please see the vignette minimal.html.

Citation

To cite the solarius package in publications use:

  Ziyatdinov et al., solarius: an R interface to SOLAR for variance
  component analysis in pedigrees, Bioinformatics (2016)

A BibTeX entry for LaTeX users is:

  @article{ziyatdinov2016solarius,
    title = {solarius: an R interface to SOLAR for variance component analysis in pedigrees},
    author = {Andrey Ziyatdinov and Helena Brunel and Angel Martinez-Perez and Alfonso Buil and Alexandre Perera and Jose Manuel Soria},
    year = {2016},
    publisher = {Oxford Univ Press},
    journal = {Bioinformatics},
    pages = {btw080},
    url = {http://bioinformatics.oxfordjournals.org/content/32/12/1901},
  }

Rationale

The rationale behind the solarius software:

  • do not automate things in R, which SOLAR has already automated
    • call SOLAR by system R base function passing options/settings to SOLAR as 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 descriptors of individuals)
    • support of extended pedigrees
  • Stable routines for optimization of VC models
  • Advanced polygenic models
    • support of multivariate models
    • liability threshold model (probit)
    • LRT applied to both covariates and variance components
  • Elaborated linkage models
    • Multi-pass
    • Multivariate
    • Adjustment of LOD scores
  • Association models
    • Speed-up based on residuals
  • Advanced VC models (custom scripts)
    • Sex-specificity
    • Longitudinal

On the R side:

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

FAQ

Q1: I use GEMMA for my qtl mapping analysis. Are there any special reasons to switch to SOLAR / solarius?

A1: That depends on the type of analysis. Some of the features SOLAR has and GEMMA does not:

  • GEMMA allows for a single random effect (the additive genetic), while SOLAR is flexible in the number of such effects.
    • By default, a SOLAR model has (1) the additive genetic (it is compulsory) (ID/FA/MO fields); and (2) the house-hold grouping (HHID field) effect. The solarius package can be easily used to specify such models with the two random effects.
    • Note that if HHID variable is not measured in a sample under study, SOLAR and GEMMA perform the same modeling.
    • If one is interested in a more general model with >2 random effects, then solarius can not help here and the only way is to deal with SOLAR tcl scripts, etc.
  • SOLAR has the liability threshold (probit) model for binary traits, while GEMMA seems not. Consequently, a bi- or multi-variate trait model, where some traits are binary, is easy to define in SOLAR (SOLAR computes conditional likelihoods).
  • Generally, SOLAR might be more stable and robust to ambiguous models in the case of multi-trait analysis, because of many years of improvement in this direction.

Q2: I was wondering whether there was any support for user-defined omega functions, or any slightly more complicated variance components models (e.g. to allow different variance components for males and females, or to report results as variance components rather than proportions of variance)? If not, are there any plans to incorporate these in future?

A2: The solarius package supports the three basic models: polygenic, multipoint and mga commands of SOLAR.

In future versions of solarius, we are not going to include any complex models. In this sence, solarius is a partial port of SOLAR into R.

Also note that GxE tcl scripts are not publicly available. In our group, we did some specific analyses like GxE with custom tcl scripts (requested from the SOLAR authors).

Q3: When I tried to install the package, this was the message I got:

> install.packages(“solarius”)

Warning message:
package ‘solarius’ is not available (for R version 3.2.2)

Could you please let me know what I have done wrong and correct way to install the package?

A3: I suspect that you might have the Windows system, for which solarius is not supported. That is because of SOLAR.

Please see the installation notes on http://ugcd.github.io/solarius/vignettes/tutorial.html#installation.

SOLAR references

solarius's People

Contributors

gelowin avatar helenabrunel avatar variani avatar wseng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

gelowin

solarius's Issues

issue solarPolygenic R version 4.0

Hi,

With R version 4.0 matrix objects now also inherit from class "array", so e.g., class(matrix(1:9)) is c("matrix", "array"). This is problematic if you want to use de function solarPolygenic with the parameter "kinship" because the function checks if this input is a matrix... but it's not only a matrix anymore. So, you cannot use this function with a predefined kinship matrix.

It returns this error: <Error in kmat2kf(kmat) : class(kmat) == "matrix" are not all TRUE>.

Could you fix this bug, please?

issue running solarPolygenic - ibdprep failed

Hello
I am trying to run the tutorial example: M1 <- solarPolygenic(trait1 ~ age + sex, data = dat30)

And I recieve the below error - do you know what might be causing this?
Program ibdprep failed to run
Error in df2solar(df, dir, ...) :
file.exists(file.path(dir, "phi2.gz")) is not TRUE

Problems Running Example on Vignette

Hello Solarius Team;

Sorry for disturbing you guys. In have issues using solarius
after a succesful install in R on my MACbook. Firstly, I tried running
the examples on the vignette, but failed at certain point,
but do not seem to figure out why?

nature of problem

load data and check out ID names

library(solarius)
data(dat30)
matchIdNames(names(dat30))
id famid mo fa sex
"ID" "FAMID" "MO" "FA" "SEX"

basic (univariate) polygenic model

mod <- solarPolygenic(trait1 ~ age + sex, dat30,)
sh: solar: command not found
Error in system("solar", input = cmd, intern = result, ignore.stdout = ignore.stdout, :
error in running command
Error in df2solar(data, dir) :
file.exists(file.path(dir, "phi2.gz")) is not TRUE

Please could you help me out? I will be greatful.

Best Regards

fix examples in dat30

There is an attempt to load kinship2 namespace in examples datasets.R#L47, code below is the results from examples.
As kinship2 is suggested dependency, it should not be required to run examples according to R-exts. This can be conditionally escaped with requireNamespace.
It is possible there are other cases of that issue in other examples, this one was to first that fails.

* checking examples ... ERROR
Running examples in ‘solarius-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: dat30
> ### Title: dat30 data set adapted from multic R package
> ### Aliases: dat30 genocovdat30 mapdat30
> 
> ### ** Examples
> 
> data(dat30)
> 
> str(dat30)
'data.frame':   174 obs. of  10 variables:
 $ famid : int  1 1 1 1 1 1 2 2 2 2 ...
 $ id    : int  11 12 13 14 15 16 21 22 23 24 ...
 $ fa    : int  0 0 11 11 11 11 0 0 21 21 ...
 $ mo    : int  0 0 12 12 12 12 0 0 22 22 ...
 $ sex   : int  1 2 1 2 1 1 1 2 2 1 ...
 $ affect: int  2 2 2 2 2 2 2 2 2 2 ...
 $ class : logi  NA NA NA NA NA NA ...
 $ trait1: num  11.96 7.1 10.32 9.76 9.46 ...
 $ trait2: num  13.58 5.37 6.4 8.98 9.21 ...
 $ age   : int  50 25 35 49 51 45 37 29 39 41 ...
> 
> plotPed(dat30, 2) # plot the pedigree tree for family #2
Error: requireNamespace("kinship2", quietly = TRUE) is not TRUE
Execution halted

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.