output CIGAR format

r0r

New member
Dear Benjamin,

would it be possible to have a cigar field in the tab-delimited output ?
By 'cigar' I mean for instance: 16M2D3M1I23M (with M, I and D standing for match, insertion and deletion respectively).

The 'btop' field is already present but the quantity of information in this field is quite large, making output files gigantic.
A classical cigar format would solve this problem while providing more or less the same information (not the exact sequences).

best,
Romain
 

r0r

New member
many thanks!

However I get an error message when trying to compile this commit (not sure the problem comes from the commit or the way I'm compiling it).
Here is the error message I get with the make command (following 'cmake -D CMAKE_BUILD_TYPE=Debug ..'):

[ 14%] Built target arch_sse4_1
[ 15%] Building CXX object CMakeFiles/diamond.dir/src/align/culling.cpp.o
In file included from /Users/aaaa/Downloads/diamond-master/src/align/culling.cpp:22:
/Users/aaaa/Downloads/diamond-master/src/align/target.h:61:3: warning: field 'filter_score' will be initialized after field 'seq' [-Wreorder]
filter_score(0),
^
/Users/aaaa/Downloads/diamond-master/src/align/culling.cpp:42:25: error: no matching function for call to 'min'
i = targets.begin() + std::min(config.max_alignments, targets.size());
^~~~~~~~
/Users/aaaa/miniconda3/bin/../include/c++/v1/algorithm:2546:1: note: candidate template ignored: deduced conflicting types for parameter '_Tp' ('unsigned long long' vs. 'unsigned long')
min(const _Tp& __a, const _Tp& __b)
^
/Users/aaaa/miniconda3/bin/../include/c++/v1/algorithm:2556:1: note: candidate template ignored: could not match 'initializer_list<type-parameter-0-0>' against 'unsigned long long'
min(initializer_list<_Tp> __t, _Compare __comp)
^
/Users/aaaa/miniconda3/bin/../include/c++/v1/algorithm:2538:1: note: candidate function template not viable: requires 3 arguments, but 2 were provided
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
/Users/aaaa/miniconda3/bin/../include/c++/v1/algorithm:2564:1: note: candidate function template not viable: requires single argument '__t', but 2 arguments were provided
min(initializer_list<_Tp> __t)
^
1 warning and 1 error generated.
make[2]: *** [CMakeFiles/diamond.dir/src/align/culling.cpp.o] Error 1
make[1]: *** [CMakeFiles/diamond.dir/all] Error 2
make: *** [all] Error 2
 

r0r

New member
It works perfectly with this new commit, thanks.
I have checked manually a few cigar strings and it is all good.

The output files are almost 10 times smaller with this cigar field.
Just to mention that the cigar filed is not indicated as possible field with the 'diamond help' command.

many thanks !
 
Top