Error Reading PLINK files (.bed)
1
0
Entering edit mode
6.6 years ago

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 • 5.6k views
ADD COMMENT
1
Entering edit mode

what is the output of

head ~/Desktop/GWAStutorial.bed

?

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

what is the output of

head ~/Desktop/GWAStutorial.bed

?

ADD REPLY
0
Entering edit mode

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

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

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

De nada amigo, abraços!

ADD REPLY

Login before adding your answer.

Traffic: 2726 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6