Everything is in the question! Basically I guess I should load the bedgraph file and get the maximum value from the coverage column, however I can't seem to get this done.
I've tried using numpy:
>>> np.loadtxt('GSM1470159_sickle-se-q20_bwa.bedgraph', usecols=3)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/numpy/lib/npyio.py", line 722, in loadtxt
usecols = list(usecols)
TypeError: 'int' object is not iterable
This kind of stuff is a lot easier to deal with in R, however it looks super complicated to use R in python for such a simple task: https://sites.google.com/site/aslugsguidetopython/data-analysis/pandas/calling-r-from-python.
I must be missing something here, if you can help me thanks in advance!
Seems answered here: http://stackoverflow.com/questions/10758668/numpy-loadtxt-gives-not-iterable-error
Oh thanks, indeed! In the meantime I found another solution with pandas (see under).