Skip to content

Commit

Permalink
Fixed bug in argument parser -- bumpped to v0.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-p committed Nov 21, 2013
1 parent 6f15ff7 commit 0a0ca38
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 14 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ enable_testing()

project (Sailfish)

set(CPACK_PACKAGE_VERSION "0.6.1")
set(CPACK_PACKAGE_VERSION "0.6.2")
set(CPACK_PACKAGE_VERSION_MAJOR "0")
set(CPACK_PACKAGE_VERSION_MINOR "6")
set(CPACK_PACKAGE_VERSION_PATCH "1")
set(CPACK_PACKAGE_VERSION_PATCH "2")
set(CPACK_GENERATOR "TGZ")
set(CPACK_SOURCE_GENERATOR "TGZ")
set(CPACK_PACKAGE_VENDOR "Carnegie Mellon University")
Expand Down
4 changes: 2 additions & 2 deletions include/SailfishConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
namespace Sailfish {
constexpr char majorVersion[] = "0";
constexpr char minorVersion[] = "6";
constexpr char patchVersion[] = "1";
constexpr char version[] = "0.6.1";
constexpr char patchVersion[] = "2";
constexpr char version[] = "0.6.2";
}

#endif // SAILFISH_CONFIG_HPP
6 changes: 3 additions & 3 deletions src/IndexedCounter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ bool countKmers(ParserT& parser, PerfectHashIndex& phi, CountDBNew& rhash, size_
switch(c) {
case jellyfish::CODE_IGNORE: break;
case jellyfish::CODE_COMMENT:
std::cerr << "ERROR\n";
std::cerr << "ERROR: unexpected character " << c << " in read!\n";

// Fall through
case jellyfish::CODE_RESET:
Expand Down Expand Up @@ -318,8 +318,8 @@ int mainCount( int argc, char *argv[] ) {
("help,h", "produce help message")
("index,i", po::value<string>(), "transcript index file [Sailfish format]")
("reads,r", po::value<std::vector<string>>(&undirReadFiles)->multitoken(), "List of files containing \"undirected\" reads")
("reverse,R", po::value<std::vector<string>>(&fwdReadFiles)->multitoken(), "List of files containing \"sense\" reads")
("forward,F", po::value<std::vector<string>>(&revReadFiles)->multitoken(), "List of files containing \"anti-sense\" reads")
("reverse,R", po::value<std::vector<string>>(&revReadFiles)->multitoken(), "List of files containing \"anti-sense\" reads")
("forward,F", po::value<std::vector<string>>(&fwdReadFiles)->multitoken(), "List of files containing \"sense\" reads")
("counts,c", po::value<string>(), "File where Sailfish read count is written")
("threads,p", po::value<uint32_t>()->default_value(maxThreads), "The number of threads to use when counting kmers")
("polya,a", po::bool_switch(), "polyA/polyT k-mers should be discarded")
Expand Down
25 changes: 18 additions & 7 deletions src/QuantificationDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,27 +61,38 @@ int runKmerCounter(const std::string& sfCommand,
argStream << "--counts " << countFileOut << " ";
argStream << "--threads " << numThreads << " ";

std::cerr << "Undirected reads:[";
// Undirected reads
argStream << "--reads ";
for (auto& rfile : undirReadFiles) {
argStream << rfile << " ";
if (undirReadFiles.size() > 0) {
argStream << "--reads=";
for (auto& rfile : undirReadFiles) {
std::cerr << rfile << " ";
argStream << rfile << " ";
}
}
std::cerr << "]\n";

std::cerr << "Sense reads:[";
// Sense reads
if (fwdReadFiles.size() > 0) {
argStream << "--forward";
argStream << "--forward=";
for (auto& rfile : fwdReadFiles) {
argStream << rfile << " ";
std::cerr << rfile << " ";
argStream << rfile << " ";
}
}
std::cerr << "]\n";

std::cerr << "Anti-sense reads:[";
// Anti-sense reads
if (revReadFiles.size() > 0) {
argStream << "--reverse";
argStream << "--reverse=";
for (auto& rfile : revReadFiles) {
argStream << rfile << " ";
std::cerr << rfile << " ";
argStream << rfile << " ";
}
}
std::cerr << "]\n";

std::string argString = argStream.str();
boost::trim(argString);
Expand Down

0 comments on commit 0a0ca38

Please sign in to comment.