This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error Reading PLINK files (.bed)

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")) : 
 Couldn'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!

bed plink gwas read.plink

what is the output of

head ~/Desktop/GWAStutorial.bed

?

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

what is the output of

head ~/Desktop/GWAStutorial.bed

?

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

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

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

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! :-)

1 answer

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

Log in to answer this question.