Skip to content

Commit

Permalink
fix OntologyEnrichment numberOfDEsInBin
Browse files Browse the repository at this point in the history
  • Loading branch information
bvenn committed Aug 16, 2019
1 parent 0472f29 commit 0ed0161
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .paket/Paket.Restore.targets
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
</PropertyGroup>

<PropertyGroup Condition=" '$(MSBuildSupportsHashing)' == 'true' And '$(CacheFilesExist)' == 'true' ">
<!-- If the restire file doesn't exist we need to restore, otherwise only if hashes don't match -->
<!-- If the restore file doesn't exist we need to restore, otherwise only if hashes don't match -->
<PaketRestoreRequired>true</PaketRestoreRequired>
<PaketRestoreRequired Condition=" '$(PaketRestoreLockFileHash)' == '$(ProjectsRestoredHash)' ">false</PaketRestoreRequired>
<PaketRestoreRequired Condition=" '$(PaketRestoreLockFileHash)' == '' ">true</PaketRestoreRequired>
Expand Down
4 changes: 2 additions & 2 deletions src/BioFSharp.Stats/OntologyEnrichment.fs
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ module OntologyEnrichment =
let hp = FSharp.Stats.Distributions.Discrete.hypergeometric totalUnivers totalNumberOfDE numberInBin
if numberInBin > splitPvalueThreshold then
// Calculate normal pValue
1. - hp.CDF (float (numberOfDEsInBin + 1))
1. - hp.CDF (float (numberOfDEsInBin - 1))
else
// Calculate split pValue
0.5 * ((1. - hp.CDF(float(numberOfDEsInBin + 1)) ) + ( (1. - hp.CDF(float(numberOfDEsInBin))) ) )
0.5 * ((1. - hp.CDF(float(numberOfDEsInBin - 1)) ) + ( (1. - hp.CDF(float(numberOfDEsInBin))) ) )
else
nan

Expand Down

0 comments on commit 0ed0161

Please sign in to comment.