Convert plink to classical BED
1
0
Entering edit mode
9.4 years ago

Guys,

I have plink-format file with six individuals snps (.bed, .ped, .map) and want to convert it to classic bed (chr pos_start pos_end al1 al2 al1 al2 al1 al2 al1 al2 al1 al2 al1 al2)

Do you know the best way?

Thanks in advance!

plink SNP bed • 3.4k views
ADD COMMENT
1
Entering edit mode
9.4 years ago

what you're probably looking for is the classic ped format. which you'll maybe have it there already if your question did not contain any typos. in case you may have plink binary files (.bed, .bim, .fam) you can easily recode them into plink text files (.ped, .map), ending up with the .ped file you were looking for:

plink --bfile binary_fileset --recode --out new_text_fileset
ADD COMMENT
0
Entering edit mode

Thanks, but that brings me to file like

ind1 snp1 snp2 snp3 ....

ind2 snp1 snp2 snp3 ....

ind3 snp1 snp2 snp3 ...

but I want to have

chr pos1 pos2    al1 al2     al1 al2     al1 al2....

chr1 154576 154577    A T     A A     C T ...

chr2 567534 567535   G T     T A     G T....
ADD REPLY
1
Entering edit mode

That's some strange hybrid of PLINK .tped and UCSC BED. Are you sure that is the format you want? What program/script do you need this for?

ADD REPLY
0
Entering edit mode

Actually, I wanted to split it into six files (according to individuals) and intersectbed them using bedtools

ADD REPLY
0
Entering edit mode

oh, I understand. what about generating a vcf file, and then extracting the genotypes through vcf-to-tab? that definitely would work, although I was trying to come out with a more elegant solution directly through plink.

ADD REPLY
0
Entering edit mode

Thanks for your replies! I have finally fixed it with tped.

ADD REPLY

Login before adding your answer.

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