daler / chromhmm-tools Goto Github PK
View Code? Open in Web Editor NEWHelpers for working with ChromHMM (http://compbio.mit.edu/ChromHMM/)
Helpers for working with ChromHMM (http://compbio.mit.edu/ChromHMM/)
Hello,
I am receiving an error when using the ChromHMM-signalize rebin command. The first bigwig file is converted to a bedgraph and then I receive the error below. Do you have any suggestions to resolve this?
Thanks,
Michael
[2018-02-24 23:52:41,283] INFO: /projects/med/hlab/analysis/working/UM_shBAP1/ChIP-Seq/921/chromHMM/921_Control_H2Aub_average.bw -> binned/921_Control-H2Aub-200-{chrom}.binned
[2018-02-24 23:52:41,353] INFO: converting to bedgraph
[2018-02-24 23:53:46,457] INFO: chr1
Traceback (most recent call last):
File "/projects/med/hlab/software/chromhmm-tools/chromhmm_signalize.py", line 280, in <module>
parser.dispatch()
File "/projects/med/hlab/software/virtualpython/ENV/lib/python2.7/site-packages/argh/helpers.py", line 55, in dispatch
return dispatch(self, *args, **kwargs)
File "/projects/med/hlab/software/virtualpython/ENV/lib/python2.7/site-packages/argh/dispatching.py", line 174, in dispatch
for line in lines:
File "/projects/med/hlab/software/virtualpython/ENV/lib/python2.7/site-packages/argh/dispatching.py", line 277, in _execute_command
for line in result:
File "/projects/med/hlab/software/virtualpython/ENV/lib/python2.7/site-packages/argh/dispatching.py", line 260, in _call
result = function(*positional, **keywords)
File "/projects/med/hlab/software/chromhmm-tools/chromhmm_signalize.py", line 194, in rebin
write_interpolated_results(x, y, chrom)
File "/projects/med/hlab/software/chromhmm-tools/chromhmm_signalize.py", line 176, in write_interpolated_results
max_pos = genome[chrom][-1]
KeyError: u'chr1'
Hi, I'm trying to run rebin on a set of .bigwig files, however this error shows up when I try to run chromhmm_signalize.py rebin config.txt hg18. The config.txt file looks correct, so I'm not sure what the error is. I tried to use a config file with only one line, or config files with other .bigwig files from ENCODE, but both still show the same error. Please help! Thank you :)
Code
chromhmm_signalize.py rebin config.txt hg18
ERROR
INFO: /home/itg/jackson.cheung/data/GSM3691940_MSC_H3K4me3_8A.bigwig -> binned/MSC-H3K4me3-200-{chrom}.binned
Traceback (most recent call last):
File "/home/itg/jackson.cheung/chromhmm-tools/chromhmm_signalize.py", line 280, in
parser.dispatch()
File "/home/itg/jackson.cheung/miniconda3/envs/HiCExplorer/lib/python3.10/site-packages/argh/helpers.py", line 55, in dispatch
return dispatch(self, *args, **kwargs)
File "/home/itg/jackson.cheung/miniconda3/envs/HiCExplorer/lib/python3.10/site-packages/argh/dispatching.py", line 174, in dispatch
for line in lines:
File "/home/itg/jackson.cheung/miniconda3/envs/HiCExplorer/lib/python3.10/site-packages/argh/dispatching.py", line 277, in _execute_command
for line in result:
File "/home/itg/jackson.cheung/miniconda3/envs/HiCExplorer/lib/python3.10/site-packages/argh/dispatching.py", line 260, in _call
result = function(*positional, **keywords)
File "/home/itg/jackson.cheung/chromhmm-tools/chromhmm_signalize.py", line 192, in rebin
for i in bt:
File "pybedtools/cbedtools.pyx", line 760, in pybedtools.cbedtools.IntervalIterator.next
File "/home/itg/jackson.cheung/miniconda3/envs/HiCExplorer/lib/python3.10/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfc in position 1: invalid start byte
I checked the results generated by chromhmm_signalize.py which all results are float values. It is correct?
Hi,
I hope this repo is still maintained, it looks a very useful tool from my first tries, thanks for your work.
I am currently having trouble pooling multiple instances of the binarized signal into a single one when going from your script to ChromHMM.
For instance, I have 15 H3K27ac peak files, same cell type. However, even specifying this in the config, I obtain a single column for each one of them in the signal folder. Am I missing something?
It looks like ChromHMM binarizeSignal
doesn't allow for a config file specification itself (unlike binarizeBed
and binarizeBam
), so I can't pool them downstream.
Thank you for your help
EDIT: I made a mistake, indeed the output of your script is a single file for each cell/mark combination, for each chromosome (pooling the bw/bedgraphs, right? But, looking at the logs while the program is running it almost seems that each single one overwrites the previous). The problem is probably downstream when I first call ChromHMM. I am trying to understand what step is causing me this problem.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.