Skip to content

Commit

Permalink
Update Galaxy tests and apply the general formatting in bedGraph outp…
Browse files Browse the repository at this point in the history
…ut everywhere
  • Loading branch information
dpryan79 committed Oct 28, 2016
1 parent 174a9b9 commit 982e412
Show file tree
Hide file tree
Showing 7 changed files with 482 additions and 482 deletions.
4 changes: 2 additions & 2 deletions deeptools/writeBedGraph_bam_and_bw.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def writeBedGraph_worker(
elif previousValue != value:
if not np.isnan(previousValue):
_file.write(
toBytes("{0}\t{1}\t{2}\t{3:.2f}\n".format(chrom, writeStart,
toBytes("{0}\t{1}\t{2}\t{3:g}\n".format(chrom, writeStart,
writeEnd, previousValue)))
previousValue = value
writeStart = writeEnd
Expand All @@ -138,7 +138,7 @@ def writeBedGraph_worker(
# write remaining value if not a nan
if previousValue and writeStart != end and \
not np.isnan(previousValue):
_file.write(toBytes("{0}\t{1}\t{2}\t{3:.1f}\n".format(chrom, writeStart,
_file.write(toBytes("{0}\t{1}\t{2}\t{3:g}\n".format(chrom, writeStart,
end, previousValue)))

tempFileName = _file.name
Expand Down
2 changes: 1 addition & 1 deletion galaxy/wrapper/test-data/bamCompare_result1.bg
Original file line number Diff line number Diff line change
@@ -1 +1 @@
chrM 0 16569 1.00
chrM 0 16569 1
Binary file modified galaxy/wrapper/test-data/bamCoverage_result2.bw
Binary file not shown.
14 changes: 7 additions & 7 deletions galaxy/wrapper/test-data/bamCoverage_result3.bg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
chrM 0 210 9768764.94
chrM 210 220 9560918.88
chrM 220 230 7690304.31
chrM 230 240 5196151.56
chrM 240 250 3325537.00
chrM 250 260 623538.19
chrM 260 16569 0.00
chrM 0 210 9.76876e+06
chrM 210 220 9.56092e+06
chrM 220 230 7.6903e+06
chrM 230 240 5.19615e+06
chrM 240 250 3.32554e+06
chrM 250 260 623538
chrM 260 16569 0
Loading

0 comments on commit 982e412

Please sign in to comment.