Question: error opening file after QIIME script: add_qiime_labels.py
0
gravatar for aester
3.5 years ago by
aester0
United States
aester0 wrote:

So i am trying to add qiime labels. when i run the script 

add_qiime_labels.py -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:~ $ validate_mapping_file.py -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/add_qiime_labels.py", line 4, in <module>

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

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

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

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

    main()

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

    output_dir, count_start)

  File "/macqiime/lib/python2.7/site-packages/qiime-1.9.0-py2.7.egg/qiime/add_qiime_labels.py", 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/add_qiime_labels.py", 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

TACGGAGGATCCGAGTGTTATCCGGATTTATTGGGTTTAAAGGGTGCGTAGGCGGAGGATCAAGTCAGTGGTGAAATGGTGCGGCTCAACCGTAGCATTGCCGTTGAAACTGGTTTTCTAGAGTGCGAATGAGGTGGGCGGAATGTGTCATGTAGCGGTGAAATGCATAGATATGACAAAGAACACCGATGGCGAAGGCAGCTGACTGGGACGAAACTGACGCTGAGGCACGAAAGTGCGGGGATCGAACA

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

TACGTAGGTGGCGAGCGTTATCCGGAATTATTGGGCGTAAAGAGTGAGCAGGCGGCATGGTAAGTTTGGAGTGAAAGCGTTGGGCTCAACCCCATACAGCTTCGAAAACTGCCAGGCTAGAGTACGGGAGAGGTAAACGGAACTCCATGTGTAGCGGTGAAATGCGTAGATATTAGGAGGAACACCAGTGGCGAAGGCGGCTTACTGGACTGTAACTGACGTTGAGGCACGAAAGCGTGGGGAGCAAACA

Please help!!

qiime amplicon • 2.1k views
ADD COMMENTlink modified 3.5 years ago by Josh Herr5.6k • written 3.5 years ago by aester0
0
gravatar for Josh Herr
3.5 years ago by
Josh Herr5.6k
University of Nebraska
Josh Herr5.6k 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 3.5 years ago by Josh Herr5.6k
Please log in to add an answer.

Help
Access

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