Skip to content
Snippets Groups Projects
Commit aee17e84 authored by Thomas Weber's avatar Thomas Weber
Browse files

Split into files ; define modes & associated conda envs ; run on a single...

Split into files ; define modes & associated conda envs ; run on a single chromosome by keeping full initial BAM  ; functionnal until strandphaser
parent b9d78e43
No related branches found
No related tags found
No related merge requests found
Showing
with 4675 additions and 0 deletions
This diff is collapsed.
/*
Copyright (C) 2017 Sascha Meiers
Distributed under the MIT software license, see the accompanying
file LICENSE.md or http://www.opensource.org/licenses/mit-license.php.
*/
#include <iostream>
#include <htslib/sam.h>
#include "version.hpp"
#include "count.hpp"
#include "segmentation.hpp"
#include "simulate.hpp"
#include "calc_bins.hpp"
#include "sces.hpp"
#include "ploidy.hpp"
int main(int argc, char **argv)
{
if (argc >= 2 && std::string(argv[1]) == "count") {
return main_count(argc-1, argv+1);
} else if (argc >= 2 && std::string(argv[1]) == "simulate") {
return main_simulate(argc-1, argv+1);
} else if (argc >= 2 && std::string(argv[1]) == "segment") {
return main_segment(argc-1, argv+1);
} else if (argc >= 2 && std::string(argv[1]) == "makebins") {
return main_calc_bins(argc-1, argv+1);
} else if (argc >= 2 && std::string(argv[1]) == "states") {
return main_strand_states(argc-1, argv+1);
} else if (argc >= 2 && std::string(argv[1]) == "hmm") {
return main_hmm(argc-1, argv+1);
} else if (argc >= 2 && std::string(argv[1]) == "--version") {
std::cout << "Mosaicatcher " << STRINGIFYMACRO(MOSAIC_VERSION_MAJOR) ;
std::cout << "." << STRINGIFYMACRO(MOSAIC_VERSION_MINOR) << " (";
std::cout << STRINGIFYMACRO(MOSAIC_GIT_COMMIT_HASH) << "-";
std::cout << STRINGIFYMACRO(MOSAIC_GIT_BRANCH) << ")" << std::endl;
std::cout << "htslib " << STRINGIFYMACRO(HTSLIB_VERSION) << std::endl;
std::cout << "boost version " << STRINGIFYMACRO(BOOST_VERSION) << std::endl;
return 0;
} else {
std::cout << std::endl;
std::cout << "Mosaicatcher " << STRINGIFYMACRO(MOSAIC_VERSION_MAJOR);
std::cout << "." << STRINGIFYMACRO(MOSAIC_VERSION_MINOR) << std::endl;
std::cout << std::endl;
std::cout << "Usage: " << argv[0] << " [--version] [--help] <command> [options]" << std::endl << std::endl;
std::cout << "Commands:" << std::endl;
std::cout << " count Count binned reads in Strand-seq cells" << std::endl;
//std::cout << " hmm Count binned reads in arbitrary ploidy" << std::endl;
std::cout << " segment Find a segmentation across binned counts" << std::endl;
std::cout << " simulate Simulate Strand-seq data" << std::endl;
std::cout << " makebins Create variable-width bins based on real data" << std::endl;
std::cout << " states Determine strand states including SCEs" << std::endl;
std::cout << std::endl;
if (argc >= 2 && std::string(argv[1]) == "--help") {
std::cout << "Mosaicatcher calls structural variants (SVs) in Strand-seq data." << std::endl;
std::cout << "It is currently under development." << std::endl;
std::cout << "This software comes with absolutely no warranty." << std::endl << std::endl;
return 0;
}
}
return 1;
}
This diff is collapsed.
/*
Copyright (C) 2017 Sascha Meiers
Distributed under the MIT software license, see the accompanying
file LICENSE.md or http://www.opensource.org/licenses/mit-license.php.
*/
#ifndef program_options_h
#define program_options_h
#include <fstream>
#include <boost/program_options/errors.hpp>
auto in_range = [](int min, int max, char const * const opt_name)
{
using boost::program_options::validation_error;
// returns another lambda function
return [opt_name, min, max](unsigned short v)
{
if(v < min || v > max){
throw validation_error(validation_error::invalid_option_value,
opt_name,
std::to_string(v));
}
};
};
// opt::value<unsigned short>()->default_value(5)->notifier(in(0, 10, "my_opt"));
template <typename TString>
bool file_exists(TString const & fileName)
{
std::ifstream infile(fileName);
return infile.good();
}
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#ifndef version_hpp
#define version_hpp
#define STRINGIFY(x) #x
#define STRINGIFYMACRO(y) STRINGIFY(y)
#define MOSAIC_VERSION_MAJOR @MOSAIC_VERSION_MAJOR@
#define MOSAIC_VERSION_MINOR @MOSAIC_VERSION_MINOR@
#define HTSLIB_VERSION @HTSLIB_VERSION@
#define BOOST_VERSION @Boost_VERSION@
#define MOSAIC_GIT_COMMIT_HASH @GIT_COMMIT_HASH@
#define MOSAIC_GIT_BRANCH @GIT_BRANCH@
#endif /* version_hpp */
This diff is collapsed.
/g/korbel2/weber/workspace/mosaicatcher-update/workflow/.snakemake/conda/41c386e2197cbc9beb30ca282d0aa485
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
name: plots
channels:
- conda-forge
dependencies:
- imagemagick
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment