numpy error in split_libraries_fastq.py

66 views
Skip to first unread message

Jacob Cram

unread,
Aug 8, 2017, 8:40:50 PM8/8/17
to Qiime 1 Forum
Like people in this post https://groups.google.com/forum/#!topic/qiime-forum/ccyPJWRFseA
I am getting an error when I try to run libraries_fastq.py

With the attached files
split_libraries_fastq.py -i reads.fastq -b barcodes.fastq -m mapping.csv --barcode_type 6 -o proc096/plate65demult --phred_offset 33


Traceback (most recent call last):
  File "/home/jacob/anaconda3/envs/qiime1b/bin/split_libraries_fastq.py", line 4, in <module>
    __import__('pkg_resources').run_script('qiime==1.9.1', 'split_libraries_fastq.py')
  File "/home/jacob/anaconda3/envs/qiime1b/lib/python2.7/site-packages/setuptools-27.2.0-py2.7.egg/pkg_resources/__init__.py", line 744, in run_script
   
  File "/home/jacob/anaconda3/envs/qiime1b/lib/python2.7/site-packages/setuptools-27.2.0-py2.7.egg/pkg_resources/__init__.py", line 1499, in run_script
   
  File "/home/jacob/anaconda3/envs/qiime1b/lib/python2.7/site-packages/qiime-1.9.1-py2.7.egg-info/scripts/split_libraries_fastq.py", line 365, in <module>
    main()
  File "/home/jacob/anaconda3/envs/qiime1b/lib/python2.7/site-packages/qiime-1.9.1-py2.7.egg-info/scripts/split_libraries_fastq.py", line 344, in main
    for fasta_header, sequence, quality, seq_id in seq_generator:
  File "/home/jacob/anaconda3/envs/qiime1b/lib/python2.7/site-packages/qiime/split_libraries_fastq.py", line 373, in process_fastq_single_end_read_file
    filter_bad_illumina_qual_digit)
  File "/home/jacob/anaconda3/envs/qiime1b/lib/python2.7/site-packages/qiime/split_libraries_fastq.py", line 127, in quality_filter_sequence
    phred_quality_threshold)
  File "/home/jacob/anaconda3/envs/qiime1b/lib/python2.7/site-packages/qiime/split_libraries_fastq.py", line 93, in read_qual_score_filter
    for starts, ends in _contiguous_regions(mask):
  File "/home/jacob/anaconda3/envs/qiime1b/lib/python2.7/site-packages/qiime/split_libraries_fastq.py", line 68, in _contiguous_regions
    d = np.diff(condition)
  File "/home/jacob/.local/lib/python2.7/site-packages/numpy/lib/function_base.py", line 1926, in diff
    return a[slice1]-a[slice2]
TypeError: numpy boolean subtract, the `-` operator, is deprecated, use the bitwise_xor, the `^` operator, or the logical_xor function instead.

I've been using conda to install qiime the whole time, but following that post, I installed a new version of qiime with the command

conda create -n qiime1b numpy=1.10 python=2.7 qiime matplotlib=1.4.3 mock nose -c bioconda

but the results remain the same. I've attched the output of print_qiime_config.py for this version to this post.

Any advice?
 
barcodes.fastq
mapping.csv
print_qiime_config_output.txt
reads.fastq

Jose Antonio Navas Molina

unread,
Aug 9, 2017, 10:56:06 AM8/9/17
to Qiime 1 Forum
Hi Jacob,

I would suggest removing any Qiime installation that you have in your system and re-install from scratch. On your "conda create" command you specify "numpy=1.10" but in the print qiime config output it states "NumPy version: 1.13.0" so I think there is some type of mismatch on the environments.

Hope this helps!

Jacob Cram

unread,
Aug 9, 2017, 5:44:57 PM8/9/17
to Qiime 1 Forum
Thanks Jose,

The problem turned out not to be old qiime installations, but rather old python installations. There turned out to be an extra version of python 2.7 with a version of numpy that condas was referring to before the version I installed. See this stack overflow post for an overview of how I ended up solving this problem.

https://stackoverflow.com/questions/45597201/conda-python-isnt-using-the-numpy-version-i-try-install-if-i-also-specify-that?noredirect=1#comment78159838_45597201

Jose Antonio Navas Molina

unread,
Aug 10, 2017, 11:08:40 AM8/10/17
to Qiime 1 Forum
Glad you found the source of the problem! And thanks for posting the link to the solution!
Reply all
Reply to author
Forward
0 new messages