Question: Error Reading PLINK files (.bed)
0
gravatar for eduardorazza
2.0 years ago by
eduardorazza0 wrote:

Hi, I'm learning basic GWAS analysis using the Foulkes lab tutorial available at http://www.stat-gen.org

The thing is that just cannot read the PLINK files. Following the tutorial I have used the code:

geno <- read.plink(gwas.fn$bed, gwas.fn$bim, gwas.fn$fam, na.strings = ("-9"))

But I repeatedly get the following error:

Error in read.plink(gwas.fn$bed, gwas.fn$bim, gwas.fn$fam, na.strings = ("-9")) :

Couln't open input file: ~/Desktop/GWAStutorial.bed

As it looks like I just can't open the .bed file, which contains the genotype information, coded in binary. But the file is the exactly one from the tutorial, available to anyone. Any chance it might be corrupted?

Anybody can give me any hints?

Thanks in advance!

read.plink plink .bed gwas • 1.4k views
ADD COMMENTlink modified 2.0 years ago • written 2.0 years ago by eduardorazza0
1

what is the output of

head ~/Desktop/GWAStutorial.bed

?

ADD REPLYlink written 2.0 years ago by Pierre Lindenbaum123k

I set the output dir the same as the data.dir. Would this be a problem? o.0

ADD REPLYlink written 2.0 years ago by eduardorazza0

what is the output of

head ~/Desktop/GWAStutorial.bed

?

ADD REPLYlink written 2.0 years ago by Pierre Lindenbaum123k

Erro: '/' inesperado in "head(~/"

Where "Erro" means "Error" and "inesperado" means "unexpected".

ADD REPLYlink written 2.0 years ago by eduardorazza0

Português? - eu falo da forma fluente o português.

The head command will not be able to interpret a binary file but it should still output something.

It is good practice to always use full absolute paths for files, e.g., /home/eduardorazza/Escritorio/GWAStutorial.bed

On that note, is it because, on your computer, 'Desktop' is actually 'Escritorio'? It seems that you are using a Portuguese locale.

Kevin

ADD REPLYlink modified 2.0 years ago • written 2.0 years ago by Kevin Blighe48k

Hey! Thanks Kevin! I just reset it, deleted and started it all over setting the Desktop as my directory and output directory to simplify things. It turned out that now it just worked. Also i did it in a different network, but I don't know if this could have affected the previous failure. O que você acha, Kevin? De qualquer maneira, muito obrigado pelo retorno! Abraço! :-)

ADD REPLYlink written 2.0 years ago by eduardorazza0

De nada amigo, abraços!

ADD REPLYlink written 2.0 years ago by Kevin Blighe48k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 762 users visited in the last hour