Skip to content

Commit

Permalink
Merge pull request #62 from nmmsv/master
Browse files Browse the repository at this point in the history
minor change in command line options
  • Loading branch information
gymreklab authored Mar 7, 2019
2 parents a05ac3f + 793f309 commit 3db25f8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Options for different sequencing settings
* **`--insertmean <float>`** Fragment length mean. (default: calculate if not provided)
* **`--insertsdev <float>`** Fragment length standard deviation. (default: calculate if not provided)
* **`--nonuniform`** Indicates non-uniform coverage in alignment file (i.e., used for exome sequencing). Using this flag removes the likelihood term corresponding to FRR count.
* **`--min-reads-cov <int>`** Minimum number of reads required for calculation of coverage.
* **`--min-sample-reads <int>`** Minimum number of reads per sample.

Advanced parameters for likelihood model:
* **`--frrweight <float>`** Reset weight for FRR class in likelihood model. (default 1.0)
Expand Down
7 changes: 6 additions & 1 deletion src/genotyper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,11 @@ bool Genotyper::ProcessLocus(BamCramMultiReader* bamreader, Locus* locus) {
locus->flanking_reads[samp] = sample_likelihood_maximizers[samp]->GetFlankingDataSize();
locus->depth[samp] = sample_likelihood_maximizers[samp]->GetReadPoolSize();
locus->called[samp] = true;
if (allele1 <= 0 and allele2 <= 0){
PrintMessageDieOnError("\tProblem maximizing likelihood. Skipping locus", M_WARNING, options->quiet);
locus->called[samp] = false;
continue;
}
if (options->include_ggl && !SetGGL(*locus, samp)) {
PrintMessageDieOnError("\tProblem setting genotype likelihoods", M_WARNING, options->quiet);
}
Expand Down Expand Up @@ -238,7 +243,7 @@ bool Genotyper::ProcessLocus(BamCramMultiReader* bamreader, Locus* locus) {
catch (std::exception &exc){
if (options->verbose) {
stringstream msg;
msg<<"\tEncountered error("<< exc.what() <<") in likelihood maximization for CI. Skipping locus";
msg<<"\tEncountered error("<< exc.what() <<") in likelihood maximization for confidence interval. Skipping locus";
PrintMessageDieOnError(msg.str(), M_PROGRESS, options->quiet);
}
locus->called[samp] = false;
Expand Down
4 changes: 2 additions & 2 deletions src/main_gangstr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void show_help() {
<< "\t" << "--insertmean <float> " << "\t" << "Fragment length mean. Comma separated list to specify for each BAM separately." << "\n"
<< "\t" << "--insertsdev <float> " << "\t" << "Fragment length standard deviation. Comma separated list to specify for each BAM separately. " << "\n"
<< "\t" << "--nonuniform " << "\t" << "Indicate whether data has non-uniform coverage (i.e., exome)" << "\n"
<< "\t" << "--min-reads-cov <int> " << "\t" << "Minimum number of reads required for calculation of coverage." << "\n"
<< "\t" << "--min-sample-reads <int> " << "\t" << "Minimum number of reads per sample." << "\n"
<< "\n Advanced paramters for likelihood model:\n"
<< "\t" << "--frrweight <float> " << "\t" << "Weight for FRR reads. Default: " << options.frr_weight << "\n"
<< "\t" << "--enclweight <float> " << "\t" << "Weight for enclosing reads. Default: " << options.enclosing_weight << "\n"
Expand Down Expand Up @@ -148,7 +148,7 @@ void parse_commandline_options(int argc, char* argv[], Options* options) {
};
static struct option long_options[] = {
{"skip-qscore", no_argument, NULL, OPT_SKIPQ},
{"min-read-cov", required_argument, NULL, OPT_MINREAD},
{"min-sample-reads", required_argument, NULL, OPT_MINREAD},
{"period", required_argument, NULL, OPT_PERIOD},
{"include-ggl", no_argument, NULL, OPT_GGL},
{"grid-threshold", required_argument, NULL, OPT_GRIDTHRESH},
Expand Down
4 changes: 2 additions & 2 deletions src/vcf_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ void VCFWriter::WriteRecord(Locus& locus) {
std::set<int> alt_allele_lengths;
for (size_t i=0; i<sample_names.size(); i++) {
std::string samp = sample_names[i];
if (locus.allele1[samp] != refsize) {
if (locus.allele1[samp] != refsize and locus.allele1[samp] > 0) {
alt_allele_lengths.insert(locus.allele1[samp]);
}
if (locus.allele2[samp] != refsize) {
if (locus.allele2[samp] != refsize and locus.allele2[samp] > 0) {
alt_allele_lengths.insert(locus.allele2[samp]);
}
}
Expand Down

0 comments on commit 3db25f8

Please sign in to comment.