https://github.com/ciaranomara/bedgraph.jl

Read and write support for bedGraph file format.

https://github.com/ciaranomara/bedgraph.jl

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

bedgraph bioinformatics dna julia
Last synced: 9 months ago · JSON representation

Repository

Read and write support for bedGraph file format.

Basic Info
  • Host: GitHub
  • Owner: CiaranOMara
  • License: mit
  • Language: Julia
  • Default Branch: develop
  • Homepage:
  • Size: 126 KB
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 5
  • Open Issues: 0
  • Releases: 18
Topics
bedgraph bioinformatics dna julia
Created almost 9 years ago · Last pushed about 2 years ago
Metadata Files
Readme License

README.md

Bedgraph.jl

Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public. Unit Tests codecov

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, and right_open key 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

GitHub Events

Total
Last Year

Committers

Last synced: over 1 year ago

All Time
  • Total Commits: 150
  • Total Committers: 3
  • Avg Commits per committer: 50.0
  • Development Distribution Score (DDS): 0.02
Past Year
  • Commits: 6
  • Committers: 1
  • Avg Commits per committer: 6.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email 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.

  • Versions: 14
  • Dependent Packages: 1
  • Dependent Repositories: 0
  • Downloads: 1 Total
Rankings
Dependent repos count: 9.9%
Forks count: 21.7%
Dependent packages count: 23.0%
Average: 31.9%
Stargazers count: 73.2%
Last synced: 9 months ago

Dependencies

.github/workflows/CompatHelper.yml actions
  • julia-actions/setup-julia v1 composite
.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite
.github/workflows/UnitTests.yml actions
  • 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