SILVA prep for QIIME

28 views
Skip to first unread message

Stephanie Matthews

unread,
Aug 14, 2018, 12:25:10 AM8/14/18
to Qiime 1 Forum
Hi - I know this forum is for QIIME 1 which is no longer supported, but I'm working on prepping the SILVA LSU database for use in QIIME, and I'm using QIIME 1 to maintain uniformity with the published SILVA files that are QIIME compatible. I'm following the workflow found here: https://github.com/mikerobeson/Misc_Code/tree/master/SILVA_to_RDP#silva_to_rdp, and it's working fairly well but I'm stuck on the fix_fasta_labels.py (https://gist.github.com/walterst/f5c619799e6dc1f575a0). I get the following error: 

Traceback (most recent call last):

  File "$DIR/SILVA-to-RDP/fix_fasta_labels.py", line 16, in <module>

    output_fasta = open(argv[2], "w")

IndexError: list index out of range


From some googling, it looks like this is an issue with argv...I'm not at all familiar with C or Python. Has anybody run into similar issues with these scripts? 


Thanks! 

TonyWalters

unread,
Aug 14, 2018, 12:52:19 AM8/14/18
to Qiime 1 Forum
Hello Stephanie,

What version of python do you have? This was written with 2.7. If you type: python and then quit() you'll see the version.

Also, what is the full command you're typing?

Stephanie Matthews

unread,
Aug 14, 2018, 11:50:36 AM8/14/18
to Qiime 1 Forum
Hi Tony, 

My apologies for not including a reproducible example. In replying to you just now I figured out my problem: it turns out I was calling the program incorrectly. I'll include the info and my error below for reference in case anybody else has similar issues:
 
My python version is: 

Python 2.7.8 (default, Apr  9 2015, 02:32:06) 

[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2


The full command I was running is: 

python ~/lus/SILVA-to-RDP/fix_fasta_labels.py ~/lus/SILVA-to-RDP/repex.fasta > ~/lus/SILVA-to-RDP/repex_clean.fasta


I changed the command to the following, which runs perfectly fine (fixed my mistake!): 

python ~/lus/SILVA-to-RDP/fix_fasta_labels.py ~/lus/SILVA-to-RDP/repex.fasta ~/lus/SILVA-to-RDP/repex_clean.fasta


Thanks for pointing me toward the command as the issue! 

repex.fasta
Reply all
Reply to author
Forward
0 new messages