Small floats render in exponential notation
See original GitHub issueI have a WDL with command block samtools view -s ${frac} -b ${bampath} -o ${outname}.bam
, where frac
is a Float
type.
I’m running in FireCloud. Downstream, in the PAPI script, this had turned into samtools view -s 5.0E-5 -b ...<etc>
, which rather confused samtools.
Someone somewhere decided to render 0.00005
as 5.0E-5
, and it wasn’t me. Can you help?
(Adam N said to reference WDL draft-2, so I am hereby doing that.)
WDL follows:
task downsample {
File bampath
File baipath
File refpath
File refipath
Float frac
String outname
Int disk_size = ceil((size(bampath, "GB") + size(refpath, "GB") + size(refipath, "GB")) * 3)
command {
samtools view -s ${frac} -b ${bampath} -o ${outname}.bam
}
output {
File outcram = "${outname}.bam"
}
runtime {
docker : "mshand/genomesinthecloud:samtools.1.8"
disks: "local-disk ${disk_size} HDD"
memory: "4GB"
}
}
workflow dswf {
call downsample
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
How to suppress scientific notation when printing float values?
Is there any way to suppress scientific notation and make it display as 0.00001 ? I'm going to use the result as a...
Read more >FloatPrecision - R7RS-small
These are written by replacing the e of exponential notation with an s, f, d, ... short-floats cannot have more precision than long-floats,...
Read more >Floating-point arithmetic - Wikipedia
In computing, floating-point arithmetic (FP) is arithmetic that represents real numbers approximately, using an integer with a fixed precision, ...
Read more >Floating-Point Number - an overview | ScienceDirect Topics
Like scientific notation, floating-point numbers have a sign, mantissa (M), base (B), and exponent (E), as shown in Figure 5.27. For example, the...
Read more >Simple String Representation of Java Decimal Numbers ...
While float and double had their smallest and largest numbers expressed in scientific notation, BigDecimal only does this by default for smaller ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
FWIW this should workaround the issue until it’s addressed
https://github.com/openwdl/wdl/pull/235/files#diff-7ab1be25d3b4d9ecf4f763e14d464681R1084