Hi Giuseppe,
Many thanks for releasing Scalpel. I'm trying to compile the latest code, which contains vcf output, but I'm getting the following errors in compilation (Microassembler):
g++ -Wno-deprecated -Wall -g -Wl,-rpath,/home/ahdesmak/Desktop/NextGen/scalpel-code/bamtools-2.3.0/lib/ -I/home/ahdesmak/Desktop/NextGen/scalpel-code/bamtools-2.3.0/include/ -L/home/ahdesmak/Desktop/NextGen/scalpel-code/bamtools-2.3.0/lib/ Microassembler.cc Edge.cc Node.cc Graph.cc Path.cc ContigLink.cc align.cc util.cc -o Microassembler -lbamtools -lz Microassembler.cc: In member function ‘int Microassembler::run(int, char**)’: Microassembler.cc:447:2: error: ‘optarg’ was not declared in this scope optarg = NULL; ^ Microassembler.cc:449:99: error: ‘getopt’ was not declared in this scope while (!errflg && ((ch = getopt (argc, argv, "m:r:g:s:k:K:l:t:c:d:x:BDRACIhSL:T:M:vF:q:b:Q:P:p:E")) != EOF)) ^ Microassembler.cc:491:50: error: ‘optopt’ was not declared in this scope fprintf (stderr, "Unrecognized option -%c\n", optopt); ^ Graph.cc: In member function ‘Node_t* Graph_t::getNode(Mer_t)’: Graph.cc:1768:36: warning: converting ‘false’ to pointer type ‘Node_t*’ [-Wconversion-null] if (ni == nodes_m.end()) { return false; } ^ Graph.cc: In member function ‘Node_t* Graph_t::getNode(Edge_t&)’: Graph.cc:1789:36: warning: converting ‘false’ to pointer type ‘Node_t*’ [-Wconversion-null] if (ni == nodes_m.end()) { return false; } ^ make[1]: *** [Microassembler] Error 1
Any pointers as to what I might be doing wrong?
Ah, adding
into Microassembler.hh seems to have solved the getopt and optopt problem (the above is missing the less-than and more-than symbols because I can't get them to display correctly here)
Last edit: Miika Ahdesmaki 2014-05-24
Thank you Miika for reporting the problem.
I included your fix in the src code.