I successfully ran Diamond to generate output files in the BLAST tabular format using the command:
diamond blastx -d nr -q microbiome_dna_seq_9_R1.fastq.gz -o matches_9R1.m8
However, I get an error when I try to create a DAA output file. The error is “Closing the output file… Illegal instruction”
The command I used is:
diamond blastx -d nr -q microbiome_dna_seq_9_R1.fastq.gz -f 100 -o matches_9R1.DAA
Is it not possible to generate a DAA file directly from the blast alignment?
The command line options you are using appears to be correct and you should be able to produce a DAA file in this way. This looks like a bug in DIAMOND, please go here for DIAMOND support: https://github.com/bbuchfink/diamond
Thanks so much for your response! I tried compiling Diamond from source, but I got a CMake error during install stating that “file INSTALL cannot copy file /master/kreeves/diamond-0.8.36/bin/diamond to /usr/local/bin/diamond.” I have included all of the text below. I don’t know if this is a permission issue, or if there is something else going on. Any help will be appreciated!
bulmer.txbiomedgenetics.org% tar xzf v0.8.36.tar.gz bulmer.txbiomedgenetics.org% cd diamond-0.8.36
/master/kreeves/diamond-0.8.36 bulmer.txbiomedgenetics.org% mkdir bin bulmer.txbiomedgenetics.org% cd bin
/master/kreeves/diamond-0.8.36/bin bulmer.txbiomedgenetics.org% cmake …
– The C compiler identification is GNU 4.4.7
– The CXX compiler identification is GNU 4.4.7
– Check for working C compiler: /usr/bin/cc
– Check for working C compiler: /usr/bin/cc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working CXX compiler: /usr/bin/c++
– Check for working CXX compiler: /usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Performing Test COMPILER_SUPPORTS_MARCHNATIVE
– Performing Test COMPILER_SUPPORTS_MARCHNATIVE - Success
– Found ZLIB: /usr/lib64/libz.so (found version “1.2.3”)
– Looking for include file pthread.h
– Looking for include file pthread.h - found
– Looking for pthread_create
– Looking for pthread_create - not found
– Looking for pthread_create in pthreads
– Looking for pthread_create in pthreads - not found
– Looking for pthread_create in pthread
– Looking for pthread_create in pthread - found
– Found Threads: TRUE
– Configuring done
– Generating done
– Build files have been written to: /master/kreeves/diamond-0.8.36/bin bulmer.txbiomedgenetics.org% make install
Scanning dependencies of target diamond
[ 1%] Building CXX object CMakeFiles/diamond.dir/src/run/main.cpp.o
[ 3%] Building CXX object CMakeFiles/diamond.dir/src/basic/config.cpp.o
[ 5%] Building CXX object CMakeFiles/diamond.dir/src/util/tinythread.cpp.o
[ 7%] Building CXX object CMakeFiles/diamond.dir/src/util/compressed_stream.cpp.o
[ 9%] Building CXX object CMakeFiles/diamond.dir/src/basic/score_matrix.cpp.o
[ 11%] Building CXX object CMakeFiles/diamond.dir/src/blast/blast_filter.cpp.o
/master/kreeves/diamond-0.8.36/src/blast/blast_def.h: In function ‘BlastSeqLoc* BlastSeqLocNodeFree(BlastSeqLoc*)’:
/master/kreeves/diamond-0.8.36/src/blast/blast_def.h:115: warning: dereferencing pointer ‘loc.11’ does break strict-aliasing rules
/master/kreeves/diamond-0.8.36/src/blast/blast_filter.cpp:175: note: initialized from here
/master/kreeves/diamond-0.8.36/src/blast/blast_def.h: In function ‘void BlastSeqLocListReverse(BlastSeqLoc**)’:
/master/kreeves/diamond-0.8.36/src/blast/blast_def.h:115: warning: dereferencing pointer ‘ptrs.9’ does break strict-aliasing rules
/master/kreeves/diamond-0.8.36/src/blast/blast_filter.cpp:166: note: initialized from here
/master/kreeves/diamond-0.8.36/src/blast/blast_def.h: In function ‘BlastSeqLoc* BlastSeqLocFree(BlastSeqLoc*)’:
/master/kreeves/diamond-0.8.36/src/blast/blast_def.h:115: warning: dereferencing pointer ‘loc.11’ does break strict-aliasing rules
/master/kreeves/diamond-0.8.36/src/blast/blast_filter.cpp:175: note: initialized from here
/master/kreeves/diamond-0.8.36/src/blast/blast_def.h: In function ‘void BlastSeqLocCombine(BlastSeqLoc**, int32_t)’:
/master/kreeves/diamond-0.8.36/src/blast/blast_def.h:115: warning: dereferencing pointer ‘loc.11’ does break strict-aliasing rules
/master/kreeves/diamond-0.8.36/src/blast/blast_filter.cpp:175: note: initialized from here
/master/kreeves/diamond-0.8.36/src/blast/blast_def.h:115: warning: dereferencing pointer ‘ptrs.26’ does break strict-aliasing rules
/master/kreeves/diamond-0.8.36/src/blast/blast_filter.cpp:306: note: initialized from here
/master/kreeves/diamond-0.8.36/src/blast/blast_def.h: In function ‘BlastMaskLoc* BlastMaskLocFree(BlastMaskLoc*)’:
/master/kreeves/diamond-0.8.36/src/blast/blast_def.h:115: warning: dereferencing pointer ‘loc.11’ does break strict-aliasing rules
/master/kreeves/diamond-0.8.36/src/blast/blast_filter.cpp:175: note: initialized from here
/master/kreeves/diamond-0.8.36/src/blast/blast_def.h:115: warning: dereferencing pointer ‘mask_loc.18’ does break strict-aliasing rules
/master/kreeves/diamond-0.8.36/src/blast/blast_filter.cpp:244: note: initialized from here
At global scope:
cc1plus: warning: unrecognized command line option “-Wno-ignored-attributes”
[ 12%] Building CXX object CMakeFiles/diamond.dir/src/blast/blast_seg.cpp.o
/master/kreeves/diamond-0.8.36/src/blast/blast_def.h: In function ‘void s_SSequenceFree(SSequence*)’:
/master/kreeves/diamond-0.8.36/src/blast/blast_def.h:115: warning: dereferencing pointer ‘palpha.6’ does break strict-aliasing rules
/master/kreeves/diamond-0.8.36/src/blast/blast_seg.cpp:1390: note: initialized from here
/master/kreeves/diamond-0.8.36/src/blast/blast_def.h:115: warning: dereferencing pointer ‘seq.8’ does break strict-aliasing rules
/master/kreeves/diamond-0.8.36/src/blast/blast_seg.cpp:1409: note: initialized from here
/master/kreeves/diamond-0.8.36/src/blast/blast_def.h: In function ‘void SegParametersFree(SegParameters*)’:
/master/kreeves/diamond-0.8.36/src/blast/blast_def.h:115: warning: dereferencing pointer ‘sparamsp.57’ does break strict-aliasing rules
/master/kreeves/diamond-0.8.36/src/blast/blast_seg.cpp:2253: note: initialized from here
/master/kreeves/diamond-0.8.36/src/blast/blast_def.h: In function ‘int16_t s_SegSeq(SSequence*, SegParameters*, SSeg**, int32_t)’:
/master/kreeves/diamond-0.8.36/src/blast/blast_def.h:115: warning: dereferencing pointer ‘win.18’ does break strict-aliasing rules
/master/kreeves/diamond-0.8.36/src/blast/blast_seg.cpp:1705: note: initialized from here
/master/kreeves/diamond-0.8.36/src/blast/blast_def.h:115: warning: dereferencing pointer ‘win.18’ does break strict-aliasing rules
/master/kreeves/diamond-0.8.36/src/blast/blast_seg.cpp:1705: note: initialized from here
/master/kreeves/diamond-0.8.36/src/blast/blast_def.h:115: warning: dereferencing pointer ‘win.18’ does break strict-aliasing rules
/master/kreeves/diamond-0.8.36/src/blast/blast_seg.cpp:1705: note: initialized from here
/master/kreeves/diamond-0.8.36/src/blast/blast_def.h:115: warning: dereferencing pointer ‘win.18’ does break strict-aliasing rules
/master/kreeves/diamond-0.8.36/src/blast/blast_seg.cpp:1705: note: initialized from here
/master/kreeves/diamond-0.8.36/src/blast/blast_def.h:115: warning: dereferencing pointer ‘H.51’ does break strict-aliasing rules
/master/kreeves/diamond-0.8.36/src/blast/blast_seg.cpp:2090: note: initialized from here
/master/kreeves/diamond-0.8.36/src/blast/blast_def.h: In function ‘int16_t SeqBufferSeg(uint8_t*, uint32_t, uint32_t, SegParameters*, BlastSeqLoc**)’:
/master/kreeves/diamond-0.8.36/src/blast/blast_def.h:115: warning: dereferencing pointer ‘nextseg.54’ does break strict-aliasing rules
/master/kreeves/diamond-0.8.36/src/blast/blast_seg.cpp:2121: note: initialized from here
/master/kreeves/diamond-0.8.36/src/blast/blast_def.h:115: warning: dereferencing pointer ‘seg.10’ does break strict-aliasing rules
/master/kreeves/diamond-0.8.36/src/blast/blast_seg.cpp:1426: note: initialized from here
/master/kreeves/diamond-0.8.36/src/blast/blast_def.h:115: warning: dereferencing pointer ‘sparamsp.57’ does break strict-aliasing rules
/master/kreeves/diamond-0.8.36/src/blast/blast_seg.cpp:2253: note: initialized from here
At global scope:
cc1plus: warning: unrecognized command line option “-Wno-ignored-attributes”
[ 14%] Building C object CMakeFiles/diamond.dir/src/blast/sm_blosum45.c.o
[ 16%] Building C object CMakeFiles/diamond.dir/src/blast/sm_blosum50.c.o
[ 18%] Building C object CMakeFiles/diamond.dir/src/blast/sm_blosum62.c.o
[ 20%] Building C object CMakeFiles/diamond.dir/src/blast/sm_blosum80.c.o
[ 22%] Building C object CMakeFiles/diamond.dir/src/blast/sm_blosum90.c.o
[ 24%] Building C object CMakeFiles/diamond.dir/src/blast/sm_pam30.c.o
[ 25%] Building C object CMakeFiles/diamond.dir/src/blast/sm_pam70.c.o
[ 27%] Building C object CMakeFiles/diamond.dir/src/blast/sm_pam250.c.o
[ 29%] Building CXX object CMakeFiles/diamond.dir/src/data/queries.cpp.o
[ 31%] Building CXX object CMakeFiles/diamond.dir/src/data/reference.cpp.o
[ 33%] Building CXX object CMakeFiles/diamond.dir/src/data/seed_histogram.cpp.o
[ 35%] Building CXX object CMakeFiles/diamond.dir/src/output/daa_record.cpp.o
[ 37%] Building CXX object CMakeFiles/diamond.dir/src/search/search.cpp.o
[ 38%] Building CXX object CMakeFiles/diamond.dir/src/util/command_line_parser.cpp.o
[ 40%] Building CXX object CMakeFiles/diamond.dir/src/util/seq_file_format.cpp.o
[ 42%] Building CXX object CMakeFiles/diamond.dir/src/util/util.cpp.o
[ 44%] Building CXX object CMakeFiles/diamond.dir/src/util/Timer.cpp.o
[ 46%] Building CXX object CMakeFiles/diamond.dir/src/basic/basic.cpp.o
[ 48%] Building CXX object CMakeFiles/diamond.dir/src/dp/floating_sw.cpp.o
[ 50%] Building CXX object CMakeFiles/diamond.dir/src/basic/hssp.cpp.o
[ 51%] Building CXX object CMakeFiles/diamond.dir/src/dp/ungapped_align.cpp.o
[ 53%] Building CXX object CMakeFiles/diamond.dir/src/run/tools.cpp.o
[ 55%] Building CXX object CMakeFiles/diamond.dir/src/dp/greedy_align.cpp.o
[ 57%] Building CXX object CMakeFiles/diamond.dir/src/run/benchmark.cpp.o
[ 59%] Building CXX object CMakeFiles/diamond.dir/src/search/stage2.cpp.o
[ 61%] Building CXX object CMakeFiles/diamond.dir/src/output/output_format.cpp.o
[ 62%] Building CXX object CMakeFiles/diamond.dir/src/output/join_blocks.cpp.o
[ 64%] Building CXX object CMakeFiles/diamond.dir/src/run/mapper.cpp.o
[ 66%] Building CXX object CMakeFiles/diamond.dir/src/data/count_approximate.cpp.o
[ 68%] Building CXX object CMakeFiles/diamond.dir/src/data/index.cpp.o
[ 70%] Building CXX object CMakeFiles/diamond.dir/src/data/frequent_seeds.cpp.o
[ 72%] Building CXX object CMakeFiles/diamond.dir/src/align/query_mapper.cpp.o
[ 74%] Building CXX object CMakeFiles/diamond.dir/src/align/align_target.cpp.o
[ 75%] Building CXX object CMakeFiles/diamond.dir/src/output/blast_tab_format.cpp.o
[ 77%] Building CXX object CMakeFiles/diamond.dir/src/dp/padded_banded_sw.cpp.o
[ 79%] Building CXX object CMakeFiles/diamond.dir/src/dp/needleman_wunsch.cpp.o
[ 81%] Building CXX object CMakeFiles/diamond.dir/src/output/blast_pairwise_format.cpp.o
[ 83%] Building CXX object CMakeFiles/diamond.dir/src/extra/roc.cpp.o
[ 85%] Building CXX object CMakeFiles/diamond.dir/src/dp/comp_based_stats.cpp.o
[ 87%] Building CXX object CMakeFiles/diamond.dir/src/extra/model_sim.cpp.o
[ 88%] Building CXX object CMakeFiles/diamond.dir/src/run/double_indexed.cpp.o
[ 90%] Building CXX object CMakeFiles/diamond.dir/src/search/search_query.cpp.o
[ 92%] Building CXX object CMakeFiles/diamond.dir/src/search/collision.cpp.o
[ 94%] Building CXX object CMakeFiles/diamond.dir/src/output/sam_format.cpp.o
[ 96%] Building CXX object CMakeFiles/diamond.dir/src/align/align.cpp.o
[ 98%] Building CXX object CMakeFiles/diamond.dir/src/search/setup.cpp.o
[100%] Building CXX object CMakeFiles/diamond.dir/src/extra/opt.cpp.o
Linking CXX executable diamond
[100%] Built target diamond
Install the project…
– Install configuration: “Release”
– Installing: /usr/local/bin/diamond
CMake Error at cmake_install.cmake:42 (FILE):
file INSTALL cannot copy file "/master/kreeves/diamond-0.8.36/bin/diamond"
to “/usr/local/bin/diamond”.
It means you do not have write permissions to that directory. If you have root privileges, run sudo make install. If not run the program from diamond-0.8.36/bin/diamond.
Thanks for the quick response! I am having trouble running from diamond-0.8.36/bin/diamond, so I will contact an admin with root privileges to run the sudo command.