-
Notifications
You must be signed in to change notification settings - Fork 39
Description
Hello, I am having issues with standardized_DIAMOND_analysis_counter.py script
I am getting an IndexError in line 138
I've modified your master_script_for_sample_files.bash file and the error comes after STEP4 is DONE
command from your script:
STEP 5: AGGREGATING WITH ANALYSIS_COUNTER
for file in $starting_files_location/step_4_output/*RefSeq_annotated*
do
python $python_programs/standardized_DIAMOND_analysis_counter.py -I $file -D $RefSeq_db -O
python $python_programs/standardized_DIAMOND_analysis_counter.py -I $file -D $RefSeq_db -F
done
error:
Now reading through the m8 results infile.
Analysis of /projects/bact.fun.unmapped.RefSeq_annotated complete.
Number of total lines: 574668
Number of unique sequences: 574668
Time elapsed: 1.8101940155 seconds.
then "Starting database analysis now." message pops and goes until
198M lines processed so far in 2025.08801007 seconds.
Then I get this error:
Traceback (most recent call last):
File "/projects/tools/samsa2/python_scripts/standardized_DIAMOND_analysis_counter.py", line 138, in
db_entry = db_entry[1][:-1]
IndexError: list index out of range
Here is an snapshot of your script from line 127 to 138
for line in db:
if line.startswith(">") == True:
db_line_counter += 1
splitline = line.split("[",1)
# ID, the hit returned in DIAMOND results
db_id = str(splitline[0].split()[0])[1:]
# name and functional description
db_entry = line.split("[", 1)
db_entry = db_entry[0].split(" ", 1)
db_entry = db_entry[1][:-1]
Thanks in advance