Tranforming vcf files to .bed (PLINK binary biallelic genotype table)
0
0
Entering edit mode
4.3 years ago
AT/GC • 0

Hello,

I want to detect local adaption between different populations using pooled sequencing data.

luckily there is a reliable R package that one can use. pcadapt (https://cran.r-project.org/web/packages/pcadapt/index.html)

The struggle is to convert my vcf files to "a frequency matrix with n rows and L columns (where n is the number of populations and L is the number of genetic markers)" https://bcm-uga.github.io/pcadapt/articles/pcadapt.html#a--reading-genotype-data so from vcf file to .bed (PLINK binary biallelic genotype table) https://www.cog-genomics.org/plink2/formats#bed with only the number of populations in rows and the allele frequency in colums

I can just calculate the allele frequency and format the table into the required format using Excel... But there must be a better way to automate the process.

If an anyone knows a R plug in or another way to convert this I would greatly appreciate

SNP plink R • 1.4k views
ADD COMMENT
1
Entering edit mode

Have you tried, eh, plink? https://www.cog-genomics.org/plink/1.9/data

ADD REPLY
0
Entering edit mode

Yes I have, thank you

I was hoping for an R based way

ADD REPLY
0
Entering edit mode

with Plink its kind of annoying, because it assumes that the Pools I have in my vcf file are Individuals. I'm sure there is a solution but I just used the vcfR package in R

thanks for the input

ADD REPLY

Login before adding your answer.

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