zhangh12 / artp2 Goto Github PK
View Code? Open in Web Editor NEWAn enhanced R package of biological pathway analysis and pathway meta-analysis for genome-wide association studies
An enhanced R package of biological pathway analysis and pathway meta-analysis for genome-wide association studies
Dear ARTP2 maintainers,
Thanks for ARTP2's read.bed
function, I am very happy it is available!
Unexpectedly, for a simple .bed file (created by PLINK v1.9 with --make_bed
), read.bed
fails, where the genio R package does read it successfully. Below is a reprex with the error message.
I predicted this can be fixed easily, as the solution is laid bare by the reprex :-)
Thanks and cheers, Richel
# Get the data to work on
remotes::install_github("richelbilderbeek/plinkr")
bed_filename <- get_plinkr_filename("demo_assoc.bed")
bim_filename <- get_plinkr_filename("demo_assoc.bim")
fam_filename <- get_plinkr_filename("demo_assoc.fam")
# genio can read the .bed file
genio::read_bed(
file = bed_filename,
names_loci = genio::read_bim(bim_filename)$id,
names_ind = genio::read_fam(fam_filename)$fam
)
# ARTP2 cannot read the .bed file yet
ARTP2::read.bed(
bed = get_plinkr_filename("demo_assoc.bed"),
bim = get_plinkr_filename("demo_assoc.bim"),
fam = get_plinkr_filename("demo_assoc.fam")
)
The error given is:
Error in `.rowNamesDF<-`(x, value = value) :
duplicate 'row.names' are not allowed
In addition: Warning messages:
1: In ARTP2::read.bed(bed = get_plinkr_filename("demo_assoc.bed"), :
Duplicated subjects exist in fam file:
/home/richel/GitHubs/plinkr/inst/extdata/demo_assoc.fam
2: non-unique value when setting 'row.names': ‘1’
This gives us the reason for the problem: the .fam file has duplicate IDs. This is reasonable: all individuals should be unique. Well done!
But maybe the function is a bit too overeager. One hint of this may already be that PLINK can work with the .fam file without problems. So, let's take a look at the .fam file:
genio::read_fam(fam_filename)
# A tibble: 3 x 6
fam id pat mat sex pheno
<chr> <chr> <chr> <chr> <int> <dbl>
1 1 1 0 0 1 1
2 2 1 0 0 1 1
3 3 1 0 0 1 1
Aha, all individuals are unique, as all combinations of family ID and within-family ID are unique.
I guess that makes fixing this bug easy :-)
Thanks for this package.
I would like to use this to read plink data.
https://rdrr.io/cran/ARTP2/man/read.bed.html
If I use following code however, I was wondering when reading plink file are the data loaded completely in memory or in chunks or index?
read.bed(bed, bim, fam, sel.snps = NULL, sel.subs = NULL, encode012 = TRUE)
I have plink data for about ~200K individuals.
Thank you.
I got this when I trying to install ARTP2 using package manager in RStudio. What's the compatible R version for ARTP2? Thanks
I learned about GWAS and found a path-based test. From the manual, it seems that it can be executed only in cases and controls study. Is it applicable to continuous traits?
Thank you
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.