Git Product home page Git Product logo

rgs3's Introduction

Package "rgs3"

This directory contains the rgs3 package for the R software environment. This package wraps the GS3 program for genomic prediction and selection. See the web page from Andrés Legarra for more information.

The rgs3 package is available under a free software license, the GNU Public License (version 3 or later). See the COPYING file for details. The copyright is owned by the INRA.

The content of this directory is versioned using git, the central repository being hosted here, on GitHub, and the institutional repository being hosted there, on SourceSup.

Installation

Before installing the rgs3 package, the latest version of the GS3 program should already be installed on your computer (see on GitHub). More precisely, the executable should be present in your PATH, under the name gs3 for Unix-like operating systems (GNU/Linux, Mac OS) and gs3.exe for Microsoft Windows.

  • On Unix-like operating systems, you can save the executable in a new directory named bin in your home directory, and then add the path to this new directory to the environment variable PATH (use your ~/.bash_profile).

  • On Windows, you can save the executable in a new directory named GS3, for instance in C:\Program Files, and then add the path to this new directory to the environment variable Path (go to Configuration parameters -> System -> Advanced, or something similar).

To check if R properly detects the new directory, open a new R session, and call Sys.getenv("PATH"). To check if the executable is found in your PATH, open a new R session, and call system("gs3") (or system("gs3.exe") for Windows).

Then, to install the rgs3 package, the easiest is to download the released .tar.gz from SourceSup here, open a R session and run the following command:

install.packages("/path/to/rgs3_<version>.tar.gz", repos=NULL, type="source")

You can also install the latest version of the source code directly from GitHub, by opening a R session and running the following commands:

library(devtools) # can be installed from the CRAN
install_github("INRA/rgs3", build_vignettes=TRUE)

Note that creating the vignettes may take a couple of minutes.

Once this is done, the rgs3 package should be available on your computer.

Usage

Once the rgs3 package is installed on your computer, it can be loaded into a R session:

library(rgs3)
help(package="rgs3")
browseVignettes("rgs3")

Citation

As a lot of time and effort were spent in creating the GS3 program, please cite it when using it for data analysis:

Legarra, A., Ricard, A., Filangi, O. GS3, a  software  for  genome-wide genetic evaluations and validations. 2014.

You should also cite the rgs3 package:

citation("rgs3")

See also citation() for citing R itself.

Issues

When encountering a problem with the package, you can report issues on GitHub directly (here). Remember to copy-paste the output of sessionInfo() to help efficiently diagnose the problem and find a solution.

Contributing

You can contribute in various ways:

  • report an issue (online, see the above section);

  • suggest improvements (in the same way as issues);

  • propose a pull request (after creating a new branch).

rgs3's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

famuvie

rgs3's Issues

handling missing data in writeDataForGs3 and writeGenosForGs3

I found a problem in the way missing data are handled in writeDataForGs3: if the data.frame with the phenotypic data has several columns before the trait of interest and these columns contain missing data, for the moment writeDataForGs3 will not transform them into -9999 and this will prevent reading data further by gs3. I had a phenotypic dataset with a missing data in the second trait at the 6th line, and when I asked for analysis of the third trait, only 5 records were read.

Concerning writeGenosForGs3, as gs3 can work with missing data in the genotypic data, and these have to be coded as "5", writeGenosForGs3 should accept values of 5 in the matrix of genotypic data.
So the stopping rules at the beginning should be
stopifnot(is.matrix(x), all(x %in% c(0, 1, 2, 5)), !is.null(rownames(x)),
is.vector(inds), is.numeric(inds), !is.null(names(inds)),
all(inds == 1:length(inds)), all(rownames(x) %in% names(inds)))

Hope this helps !

Hélène

couldn't get the vignette on Windows

install and library loading is OK but I couldn't the vignette on Windows:

browseVignettes("rgs3")
No vignettes found by browseVignettes("rgs3")

R CMD build rgs3

Dear Timothée,

I was trying to download rgs3 from github but it failed, so I cloned the git repo and tried to build it myself on debian, Unfortunaltely, I am having problems. Do you think you could help?
Best Gregor

R CMD build rgs3

  • checking for file ‘rgs3/DESCRIPTION’ ... OK
  • preparing ‘rgs3’:
  • checking DESCRIPTION meta-information ... OK
  • installing the package to build vignettes
  • creating vignettes ... ERROR
    --- re-building ‘crossval-rgs3.Rmd’ using rmarkdown
    Quitting from lines 137-147 (crossval-rgs3.Rmd)
    Error: processing vignette 'crossval-rgs3.Rmd' failed with diagnostics:
    isValidData(dat, NULL, col.id, col.trait, binary.trait) ist nicht TRUE
    --- failed re-building ‘crossval-rgs3.Rmd’

--- re-building ‘intro-rgs3.Rmd’ using rmarkdown
Quitting from lines 308-311 (intro-rgs3.Rmd)
Error: processing vignette 'intro-rgs3.Rmd' failed with diagnostics:
isValidData(x, inds, col.id, col.traits, binary.traits) ist nicht TRUE
--- failed re-building ‘intro-rgs3.Rmd’

SUMMARY: processing the following files failed:
‘crossval-rgs3.Rmd’ ‘intro-rgs3.Rmd’

Fehler: Vignette re-building failed.
Ausführung angehalten

error when GS3 parses the nb of iterations in config file

GS3 returned the following error:

At line 1199 of file gs3.f90 (unit = 10, file = 'config.txt')
Fortran runtime error: Bad integer for item 1 in list input

It seems to be due to the fact that NITER is written as 1e+05 instead of 100000.

binary.traits and handling of missing data in writeDataForGs3

In writeDataForGs3, the default value for binary.traits as only one value, but if there are missing data, binary.traits is expected to be a vector of length the number of columns of x because there is a test on binary.traits[c] with c in 1:ncol(x).

However, at the beginning there is a test on length(binary.traits) == length(col.traits) so length(binary.traits) cannot be ncol(x)

I think replacing
if (binary.traits[c]) {
by
if (binary.traits[which(c == col.traits)]) {
should work.

Hélène

check the version of GS3

This should be doable by executing GS3 without any configuration file, and parsing the stdout or stderr.

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.