Skip to content

Commit

Permalink
round all haplotype frequencies to 5 decimal places (#61)
Browse files Browse the repository at this point in the history
converts all frequencies in scientific notation to decimal before rounding
  • Loading branch information
alexlancaster authored Jul 30, 2023
1 parent 3b3e4ee commit 4a8011c
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/PyPop/xslt/emhaplofreq.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,12 @@ MODIFICATIONS.
</xsl:call-template>

<xsl:call-template name="append-pad">
<xsl:with-param name="padVar" select="frequency"/>
<xsl:with-param name="padVar">
<xsl:call-template name="round-to">
<xsl:with-param name="node" select="frequency"/>
<xsl:with-param name="places" select="5"/>
</xsl:call-template>
</xsl:with-param>
<xsl:with-param name="length">9</xsl:with-param>
</xsl:call-template>

Expand Down Expand Up @@ -438,7 +443,12 @@ MODIFICATIONS.
</xsl:call-template>

<xsl:call-template name="append-pad">
<xsl:with-param name="padVar" select="frequency"/>
<xsl:with-param name="padVar">
<xsl:call-template name="round-to">
<xsl:with-param name="node" select="frequency"/>
<xsl:with-param name="places" select="5"/>
</xsl:call-template>
</xsl:with-param>
<xsl:with-param name="length">9</xsl:with-param>
</xsl:call-template>

Expand Down

0 comments on commit 4a8011c

Please sign in to comment.