Skip to content

Commit

Permalink
Merge pull request #228 from ProsperP/bugfix_vsc
Browse files Browse the repository at this point in the history
Fix IndexError in `set_vsc_parameters()` due to misplaced right parenthesis in string's format method.
  • Loading branch information
Cengoni authored Sep 24, 2024
2 parents f624cc5 + 7059404 commit 0009254
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions metaphlan/metaphlan.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,11 +402,11 @@ def set_vsc_parameters(index, bowtie2_db):
vsc_vinfo = os.path.join(bowtie2_db, "{}_VINFO.csv".format(index))

if not os.path.isfile(vsc_fna):
sys.stderr.write("Error:\n {} file not found in bowtie2db folder ({}). Re-download MetaPhlAn database.".format("{}_VSG.fna".format(index, bowtie2_db)))
sys.stderr.write("Error:\n {} file not found in bowtie2db folder ({}). Re-download MetaPhlAn database.".format("{}_VSG.fna".format(index), bowtie2_db))
sys.exit(1)

if not os.path.isfile(vsc_vinfo):
sys.stderr.write("Error:\n {} file not found in bowtie2db folder ({}). Re-download MetaPhlAn database.".format("{}_VINFO.csv".format(index, bowtie2_db)))
sys.stderr.write("Error:\n {} file not found in bowtie2db folder ({}). Re-download MetaPhlAn database.".format("{}_VINFO.csv".format(index), bowtie2_db))
sys.exit(1)

return(vsc_fna, vsc_vinfo)
Expand Down Expand Up @@ -1469,6 +1469,7 @@ def main():
selectedMakrers.append(topMarker)


VSCs_markers.close()
SeqIO.write( selectedMakrers,viralTempFolder+'/v_mks.fa','fasta' )

VSC_report = vsc_bowtie2(viralTempFolder, pars['nproc'], file_format=pars['input_type'],
Expand Down

0 comments on commit 0009254

Please sign in to comment.