Fixed bug in FastaAlternateReferenceMaker when input VCF has overlapping deletions as reported a while back on GS
This commit is contained in:
parent
a4a41458ef
commit
459832ee16
|
|
@ -47,8 +47,10 @@ import java.util.List;
|
|||
* <p>
|
||||
* 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'.
|
||||
* Note that if there are multiple variants at a site, it chooses one of them randomly.
|
||||
* Also note that this tool works only for SNPs and for simple indels (but not for things like complex substitutions).
|
||||
* Several important notes:
|
||||
* 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).
|
||||
*
|
||||
* <h2>Input</h2>
|
||||
|
|
@ -103,7 +105,7 @@ public class FastaAlternateReference extends FastaReference {
|
|||
String refBase = String.valueOf((char)ref.getBase());
|
||||
|
||||
// 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() )
|
||||
continue;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue