Hi, could you please explain what information will be written to .fam file since vcf file will not have that informtion (as per my understanding)? Can we append information to .fam file later?
Hi,
I was working on converting my vcf file into plink ped/map format.
I used the following command from vcftools
vcftools --vcf myvcf.vcf --plink --out myplink
I also would like to filter my snps based on minor allele frequency (maf).
I was wondering whether simply using
vcftools --vcf myvcf.vcf --plink --maf 0.05 --out myplink
would do it in one step?
Or shall i do it in two steps. First convert it to the ped/map format and then use plink to do the filtering?
2 answers
PLINK 1.9 can do this:
plink --vcf myvcf.vcf --maf 0.05 --recode --out myplink
(Are you sure you want to convert to ped/map, though? PLINK prefers to work with binary bed/bim/fam.)
Hi I am new user in PLINK and I have a problem. I have a vcf file (by this command plink --vcf myfile.vcf --allow-no-samples --make-bed --out newphase) it converted to bed /bim and fam files. now I would like to get minor allele frequency of this file (with this command plink --bfile newphase --freq --make-bed --out newphase-frq) but I get this error the fam file is empty. what should i do? is there any way which i can get minor allele frequency of my bed file by plink?
I think you need samples in your vcf to calculate the minor allele frequency. If you are using --allow-no-samples your vcf might have no samples to calculate it from.
Log in to answer this question.