Comments (7)
The maxVal is stored in the bigBed header. Could it be that it simply wasn't set for one of the files?
from pybigwig.
all files pull up a maxVal when tested
chr10 was successful but chr11 was not:
error msg:
from pybigwig.
Can you make the file available to me? I can have a look then.
from pybigwig.
Hi,
Currently, I'd like to know how to save the all entries into a file.
Here is my code:
bb=pyBigWig.open('./PBMCs_HistoneMarks_Blueprint/Males_UMCG00025_H3K4me1.peak_calls.bigBed' )
bb.entries('chrX', 16426, 156000962, withString=False)
So how can I output "bb.entries" object? By the way,for the bigBed object, how can I output all chromosomes intervals at one time, I found I need to specify start and end positions for each chromosome.
Again,if I use bigWig file, the intervals I extract is same as bigBed?Because I found start and end position is not necessary for bigWig file based on your description.
Many thx!
from pybigwig.
I don't know that I ever put in the logic in the .entries()
function to have it fill in the chromosome bounds if nothing was supplied. I suppose that could be done, though since the python function is really just a thin wrapper over a C function and C is less flexible about such things.
For outputting the results of bb.entries(), it's just a list of tuples, so something like the following would work:
for res in bb.entries('chr1', 10000000, 10020000):
o.write("chr1\t{}\t{}\t{}\n".format(res[0], res[1], res[2]))
from pybigwig.
I don't know that I ever put in the logic in the
.entries()
function to have it fill in the chromosome bounds if nothing was supplied. I suppose that could be done, though since the python function is really just a thin wrapper over a C function and C is less flexible about such things.
Thanks for your detailed reply.
Could I try this, I don't need strings:
for res in bb.entries('chr1', 10000000, 10020000, withString=False):
o.write("chr1".format(res[0], res[1], res[2]))
Best wishes!
from pybigwig.
o.write("chr1\t{}\t{}\n".format(res[0], res[1]))
in that case as an example.
from pybigwig.
Related Issues (20)
- RuntimeError: Invalid interval bounds
- Document performance considerations? HOT 4
- Cannot add entries of value type int, but only float HOT 2
- support for osx-arm64 HOT 2
- numpy support broken in 0.3.18? HOT 1
- Create a BedGraph file using addEntries() throws segmentation fault HOT 2
- library import error HOT 4
- pyBigWig fails to find numpy installation when installing from PyPI HOT 5
- Writing a nan value should leave a gap HOT 7
- Can't enforce numpy features when pyBigWig is used as a dependency in downstream package HOT 5
- pip installation broken HOT 4
- Installing through pip not working HOT 9
- addHeader does not support multiple calls
- Support for python >=3.11 HOT 1
- Issue Downloading pyBigWig HOT 1
- Simple patch to resolve conflict with roundup() macro
- Stats Sum Not Working as Expected
- 'zsh: segmentation fault ' HOT 1
- Out of memory listing entries on one human chromosome on a machine with 300 GB ram and 165 GB BigBed file HOT 1
- pyBigWig.entries() should return empty array, not None when no entries are found
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pybigwig.