![]() |
eXpress “1.5”
|
The TargetTable class is used to keep track of the Target objects for a run. More...
#include <targets.h>
Public Member Functions | |
| TargetTable (std::string targ_fasta_file, std::string haplotype_file, bool prob_seqs, bool known_aux_params, double alpha, const AlphaMap *alpha_map, const Librarian *libs) | |
| TargetTable Constructor. | |
| ~TargetTable () | |
| TargetTable Destructor. | |
| Target * | get_targ (TargID id) |
| A member function that returns a pointer to the target with the given id. | |
| void | round_reset () |
| A member function that readies all Target objects in the table for the next round of batch EM. | |
| size_t | size () const |
| An accessor for the number of targets in the table. | |
| double | total_fpb () const |
| An accessor for the (logged) total mass per base, including pseudo-counts. | |
| void | update_total_fpb (double incr_amt) |
| a member function that increments the (logged) total mass per base. | |
| void | update_covar (TargID targ1, TargID targ2, double covar) |
| A member function that increases the (logged) covariance between two targets by the specified amount. | |
| double | get_covar (TargID targ1, TargID targ2) |
| An accessor for the covariance between two targets. | |
| size_t | covar_size () const |
| An accessor for number of pairs of targets with non-zero covariance. | |
| Bundle * | merge_bundles (Bundle *b1, Bundle *b2) |
| A member function that merges the given Bundles. | |
| size_t | num_bundles () const |
| An accessor for the number of bundles in the partition. | |
| void | masses_to_counts () |
| Renormalized masses to be counts and projects when necessary. | |
| void | output_results (std::string output_dir, size_t tot_counts, bool output_varcov=false, bool output_rdds=false) |
| A member function that outputs the final expression data in a file called 'results.xprs', (optionally) the variance-covariance matrix in 'varcov.xprs', and (optionally) the RDD p-values in the given output directory. | |
| void | asynch_bias_update (boost::mutex *mutex) |
| A member function to be run asynchronously that continuously updates the background bias values, target bias values, and target effective lengths. | |
| void | enable_bundle_threadsafety () |
| void | disable_bundle_threadsafety () |
| void | collapse_bundles () |
| Collapses the merge trees in the BundleTable. | |
The TargetTable class is used to keep track of the Target objects for a run.
The constructor parses a fasta file to generate the Target objects and stores them in a map keyed by their string id.
| TargetTable::TargetTable | ( | std::string | targ_fasta_file, |
| std::string | haplotype_file, | ||
| bool | prob_seqs, | ||
| bool | known_aux_params, | ||
| double | alpha, | ||
| const AlphaMap * | alpha_map, | ||
| const Librarian * | libs | ||
| ) |
TargetTable Constructor.
| targ_fasta_file | a string storing the path to the fasta file from which to load targets. |
| haplotype_file | a string storing the path to the haplotype file containing comma-separated target pairs to be considered alternative haplotypes (optional). |
| prob_seqs | a bool that specifies if the sequence is to be treated probablistically, for RDD detection. |
| known_aux_params | a bool that is true iff the auxiliary parameters (fld, bias) are provided and need not be learned. |
| alpha | a double that specifies the intial pseudo-counts for each bp of the targets (non-logged). |
| alpha_map | an optional pointer to a map object that specifies proportional weights of pseudo-counts for each target. |
| libs | a pointer to the struct containing pointers to the global parameter tables (bias_table, mismatch_table, fld). |
Definition at line 292 of file targets.cpp.
| TargetTable::~TargetTable | ( | ) |
TargetTable Destructor.
Deletes all of the target objects in the table.
Definition at line 424 of file targets.cpp.
| void TargetTable::asynch_bias_update | ( | boost::mutex * | mutex | ) |
A member function to be run asynchronously that continuously updates the background bias values, target bias values, and target effective lengths.
| mutex | a pointer to the mutex to be used to protect the global fld and bias tables during updates. |
Definition at line 843 of file targets.cpp.
| size_t TargetTable::covar_size | ( | ) | const [inline] |
| double TargetTable::get_covar | ( | TargID | targ1, |
| TargID | targ2 | ||
| ) | [inline] |
An accessor for the covariance between two targets.
These returned value will be the log of the negative of the true value.
| targ1 | one of the targets in the pair. |
| targ2 | the other target in the pair. |
| Target * TargetTable::get_targ | ( | TargID | id | ) |
A member function that returns a pointer to the target with the given id.
| id | of the target queried. |
Definition at line 462 of file targets.cpp.
A member function that merges the given Bundles.
Definition at line 466 of file targets.cpp.
| size_t TargetTable::num_bundles | ( | ) | const [inline] |
| void TargetTable::output_results | ( | std::string | output_dir, |
| size_t | tot_counts, | ||
| bool | output_varcov = false, |
||
| bool | output_rdds = false |
||
| ) |
A member function that outputs the final expression data in a file called 'results.xprs', (optionally) the variance-covariance matrix in 'varcov.xprs', and (optionally) the RDD p-values in the given output directory.
| output_dir | the directory to output the expression file to. |
| tot_counts | the total number of observed mapped fragments. |
| output_varcov | boolean specifying whether to also output the variance-covariance matrix |
| output_rdds | boolean specifying whether to also output the RDD p-values. |
Definition at line 588 of file targets.cpp.
| size_t TargetTable::size | ( | ) | const [inline] |
| double TargetTable::total_fpb | ( | ) | const |
An accessor for the (logged) total mass per base, including pseudo-counts.
Definition at line 833 of file targets.cpp.
| void TargetTable::update_covar | ( | TargID | targ1, |
| TargID | targ2, | ||
| double | covar | ||
| ) | [inline] |
A member function that increases the (logged) covariance between two targets by the specified amount.
These values are stored positive even though they are negative.
| targ1 | one of the targets in the pair |
| targ2 | the other target in the pair |
| covar | a double specifying the amount to increase the pair's covariance by (logged) |
| void TargetTable::update_total_fpb | ( | double | incr_amt | ) |
a member function that increments the (logged) total mass per base.
| incr_amt | the (logged) amount to increment by. |
Definition at line 838 of file targets.cpp.