PLINK help

Hi Plink users,
I am very new in GWAS and decided to use PLINK for this. But I am struggling with file formats.
I have one exome data with 200000 SNPs in it. But it is in .txt format. But all the necessary fields are there in different columns.
Can you please suggest me how I can create the plink .bed file?
Is there any direct way to create .bed file from .txt?

I tried to create a .bim and a .fam file following the instruction in PLINK website Binary files (BED/BIM/FAM)
Is there any way to create .bed file from these two (.bim & .fam) files?
Please let em know.
Thanks a lot,
Suparna.

I was really confused until I figured out there's two applications named plink, and you weren't talking about an ssh client :smiley:

What, exactly, did you try? What, exactly did it do? Did you or did you not succeed in making the bim and fam files?

What syntax is your input file? "text" doesn't mean much, since lots of them appear to be text of different arrangement.

1 Like

Thanks Corona688,
My file format is like:

Sample Name	SNP Name	Sample ID	Allele1 - Top	Allele2 - Top	GC Score	Allele1 - Forward	Allele2 - Forward	Allele1 - Design	Allele2 - Design	Allele1 - AB	Allele2 - AB	Allele1 - Plus	Allele2 - Plus	Chr	Position	GT Score	Cluster Sep	SNP	ILMN Strand	Customer Strand	Top Genomic Sequence	Plus/Minus Strand	Theta	R	X	Y	X Raw	Y Raw	B Allele Freq	Log R Ratio	CNV Value	CNV Confidence
	200610-104	P001	A	A	0.4097	T	T	T	T	A	A	T	T	MT	212	0.8207	1.0000	[T/C]	BOT	BOT		+	0.010	2.315	2.281	0.034	35825	464	0.0042	-0.1955		
	200610-106	P001	A	A	0.2638	T	T	A	A	A	A	A	A	MT	246	0.7865	1.0000	[A/G]	TOP	BOT		+	0.106	2.202	1.884	0.318	29655	3030	0.0661	-0.3255		
	200610-119	P001	A	A	0.3616	T	T	T	T	A	A	T	T	MT	5049	0.7771	1.0000	[T/C]	BOT	BOT		+	0.035	2.515	2.382	0.133	37410	1369	0.0000	-0.0959		
	200610-137	P001	A	A	0.3616	T	T	T	T	A	A	T	T	MT	12286	0.7771	1.0000	[T/C]	BOT	BOT		+	0.086	

Now obviously for Plink (Whole genome data analysis toolset....which is a comandline program for GWAS ) I don't need all the columns. So I managed to create bim and fam files using awk. But now I need binary bed file (which is not liek usual .bed files). That is why I was looking for any user who used PLINK before.

I think there are some option like --make-bed supplying bim and fam files; but I am not sure if I am doing it right.

Any help will be really great :slight_smile:
Thanks a lot,
Mitra

Okay, I see.

I found this which seem to show what you need.

Given test.ped and test.map, to create test.bed you run this. Note the lack of extensions -- plink adds the .fam, .bed, etc to the filename itself.

plink --file test --make-bed --out test
1 Like

Hello Corona688,
Thanks for your reply. But I also have seen this. But this is Given test.ped and test.map, but I have only bim and fam and I want to create bed file. Given .ped and .map, program automatically create bim,bed,fam 3 files. But I want to go from bim and fam 20 bed file.
Thanks,
Mitra

Hello,
I tried to use

 ./plink --noweb --fam myfile.fam --bim myfile.bim --make-bed --out myfile.bed

But still didn't work. Here is the error message below. Can anybody PLEASE HELP?

Many thanks in advance.

@----------------------------------------------------------@
| PLINK! | v1.07 | 10/Aug/2009 |
|----------------------------------------------------------|

(C) 2009 Shaun Purcell, GNU General Public License, v2
For documentation, citation & bug-report instructions:
PLINK: Whole genome data analysis toolset
@----------------------------------------------------------@

Skipping web check... [ --noweb ]
Writing this text to log file [ myfile.bed.log ]
Analysis started: Mon Sep 3 10:06:10 2012

Options in effect:
--noweb
--fam myfile.fam
--bim myfile.bim
--make-bed
--out myfile.bed

** For gPLINK compatibility, do not use '.' in --out **

ERROR: No file [ plink.bed ] exists.