YangLab / CIRCexplorer2

circular RNA analysis toolset
http://circexplorer2.readthedocs.org/
Other
76 stars 41 forks source link

IndexError: list index out of range #22

Closed ghost closed 5 years ago

ghost commented 5 years ago

I am getting an error when running CIRCexplorer2 annotate. I know that this error happened to other users as well. I have read the previous comments and applied their suggestions but I am still getting the same error. Any help to solve this problem would be appreciated.

What I did to make sure the input Genepred file format is correct: I generated the GenePred file using ucsc gtfToGenepred. Since the output only has 10 column, I added a column that contained gene names. To make sure the reference genome sequence file contains all the genome sequences with respective chromosome ID, I removed the non-chromosome sequences from gtf file and fasta file.

Few lines of my Genepred file (it is a tab delimited file): ENSRNOG00000046319 ENSRNOT00000044187 1 + 396699 409676 409676 409676 9 396699,397779,399061,399556,400255,401911,403344,406543,409035, 396905,397788,399070,399827,401059,402136,403468,406789,409676, ENSRNOG00000046319 ENSRNOT00000072186 1 + 396699 409676 409676 409676 6 396699,399544,400255,401911,407503,408792, 396905,399827,401059,402136,407627,409676, ENSRNOG00000046319 ENSRNOT00000093216 1 + 396839 409750 409750 409750 6 396839,399544,400255,401911,407503,408792, 396905,399827,401059,402140,407627,409750, ENSRNOG00000047964 ENSRNOT00000072360 1 + 699412 708065 699412 708065 6 699412,702188,702859,704512,705912,707178, 699618,702471,703663,704737,706036,708065,

Error:

File "/usr/local/bin/CIRCexplorer2", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.5/dist-packages/circ2/command_parse.py", line 51, in main
    command=command_log, name='annotate')
  File "/usr/local/lib/python3.5/dist-packages/circ2/helper.py", line 38, in wrapper
    fn(*args)
  File "/usr/local/lib/python3.5/dist-packages/circ2/annotate.py", line 35, in annotate
    secondary_flag=options['--low-confidence'])
  File "/usr/local/lib/python3.5/dist-packages/circ2/annotate.py", line 47, in annotate_fusion
    genes, novel_genes, gene_info, chrom_info = parse_ref(ref_f, 1)
  File "/usr/local/lib/python3.5/dist-packages/circ2/parser.py", line 75, in parse_ref
    starts = [int(x) for x in line.split()[9].rstrip(',').split(',')]
IndexError: list index out of range
xingma commented 5 years ago

There may be some problems in some part of your refFlat file. Please do a test by selecting some lines from refFlat file.

ghost commented 5 years ago

Thanks for the great suggestion. I generated a refFlat file with 3 lines, a back spliced junction bed file with one line, and a fasta file for chromosome 1. I am still getting the same error. The refFlat, bed file, the error, and the command are copied below:

refFlat ENSRNOG00000042679 ENSRNOT00000076842 1 + 260732484 260807926 260798238 260804901 8260732484,260733385,260774581,260775086,260791755,260798188,260801077,260803931, 260732631,260733459,260774647,260775166,260791888,260798476,260801171,260807926, ENSRNOG00000042679 ENSRNOT00000076073 1 + 260732501 260830854 260798238 260828394 9260732501,260733385,260774581,260775086,260791755,260798188,260801077,260824977,260828386, 260732627,260733459,260774647,260775166,260791888,260798476,260801171,260826323,260830854, ENSRNOG00000042679 ENSRNOT00000036791 1 + 260798238 260804901 260798238 260804901 3260798238,260801077,260803931, 260798476,260801171,260804901,

back_spliced_junction.bed 1 260781191 260781370 FUSIONJUNC_619/1 0 +

command: CIRCexplorer2 annotate -r chr1.fa -g refFlat.txt -b back_spliced_junction.bed -o circularRNA_known.txt > CIRCexplorer2_annotate.log Error File "/usr/local/bin/CIRCexplorer2", line 11, in <module> sys.exit(main()) File "/usr/local/lib/python3.5/dist-packages/circ2/command_parse.py", line 51, in main command=command_log, name='annotate') File "/usr/local/lib/python3.5/dist-packages/circ2/helper.py", line 38, in wrapper fn(*args) File "/usr/local/lib/python3.5/dist-packages/circ2/annotate.py", line 35, in annotate secondary_flag=options['--low-confidence']) File "/usr/local/lib/python3.5/dist-packages/circ2/annotate.py", line 47, in annotate_fusion genes, novel_genes, gene_info, chrom_info = parse_ref(ref_f, 1) File "/usr/local/lib/python3.5/dist-packages/circ2/parser.py", line 75, in parse_ref starts = [int(x) for x in line.split()[9].rstrip(',').split(',')] IndexError: list index out of range

xingma commented 5 years ago

You reversed two parameters "-r" and "-g".

ghost commented 5 years ago

Thanks. That solved the problem.