https://github.com/ciaranomara/bedgraph.jl
Read and write support for bedGraph file format.
Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
2 of 3 committers (66.7%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.5%) to scientific vocabulary
Keywords
Repository
Read and write support for bedGraph file format.
Basic Info
Statistics
- Stars: 0
- Watchers: 0
- Forks: 5
- Open Issues: 0
- Releases: 18
Topics
Metadata Files
README.md
Bedgraph.jl
This project follows the semver pro forma and uses the git-flow branching model.
Description
This package provides read and write support for Bedgraph files.
Note: this package does not currently handle bedGraph meta data such as the track definition or browser lines.
Installation
You can install Bedgraph from the Julia REPL.
Press ] to enter pkg mode, then enter the following:
julia
add Bedgraph
If you are interested in the cutting edge of the development, please check out the develop branch to try new features before release.
Usage
Reading and writing bedGraph files
See source for optional
bump_back,bump_forward, andright_openkey values. These options are included in the pertinent read/write functions to handle quirks of the zero-based and half-open nature of the bedGraph format.
Read header/meta
```julia using Bedgraph
header = read(file, BedgraphHeader{Vector{String}}) ```
Read records
Read all records at once. ```julia using Bedgraph
records = read(file, Vector{Bedgraph.Record}) ```
```julia using Bedgraph
records = open(file, "r") do io return read(io, Vector{Bedgraph.Record}) end ```
Alternatively you may want to read and process records individually.
julia
open(file, "r") do io
while !eof(seek(io, Bedgraph.Record))
record = read(io, Bedgraph.Record) #Note: no protection.
# Process record.
end
end
Write a bedGraph file
Bedgraph.jl currently provides two write functions: one for Bedgraph.BedgraphHeader, and one for Bedgraph.Record, which also accepts Vector{Bedgraph.Record}.
```julia using Bedgraph
const chroms = ["chr19", "chr19", "chr19", "chr19", "chr19", "chr19", "chr19", "chr19", "chr19"] const firsts = [49302000, 49302300, 49302600, 49302900, 49303200, 49303500, 49303800, 49304100, 49304400] const lasts = [49302300, 49302600, 49302900, 49303200, 49303500, 49303800, 49304100, 49304400, 49304700] const values = [-1.0, -0.75, -0.50, -0.25, 0.0, 0.25, 0.50, 0.75, 1.00]
records = Bedgraph.Record.(chroms, firsts, lasts, values)
sort!(records)
header = Bedgraph.generatebasicheader(records)
write("data.bedgraph", header, records) ```
```julia using Bedgraph
records = [Record("chr19", 49302000, 49302300, -1.0), Record("chr19", 49302300, 49302600, -1.75)] header = Bedgraph.generatebasicheader("chr19", records[1].first, records[end].last, bump_forward=false)
open(output_file, "w") do io write(io, header, records) end ```
Converting records
Below are some examples of Bedgraph.Record conversions provided by this package.
```julia
using Bedgraph
record = Record("chr1", 10, 20)
Convert record to NamedTuple.
nt = convert(NamedTuple, record)
Convert record to NamedTuple and rename fields.
nt = convert(NamedTuple{(:chrom, :left, :right, :value)}, record) ```
Owner
- Name: Ciarán O'Mara
- Login: CiaranOMara
- Kind: user
- Website: https://ciaranomara.github.io
- Repositories: 102
- Profile: https://github.com/CiaranOMara
GitHub Events
Total
Last Year
Committers
Last synced: over 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Ciarán O'Mara | C****a@u****u | 147 |
| Ciarán O'Mara | C****u | 2 |
| Tony Kelman | t****y@k****t | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 9 months ago
All Time
- Total issues: 1
- Total pull requests: 2
- Average time to close issues: less than a minute
- Average time to close pull requests: about 2 years
- Total issue authors: 1
- Total pull request authors: 2
- Average comments per issue: 5.0
- Average comments per pull request: 2.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- JuliaTagBot (1)
Pull Request Authors
- JuliaTagBot (2)
- tkelman (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- julia 1 total
- Total dependent packages: 1
- Total dependent repositories: 0
- Total versions: 14
juliahub.com: Bedgraph
Read and write support for bedGraph file format.
- Documentation: https://docs.juliahub.com/General/Bedgraph/stable/
- License: MIT
-
Latest release: 2.3.0
published about 2 years ago
Rankings
Dependencies
- julia-actions/setup-julia v1 composite
- JuliaRegistries/TagBot v1 composite
- actions/checkout v4 composite
- codecov/codecov-action v4 composite
- julia-actions/cache v1 composite
- julia-actions/julia-buildpkg v1 composite
- julia-actions/julia-processcoverage v1 composite
- julia-actions/julia-runtest v1 composite
- julia-actions/setup-julia v1 composite