Question: GWAS: access Imputation probabilities: snpStats
0
9 months ago by
GENOMIC_region0 wrote:

Hi there,

I'm interested to work with .gen file generated from IMPUTE2 imputation tool. In particular I need probabilities per SNP. I use snpStats' function:

test_impute<-read.impute("genotyped_snps_chr22.impute", rownames = NULL, nsnp = NULL, snpcol = 2)

But the output I get is snpMatrix, which I fail to unpack and access. Is there a way I can see first 10 rows and column from this matrix?

show(test_impute)
class(test_impute)
summary(test_impute)
attributes(test_impute) This prints all SNP ids on screen
names(test_impute)

None of these help.

Is there a better way that could allow me to access these probabilities for my downstream analysis?

I'm looking at gtx package's read.snpdata.impute function - but this is awfully slow. I've 13K snps in the input file.

Thanks.

snpStats_1.28.0 Matrix_1.2-14   gtx_0.0.8       survival_2.42-3 R version 3.4.2 (2017-09-28)
Platform: x86_64-pc-linux-gnu (64-bit)

snpstats gwas imputation • 149 views
modified 9 months ago • written 9 months ago by GENOMIC_region0

I haven't really worked with the snpStats package or SnpMatrix but you might try

as.data.frame(test_impute)
as(test_impute, "character")
as(test_impute, "numeric")