Skip to content

Commit

Permalink
Added ASW
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsonra committed Apr 19, 2018
1 parent b19816e commit 151191b
Show file tree
Hide file tree
Showing 25 changed files with 35 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ALDdata/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ALDdata
Version: 1.2.2
Date: 2016-01-13
Version: 1.3.0
Date: 2018-04-19
Title: ALDdata
Author: Randall Johnson <johnsonra@mail.nih.gov>
Maintainer: Randy Johnson <johnsonra@mail.nih.gov>
Expand Down
Binary file added ALDdata/data/asw1.RData
Binary file not shown.
Binary file added ALDdata/data/asw10.RData
Binary file not shown.
Binary file added ALDdata/data/asw11.RData
Binary file not shown.
Binary file added ALDdata/data/asw12.RData
Binary file not shown.
Binary file added ALDdata/data/asw13.RData
Binary file not shown.
Binary file added ALDdata/data/asw14.RData
Binary file not shown.
Binary file added ALDdata/data/asw15.RData
Binary file not shown.
Binary file added ALDdata/data/asw16.RData
Binary file not shown.
Binary file added ALDdata/data/asw17.RData
Binary file not shown.
Binary file added ALDdata/data/asw18.RData
Binary file not shown.
Binary file added ALDdata/data/asw19.RData
Binary file not shown.
Binary file added ALDdata/data/asw2.RData
Binary file not shown.
Binary file modified ALDdata/data/asw20.RData
Binary file not shown.
Binary file added ALDdata/data/asw21.RData
Binary file not shown.
Binary file added ALDdata/data/asw22.RData
Binary file not shown.
Binary file added ALDdata/data/asw3.RData
Binary file not shown.
Binary file added ALDdata/data/asw4.RData
Binary file not shown.
Binary file added ALDdata/data/asw5.RData
Binary file not shown.
Binary file added ALDdata/data/asw6.RData
Binary file not shown.
Binary file added ALDdata/data/asw7.RData
Binary file not shown.
Binary file added ALDdata/data/asw8.RData
Binary file not shown.
Binary file added ALDdata/data/asw9.RData
Binary file not shown.
30 changes: 30 additions & 0 deletions R/helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,33 @@ get.LD <- function(chr, pop, keep)

return(LD)
}

# example of importing data into ALDdata (could be coded better, but this will do)
if(FALSE)
{
library(ALDdata)
library(magrittr)
data(hapmap)

for(i in 1:23)
{
cat("Processing chromosome", i, '\n')

phased_raw <- get.phased(i, 'ASW')

phased <- matrix(nrow = dim(phased_raw)[2] - 2, ncol = dim(phased_raw)[1],
dimnames = list(names(phased_raw)[-(1:2)], phased_raw$rsID))

tmp <- subset(hapmap, rs %in% phased_raw$rsID)
vart <- tmp$var
names(vart) <- tmp$rs

for(j in 1:dim(phased_raw)[1])
{
phased[,phased_raw$rsID[j]] <- (phased_raw[j,-(1:2)] == vart[phased_raw$rsID[j]]) %>%
as.numeric()
}

save(phased, file = paste0('../Data/ASW/bin/asw', i, '.RData'))
}
}
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ sudo R CMD ISNTALL ALDdata
Versions
========

1.3.0
- Added phased data for ASW

1.2.0
- Added variant allele frequency for all SNPs in YRI, CEU, CHB and JPT
- Added ALDdata to github
Expand Down

0 comments on commit 151191b

Please sign in to comment.