// ========================================================================== // lambda // ========================================================================== // Copyright (c) 2013-2017, Hannes Hauswedell
const &);
template const &,
TRedAlph const &);
template const &,
TRedAlph const &,
TIndexSpecSpec const &);
// ==========================================================================
// Functions
// ==========================================================================
// --------------------------------------------------------------------------
// Function main()
// --------------------------------------------------------------------------
// Program entry point.
int main(int argc, char const ** argv)
{
// Parse the command line.
seqan::ArgumentParser parser;
LambdaIndexerOptions options;
seqan::ArgumentParser::ParseResult res = parseCommandLine(options, argc, argv);
// If there was an error parsing or built-in argument parser functionality
// was triggered then we exit the program. The return code is 1 if there
// were errors and 0 if there were none.
if (res != seqan::ArgumentParser::PARSE_OK)
return res == seqan::ArgumentParser::PARSE_ERROR;
if (std::string(CMAKE_BUILD_TYPE) != "Release")
std::cerr << "WARNING: This binary is not built in release mode and will be much slower than it should be!\n";
return argConv0(options);
}
inline int
argConv0(LambdaIndexerOptions const & options)
{
switch(options.blastProgram)
{
case BlastProgram::BLASTN:
return argConv1(options, BlastProgramSelector<:blastn>());
case BlastProgram::BLASTP:
return argConv1(options, BlastProgramSelector<:blastp>());
case BlastProgram::BLASTX:
return argConv1(options, BlastProgramSelector<:blastx>());
case BlastProgram::TBLASTN:
return argConv1(options, BlastProgramSelector<:tblastn>());
case BlastProgram::TBLASTX:
return argConv1(options, BlastProgramSelector<:tblastx>());
default:
break;
}
return -1;
}
/// Alphabet reduction
template const &)
{
using TUnred = typename std::conditional ::type;
using Tp = BlastProgramSelector ;
switch (options.alphReduction)
{
case 0:
return argConv2(options, Tp(), TUnred());
case 2:
return argConv2(options, Tp(), ReducedAminoAcid const &,
TRedAlph const &)
{
if (options.algo == "radixsort")
return realMain(options, BlastProgramSelector (), TRedAlph(), RadixSortSACreateTag());
else
return realMain(options, BlastProgramSelector (), TRedAlph(), Nothing());
}
template const &,
TRedAlph const &,
TIndexSpecSpec const &)
{
using TOrigSet = TCDStringSet (),
TRedAlph());
} else
{
using TIndexSpec = IndexSa (),
TRedAlph());
}
return 0;
}