Convert Binary Plink Files To Human Readable
2
0
Entering edit mode
11.1 years ago

Hi!

I have received three plink files: *bed, *bim, and *fam, from which I need to extract two columns of data in a human readable form. The files contain some information on patients' genotypes and survival times.

I have managed to extract the genotype information by creating a *ped file (under plink 1.07-3 in Debian, Linux):

p-link --bfile mar2 --recode --tab --out outfile

The resulting file contains the following columns (each row is a patient):

family_ID sample_ID paternal_ID maternal_ID sex affection genotype

But there is no information on patients' survival times. Does anybody know how to extract them?

I don't know neither its column name, nor the way this information is encoded in the binaries. Probably I need to list all column names first and guess which one is the right one, but I don't know how to do it. Or maybe there exist some standard way to encode survival times in plink?

I would be grateful for a detailed instruction, as I am not a regular plink user (and don't really want to be - I just need these two columns of data).

Thanks for help.

plink • 5.0k views
ADD COMMENT
2
Entering edit mode
11.1 years ago
zx8754 12k

PED files:

A PED file must have 1 and only 1 phenotype in the sixth column.

"affection" is your 6th column, which can be either a quantitative trait or an affection status. You might be missing Alternate phenotype files or Covariate files for your data, apart from binary files.

ADD COMMENT
0
Entering edit mode
11.1 years ago

In the created ped file I have 7 columns separated by tabs:

idXXX    idXXX     0    0    1    2    T T
idYYY   idYYY    0    0    1    2    C T
...

The nucleotides in the last column are separated by space. I guessed that the sixth column is "affection" based on the manual. Affection or not, it is certainly not the survival time.

You say I'm missing some more files... I cannot exclude that, however, I was assured few times by the research authors that survival times are there - in the binaries. Any ideas how to take them out, or at least check if they are really there?

ADD COMMENT
1
Entering edit mode

In your binaries files, the phenotype is the 6th column of your fam file. If this column is not what you are looking for, then you don't have what you want.

ADD REPLY

Login before adding your answer.

Traffic: 1892 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