leafcutter_cluster_regtools.py reports "IndexError: list index out of range"
python ../clustering/leafcutter_cluster_regtools.py -j test_juncfiles.txt -m 50 -o testYRIvsEU -l 500000
……
Parsing...
KI270310.1:?..GL000008.2:?..KI270732.1:?..KI270330.1:?..KI270315.1:?..KI270708.1:?..KI270582.1:?..Traceback (most recent call last):
File "/home/lingli/Apps/leafcutter/clustering/leafcutter_cluster_regtools.py", line 534, in
Anyone known how to solve this problem?
Yes this is a known issue, I've proposed a fix for it - waiting for @davidaknowles to approve: https://github.com/davidaknowles/leafcutter/pull/162
In the meantime you can grep -v "?" your junction files to remove junctions where regtools can't assign a strand.
Dear Jack Humphrey,
Thanks for your reply. The code I used to extract junc files is :
regtools junctions extract -s 0 -a 8 -m 50 -M 500000 $bam -o $bam.junc
The regtools didn't give strand info in the junc files. All are ?.
Ling
发件人: Jack Humphrey [email protected] 发送时间: 2020年12月11日 3:01 收件人: davidaknowles/leafcutter [email protected] 抄送: lingjoyo [email protected]; Author [email protected] 主题: Re: [davidaknowles/leafcutter] leafcutter_cluster_regtools.py reports "IndexError: list index out of range" (#168)
Yes this is a known issue, I've proposed a fix for it - waiting for @davidaknowleshttps://github.com/davidaknowles to approve: #162https://github.com/davidaknowles/leafcutter/pull/162
In the meantime you can grep -v "?" your junction files to remove junctions where regtools can't assign a strand.
― You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/davidaknowles/leafcutter/issues/168#issuecomment-743242389, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQQZLW473SIYINHUXKSYYITSUIX3BANCNFSM4UWSQ5QA.
This is how my junctions files look like:
GL000008.2 196082 198547 JUNC00394618 74 - 196082 198547 255,0,0 2 132,72 0,2393 GL000008.2 198464 199323 JUNC00394616 76 - 198464 199323 255,0,0 2 81,75 0,784 GL000008.2 198475 201258 JUNC00394619 14 - 198475 201258 255,0,0 2 70,31 0,2752 GL000008.2 199248 201263 JUNC00394621 48 - 199248 201263 255,0,0 2 72,36 0,1979 GL000008.2 201195 208566 JUNC00394620 40 - 201195 208566 255,0,0 2 63,107 0,7264 GL000008.2 203012 208574 JUNC00394622 2 - 203012 208574 255,0,0 2 36,115 0,5447 GL000009.2 5187 12472 JUNC00394623 4 + 5187 12472 255,0,0 2 107,27 0,7258 GL000009.2 10570 14055 JUNC00394624 4 - 10570 14055 255,0,0 2 50,49 0,3436 GL000009.2 15175 19194 JUNC00394625 8 + 15175 19194 255,0,0 2 51,34 0,3985 GL000009.2 28112 32440 JUNC00394626 140 + 28112 32440 255,0,0 2 137,147 0,4181 GL000009.2 32356 33882 JUNC00394627 2 + 32356 33882 255,0,0 2 101,49 0,1477 … All have strand informations. But it still reported same error.
I too have the same error. The junction files contained strand information, but it is still showing the error.
GL000225.1:+..chr11:-..KI270317.1:+..KI270519.1:-..GL000205.2:-..KI270711.1:-..KI270303.1:+..chr22:-..chr10:-..KI270755.1:+..KI270315.1:-..KI270316.1:+..KI270364.1:+..GL000221.1:+..KI270522.1:+..KI270336.1:-..KI270714.1:+..chr21:+..KI270589.1:-..chr12:+..chr4:+..chr1:+..KI270727.1:-..KI270590.1:+..KI270448.1:+..KI270311.1:-..GL000220.1:-..KI270333.1:+..KI270522.1:-..KI270752.1:+..KI270717.1:-..Traceback (most recent call last):
File "leafcutter/clustering/leafcutter_cluster_regtools.py", line 534, in
Hi both,
If you're sure there are no "?" in the junction files, did you try using the --checkchrom flag?
Hi Jack, It worked fine after I used the --checkchrom flag. Bodhi
This error also occurs if there are no junctions in the chr:strand pairing with reads > 3 after filtering within pool_junc_reads()
I also have this problem. I made sure to use the option -s 1 when I used regtools for my bam files, but the issue persists. Is there any fix? using --checkchrome just makes it so all my junctions are thrown out and I remain with empty files.
Hi @Tommeri, what chromosome names are present in your junction file? I believe that --checkchrom only works if you have chr1 or 1 style chromosome names.
I've proposed a fix for the "?" strand issue but there is still a problem of leafcutter throwing out non-standard chromosome names. If anyone has time to dig into this it would be much appreciated.