Skip to content

Commit

Permalink
initial sketch mode stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Patro committed Sep 28, 2020
1 parent 23eaba3 commit 6501f4d
Show file tree
Hide file tree
Showing 6 changed files with 573 additions and 13 deletions.
3 changes: 2 additions & 1 deletion include/AlevinOpts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ struct AlevinOpts {
//Stop progress sumps
bool quiet;
// just perform alignment and produce
// an output directory with a PAM file.
// an output directory with a RAD file.
bool just_align;
bool sketch_mode;
//flag for deduplication
bool noDedup;
//flag for not performing external whitelisting
Expand Down
1 change: 1 addition & 0 deletions include/SalmonDefaults.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ namespace defaults {
constexpr const bool noEM{false};
constexpr const bool debug{true};
constexpr const bool just_align{false};
constexpr const bool sketch_mode{false};
constexpr const uint32_t trimRight{0};
constexpr const uint32_t numBootstraps{0};
constexpr const uint32_t numGibbsSamples{0};
Expand Down
5 changes: 3 additions & 2 deletions scripts/fetchPufferfish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ if [ -d ${INSTALL_DIR}/src/pufferfish ] ; then
fi

#SVER=salmon-v1.3.0
SVER=develop
#SVER=develop
SVER=sketch-mode

EXPECTED_SHA256=0176b2ec5fc45bbf68c60b5845fead28e63db72f91ff93499d67e7a571167fdf

Expand All @@ -42,7 +43,7 @@ fi
if [ -z "${hashcheck-}" ]; then
echo "Couldn't find shasum command; can't verify contents of downloaded pufferfish";
else
if [[ $SVER != develop ]]; then
if [[ $SVER != sketch-mode ]]; then
echo "${EXPECTED_SHA256} ${EXTERNAL_DIR}/pufferfish.zip" | ${hashcheck} -c - || { echo "pufferfish.zip did not match expected SHA1! Exiting."; exit 1; }
else
echo "not testing sha since pulling from develop"
Expand Down
13 changes: 12 additions & 1 deletion src/AlevinUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,7 @@ namespace alevin {
aopt.jointLog = spdlog::create("alevinLog", std::begin(sinks), std::end(sinks));

aopt.just_align = vm["justAlign"].as<bool>();
aopt.sketch_mode = vm["sketchMode"].as<bool>();
aopt.quiet = vm["quiet"].as<bool>();
aopt.noEM = vm["noem"].as<bool>();
aopt.noDedup = vm["noDedup"].as<bool>();
Expand All @@ -594,8 +595,18 @@ namespace alevin {

if (aopt.just_align) {
aopt.jointLog->info("The --justAlign flag was passed to alevin. The "
"reads will be selectively aligned and the output written to a PAM file."
"reads will be selectively aligned and the output written to a RAD file."
"Arguments passed that correspond to other processing steps will be ignored");
if (aopt.sketch_mode) {
aopt.jointLog->info("The --sketchMode flag was passed; the alignment will be run "
"in sketch mode.");
sopt.mismatchSeedSkip = 15;
}
} else {
if (aopt.sketch_mode) {
aopt.jointLog->info("The --sketchMode flag is not meaningful without the "
"--justAlign flag. This flag will be ignored.");
}
}

if (aopt.umiEditDistance > 4 ) {
Expand Down
6 changes: 5 additions & 1 deletion src/ProgramOptionsGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,12 @@ namespace salmon {
("help,h", "produce help message")
("output,o", po::value<std::string>()->required(), "Output quantification directory.")
("justAlign,j", po::bool_switch()->default_value(alevin::defaults::just_align),
"just selectively align the data and write the results to a PAM file. Do not perform "
"just selectively align the data and write the results to a RAD file. Do not perform "
"the rest of the quantification procedure.")
("sketchMode", po::bool_switch()->default_value(alevin::defaults::sketch_mode),
"perform sketching rather than selective alignment and write the results to a RAD file. "
"Requires the `--justAlign` flag. Do not perform the rest of the quantification procedure."
)
("threads,p",
po::value<uint32_t>(&(sopt.numThreads))->default_value(sopt.numThreads),
"The number of threads to use concurrently.")
Expand Down

0 comments on commit 6501f4d

Please sign in to comment.