loosolab / UROPA

Universal RObust Peak Annotator
https://uropa-manual.readthedocs.io/
MIT License
15 stars 6 forks source link

IndexError #1

Closed pdimitron closed 5 years ago

pdimitron commented 5 years ago

I'm fairly new to coding and I'm running into an error using your peak annotation package. No one in my lab is familiar with using it and I was hoping to get some help troubleshooting. I am running MacOSX El Capitan. Here is my code up until the error:

(uropa) pro1:UROPA nathanslab$ uropa -b TOA1_narrowpeaks.bed -g Mus_musculus.GRCm38.96.chr.gtf -i UROPA.json

2019-05-20 14:56:52 [INFO] - Started UROPA
2019-05-20 14:56:52 [INFO] - Working directory: /Users/nathanslab/Desktop/PD/UROPA
2019-05-20 14:56:52 [INFO] - Command-line call: /Users/lab/miniconda3/envs/uropa/bin/uropa -b TOA1_narrowpeaks.bed -g Mus_musculus.GRCm38.96.chr.gtf -i UROPA.json
2019-05-20 14:56:52 [INFO] - Reading configuration from commandline/input config
2019-05-20 14:56:52 [INFO] - Reading .bed-file to annotate
2019-05-20 14:56:53 [INFO] - Preparing .gtf-file for fast access
Traceback (most recent call last):
  File "/Users/lab/miniconda3/envs/uropa/bin/uropa", line 11, in <module>
    load_entry_point('uropa==3.3.0', 'console_scripts', 'uropa')()

File "/Users/lab/miniconda3/envs/uropa/lib/python3.7/site-packages/uropa/uropa.py", line 316, in main
    subset_gtf(cfg_dict["gtf"], query_feat, sub_gtf)

File "/Users/lab/miniconda3/envs/uropa/lib/python3.7/site-packages/uropa/utils.py", line 336, in subset_gtf

gtf_query_feat = [line for line in lines if line.split("\t")[2] in feat2cut]
File "/Users/lab/miniconda3/envs/uropa/lib/python3.7/site-packages/uropa/utils.py", line 336, in <listcomp>

gtf_query_feat = [line for line in lines if line.split("\t")[2] in feat2cut]
IndexError: list index out of range

I have tried re-downloading miniconda3 and UROPA as well as using multiple .gtf files. I also checked my .json code with JSONLint. Any help would be appreciated.

Best

pdimitron commented 5 years ago

apologies for all the edits, I was trying to figure out how to format the code.

msbentsen commented 5 years ago

Hi pdimitron,

Looks like your input files are fine. I looked at the error and found a bug in uropa occuring when subsetting .gtf's with comment lines - sorry about that.

I have released uropa 3.3.1 to resolve this issue. It is not available in bioconda yet, but you can use pip to install: pip install uropa and add --upgrade if you already installed using pip.
Calling uropa --version should then read uropa 3.3.1.

Hope this fixes the error!

pdimitron commented 5 years ago

Hi,

Thank you, yes that solved the problem.Thank you for your help.

Best