diff --git a/bwa/Makefile b/bwa/Makefile index d27463637..7651f1c68 100644 --- a/bwa/Makefile +++ b/bwa/Makefile @@ -31,6 +31,8 @@ bwa:libbwa.a $(AOBJS) main.o ## JEREMIAH test: ; +dist: ; +distdir: ; check: ; diff --git a/htslib/Makefile b/htslib/Makefile index b12af3c80..e807ee8d9 100644 --- a/htslib/Makefile +++ b/htslib/Makefile @@ -84,6 +84,9 @@ BUILT_TEST_PROGRAMS = \ all: lib-static $(BUILT_PROGRAMS) ##$(BUILT_TEST_PROGRAMS) +##JEREMIAH +distdir: ; + HTSPREFIX = include htslib_vars.mk diff --git a/src/AlignedContig.cpp b/src/AlignedContig.cpp index 5bef46086..4aaf01a11 100644 --- a/src/AlignedContig.cpp +++ b/src/AlignedContig.cpp @@ -754,7 +754,7 @@ bool AlignmentFragment::parseIndelBreak(BreakPoint &bp) { //bp.homology = ""; int curr = 0; - int gcurrlen = -1; + int gcurrlen = 0; //-1; bp.gr1.pos1 = -1; bp.gr1.pos2 = -1; diff --git a/src/BreakPoint.cpp b/src/BreakPoint.cpp index 8f2790317..e5e88cb3d 100644 --- a/src/BreakPoint.cpp +++ b/src/BreakPoint.cpp @@ -663,8 +663,8 @@ namespace SnowTools { int pos1 = gr1.pos1; bool isdel = insertion.length() == 0; - if (isdel) // del breaks are stored as last non-deleted base. CigarMap stores as THE deleted base - pos1++; + //if (isdel) // del breaks are stored as last non-deleted base. CigarMap stores as THE deleted base + // pos1++; std::string st = std::to_string(gr1.chr) + "_" + std::to_string(pos1) + "_" + std::to_string(this->getSpan()) + (isdel ? "D" : "I"); return st; } @@ -771,21 +771,29 @@ namespace SnowTools { // set the allelic fraction double af_n = -1; double af_t = -1; - std::cerr << cname << " " << tcov_support << " " << ncov_support << std::endl; + if (isindel && tcov > 0) af_t = static_cast(/*std::max(tsplit, tcigar)*/tcov_support) / static_cast(tcov); if (isindel && ncov > 0) af_n = static_cast(/*std::max(nsplit, ncigar)*/ncov_support) / static_cast(ncov); + std::string s_af_t = std::to_string(af_t); + if (s_af_t.length() > 4) + s_af_t = s_af_t.substr(0, 4); + std::string s_af_n = std::to_string(af_n); + if (s_af_n.length() > 4) + s_af_n = s_af_n.substr(0, 4); + size_t rs_t = std::count(rs.begin(), rs.end(), 'r'); + if (isindel) - ss << ">>>> " << (insertion.size() ? "INSERTION" : "DELETION") << " of length " << getSpan() << " at " << gr1 << " contig " << cname + ss << ">" << (insertion.size() ? "INS: " : "DEL: ") << getSpan() << " " << gr1 /*<< " " << cname */ << " T/N split: " << tsplit << "/" << nsplit << " T/N cigar: " - << tcigar << "/" << ncigar << " T/N AF " << af_t << "/" << af_n << " T/N Cov " << tcov << "/" << ncov << " DBSNP " << rs; + << tcigar << "/" << ncigar << " T/N AF " << s_af_t << "/" << s_af_n << " T/N Cov " << tcov << "/" << ncov << " DBSNP: " << rs_t; else - ss << ">>>> STRUCTURAL VAR at " << gr1.pointString() << " to " << gr2.pointString() << " SPAN " << getSpan() << " contig " << cname - << " T/N split: " << tsplit << "/" << nsplit << " T/N discordant: " - << dc.tcount << "/" << dc.ncount << " evidence " << evidence; + ss << "> SV: " << gr1.pointString() << " to " << gr2.pointString() << " SPAN " << getSpan() /*<< " " << cname */ + << " T/N split: " << tsplit << "/" << nsplit << " T/N disc: " + << dc.tcount << "/" << dc.ncount << " " << evidence; return ss.str(); diff --git a/src/Makefile.in b/src/Makefile.in index 23a2ab3d2..6954b9252 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -20,7 +20,7 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. +top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 @@ -34,7 +34,7 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : -subdir = src +subdir = SnowTools/src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac @@ -204,9 +204,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign SnowTools/src/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/Makefile + $(AUTOMAKE) --foreign SnowTools/src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/src/SnowTools/SnowToolsCommon.h b/src/SnowTools/SnowToolsCommon.h index fddaac17d..6238a874b 100644 --- a/src/SnowTools/SnowToolsCommon.h +++ b/src/SnowTools/SnowToolsCommon.h @@ -100,7 +100,7 @@ namespace SnowTools { static const int NONCENT_CHR [44] = {1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10, 11,11,12,12,13,14,15,16,16,17,17,18,18,19,19,20,20,21,21,22,23,23,24,24}; - + } #endif