IndexError: list index out of range

Issue #34 resolved
Basma Abdelkarim created an issue

Hi, I've been trying to run the ROSE algorithm and it works fine with the example files, but when I use my files I keep getting this error:

Traceback (most recent call last):
  File "ROSE_bamToGFF.py", line 249, in <module>
    main()
  File "ROSE_bamToGFF.py", line 240, in main
    newGFF = mapBamToGFF(bamFile,gffFile,options.sense,int(options.extension),options.floor,options.rpm,options.matrix)
  File "ROSE_bamToGFF.py", line 76, in mapBamToGFF
    gffLocus = ROSE_utils.Locus(line[0],int(line[3]),int(line[4]),line[6],line[1])
IndexError: list index out of range

I used the exact instructions given for the .gff file and it still gives me this error. The program keeps running, it doesn't crash but this is all I got in my log file:

{'matrix': '1', 'extension': '200', 'floor': '1', 'sense': 'both', 'output': 'ROSE_output2/mappedGFF/HI038_HI038.2_Tead4_2d.nodup.bam_MAPPED.gff', 'bam': '/home/hpc3815/H3K27ac/chipseq_bowtie_dedup/HI038.2_Tead4_2d.nodup.bam', 'rpm': True, 'input': '/home/hpc3815/H3K27ac/MACS2/HI038.2_Tead4_2d_summits.gff'}
[]
mapping to GFF and making a matrix with fixed bin number
2370615
using a MMR value of 2.3706
has chr
Number lines processed
0
{'matrix': '1', 'extension': '200', 'floor': '1', 'sense': 'both', 'output': 'ROSE_output2/mappedGFF/HI038_12KB_STITCHED_HI038.2_Tead4_2d.nodup.bam_MAPPED.gff', 'bam': '/home/hpc3815/H3K27ac/chipseq_bowtie_dedup/HI038.2_Tead4_2d.nodup.bam', 'rpm': True, 'input': 'ROSE_output2/gff/HI038_12KB_STITCHED.gff'}
[]
mapping to GFF and making a matrix with fixed bin number
2370615
using a MMR value of 2.3706
has chr
Number lines processed
0
100
200
300
400
500
600
700
800
900
1000
1100
1200
1300
1400
1500
1600
1700
1800
1900
2000
2100
2200
2300
2400
2500
2600
2700
2800
2900
3000
3100
3200
3300

and the only output I get is the stitched file in the mapped directory, the rest doesn't output

Please help. Thank you in advance

Comments (8)

  1. Brian Abraham

    Hello,

    It would help to diagnose your issue if you could post a few lines from /home/hpc3815/H3K27ac/MACS2/HI038.2_Tead4_2d_summits.gff as well as from ROSE_output2/gff/HI038_12KB_STITCHED.gff

  2. Basma Abdelkarim reporter

    Hello Brian,

    I figured out it was a problem with my gff file. To fix the problem I used a bed file and used the bedToGFF method in the bamToGFF.py script and it worked well.

    Thank you for your concern.

  3. Gunjan Girish Gala

    Hello, I get the same error and to troubleshoot I tried different approaches but still the error persists. I was curious to know how did Basma Abdelkarim fix this using bamToGFF.py ? Or if there is any easy/alternate solution to try. Thanks, Gunjan

  4. Brian Abraham

    Hello,

    I suspect the gff you are giving ROSE is not formatted correctly. Common problems with this include not being tab-delimited properly and using a DOS-formatted file with extra end-of-line characters.

  5. Tao Lin

    Hi, When I run ROSE, I encounter the following problem:

    (python2.7) liurui@liuruideMacBook-Pro ROSE % python2.7 ROSE_main.py -g HG38.fa -i /Users/liurui/ROSE/hepg2_fil_peaks.gff -r /Users/liurui/ROSE/hepg2_k27ac_fil.sorted.bam -c /Users/liurui/ROSE/hepg2_con_fil.sorted.bam -o /Users/liurui/ROSE -s 12500 -t 2000
    USING /Users/liurui/ROSE/hepg2_fil_peaks.gff AS THE INPUT GFF
    USING HG38.fa AS THE GENOME
    MAKING START DICT
    Traceback (most recent call last):
    File "ROSE_main.py", line 484, in <module>
    main()
    File "ROSE_main.py", line 336, in main
    startDict = ROSE_utils.makeStartDict(annotFile)
    File "/Users/liurui/ROSE/ROSE_utils.py", line 168, in makeStartDict
    refseqTable,refseqDict = importRefseq(annotFile)
    File "/Users/liurui/ROSE/ROSE_utils.py", line 230, in importRefseq
    if refseqDict.has_key(line[1]):
    IndexError: list index out of range

  6. Log in to comment