Skip to content

Commit

Permalink
Preparing for aux index branch
Browse files Browse the repository at this point in the history
  • Loading branch information
geetduggal committed Jun 29, 2015
1 parent 2173085 commit 113545d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions include/SalmonConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ namespace salmon {
constexpr char minorVersion[] = "4";
constexpr char patchVersion[] = "2";
constexpr char version[] = "0.4.2";
constexpr uint32_t indexVersion = 1;
}

#endif // SALMON_CONFIG_HPP
5 changes: 5 additions & 0 deletions src/BuildSalmonIndex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
#include "format.h"
#include "spdlog/spdlog.h"

#include "cereal/archives/json.hpp"
#include "cereal/types/vector.hpp"

using my_mer = jellyfish::mer_dna_ns::mer_base_static<uint64_t, 1>;

typedef jellyfish::stream_manager<char**> stream_manager;
Expand Down Expand Up @@ -236,6 +239,8 @@ Creates a salmon index.
jointLog->info() << infostr.str();
computeBiasFeatures(transcriptFiles, transcriptBiasFile, useStreamingParser, numThreads);
// ==== finished computing bias fetures

bfs::path versionFile = indexDirectory / "indexVersion";

bfs::path outputPrefix = indexDirectory / "bwaidx";

Expand Down
11 changes: 5 additions & 6 deletions src/SalmonQuantify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1366,10 +1366,9 @@ inline bool nearEndOfTranscript(
Transcript& txp,
int32_t cutoff=std::numeric_limits<int32_t>::max()) {
// check if hit appears close to the end of the given transcript
bool isForward = hit.isForward();
int32_t hitPos = static_cast<int32_t>(hit.bestHitPos);
return (hitPos < cutoff or
std::abs(hitPos - static_cast<int32_t>(txp.RefLength)) < cutoff);

return (hitPos <= cutoff or std::abs(static_cast<int32_t>(txp.RefLength) - hitPos) <= cutoff);
}

template <typename CoverageCalculator>
Expand Down Expand Up @@ -1562,7 +1561,7 @@ void getHitsForFragment(std::pair<header_sequence_qual, header_sequence_qual>& f
double score = covChain.bestHitScore;

// make sure orphaned fragment is near the end of the transcript
// if (!nearEndOfTranscript(covChain, t, 200)) { continue; }
// if (!nearEndOfTranscript(covChain, t, 1000)) { continue; }

if (score >= fOpt * bestScore and score >= cutoffLeft) {
foundValidHit = true;
Expand Down Expand Up @@ -1603,7 +1602,7 @@ void getHitsForFragment(std::pair<header_sequence_qual, header_sequence_qual>& f
double score = covChain.bestHitScore;

// make sure orphaned fragment is near the end of the transcript
//if (!nearEndOfTranscript(covChain, t, 200)) { continue; }
// if (!nearEndOfTranscript(covChain, t, 1000)) { continue; }

if (score >= fOpt * bestScore and score >= cutoffRight) {
if (score > bestScore) { bestScore = score; }
Expand Down Expand Up @@ -3206,7 +3205,7 @@ transcript abundance from RNA-seq reads
// Make sure the provided file exists
geneMapPath = vm["geneMap"].as<std::string>();
if (!bfs::exists(geneMapPath)) {
std::cerr << "Could not fine transcript <=> gene map file " << geneMapPath << "\n";
std::cerr << "Could not find transcript <=> gene map file " << geneMapPath << "\n";
std::cerr << "Exiting now: please either omit the \'geneMap\' option or provide a valid file\n";
std::exit(1);
}
Expand Down

0 comments on commit 113545d

Please sign in to comment.