DerKevinRiehl / transposon_annotation_reasonaTE

Transposon annotation tool "resonaTE" (part of TransposonUltimate)
GNU General Public License v3.0
16 stars 1 forks source link

"IndexError: list index out of range" when running Step 4 (pipeline on the genome annotations) #16

Open WDBS369 opened 2 years ago

WDBS369 commented 2 years ago

Hi Kevin,

I encounter an error when I ran step4 (pipeline) on my genome annotations. Any idea why this occurred?

Thanks, Chan

The code I used is: reasonaTE -mode pipeline -projectFolder Pame.btk.umk.07 -projectName Pame.btk.umk.07

The error info: image

The process stopped after/at the transposon sequences sorting: image

Also, I checked step 3 (parse tool annotation) and it seems to work fine. image

DerKevinRiehl commented 1 year ago

Dear Chan Liu, sorry for the late reply.

Did you find a solution already? Otherwise, I think the issue is that for some reason one of your sequence files might be empty. First of all, thanks for finding this bug, I probably should have added something in the code to deal with it.

To solve it, you need to edit the source code of TransposonClustering.py in python as follows:

From this code

    for key in list(clusterData.keys()):
        cluster = clusterData[key]
        transpIDs.append(["transposon"+str(cluster[0]),key])

to this code

    for key in list(clusterData.keys()):
        cluster = clusterData[key]
        if(len(cluster)!=0):
            transpIDs.append(["transposon"+str(cluster[0]),key])

You can find this file in this folder: /project/xnzh222_uksr/qli259/my_miniconda3/envs/transposon_annotation_resonaTE/share/TransposonAnnotator_reasonaTE/TransposonClustering.py

If you are able to, you could use a linux software like "vim" or "nano" to edit this .py file.

Could this help to solve the issue? Thanks for letting me know, Best, Kevin

sahoo-rk commented 1 year ago

Hi Kevin, I find a similar error, but during the mode 'parseAnnotation'. My error message is as follows. Please suggest. Thanks!

Parse must... Traceback (most recent call last): File "/home/sahoork/anaconda3/envs/transposon_annotation_tools_env/share/TransposonAnnotator_reasonaTE/TransposonAnnotator.py", line 114, in parseAvailableResults(projectFolderPath) File "/home/sahoork/anaconda3/envs/transposon_annotation_tools_env/share/TransposonAnnotator_reasonaTE/AnnotationParser.py", line 1333, in parseAvailableResults parseMust(pathResDir, fastaFile, targetGFFFile, targetFastaFile) File "/home/sahoork/anaconda3/envs/transposon_annotation_tools_env/share/TransposonAnnotator_reasonaTE/AnnotationParser.py", line 511, in parseMust if(transposons[23]=="Full Copy"): IndexError: list index out of range

best,