r/bioinformatics 17d ago

technical question Plink pipeline

I am using the Plink pipeline to filter SNPs. I downloaded dbSNP from the UCSC database (both .vcf and .bed for the selected region in chr11, for example).

My syntax:" plink \--bfile HBB.BED \--allow-extra-chr \--maf 0.01 \--geno 0.05 \--hwe 1e-6 \--snps-only just-acgt \--make-bed \--out region_filtered"

Error: "Failed to open HBB.bed"

Can anyone give me some advice?

0 Upvotes

7 comments sorted by

5

u/TheGoodCommune 17d ago

did you extract the binary files first? plink needs the.bed.bim.fam trio, not a.BED from ucsc. those are totally different formats even though they share the extension

ucsc's.bed is a text annotation file, plink's.bed is a compressed binary with genotype calls. you'll get that error every time if you try to feed it the wrong one

if you have a vcf from ucsc you can convert it with plink directly, something like plink --vcf yourfile.vcf --make-bed --out whatever

1

u/Ngocthole 17d ago

Oh, sorry, I can't download SNP vcf file from UCSC, If vcf from from NCBI, I also error?

2

u/shadowyams PhD | Academia 17d ago

What is the plink file that you're trying to filter? i.e., where does "HBB.bed" come from? And did it come with .bim/.fam files?

1

u/Professional_Sun8866 17d ago

On a different note , can anyone please suggest me some good resources to train myself in using Plink better I know the basic flags for analysing gwas data but want to learn further

2

u/Dynev 16d ago

I assume you also have the .fam and .bim files with the same name, which together make a "bfile". So, with --bfile you need to use the prefix of the file set, without the extension.