Closed arahuja closed 8 years ago
Reviewed 1 of 2 files at r1. Review status: 1 of 2 files reviewed at latest revision, 3 unresolved discussions.
_pom.xml, line 281 [r1] (raw file):_
<groupId>org.scalanlp</groupId> <artifactId>breeze_${scala.version.prefix}</artifactId> <version>0.11.2</version>
OOC any reason we use 0.11.2 over 0.12 (latest stable release)?
src/main/scala/org/hammerlab/guacamole/likelihood/Likelihood.scala, line 61 [r1] (raw file):
val result = likelihoodsOfGenotypes( elements, Array(genotype),
per Slack discussion, maybe change these to Vector?
src/main/scala/org/hammerlab/guacamole/likelihood/Likelihood.scala, line 88 [r1] (raw file):
normalize: Boolean = false): Seq[(Genotype, Double)] = { val alleles = pileup.distinctAlleles.filter(allele => allele.altBases.forall((Bases.isStandardBase _)))
Since it's been eliminated, OOC what was the original purpose of this filter fn?
Comments from Reviewable
Review status: 1 of 2 files reviewed at latest revision, 3 unresolved discussions.
pom.xml, line 281 [r1] (raw file):
No, I don't think so, just hasn't been updated since. I will update this as well
src/main/scala/org/hammerlab/guacamole/likelihood/Likelihood.scala, line 61 [r1] (raw file):
This is just creating a one element array so it shouldn't make a difference really
src/main/scala/org/hammerlab/guacamole/likelihood/Likelihood.scala, line 88 [r1] (raw file):
Ah, good question, perhaps I should not remove it. I think it was to only evaluate Genotypes with proper bases, so should be left as-is.
Comments from Reviewable
Review status: 0 of 3 files reviewed at latest revision, 2 unresolved discussions.
_src/main/scala/org/hammerlab/guacamole/likelihood/Likelihood.scala, line 88 [r1] (raw file):_
In what case would a non-proper base make its way into a Genotype?
Comments from Reviewable
src/main/scala/org/hammerlab/guacamole/likelihood/Likelihood.scala, line 61 [r1] (raw file):
An
N
base or an empty string could be there
Comments from Reviewable
Reviewed 3 of 3 files at r2. Review status: all files reviewed at latest revision, 1 unresolved discussion.
Comments from Reviewable
Review status: all files reviewed at latest revision, 1 unresolved discussion.
Comments from Reviewable
Thanks for the review @e5c!
src/main/scala/org/hammerlab/guacamole/likelihood/Likelihood.scala, line 27 [r2] (raw file):
* This considers only the base quality scores. * * @param element the [org.hammerlab.guacamole.pileup.PileupElement]] to consider
missing [
here?
Comments from Reviewable
src/main/scala/org/hammerlab/guacamole/likelihood/Likelihood.scala, line 91 [r2] (raw file):
val genotypes = (for { i <- 0 until alleles.size
j/w: this change intentional?
Comments from Reviewable
src/main/scala/org/hammerlab/guacamole/likelihood/Likelihood.scala, line 143 [r2] (raw file):
val depth = elements.size val alleleElementProbabilities = computeAlleleElementProbabilities(elements, alleles.toArray, probabilityCorrect)
seems like you should replace the .toIndexedSeq
with .toArray
a few lines up, and then you don't have to do this here / copy the collection twice for no reason?
Comments from Reviewable
src/main/scala/org/hammerlab/guacamole/likelihood/Likelihood.scala, line 154 [r2] (raw file):
val alleleRow1 = alleleElementProbabilities(alleleToIndex(genotype.alleles(0)), ::) val alleleRow2 = alleleElementProbabilities(alleleToIndex(genotype.alleles(1)), ::) ( //alleleRow1.aggregate(alleleRow2, Functions.plus, Functions.chain(Functions.log, Functions.plus))
any reason to leave this commented line in?
Comments from Reviewable
_src/main/scala/org/hammerlab/guacamole/loci/LociArgs.scala, line 82 [r2] (raw file):_
val loci = LociParser( Source.fromInputStream(is).getLines().mkString
weird, having a hard time convincing myself that this works before or after this change.
mkString("")
ing a bunch of loci-str lines does not seem like it would work
and anyway we should probably put
each line and not read the whole file in at once.
i'll investigate this separately unless you think i'm missing something
Comments from Reviewable
_src/main/scala/org/hammerlab/guacamole/likelihood/Likelihood.scala, line 27 [r2] (raw file):_
Sure will add in follow-on
Comments from Reviewable
src/main/scala/org/hammerlab/guacamole/likelihood/Likelihood.scala, line 91 [r2] (raw file):
It was, but should be the same I can revert this
Comments from Reviewable
src/main/scala/org/hammerlab/guacamole/likelihood/Likelihood.scala, line 91 [r2] (raw file):
np. intellij suggests using
.indices
but i can't tell if there's any good reason for it; seems probably better in general though here given the next line the parallel structure is nice so fine to leave as is
Comments from Reviewable
src/main/scala/org/hammerlab/guacamole/likelihood/Likelihood.scala, line 154 [r2] (raw file):
No, removing in follow
Comments from Reviewable
Reviving an old branch here that moved the likelihood calculations to
breeze
This change is