diff --git a/Project.toml b/Project.toml index fd53590..f389db1 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "BedgraphFiles" uuid = "85eb9095-274b-55ce-be28-9e90f41ac741" authors = ["CiarĂ¡n O'Mara "] -version = "2.0.1" +version = "2.0.2" [deps] Bedgraph = "0bcc2ff6-69eb-520d-bede-0374fc5bd2fd" diff --git a/src/BedgraphFiles.jl b/src/BedgraphFiles.jl index 9d39fbd..4e24d27 100644 --- a/src/BedgraphFiles.jl +++ b/src/BedgraphFiles.jl @@ -11,7 +11,6 @@ using TableShowUtils import IterableTables -export load, save const BedgraphFileFormat = File{format"bedGraph"} @@ -24,7 +23,7 @@ function Base.show(io::IO, source::BedgraphFile) TableShowUtils.printtable(io, getiterator(source), "bedGraph file") end -function fileio_load(f::BedgraphFileFormat; args...) +function load(f::BedgraphFileFormat; args...) return BedgraphFile(f.filename, args) end @@ -59,20 +58,20 @@ function Base.collect(x::BedgraphFile) return collect(getiterator(x)) end -function fileio_save(file::BedgraphFileFormat, header::Bedgraph.BedgraphHeader, records::Vector{Bedgraph.Record}) +function save(file::BedgraphFileFormat, header::Bedgraph.BedgraphHeader, records::Vector{Bedgraph.Record}) write(file.filename, header, records) end -function fileio_save(file::BedgraphFileFormat, records::Vector{Bedgraph.Record}; bump_forward = true) +function save(file::BedgraphFileFormat, records::Vector{Bedgraph.Record}; bump_forward = true) #TODO: bump_forward records. header = Bedgraph.generateBasicHeader(records, bump_forward = bump_forward) - return fileio_save(file, header, records) + return save(file, header, records) end -function fileio_save(file::BedgraphFileFormat, data; bump_forward = true) +function save(file::BedgraphFileFormat, data; bump_forward = true) isiterabletable(data) || error("Can't write this data to bedGraph file.") it = getiterator(data) @@ -88,7 +87,7 @@ function fileio_save(file::BedgraphFileFormat, data; bump_forward = true) header = Bedgraph.generateBasicHeader(records, bump_forward = bump_forward) - return fileio_save(file, header, records) + return save(file, header, records) end end # module