Skip to content

Errors when running file : list index out of range #3

@mswyers

Description

@mswyers

First off, the shebang is missing from the top, after adding

#usr/bin/env python

and running I've been getting an error.

I've tried running your script a few times to test the output, but haven't been able to get it to run properly.
Here is my output of running the script:

Enter your NCBI gene bank file name: ctg1.cluster001.gbk
2


Parsing started
1
Traceback (most recent call last):
  File "/home/seq/gbknuctest.py", line 128, in <module>
    ntgenbank()
  File "/home/seq/gbknuctest.py", line 50, in ntgenbank
    nm_version = (nm_and_version.split('.')[1]).strip('\n')
IndexError: list index out of range

The output file is blank besides the headers, but the .txt file generated is complete.
What i'm trying to get out of this ultimately is to have a csv containing every CDS and it's corresponding nucleotide sequence to add to an annotations summary file. While your script does much more than this, I haven't been able to find one that pulls the nucleotide sequence for every CDS in the file.

Not sure if this is due to an update in python or not, I'm currently running on python 2.7.15

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions