How to load bed graph in a numpy vector
0
0
Entering edit mode
5.6 years ago
ja4123 ▴ 30

Someone can tell me how to load bed graph format to numpy as a vector? Part of a file looks like that:

4   13636   13687   1
4   13748   13799   1
4   26733   26754   1
4   26754   26776   2
4   26776   26785   3
4   26785   26791   4
sequence gene • 970 views
ADD COMMENT
0
Entering edit mode

I have added formatting to your post and changed the title to make it more explicit about what you are asking,

I would think a pandas DataFrame is more appropriate for this. Is there any reason you prefer a numpy vector?

ADD REPLY
0
Entering edit mode

It depends on what you want to do, but I second Pandas. Pandas is partly built on Numpy, so often when performing operations on dataframe series it is actually numpy under to hood running CPU optimized operations just like it would on a standard numpy array.

ADD REPLY

Login before adding your answer.

Traffic: 2197 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6