I'm wondering if in my VCF file, I can count the number of loci.
I would count the number of SNPs with
egrep -v "^#" input.vcf | wc -l
But what about the number of loci? If I have 55 individuals in my VCF file, does this is an issue?
use option -c to count:
grep -c -v "^#" input.vcf
I know that a SNP can be accounted as a locus, but do you know if there is a way to know how many SNPs I called in the different genes on my reference genome. I have he annotation file "GFF". Is there a tool that can map the number of SNPs to the genes?
convert the vcf to bed and then use bedtools intersect...
I used this code to intersect the GFF and the bed files, but how do you count the number of SNPs per gene in the GFF?
bedtools intersect -a gene.gff \
This is just, I think, giving the similarities in the 2 documents. Right?
Login before adding your answer.
Use of this site constitutes acceptance of our User Agreement and Privacy