Open rresendepinto opened 4 years ago
I have a similar problem with the mouse data. If you have found a solution, please tell me. Thank you!
Hello! It is a problem with the fields in the output table which were changed in a bedtools update. You can use a docker image I created (rrpinto/dogcatcher). Hope that solves the issue! Best, Rui
@rresendepinto Thank you for your answer. Unfortunately, I didn't find the docker image. Can you send the link?
Hi, this is the link (https://hub.docker.com/r/rrpinto/dogcatcher), you can pull it using docker pull rrpinto/dogcatcher
Thanks for that, but unfortunately, I still have the same error whether or not using the docker image.
Traceback (most recent call last):
File "/Dogcatcher/2.0_Dogcatcher.py", line 887, in
Whether using the bedtools version recommended by the author or version 2.29.2, the commands used for generating BedGraph files were as follows:
bedtools genomecov -bg -split -strand + -ibam file1.bam -g chromsizes.genome > file1_plu.BedGraph
bedtools genomecov -bg -split -strand - -ibam file1.bam -g chromsizes.genome > file1_min.BedGraph
The resulting format of the generated BedGraph files looked something like this:
chr1 14764 14914 1
chr1 138450 138599 1
chr1 353918 354067 1
chr1 361855 362005 1
chr1 364138 364288 1
chr1 564602 564603 1
Afterwards, to adapt the BedGraph files for compatibility with the provided code, the 'chr' prefix was removed using the following commands:
sed -i 's/^chr//' ${BEDPATH}/${id}_min.BedGraph
sed -i 's/^chr//' ${BEDPATH}/${id}_plu.BedGraph
Subsequently, the BedGraph files were successfully reformatted to the format:
1 14764 14914 1
1 138450 138599 1
1 353918 354067 1
1 361855 362005 1
1 364138 364288 1
1 564602 564603 1
Please ensure to delete any previously generated empty temporary files before running the commands.
When running 2.0_Dogatcher.py, I get the following error :
Traceback (most recent call last): File "Dogcatcher/2.0_Dogcatcher.py", line 896, in
last_time = time.time()
File "/opt/conda/lib/python2.7/site-packages/pandas/core/frame.py", line 2927, in getitem
indexer = self.columns.get_loc(key)
File "/opt/conda/lib/python2.7/site-packages/pandas/core/indexes/base.py", line 2659, in get_loc
return self._engine.get_loc(self._maybe_cast_indexer(key))
File "pandas/_libs/index.pyx", line 108, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 132, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 1601, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 1608, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'DOG_length'
Do you know what is causing this error? Thanks, Rui