https://github.com/brentp/bw-python
python wrapper to dpryan79's bigwig library using cffi
Science Score: 13.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
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (3.8%) to scientific vocabulary
Repository
python wrapper to dpryan79's bigwig library using cffi
Basic Info
- Host: GitHub
- Owner: brentp
- License: mit
- Language: C
- Default Branch: master
- Size: 83 KB
Statistics
- Stars: 19
- Watchers: 3
- Forks: 1
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
python wrapper to Devon Ryan's bigwig library using cffi
```Python
from bw import BigWig b = BigWig("libBigWig/test/test.bw") b BigWig('libBigWig/test/test.bw') for interval in b("1", 0, 99): ... interval Interval(chrom='1', start=0, end=1, value=0.10000000149011612) Interval(chrom='1', start=1, end=2, value=0.20000000298023224) Interval(chrom='1', start=2, end=3, value=0.30000001192092896)
get an array.array() for large numbers of values.
default is to return nan's for missing values
b.values("1", 0, 9) array('f', [0.10000000149011612, 0.20000000298023224, 0.30000001192092896, nan, nan, nan, nan, nan, nan])
we can also get missing, but won't know the base it's associated with.
b.values("1", 0, 9, False) array('f', [0.10000000149011612, 0.20000000298023224, 0.30000001192092896])
stats are ("mean", "std", "max", "min", "coverage")
b.stats("1", 0, 9, stat="mean") 0.2000000054637591
b.stats("1", 0, 9, stat="std") 0.10000000521540645
b.stats("1", 0, 4, stat="coverage") 0.75 b.stats("1", 0, 4, stat="coverage", nBins=2) array('d', [1.0, 0.5])
get the chromosomes and lengths as a list of tuples:
b.chroms [('1', 195471971), ('10', 130694993)]
b.close() ```
An array.array can be turned into a numpy array with np.frombuffer(a, dtype='f')
Owner
- Name: Brent Pedersen
- Login: brentp
- Kind: user
- Location: Oregon, USA
- Twitter: brent_p
- Repositories: 220
- Profile: https://github.com/brentp
Doing genomics
GitHub Events
Total
Last Year
Issues and Pull Requests
Last synced: over 1 year ago
All Time
- Total issues: 0
- Total pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: about 7 hours
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 1.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
Pull Request Authors
- Wainberg (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- cffi *
- setuptools >=0.6c11