vdj_pipe
pipeline for processing DNA sequence data
Namespaces | Classes | Typedefs | Functions | Variables
vdj_pipe::test Namespace Reference

Namespace for unit-tests. More...

Namespaces

 detail
 

Classes

struct  Exception_fixture
 
struct  Id1
 
struct  Id2
 
class  Step_harness
 

Typedefs

typedef boost::chrono::high_resolution_clock clock_t
 
typedef clock_t::time_point time_t
 
typedef boost::chrono::duration< double, boost::ratio< 1, 1 > > dur_t
 
typedef boost::mt11213b rng
 
typedef boost::random::uniform_int_distribution< unsigned > distribution
 
typedef bpt::ptree ptree
 
typedef std::vector< std::string > p_vector
 
typedef Qual_record::quality::value_type value
 
typedef std::pair< std::size_t, std::size_t > pair
 

Functions

 BOOST_AUTO_TEST_CASE (case01)
 
 BOOST_AUTO_TEST_CASE (match_3_elements_01)
 
 BOOST_AUTO_TEST_CASE (match_element_at_end)
 
 BOOST_AUTO_TEST_CASE (match_scan_element)
 
 BOOST_AUTO_TEST_CASE (match_step_run_02)
 
 BOOST_AUTO_TEST_CASE (match_step_run_03)
 
const distribution dist (1, sz)
 
 BOOST_AUTO_TEST_CASE (case02)
 
 BOOST_AUTO_TEST_CASE (case03)
 
 BOOST_AUTO_TEST_CASE (case04)
 
 BOOST_AUTO_TEST_CASE (me_relative_interval_01)
 
 BOOST_AUTO_TEST_CASE (me_relative_interval_02)
 
 BOOST_AUTO_TEST_CASE (me_relative_interval_03)
 
 BOOST_AUTO_TEST_CASE (me_relative_interval_04)
 
 BOOST_AUTO_TEST_CASE (max_reads_2)
 
 BOOST_AUTO_TEST_CASE (seq_files)
 
 BOOST_AUTO_TEST_CASE (case06)
 
 BOOST_AUTO_TEST_CASE (case07)
 
 BOOST_AUTO_TEST_CASE (value_names_run_01)
 
 BOOST_AUTO_TEST_CASE (value_names_run_02)
 
 BOOST_AUTO_TEST_CASE (value_names_run_03)
 
Pipe_environment make_pe (Value_map const &vm)
 
template<class Step >
Step make_step (Vm_access_single const &vma, std::string const &json)
 
 BOOST_AUTO_TEST_CASE (find_intersection_run_01)
 
 BOOST_AUTO_TEST_CASE (case05)
 
 BOOST_AUTO_TEST_CASE (file_ostream_queue_run_01)
 
 BOOST_AUTO_TEST_CASE (file_ostream_queue_run_02)
 
 BOOST_AUTO_TEST_CASE (path_decompose_run_01)
 
std::string sample_file_path (const std::string &name="")
 
std::string temp_file_path (const std::string &name="")
 
const Qual_record::quality qual1 (seq1.size(), 42)
 
const Qual_record::quality qual2 (seq2.size(), 13)
 
const Qual_record::quality qual3 (seq3.size(), 5)
 
 BOOST_AUTO_TEST_CASE (file_ostream_variant_run_01)
 
 BOOST_AUTO_TEST_CASE (file_ostream_variant_run_02)
 
 BOOST_AUTO_TEST_CASE (file_ostream_variant_run_03)
 
 BOOST_AUTO_TEST_CASE (file_ostream_variant_run_04)
 
const sequence_interval si1 (0, 18)
 
 BOOST_AUTO_TEST_CASE (match_element_run_01)
 
 BOOST_AUTO_TEST_CASE (parse_combinations_csv_file_1)
 
 BOOST_AUTO_TEST_CASE (parse_combinations_csv_file_2)
 
 BOOST_AUTO_TEST_CASE (parse_combinations_csv_file_3)
 

Variables

const std::string match1
 
const std::string seq1 = "taaaaaaaaaaaaaaTAGAGCccttACTCTGGGTGTCTCACCATGGCCTcc"
 
const std::string match2
 
const std::string seq2 = "CTGGGTGTctCACCATGGCCTcc"
 
const std::string match3
 
const std::size_t n = 10L * 1000 * 1000
 
const std::size_t sz = 230 * 1000
 
const std::string str_1
 
const std::string str_2
 
const std::string m1 = "mid1"
 
const std::string m2 = "mid2"
 
const std::string m3 = "mid3"
 
const std::string s1 = "ATGGA"
 
