Skip to content

Commit

Permalink
Making output deterministic
Browse files Browse the repository at this point in the history
  • Loading branch information
cjain7 committed Jul 25, 2019
1 parent 321b487 commit 8de233f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/cgi/include/cgid_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ namespace cgi
{
bool operator() (const MappingResult_CGI &x, const MappingResult_CGI &y)
{
return std::tie(x.genomeId, x.querySeqId, x.nucIdentity)
< std::tie(y.genomeId, y.querySeqId, y.nucIdentity);
return std::tie(x.genomeId, x.querySeqId, x.nucIdentity, x.mapRefPosBin)
< std::tie(y.genomeId, y.querySeqId, y.nucIdentity, y.mapRefPosBin);
//Added ref. bin also to make sort output deterministic [issue #46]
}
} cmp_query_bucket;

Expand Down
7 changes: 5 additions & 2 deletions src/map/include/winSketch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace skch
const skch::Parameters &param;

//Ignore top % most frequent minimizers while lookups
const float percentageThreshold = 0.001;
const float percentageThreshold = 0.0;

//Minimizers that occur this or more times will be ignored (computed based on percentageThreshold)
int freqThreshold = std::numeric_limits<int>::max();
Expand Down Expand Up @@ -123,6 +123,9 @@ namespace skch
//sequence counter while parsing file
seqno_t seqCounter = 0;

if ( omp_get_thread_num() == 0)
std::cerr << "INFO [thread 0], skch::Sketch::build, window size for minimizer sampling = " << param.windowSize << std::endl;

for(const auto &fileName : param.refSequences)
{

Expand Down Expand Up @@ -238,7 +241,7 @@ namespace skch
else
{
if ( omp_get_thread_num() == 0)
std::cerr << "INFO [thread 0], skch::Sketch::computeFreqHist, With threshold " << this->percentageThreshold << "\%, consider all minimizers during lookup." << std::endl;
std::cerr << "INFO [thread 0], skch::Sketch::computeFreqHist, consider all minimizers during lookup." << std::endl;
}

}
Expand Down

0 comments on commit 8de233f

Please sign in to comment.