broadinstitute / ABC-Enhancer-Gene-Prediction

Cell type specific enhancer-gene predictions using ABC model (Fulco, Nasser et al, Nature Genetics 2019)
MIT License
202 stars 61 forks source link

KeyError: 'end' with run.neighborhoods.py #70

Closed pgh10 closed 11 months ago

pgh10 commented 2 years ago

The code runs fine with the example inputs but fails with KeyError using own inputs. Traced the problem back to my mm10 gene file and chromosome size file. Recreated both and ensured no trailing spaces but the error persists. Does anyone have a RefSeq mm10 bed file and chr.size file they've used successfully with run.neighborhoods?

peneder commented 1 year ago

Hi! I had the same problem but could fix it by ensuring that the chromsizes file has three columns: chromosome, start, end. Start is always 0 (see the example file used in the tutorial). My files only had the chromosome and end column, that caused the error. After adding the start column (just zeroes) it worked.

Btw, this is only true for run.neighborhoods.py. makeCandidateRegions.py requires a "normal" 2-column file with chromsome and "end" information.

atancoder commented 11 months ago

We've revamped the codebase. Please check out https://github.com/broadinstitute/ABC-Enhancer-Gene-Prediction/tree/main and reopen your issue if it still exists