const std::string s2 = "CTGGA"
 
const std::string s3 = "ATGGT"
 
const std::string seq1c = "ACGGTGACCAGGGTTCCCTGGCCCCAGTAGTCAA"
 
const std::string seq3
 
const std::string seq4
 
const std::string seq5 = seq3 + seq2
 
const std::string seq6
 
const std::string seq7
 
const std::string filter1 = "{ \"type\": \"min_length\", \"min\": 100 }"
 
const std::string filter2 = "{ \"type\": \"min_quality\", \"min\": 10 }"
 
const std::string filter3 = "{ \"type\": \"nucleotides\" }"
 
const std::string filter4 = "{ \"type\": \"mean_quality\", \"min\": 30 }"
 
const std::string filter5
 
const std::string filter6 = "{ \"type\": \"homopolymer\", \"max\": 10 }"
 
const std::string str_3
 
const std::string s5
 
const std::string s6 = "CCGTTTA"
 
const std::string s7
 
const std::string s8
 
const std::string s10 = s5 + s6 + "T" + s7
 
const std::string s11 = s6 + "C" + s7 + s8
 
scoring_matrix_t const & sm1 = scoring_matrix<1,0,1,1>()
 
scoring_matrix_t const & sm2 = scoring_matrix<2,-2,1,0>()
 
const std::string id1 = "seq_id_1"
 
const std::string id2 = "seq_id_2"
 
const std::string id3 = "seq_id_3"
 
Qual_record::quality qual
 

Detailed Description

Namespace for unit-tests.

Typedef Documentation

typedef boost::chrono::high_resolution_clock vdj_pipe::test::clock_t
typedef boost::random::uniform_int_distribution<unsigned> vdj_pipe::test::distribution
typedef boost::chrono::duration<double, boost::ratio<1,1> > vdj_pipe::test::dur_t
typedef std::vector<std::string> vdj_pipe::test::p_vector
typedef std::pair<std::size_t,std::size_t> vdj_pipe::test::pair
typedef bpt::ptree vdj_pipe::test::ptree
typedef boost::mt11213b vdj_pipe::test::rng
typedef clock_t::time_point vdj_pipe::test::time_t

Function Documentation

vdj_pipe::test::BOOST_AUTO_TEST_CASE ( case01  )

At 230,000 elements Vector_set is approximately as fast as std::set; pre-allocation of elements produces little, if any, acceleration; unordered_set is over 4 times faster. If elements are removed as well as inserted, performance of Vector_set and std::set is same for 1,000 elements. In that case, unordered_set performs 2 times faster.

Test:
Test:
input files
Test:
Test:
Test:
Test:

Test print QUAL

Test:
Test:
Test:
Test:
Test:
check scoring matrix symmetry
Test:
finding longest interval with average above min
Test:
Test:
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( me_relative_interval_01  )
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( value_names_run_01  )
Test:
single read variable IDs
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( find_intersection_run_01  )
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( path_decompose_run_01  )
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( file_ostream_queue_run_01  )
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( match_element_run_01  )
Test:
Match positional element
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( value_names_run_02  )
Test:
paired reads variable IDs
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( me_relative_interval_02  )
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( file_ostream_variant_run_01  )
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( file_ostream_queue_run_02  )
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( me_relative_interval_03  )
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( value_names_run_03  )
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( match_3_elements_01  )
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( file_ostream_variant_run_02  )
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( max_reads_2  )
Test:
max reads
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( parse_combinations_csv_file_1  )
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( me_relative_interval_04  )
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( case02  )
Test:
max reads
Test:
Test:
copying
Test:

Test print FASTQ

Test:
Test:
ID iterator
Test:
Test:
check scoring matrix
Test:
finding longest interval with fewer ambiguous bases
Test:
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( seq_files  )
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( file_ostream_variant_run_03  )
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( case06  )
Test:
Test:
Parse file.gz
Test:
Parse file - get record
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( case03  )
Test:
Parse file.qual.bz2
Test:
test delimiter
Test:
Test:
Test:
Parse file - get IDs only
Test:
Test:
test for ambiguous nucleotides
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( parse_combinations_csv_file_2  )
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( match_element_at_end  )
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( file_ostream_variant_run_04  )
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( case07  )
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( case04  )
Test:
Parse file
Test:
Test:
Parse file - get IDs and sequence only
Test:
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( parse_combinations_csv_file_3  )
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( match_scan_element  )
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( match_step_run_02  )
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( match_step_run_03  )
vdj_pipe::test::BOOST_AUTO_TEST_CASE ( case05  )
Test:
Parse file.gz
Test:
homopolymer
Test:
Parse file - get ID, sequence, and quality
Test:
const distribution vdj_pipe::test::dist ( ,
sz   
)
Pipe_environment vdj_pipe::test::make_pe ( Value_map const &  vm)
template<class Step >
Step vdj_pipe::test::make_step ( Vm_access_single const &  vma,
std::string const &  json 
)
const Qual_record::quality vdj_pipe::test::qual1 ( seq1.  size(),
42   
)
const Qual_record::quality vdj_pipe::test::qual2 ( seq2.  size(),
13   
)
const Qual_record::quality vdj_pipe::test::qual3 ( seq3.  size(),
 
)
std::string vdj_pipe::test::sample_file_path ( const std::string &  name = "")
inline
const sequence_interval vdj_pipe::test::si1 ( ,
18   
)
std::string vdj_pipe::test::temp_file_path ( const std::string &  name = "")
inline

