rrazaghi / modbamtools

Set of tools to manipulate and visualize modified base bam files
Apache License 2.0
47 stars 4 forks source link

IndexError: list index out of range #23

Open yykaya opened 1 year ago

yykaya commented 1 year ago

Hi all,

I'm using the modbamtools for my annotated nanopore sequences and faced the index error of my gtf.gz.tbi file.

I'm pretty sure the positions are in the right range. Why do you think this problem is caused?

Thanks in advance!

Command:

modbamtools plot -r Chr4:1180-18584524 \ --gtf sorted.X.gtf.gz \ --out . \ --prefix GeneX \ --samples GeneX \ --track-titles GeneX \ XYZ_sorted_mapped.bam

the error:

Traceback (most recent call last): File "/u/x/miniconda3/envs/py38/bin/modbamtools", line 8, in sys.exit(cli()) File "/u/x/miniconda3/envs/py38/lib/python3.8/site-packages/click/core.py", line 1130, in call return self.main(args, kwargs) File "/u/x/miniconda3/envs/py38/lib/python3.8/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/u/x/miniconda3/envs/py38/lib/python3.8/site-packages/click/core.py", line 1657, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/u/x/miniconda3/envs/py38/lib/python3.8/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, ctx.params) File "/u/x/miniconda3/envs/py38/lib/python3.8/site-packages/click/core.py", line 760, in invoke return __callback(args, **kwargs) File "/u/x/miniconda3/envs/py38/lib/python3.8/site-packages/modbamtools/cli.py", line 334, in plot fig = Plotter( File "/u/x/miniconda3/envs/py38/lib/python3.8/site-packages/modbamtools/modbamviz.py", line 47, in init self.tracks, self.num_tracks = get_tracks_gl( File "/u/x/miniconda3/envs/py38/lib/python3.8/site-packages/modbamtools/tracks_webgl.py", line 236, in get_tracks_gl genes = parse_gtf_exons(gtf, chrom, start, end) File "/u/x/miniconda3/envs/py38/lib/python3.8/site-packages/modbamtools/gene_models.py", line 172, in parse_gtf_exons coo = (v["gene"][0], v["gene"][1]) IndexError: list index out of range

srkndgn commented 1 year ago

I have the same problem. Is there someone to help for this issue?

PanZiwei commented 10 months ago

I have also suffered the same issue. I used the GENCODE format for gtf file. Anyway to solve the issue?