Skip to content

Commit

Permalink
Set avg minimal coverage to call a fragment as deleted at 3.0... eith…
Browse files Browse the repository at this point in the history
…er fit if successful or straight average
  • Loading branch information
jeffreybarrick committed Aug 16, 2017
1 parent 03d03f3 commit 69e7c3c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
8 changes: 4 additions & 4 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Version 0.30.3
* Fixed critical error that could give negative positions when a reference sequence fragment
was called as deleted.
* Fixed rare case where fitting coverage distribution could lead to fatal error.
Version 0.31.0
* Fixed critical error that could give negative positions for mutations when a reference sequence
fragment was called as deleted.
* Fixed several cases where fitting coverage distribution could fail or lead to a fatal error.

Version 0.30.2
* Improved robustness of fitting coverage distribution and added fallbacks if fitting fails.
Expand Down
7 changes: 4 additions & 3 deletions binarydist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ BINARYLOCALDIR=${BRESEQVERSIONSTRING}-${BINARYNAME}
BINARYDIR=${PWD}/${BINARYLOCALDIR}
rm -r ${BINARYDIR} ${BINARYDIR}.tgz

echo "./configure CFLAGS=\"${ARCHFLAGS} ${CFLAGS}\" CXXFLAGS=\"${ARCHFLAGS} ${CXXFLAGS}\" LDFLAGS=\"${ARCHFLAGS} ${LDFLAGS}\" --prefix=\"${BINARYDIR}\"
./configure CFLAGS="${ARCHFLAGS} ${CFLAGS}" CXXFLAGS="${ARCHFLAGS} ${CXXFLAGS}" LDFLAGS="${ARCHFLAGS} ${LDFLAGS}" --prefix="${BINARYDIR}"
echo "${BINARYDIR}"
echo "./configure --prefix=\"${BINARYDIR}\" CFLAGS=\"${ARCHFLAGS} ${CFLAGS}\" CXXFLAGS=\"${ARCHFLAGS} ${CXXFLAGS}\" LDFLAGS=\"${ARCHFLAGS} ${LDFLAGS}\""
./configure --prefix="${BINARYDIR}" CFLAGS="${ARCHFLAGS} ${CFLAGS}" CXXFLAGS="${ARCHFLAGS} ${CXXFLAGS}" LDFLAGS="${ARCHFLAGS} ${LDFLAGS}"

make clean
make -j 6
make test
make test
make install

#Documentation and information
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.65])
AC_INIT([breseq], [0.30.2b], [[email protected]], [breseq], [http://barricklab.org/breseq])
AC_INIT([breseq], [0.31.0], [[email protected]], [breseq], [http://barricklab.org/breseq])
AC_CONFIG_AUX_DIR(aux_build)
AC_CONFIG_MACRO_DIR([aux_build/m4])
AC_CONFIG_HEADERS([aux_build/config.h])
Expand Down
14 changes: 10 additions & 4 deletions src/c/breseq/coverage_distribution.r
Original file line number Diff line number Diff line change
Expand Up @@ -465,14 +465,20 @@ if (nb_fit_mu > 0) {
cat("Mu estimate=", m," Size estimate =", size_estimate, "\n")
deletion_propagation_coverage = qnbinom(deletion_propagation_pr_cutoff, size = size_estimate, mu = m)
if (is.nan(deletion_propagation_coverage) || (deletion_propagation_coverage < 1)) {
cat("Double fallback to calculating as just 20% of the mean\n")
deletion_propagation_coverage = m * 0.2
cat("Double fallback to calculating as just 10% of the mean\n")
deletion_propagation_coverage = m * 0.1
}
}

#Call it as deleted if this number is also basically zero, implying very low coverage
#Don't allow one read to indicate non-deleted regions
if (deletion_propagation_coverage < 1) {
deletion_propagation_coverage = -1
deletion_propagation_coverage = 1
}

#This works fine with the negative values
#If we have both low fit coverage and low straight average coverage then we're deleted...
if ( (nb_fit_mu <= 3) && (m <= 3) ) {
deletion_propagation_coverage = -1
}

#print out statistics
Expand Down

0 comments on commit 69e7c3c

Please sign in to comment.