gabraham / plink2r Goto Github PK
View Code? Open in Web Editor NEWRead PLINK BED/BIM/FAM files into R
Read PLINK BED/BIM/FAM files into R
Hi Gad,
Thanks for sharing this nice package online! Is there an approximate relationship between computational time and # of SNPs as well as # of individuals for plink2R?
Best,
Rosie
Hi!
Will this package be installable with
devtools::install_github("gabraham/plink2R")
Hi,
I am using Read_Plink to read a data set of 637000 SNPs and 6000 individuals. The packages installed fine, however when I am trying to run Read_Plink R crashes. I have tried to the code on a machine with RAM of 32 GB and same thing happens. Really appreciate if you can help me with the issue.
Thanks,
Javad Rahimikollu
There is a PR from 2016, no entry in CRAN, the link in the readme (https://www.partners.org/~purcell/plink) is dead, but some use in TWAS/FUSION. What is the current state of this project?
Hello,
For reference, I am using R Studio 1.1.453, R-3.4.4, Rtools3.4, and Windows 10.
I am having issues installing plink2R through R Studio. I have tried downloading the .zip and installing it as an archive file with no luck. It doesn't show up in the packages tab, and errors out as
`> suppressMessages(library('plink2R'))`
Error in library("plink2R") : ‘plink2R’ is not a valid installed package
I then tried to install using devtools, and came up with this error:
> devtools::install_github("gabraham/plink2R/plink2R")
Downloading GitHub repo gabraham/plink2R@master
from URL https://api.github.com/repos/gabraham/plink2R/zipball/master
Installing plink2R
"C:/PROGRA~1/R/R-34~1.4/bin/x64/R" --no-site-file --no-environ \
--no-save --no-restore --quiet CMD INSTALL \
"C:/Users/vmonl/AppData/Local/Temp/Rtmpc3KOGk/devtools19a471816237/gabraham-plink2R-d74be01/plink2R" \
--library="C:/Users/vmonl/Documents/R/win-library/3.4" \
--install-tests
* installing *source* package 'plink2R' ...
** libs
*** arch - i386
c:/Rtools/mingw_32/bin/g++ -I"C:/PROGRA~1/R/R-34~1.4/include" -DNDEBUG -I"C:/Users/vmonl/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/vmonl/Documents/R/win-library/3.4/RcppEigen/include" -O2 -Wall -mtune=generic -c data.cpp -o data.o
data.cpp: In constructor 'Data::Data(const char*, const char*, bool)':
data.cpp:9:21: error: 'time' was not declared in this scope
srand48(time(NULL));
^
data.cpp:9:22: error: 'srand48' was not declared in this scope
srand48(time(NULL));
^
data.cpp: In member function 'void Data::read_bed(int)':
data.cpp:243:31: error: 'drand48' was not declared in this scope
double r = drand48();
^
make: *** [data.o] Error 1
Warning: running command 'make -f "Makevars.win" -f "C:/PROGRA~1/R/R-34~1.4/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-34~1.4/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="plink2R.dll" OBJECTS="data.o plink2R.o"' had status 2
ERROR: compilation failed for package 'plink2R'
* removing 'C:/Users/vmonl/Documents/R/win-library/3.4/plink2R'
In R CMD INSTALL
Installation failed: Command failed (1)
When that didn't work, I tried:
> devtools::install_github("gabraham/plink2R/plink2R", repos=NULL)
Downloading GitHub repo gabraham/plink2R@master
from URL https://api.github.com/repos/gabraham/plink2R/zipball/master
Installing plink2R
"C:/PROGRA~1/R/R-34~1.4/bin/x64/R" --no-site-file --no-environ \
--no-save --no-restore --quiet CMD INSTALL \
"C:/Users/vmonl/AppData/Local/Temp/Rtmpc3KOGk/devtools19a455557077/gabraham-plink2R-d74be01/plink2R" \
--library="C:/Users/vmonl/Documents/R/win-library/3.4" \
--install-tests
* installing *source* package 'plink2R' ...
** libs
*** arch - i386
c:/Rtools/mingw_32/bin/g++ -I"C:/PROGRA~1/R/R-34~1.4/include" -DNDEBUG -I"C:/Users/vmonl/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/vmonl/Documents/R/win-library/3.4/RcppEigen/include" -O2 -Wall -mtune=generic -c data.cpp -o data.o
data.cpp: In constructor 'Data::Data(const char*, const char*, bool)':
data.cpp:9:21: error: 'time' was not declared in this scope
srand48(time(NULL));
^
data.cpp:9:22: error: 'srand48' was not declared in this scope
srand48(time(NULL));
^
data.cpp: In member function 'void Data::read_bed(int)':
data.cpp:243:31: error: 'drand48' was not declared in this scope
double r = drand48();
^
make: *** [data.o] Error 1
Warning: running command 'make -f "Makevars.win" -f "C:/PROGRA~1/R/R-34~1.4/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-34~1.4/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="plink2R.dll" OBJECTS="data.o plink2R.o"' had status 2
ERROR: compilation failed for package 'plink2R'
* removing 'C:/Users/vmonl/Documents/R/win-library/3.4/plink2R'
* restoring previous 'C:/Users/vmonl/Documents/R/win-library/3.4/plink2R'
In R CMD INSTALL
Installation failed: Command failed (1)
Any help would be greatly appreciated!
Best,
Vera
Hi Gad,
@gabraham I am using the following to install the package: install_github("gabraham/plink2R/plink2R",repos = NULL)
It would be great if you can help resolve the issue.
R version: 3.5.1
Rstudio version: 1.1.456
Downloading GitHub repo gabraham/plink2R@master
from URL https://api.github.com/repos/gabraham/plink2R/zipball/master
Installing plink2R
"C:/PROGRA1/R/R-351.1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL
"C:/Users/manven01/AppData/Local/Temp/RtmpUFFSUM/devtoolsf2c62c34267/gabraham-plink2R-d74be01/plink2R"
--library="C:/Users/manven01/Documents/R/win-library/3.5" --install-tests
*** arch - i386
c:/Rtools/mingw_32/bin/g++ -I"C:/PROGRA1/R/R-351.1/include" -DNDEBUG -I"C:/Users/manven01/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/manven01/Documents/R/win-library/3.5/RcppEigen/include" -O2 -Wall -mtune=generic -c data.cpp -o data.o
data.cpp: In constructor 'Data::Data(const char*, const char*, bool)':
data.cpp:9:21: error: 'time' was not declared in this scope
srand48(time(NULL));
^
data.cpp:9:22: error: 'srand48' was not declared in this scope
srand48(time(NULL));
^
data.cpp: In member function 'void Data::read_bed(int)':
data.cpp:243:31: error: 'drand48' was not declared in this scope
double r = drand48();
^
make: *** [data.o] Error 1
ERROR: compilation failed for package 'plink2R'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.