Skip to content

Commit

Permalink
added uon setting
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusRainerSchmidt committed Sep 22, 2018
1 parent 9625db5 commit 20f5604
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 7 deletions.
4 changes: 3 additions & 1 deletion inc/module/binarySeeding.h
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@ namespace libMA
);

public:
size_t uiUONAccMaxSize;
/**
* @brief Initialize a BinarySeeding Module
* @details
Expand All @@ -485,7 +486,8 @@ namespace libMA
*/
BinarySeeding()
:
bLrExtension(defaults::sSeedSet == "maxSpan")
bLrExtension(defaults::sSeedSet == "maxSpan"),
uiUONAccMaxSize(defaults::uiUONAccMaxSize)
{}//constructor

std::shared_ptr<Container> EXPORTED execute(std::shared_ptr<ContainerVector> vpInput);
Expand Down
2 changes: 2 additions & 0 deletions inc/module/linesweep.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ namespace libMA

size_t uiSVPenalty = defaults::uiSVPenalty;

size_t uiUONAccMaxSize = defaults::uiUONAccMaxSize;

LinearLineSweep() {}//default constructor

//overload
Expand Down
14 changes: 14 additions & 0 deletions inc/util/default_parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ namespace libMA
extern int64_t iMinSVDistance;
extern size_t uiZDrop;
extern size_t uiSVPenalty;
extern size_t uiUONAccMaxSize;

inline void configureAccurate()
{
Expand All @@ -87,6 +88,19 @@ namespace libMA
//bDisableGapCostEstimationCutting = true;
}// function

inline void configureUON()
{
sParameterSet = "uon";
sSeedSet = "maxSpan";
bDisableHeuristics = true;
dMaxOverlapSupplementary = 0.25;
fMinSecScoreRatio = 0.85;
uiReportN = 3;
uiPadding = 1000;
uiUONAccMaxSize = 800;
//bDisableGapCostEstimationCutting = true;
}// function

#ifdef WITH_PYTHON
void exportDefaults();
#endif
Expand Down
2 changes: 2 additions & 0 deletions src/cmdMa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ int main(int argc, char* argv[])
defaults::configureFast();
if(strcmp(argv[i+1], "pacBio") == 0)
defaults::configurePacBio();
if(strcmp(argv[i+1], "uon") == 0)
defaults::configureUON();
}// if

options.add_options("Alignment options (requires -a)")
Expand Down
2 changes: 1 addition & 1 deletion src/module/binarySeeding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void BinarySeeding::procesInterval(
Interval<nucSeqIndex> xAreaCovered;
// performs extension and records any found seeds
// here we use bLrExtension to choose the extension scheme
if(bLrExtension)
if(bLrExtension && pQuerySeq->length() >= uiUONAccMaxSize )
xAreaCovered = maximallySpanningExtension(
xAreaToCover.center(),
pFM_index,
Expand Down
10 changes: 5 additions & 5 deletions src/module/linesweep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ std::shared_ptr<Container> LinearLineSweep::execute(
// Prof. Kutzners filter:
// this merely checks weather we actually do have to do the harmonization at all
//@todo uiSwitchQLen != 0 should be replaced with switch
if(bDoHeuristics)
if(bDoHeuristics || pQuery->length() < uiUONAccMaxSize) // @todo temporary
{
if (pQuery->length() > uiSwitchQLen && uiSwitchQLen != 0)
{
Expand Down Expand Up @@ -587,7 +587,7 @@ std::shared_ptr<Container> LinearLineSweep::execute(
nucSeqIndex uiCurrHarmScore = 0;
for(const auto& rSeed : *pSeeds)
uiCurrHarmScore += rSeed.size();
if(bDoHeuristics)
if(bDoHeuristics || pQuery->length() < uiUONAccMaxSize) // @todo temporary
{
if(uiCurrHarmScore < uiCurrHarmScoreMin )
{
Expand Down Expand Up @@ -619,7 +619,7 @@ std::shared_ptr<Container> LinearLineSweep::execute(
if(b)
pSoCIn->vExtractOrder.back().qCoverage++;
)// DEBUG
if(bDoHeuristics)
if(bDoHeuristics || pQuery->length() < uiUONAccMaxSize) // @todo temporary
{
//@todo uiSwitchQLen != 0 should be replaced with switch
if (pQuery->length() > uiSwitchQLen && uiSwitchQLen != 0)
Expand Down Expand Up @@ -660,7 +660,7 @@ std::shared_ptr<Container> LinearLineSweep::execute(

//FILTER
#if FILTER_1
if(bDoHeuristics)
if(bDoHeuristics || pQuery->length() < uiUONAccMaxSize) // @todo temporary
{
nucSeqIndex uiAccLen = pSeeds->getScore();
if (uiAccumulativeSeedLength > uiAccLen )
Expand All @@ -677,7 +677,7 @@ std::shared_ptr<Container> LinearLineSweep::execute(

}//while

if(bDoHeuristics)
if(bDoHeuristics || pQuery->length() < uiUONAccMaxSize) // @todo temporary
{
// @todo think about what to do here (maybe sorting is necessary)...
for(unsigned int ui = 0; ui < uiSoCRepeatCounter && pSoCs->size() > 1; ui++)
Expand Down
1 change: 1 addition & 0 deletions src/util/default_parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ namespace libMA
int64_t iMinSVDistance = 500;

size_t uiZDrop = 200;
size_t uiUONAccMaxSize = 0;

#ifdef WITH_PYTHON
void exportDefaults()
Expand Down

0 comments on commit 20f5604

Please sign in to comment.