Protect ProduceBeagleInputWalker against evil users who feed to it VCF's with indels, no variation sites or other interesting markers: Write to Beagle input only in biallelic SNP sites since that's the only thing Beagle can do.

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3772 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
delangel 2010-07-12 20:54:42 +00:00
parent 80a5ddfa2f
commit 297f15a60c
1 changed files with 6 additions and 0 deletions

View File

@ -86,6 +86,12 @@ public class ProduceBeagleInputWalker extends RodWalker<Integer, Integer> {
if ( vc_eval == null || vc_eval.isFiltered() )
return 0;
if (vc_eval.getType() != VariantContext.Type.SNP)
return 0;
if (vc_eval.getAlleles().size()!= 2)
return 0;
// output marker ID to Beagle input file
beagleWriter.print(String.format("%s ", vc_eval.getLocation().toString()));