bigdatagenomics / avocado

A Variant Caller, Distributed. Apache 2 licensed.
http://bdgenomics.org/projects/avocado/
Apache License 2.0
71 stars 42 forks source link

index on quality string maybe incorrect? #295

Closed jpdna closed 6 years ago

jpdna commented 6 years ago

@fnothaft I've been looking at this code: https://github.com/bigdatagenomics/avocado/blob/e0979dd11a2fd0fd8714cd062b9e7ee835a265e5/avocado-core/src/main/scala/org/bdgenomics/avocado/genotyping/DiscoverVariants.scala#L199

and as I am reading it I think that the index i on the qual array at:

if (qual(i).toInt - 33 >= phredThreshold) {
                    Some(DiscoveredVariant(
                      contigName,
                      pos + i,
                      ref(i).toString,
                      sequence(idx + i).toString))
                  } 

may currently be incorrect and should be idx + i as it seems to be on the same coordinates as sequence

or am I misunderstanding?

fnothaft commented 6 years ago

+1, I think you're correct. Let me take a look.

jpdna commented 6 years ago

Solved by #295, thanks @fnothaft