This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Selscan: ERROR: Alleles must be coded 0/1 only.

I am trying to run nsl statistics using selscan tool on a vcf file (created using freebayes). But i am getting this error

ERROR: Alleles must be coded 0/1 only.

0 2

Kindly give me a solution because genotypes can be 2 3 so how to compute the statistics, in this case.

Many thanks in advance.

vcf nsl selscan

Please edit your post and add your freebayes command.

This was the freebayes command used to generate the vcf file..

  freebayes -f ref.fa aln.bam >var.vcf

1 answer

you could filter out the multiallelic in the VCF using bcftools view -m2 M2 or convert multiallelic to biallelic using bcftools norm

Side note: Use vt decomp | vt norm instead of bcftools norm to retain information on the original variant entries after the operation. The added INFO/OLD_MULTIALLELIC field serves as a quasi-log of the operation.

Sure, I am grateful to you for helping me out thank you. I will try this out

Log in to answer this question.