Question: error opening file after QIIME script:
gravatar for aester
5.3 years ago by
United States
aester0 wrote:

So i am trying to add qiime labels. when i run the script -i . -m mouse_ForwardMap.txt -c SampleID  -o combined_fasta

it says that it can't read one of my files. But when i open the file with the less command its perfectly fine. Is there any thing that i should double check?

I already validated the mapping file, no errors detected. 

MacQIIME ford132-r05216:~ $ -m /Users/aester/Desktop/qiime_generated/ae_ForwardMap.txt -o mapping_output

No errors or warnings were found in mapping file.

but when i run the script like i said it gives back: 

Traceback (most recent call last):

  File "/macqiime/bin/", line 4, in <module>

    __import__('pkg_resources').run_script('qiime==1.9.0', '')

  File "build/bdist.macosx-10.4-x86_64/egg/pkg_resources/", line 698, in run_script

  File "build/bdist.macosx-10.4-x86_64/egg/pkg_resources/", line 1616, in run_script

  File "/macqiime/lib/python2.7/site-packages/qiime-1.9.0-py2.7.egg/EGG-INFO/scripts/", line 111, in <module>


  File "/macqiime/lib/python2.7/site-packages/qiime-1.9.0-py2.7.egg/EGG-INFO/scripts/", line 107, in main

    output_dir, count_start)

  File "/macqiime/lib/python2.7/site-packages/qiime-1.9.0-py2.7.egg/qiime/", line 44, in add_qiime_labels

    fasta_files = get_fasta_fps(fasta_dir, fasta_name_to_sample_id.keys())

  File "/macqiime/lib/python2.7/site-packages/qiime-1.9.0-py2.7.egg/qiime/", line 123, in get_fasta_fps

    raise IOError("Unable to open %s" % curr_fp)

IOError: Unable to open ./F2.all.fa

Less F2.all.fa

>M01205:41:000000000-AF9F7:1:1101:14308:1960 1:N:0:6


>M01205:41:000000000-AF9F7:1:1101:15221:1970 1:N:0:6


Please help!!

qiime amplicon • 3.0k views
ADD COMMENTlink modified 18 months ago by Payal90 • written 5.3 years ago by aester0
gravatar for Josh Herr
5.3 years ago by
Josh Herr5.7k
University of Nebraska
Josh Herr5.7k wrote:

It doesn't look like you have added any sample information to your fasta output sequences -- QIIME will merge all the fasta files and then edit the sequence headers to have sample, treatment, etc. data in the fasta header.  This is not happening here.  

You should actually set your input fasta file (i.e. -i . is not acceptable for an input, you should use the respective file names and path for all of your input files)  -- the python script does not know which files to act upon given your input.

When you are running a script it is a good idea to know what type of input you need to provide and what the expected output should be.  You're not getting the expected output and the input fasta file is not being modified.

Just a personal note -- I don't actually use this python script in QIIME as it's easy to change fasta headers from the command line with other tools and I have found that sometimes errors arise from this first script.

I co-teach a course which focuses heavily on QIIME -- you should check out our tutorial materials along with the QIIME manual source

ADD COMMENTlink written 5.3 years ago by Josh Herr5.7k
gravatar for Payal
18 months ago by
Payal90 wrote:

I had the same problem.

Two things figured: 1. The file should be fasta files. So convert your fastq files to fastq file using qiime scipts - That will create .fna files 2. Now while you are running the, the mapping file name should be exactly similar to whats in your folder. So make sure to change your .fna files to just the name of th efile given. Eg. if your fasta filename is sample1.fa/sample1.fasta/sample1.fna, just change them to sample1 in the folder and then the script will recognize the filename.

It may work other way round, where you change the name of the files in the mapping file, but i used the previous method and it worked for me

ADD COMMENTlink written 18 months ago by Payal90
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1776 users visited in the last hour