Fixed bug in FastaAlternateReferenceMaker when input VCF has overlapping deletions as reported a while back on GS

This commit is contained in:
Eric Banks 2012-08-01 10:45:04 -04:00
parent a4a41458ef
commit 459832ee16
1 changed files with 5 additions and 3 deletions

View File

@ -47,8 +47,10 @@ import java.util.List;
* <p> * <p>
* Given variant tracks, it replaces the reference bases at variation sites with the bases supplied by the ROD(s). * Given variant tracks, it replaces the reference bases at variation sites with the bases supplied by the ROD(s).
* Additionally, allows for one or more "snpmask" VCFs to set overlapping bases to 'N'. * Additionally, allows for one or more "snpmask" VCFs to set overlapping bases to 'N'.
* Note that if there are multiple variants at a site, it chooses one of them randomly. * Several important notes:
* Also note that this tool works only for SNPs and for simple indels (but not for things like complex substitutions). * 1) if there are multiple variants that start at a site, it chooses one of them randomly.
* 2) when there are overlapping indels (but with different start positions) only the first will be chosen.
* 3) this tool works only for SNPs and for simple indels (but not for things like complex substitutions).
* Reference bases for each interval will be output as a separate fasta sequence (named numerically in order). * Reference bases for each interval will be output as a separate fasta sequence (named numerically in order).
* *
* <h2>Input</h2> * <h2>Input</h2>
@ -103,7 +105,7 @@ public class FastaAlternateReference extends FastaReference {
String refBase = String.valueOf((char)ref.getBase()); String refBase = String.valueOf((char)ref.getBase());
// Check to see if we have a called snp // Check to see if we have a called snp
for ( VariantContext vc : tracker.getValues(variants) ) { for ( VariantContext vc : tracker.getValues(variants, ref.getLocus()) ) {
if ( vc.isFiltered() ) if ( vc.isFiltered() )
continue; continue;