Variable Documentation

const std::string vdj_pipe::test::filter1 = "{ \"type\": \"min_length\", \"min\": 100 }"
const std::string vdj_pipe::test::filter2 = "{ \"type\": \"min_quality\", \"min\": 10 }"
const std::string vdj_pipe::test::filter3 = "{ \"type\": \"nucleotides\" }"
const std::string vdj_pipe::test::filter4 = "{ \"type\": \"mean_quality\", \"min\": 30 }"
const std::string vdj_pipe::test::filter5
Initial value:
= "{ \"type\": \"min_quality_window\", "
"\"min_quality\": 50, \"min_length\": 300 }"
const std::string vdj_pipe::test::filter6 = "{ \"type\": \"homopolymer\", \"max\": 10 }"
const std::string vdj_pipe::test::id1 = "seq_id_1"
const std::string vdj_pipe::test::id2 = "seq_id_2"
const std::string vdj_pipe::test::id3 = "seq_id_3"
const std::string vdj_pipe::test::m1 = "mid1"
const std::string vdj_pipe::test::m2 = "mid2"
const std::string vdj_pipe::test::m3 = "mid3"
const std::string vdj_pipe::test::match1
Initial value:
=
"{ "
" \"reverse\": true, \"trimmed\": true, "
" \"elements\": [ "
" { "
" \"start\": { \"pos\": 14 }, \"length\": 8, "
" \"seq_file\": \"imid1.fasta\", "
" \"min_score\": 10, \"value_name\": \"iMID\", "
" \"score_name\": \"iMID_score\" "
" }, "
" { "
" \"end\": { \"before\": \"iMID\", \"pos\": -1 }, \"length\": 14, "
" \"value_name\": \"UMI\" "
" }, "
" { "
" \"start\": { \"after\": \"iMID\" }, "
" \"length\": 50, "
" \"sequence\": \"ACTCTGGGTGTCTCACCATGGCCT\", \"name\": \"primer\", "
" \"min_score\": 10, \"allow_gaps\": true, \"min_match_length\": 10,"
" \"cut_lower\": {\"before\": 0}, \"value_name\": \"seq42\" "
" } "
" ] "
"} "
const std::string vdj_pipe::test::match2
Initial value:
=
"{"
" \"elements\": ["
" {"
" \"end\": { \"after\": \"\" }, "
" \"sequence\": \"ggcctcc\","
" \"max_mismatches\": 1, \"value_name\": \"MID1\","
" \"score_name\": \"MID1_score\""
" }, "
" {"
" \"end\": { \"after\": \"\" }, "
" \"length\": 5,"
" \"value_name\": \"MID2\""
" }"
" ]"
"}"
const std::string vdj_pipe::test::match3
Initial value:
=
"{"
" \"elements\": ["
" {"
" \"end\": { \"after\": \"\" }, \"length\": 30, "
" \"sequence\": \"gtctcg\", "
" \"max_mismatches\": 1, \"value_name\": \"MID1\","
" \"score_name\": \"MID1_score\", \"cut_upper\": { \"after\": 0}"
" }, "
" {"
" \"end\": { \"after\": \"\" }, "
" \"length\": 5,"
" \"value_name\": \"MID2\""
" }"
" ]"
"}"
const std::size_t vdj_pipe::test::n = 10L * 1000 * 1000
Qual_record::quality vdj_pipe::test::qual
const std::string vdj_pipe::test::s1 = "ATGGA"
const std::string vdj_pipe::test::s10 = s5 + s6 + "T" + s7
const std::string vdj_pipe::test::s11 = s6 + "C" + s7 + s8
const std::string vdj_pipe::test::s2 = "CTGGA"
const std::string vdj_pipe::test::s3 = "ATGGT"
const std::string vdj_pipe::test::s5
Initial value:
= "GGCTTCCCATTCATTCAGGAACCACCTTCTGGTGATTTGCAAGAACGCGTAC"
"TTATTCGCCACCATGATTATGACCAGTGTTTCCAGTCCGTTCAGTTGTTGCAGTGGAATAGTCAGG"
"TTAAATTTAATGTGA"
const std::string vdj_pipe::test::s6 = "CCGTTTA"
const std::string vdj_pipe::test::s7
Initial value:
= "CGCAATCTGCCGACCACTCGCGATTCAATCATGACTTCGTGAT"
"AAAAGATTGAGTGTGAGGTTATAACGCCGAAGCGGTAAAAATTTTAATTTTTGCCGCTGAGGGGTT"
const std::string vdj_pipe::test::s8
Initial value:
= "GACCAAGCGAAGCGCGGTAGGTTTTCTGCTTAGTAGTTTAATCATTTTTCAG"
"ACTTTTATTTCTCGCCATAATTCAAACTTTTTTTCTGATAAGCTGGTTCTCACTTCTGTTACTCCA"
"GCTTCTTCGGCACCT"
const std::string vdj_pipe::test::seq1 = "taaaaaaaaaaaaaaTAGAGCccttACTCTGGGTGTCTCACCATGGCCTcc"
const std::string vdj_pipe::test::seq1c = "ACGGTGACCAGGGTTCCCTGGCCCCAGTAGTCAA"
const std::string vdj_pipe::test::seq2 = "CTGGGTGTctCACCATGGCCTcc"
const std::string vdj_pipe::test::seq3
Initial value:
=
"TCACAGAGTTCCTCTCTGGTTTCCAGGAAAGGTAACTGCAGTAATCTTGGTGATGAGAATACAGAAGTG"
"TACAGAGGTCAGGCCACATCCT"
const std::string vdj_pipe::test::seq4
Initial value:
=
seq2 + "TCCAGGAAA"
"GGTAACTGCAGTAATCTTGGTGATGAGAATATCCTCCAGTGCTGGCCTATTATAGAGTTTACATATGAA"
"ATTGTCACTGCAATTCACAATCTACTCTTTCACACAGAAGTG"
const std::string seq2
Definition: match_step_run.cpp:89
const std::string vdj_pipe::test::seq5 = seq3 + seq2
const std::string vdj_pipe::test::seq6
Initial value:
=
"CGTCGGTAGTCCACGTTCCCATCAGCCCCGATCAAGTAGTCTGNCNNTTATANACATCTGACGCTG"
"CCGACGAGCGATCTAGTGTAGATCTCGGTGGTCGCCTCCTCATTAAAAAAAACCTCCTCTTCCCCT"
"CCCCCCCTCCCCCTCCCCCCCCCCCCTCCCCTCCCTTCTCCCCCCCCCTCCTTCCCCTCTCCTCTC"
"CCTCCCCCTCCCCCCCCCCCCCTCCCACTACAGCCCTCCTCCCCCCCCCCCC"
const std::string vdj_pipe::test::seq7
Initial value:
=
"tcggcagggcacagtcacatcctggctggaattcgtgtagtgcttcacgtggcatgtcacggacttgcc"
"gtctgggcactgtgtggccggcagggtcagctggctgctcgtggtgtacaggtccccggaggcatcctg"
"gctaggtgggaagtttctggcggtcacgttctgtccgctttcgctccaggtcacactgagtggctcctg"
"ggggaagaagccctggaccaggcatgcgacgaccacgttcccatcttggggggtgctgtcgaggctcag"
"cgggaagaccttggggctggtcggggatgc"
scoring_matrix_t const& vdj_pipe::test::sm1 = scoring_matrix<1,0,1,1>()
scoring_matrix_t const& vdj_pipe::test::sm2 = scoring_matrix<2,-2,1,0>()
const std::string vdj_pipe::test::str_1
Initial value:
=
">id1 bl>ah2" "\n"
"10 20 42 13" "\n"
const std::string vdj_pipe::test::str_2
Initial value:
=
">id2 blah1 blah2 blah3 " "\n"
" 1 2 3 4 " "\n"
"10 20 42 13" "\n"
"\n"
">id3" "\n"
"SEQI SEQII" "\n"
">id4" "\n"
"5 10.5" "\n"
const std::string vdj_pipe::test::str_3
Initial value:
=
">id2 blah1 blah2 blah3 " "\n"
"SEQ SEQII" "\n"
"seq" "\n"
"\n"
">id3" "\n"
"SEQI SEQII" "\n"
const std::size_t vdj_pipe::test::sz = 230 * 1000