Skip to content

Commit

Permalink
Let normal be able to rescue tumor mapping quality.
Browse files Browse the repository at this point in the history
Updated to version 0.14.1.

In install-dependencies.sh : no longer let wget use ipv4 by default, and let wget continue from previous download if possible. Updated to version 0.14.2.

Fixed a compiling error.
  • Loading branch information
zhaoxiaofei committed Jun 24, 2023
1 parent 9e7c0dd commit 15f4adc
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CmdLineArgs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,10 @@ CommandLineArgs::initFromArgCV(int & parsing_result_flag, int argc, const char *
"For non-WGS: normal effective allele-fraction (FA) cannot be reduced below this times the corresponding raw FA.");
ADD_OPTDEF2(app, lib_nonwgs_normal_add_mul_ad,
"For non-WGS: normal cross-sample read count is increased by this multiplicative factor. ");
ADD_OPTDEF2(app, lib_nonwgs_normal_max_rescued_MQ,
"For non-WGS: additional maximum Phred-scaled increase in the mapping quality part of the variant quality by comparing the tumor with its matched normal. ");
ADD_OPTDEF2(app, lib_wgs_normal_max_rescued_MQ,
"For WGS: additional maximum Phred-scaled increase in the mapping quality part of the variant quality by comparing the tumor with its matched normal. ");

// *** 14 debugging

Expand Down
4 changes: 3 additions & 1 deletion CmdLineArgs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,9 @@ struct CommandLineArgs {
double lib_nonwgs_normal_full_self_rescue_fa = 0.1;
double lib_nonwgs_normal_min_self_rescue_fa_ratio = 0.2;
double lib_nonwgs_normal_add_mul_ad = 1.0;

uvc1_qual_t lib_nonwgs_normal_max_rescued_MQ = 30;
uvc1_qual_t lib_wgs_normal_max_rescued_MQ = 0;

// *** 14. parameters related to debugging in vcf
uvc1_flag_t debug_note_flag = 0x0;
uvc1_readpos_t debug_warn_min_read_end_ins_cigar_oplen = 16;
Expand Down
6 changes: 3 additions & 3 deletions install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if [ $(echo "${1}" | grep skip-bcftools | wc -l) -eq 0 ]; then
mkdir -p "${currdir}/ext/"
cd "${currdir}/ext/"
if [ $(echo "${1}" | grep skip-downloading-bcftools | wc -l) -eq 0 ]; then
wget --inet4-only https://github.com/samtools/bcftools/releases/download/1.11/bcftools-1.11.tar.bz2
wget -c https://github.com/samtools/bcftools/releases/download/1.11/bcftools-1.11.tar.bz2
fi
tar -xvf bcftools-1.11.tar.bz2
cd "${currdir}/ext/bcftools-1.11"
Expand All @@ -32,7 +32,7 @@ if [ $(echo "${1}" | grep skip-samtools | wc -l) -eq 0 ]; then
mkdir -p "${currdir}/ext/"
cd "${currdir}/ext/"
if [ $(echo "${1}" | grep skip-downloading-samtools | wc -l) -eq 0 ]; then
wget --inet4-only https://github.com/samtools/samtools/releases/download/1.11/samtools-1.11.tar.bz2
wget -c https://github.com/samtools/samtools/releases/download/1.11/samtools-1.11.tar.bz2
fi
tar -xvf samtools-1.11.tar.bz2
cd "${currdir}/ext/samtools-1.11"
Expand All @@ -43,7 +43,7 @@ fi

if [ $(echo "${1}" | grep skip-parallel | wc -l) -eq 0 ]; then
cd "${currdir}/ext/"
wget --inet4-only http://ftp.gnu.org/gnu/parallel/parallel-20201122.tar.bz2
wget -c http://ftp.gnu.org/gnu/parallel/parallel-20201122.tar.bz2
tar -xvf parallel-20201122.tar.bz2
cd "${currdir}/ext/parallel-20201122"
./configure
Expand Down
4 changes: 3 additions & 1 deletion main.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5220,6 +5220,8 @@ BcfFormat_symbol_calc_qual(
? fmt.bMQ[a] // small
: (_systematicMQ_base - (uvc1_qual_t)(numstates2phred((ADP + 1.0) / (aDP + 0.5)))));
// We may need to consider that: if an amplicon panel is designed for a target region, then there must be wet-lab protocol to deal with low mapping quality.
const bool is_nonWGS = does_fmt_imply_short_frag(fmt, paramset.lib_wgs_min_avg_fraglen);
const uvc1_qual_t normal_rescued_MQ = MIN(non_neg_minus(readlenMQcap, 60), (is_nonWGS ? paramset.lib_nonwgs_normal_max_rescued_MQ : paramset.lib_wgs_normal_max_rescued_MQ));

auto systematicMQVQ1 = MIN((MAX(_systematicMQ, paramset.syserr_MQ_min) + _systematicMQVQadd), readlenMQcap);

Expand Down Expand Up @@ -5268,7 +5270,7 @@ BcfFormat_symbol_calc_qual(
+ (is_fmtADPxfr_imba ? paramset.microadjust_strand_absence_snv_penalty : 0))
: (is_tmore_amplicon ? paramset.microadjust_dedup_absence_indel_penalty : 0));

const auto tn_syserr_q = systematicMQVQ + paramset.tn_q_inc_max;
const auto tn_syserr_q = systematicMQVQ + paramset.tn_q_inc_max + normal_rescued_MQ;

clear_push(fmt.bMQQ, systematicMQVQ);

Expand Down
2 changes: 1 addition & 1 deletion version.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define version_INCLUDED
#include <string.h>

#define VERSION123 "0.14.0"
#define VERSION123 "0.14.2"

#ifndef COMMIT_VERSION
#define COMMIT_VERSION "NotVersionControlled"
Expand Down

0 comments on commit 15f4adc

Please sign in to comment.