Skip to content
Commits on Source (5)
all: vcflib/Makefile log
cd src && $(MAKE)
wbamtools: vcflib/Makefile log
cd src && $(MAKE) -f Makefile.bamtools
log: src/version_git.h
wget -q http://hypervolu.me/freebayes/build/$(shell cat src/version_git.h | grep v | cut -f 3 -d\ | sed s/\"//g) &
......
......@@ -93,7 +93,6 @@ Luckily, if you have access to https:// on port 443, then you can use this
## Compilation
FreeBayes requires g++ and the standard C and C++ development libraries.
Additionally, cmake is required for building the BamTools API.
make
......@@ -106,6 +105,12 @@ accomplished via
sudo make install
Note that the freebayes-parallel script and the programs on which it depends are
not installed by this command.
Users can optionally build with [BamTools](https://github.com/pezmaster31/bamtools) instead of [SeqLib](https://github.com/walaj/SeqLib). Building with BamTools requires CMake.
make wbamtools
## Usage
......@@ -179,7 +184,7 @@ Note that any of the above examples can be made parallel by using the
scripts/freebayes-parallel script. If you find freebayes to be slow, you
should probably be running it in parallel using this script to run on a single
host, or generating a series of scripts, one per region, and run them on a
cluster.
cluster. Be aware that the freebayes-parallel script contains calls to other programs using relative paths from the scripts subdirectory; the easiest way to ensure a successful run is to invoke the freebayes-parallel script from within the scripts subdirectory.
## Calling variants: from fastq to VCF
......@@ -404,7 +409,7 @@ As freebayes is haplotype-based, left-alignment is necessary only for the
determination of candidate polymorphic loci. Once such loci are determined,
haplotype observations are extracted from reads where:
1. putative variants lie within `--haplotype-window` bases of each other
1. putative variants lie within `--haplotype-length` bases of each other
(default 3bp),
2. the reference sequence has repeats (e.g. microsatellites or STRs are called
as one haplotype),
......@@ -444,7 +449,7 @@ detection window. We can then use these as "basis alleles" for the observation
of haplotypes, considering all other putative variants supported by the
alignment to be sequencing errors:
freebayes -f ref.fa --haplotype-window 500 \
freebayes -f ref.fa --haplotype-length 500 \
--haplotype-basis-alleles vars.vcf aln.bam >haps.vcf
These steps should allow us to read long haplotypes directly from input data
......@@ -454,7 +459,7 @@ The high error rate means that beyond a small window each read will contain a
completely different literal haplotype. To a point, this property improves our
signal to noise ratio and can effectively filter out sequencing errors at the
point of the input filters, but it also decreases the effective observation
depth will prevent the generation of any calls if a long `--haplotype-window`
depth will prevent the generation of any calls if a long `--haplotype-length`
is combined with high a sequencing error rate.
......
freebayes (1.2.0-1) UNRELEASED; urgency=medium
* New upstream version
* Point Vcs fields to salsa.debian.org
* Standards-Version: 4.1.4
-- Andreas Tille <tille@debian.org> Thu, 26 Apr 2018 15:30:48 +0200
freebayes (1.1.0-2) unstable; urgency=medium
* Versioned Build-Depends: libseqlib-dev (>= 1.1.1+dfsg-4) to include all
......
......@@ -17,9 +17,9 @@ Build-Depends: debhelper (>= 11~),
samtools,
parallel,
libvcflib-tools (>= 1.0.0~rc1+dfsg1-6)
Standards-Version: 4.1.3
Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/freebayes.git
Vcs-Git: https://anonscm.debian.org/git/debian-med/freebayes.git
Standards-Version: 4.1.4
Vcs-Browser: https://salsa.debian.org/med-team/freebayes
Vcs-Git: https://salsa.debian.org/med-team/freebayes.git
Homepage: https://github.com/ekg/freebayes
Package: freebayes
......
This is BibTeX, Version 0.99d (TeX Live 2015/dev/Debian)
This is BibTeX, Version 0.99d (TeX Live 2015/Debian)
Capacity: max_strings=35307, hash_size=35307, hash_prime=30011
The top-level auxiliary file: main.aux
The style file: genome_research.bst
......
......@@ -180,6 +180,7 @@ const short Allele::currentQuality(void) const {
return quality;
break;
}
return 0;
}
const long double Allele::lncurrentQuality(void) const {
......@@ -332,19 +333,19 @@ string stringForAlleles(vector<Allele> &alleles) {
return out.str();
}
string json(vector<Allele*> &alleles) {
string tojson(vector<Allele*> &alleles) {
stringstream out;
vector<Allele*>::iterator a = alleles.begin();
out << "[" << (*a)->json(); ++a;
out << "[" << (*a)->tojson(); ++a;
for (; a != alleles.end(); ++a)
out << "," << (*a)->json();
out << "," << (*a)->tojson();
out << "]";
return out.str();
}
string json(Allele*& allele) { return allele->json(); }
string tojson(Allele*& allele) { return allele->tojson(); }
string Allele::json(void) {
string Allele::tojson(void) {
stringstream out;
if (!genotypeAllele) {
out << "{\"id\":\"" << readID << "\""
......@@ -1415,9 +1416,9 @@ int referenceLengthFromCigar(string& cigar) {
case 'M':
case 'X':
case 'D':
case 'N':
r += c->first;
break;
case 'N':
case 'I':
default:
break;
......@@ -1434,9 +1435,9 @@ int Allele::referenceLengthFromCigar(void) {
case 'M':
case 'X':
case 'D':
case 'N':
r += c->first;
break;
case 'N':
case 'I':
default:
break;
......@@ -1448,30 +1449,21 @@ int Allele::referenceLengthFromCigar(void) {
// combines the two alleles into a complex variant, updates important data
void Allele::mergeAllele(const Allele& newAllele, AlleleType newType) {
//cout << stringForAllele(*this) << endl << stringForAllele(newAllele) << endl;
//cerr << stringForAllele(*this) << endl << stringForAllele(newAllele) << endl;
type = newType;
alternateSequence += newAllele.alternateSequence;
length += newAllele.length; // hmmm
basesRight = newAllele.basesRight;
baseQualities.insert(baseQualities.end(), newAllele.baseQualities.begin(), newAllele.baseQualities.end());
currentBase = base();
// XXX note that we don't add Q values for intermingled gaps in combined alleles
if (newAllele.type != ALLELE_REFERENCE) {
quality = min(newAllele.quality, quality);
lnquality = max(newAllele.lnquality, lnquality);
//quality = minQuality(baseQualities);
//lnquality = log(quality);
} else {
quality = averageQuality(baseQualities);
lnquality = log(quality);
lnquality = phred2ln(quality);
basesRight += newAllele.referenceLength;
}
if (newAllele.type != ALLELE_REFERENCE) {
repeatRightBoundary = newAllele.repeatRightBoundary;
}
cigar = mergeCigar(cigar, newAllele.cigar);
referenceLength = referenceLengthFromCigar();
//cout << stringForAllele(*this) << endl << endl;
}
void Allele::squash(void) {
......
......@@ -96,10 +96,10 @@ class Allele {
friend ostream &operator<<(ostream &out, Allele &a);
friend ostream &operator<<(ostream &out, Allele* &a);
friend string json(vector<Allele*> &alleles, long int &position);
friend string json(vector<Allele*> &alleles);
friend string json(Allele &allele, long int &position);
friend string json(Allele* &allele);
friend string tojson(vector<Allele*> &alleles, long int &position);
friend string tojson(vector<Allele*> &alleles);
friend string tojson(Allele &allele, long int &position);
friend string tojson(Allele* &allele);
public:
......@@ -262,7 +262,7 @@ public:
// this is used to update cached data in the allele prior to presenting the allele for analysis
// for the current base, just use allele.currentBase
string json(void);
string tojson(void);
unsigned int getLengthOnReference(void);
int referenceLengthFromCigar(void);
......
This diff is collapsed.
......@@ -77,6 +77,7 @@ public:
void addAllele(Allele allele, bool mergeComplex = true,
int maxComplexGap = 0, bool boundIndels = false);
bool fitHaplotype(int pos, int haplotypeLength, Allele*& aptr, bool allowPartials = false);
void clumpAlleles(bool mergeComplex = true, int maxComplexGap = 0, bool boundIndels = false);
};
......@@ -249,7 +250,7 @@ public:
void removeNonOverlappingAlleles(vector<Allele*>& alleles,
int haplotypeLength = 1,
bool getAllAllelesInHaplotype = false);
void removePreviousAlleles(vector<Allele*>& alleles);
void removePreviousAlleles(vector<Allele*>& alleles, long int position);
void removeFilteredAlleles(vector<Allele*>& alleles);
void removeDuplicateAlleles(Samples& samples, map<string, vector<Allele*> >& alleleGroups,
int allowedAlleleTypes, int haplotypeLength, Allele& refallele);
......
......@@ -6,8 +6,22 @@ bool CNVMap::load(string const& filename) {
if (cnvFile.is_open()) {
while (getline (cnvFile, line)) {
vector<string> fields = split(line, " \t");
if (fields.size() == 2) {
const string& sample = fields.at(0);
int ploidy = atoi(fields.at(1).c_str());
setSamplePloidy(sample, ploidy);
} else if (fields.size() == 5) {
// note conversion between 1 and 0 based
setPloidy(fields.at(3), fields.at(0), atol(fields.at(1).c_str()), atol(fields.at(2).c_str()), atoi(fields.at(4).c_str()));
const string& sample = fields.at(3);
const string& seq = fields.at(0);
long int start = atol(fields.at(1).c_str());
long int end = atol(fields.at(2).c_str());
int ploidy = atoi(fields.at(4).c_str());
setPloidy(sample, seq, start, end, ploidy);
} else {
cerr << "error [freebayes::CNVMap] could not parse CNVmap line " << line << endl;
exit(1);
}
}
} else {
return false;
......@@ -19,24 +33,30 @@ void CNVMap::setDefaultPloidy(int defploidy) {
defaultPloidy = defploidy;
}
void CNVMap::setSamplePloidy(const string& sample, int ploidy) {
samplePloidy[sample] = ploidy;
}
void CNVMap::setPloidy(string const& sample, string const& seq, long int start, long int end, int ploidy) {
sampleSeqCNV[sample][seq][make_pair(start, end)] = ploidy;
}
int CNVMap::ploidy(string const& sample, string const& seq, long int position) {
int basePloidy = (samplePloidy.find(sample) != samplePloidy.end()) ? samplePloidy[sample] : defaultPloidy;
if (sampleSeqCNV.empty()) {
return defaultPloidy;
return basePloidy;
}
SampleSeqCNVMap::iterator scnv = sampleSeqCNV.find(sample);
if (scnv == sampleSeqCNV.end()) {
return defaultPloidy;
return basePloidy;
} else {
map<string, map<pair<long int, long int>, int> >::iterator c = scnv->second.find(seq);
if (c == scnv->second.end()) {
return defaultPloidy;
return basePloidy;
} else {
map<pair<long int, long int>, int>& cnvs = c->second;
for (map<pair<long int, long int>, int>::iterator i = cnvs.begin(); i != cnvs.end(); ++i) {
......@@ -50,7 +70,7 @@ int CNVMap::ploidy(string const& sample, string const& seq, long int position) {
break;
}
}
return defaultPloidy;
return basePloidy;
}
}
......
......@@ -19,6 +19,7 @@ class CNVMap {
public:
CNVMap(void) : defaultPloidy(2) { }
void setDefaultPloidy(int defploidy);
void setSamplePloidy(const string& sample, int ploidy);
bool load(string const& filename);
int ploidy(string const& sample, string const& seq, long int position);
void setPloidy(string const& sample, string const& seq, long int start, long int end, int ploidy);
......@@ -27,6 +28,7 @@ private:
// note: this map is stored as 0-based, end position exclusive
SampleSeqCNVMap sampleSeqCNV;
int defaultPloidy;
map<string, int> samplePloidy;
};
......
#include "DataLikelihood.h"
#include "multichoose.h"
#include "multipermute.h"
#include "Logging.h"
long double
probObservedAllelesGivenGenotype(
Sample& sample,
Genotype& genotype,
double dependenceFactor,
bool useMapQ,
Bias& observationBias,
bool standardGLs,
vector<Allele>& genotypeAlleles,
Contamination& contaminations,
map<string, double>& freqs
map<string, double>& freqs,
Parameters& parameters
) {
//cerr << "P(" << genotype << " given" << endl << sample;
DEBUG2("P(" << genotype << " given" << endl << sample);
int observationCount = sample.observationCount();
vector<long double> alleleProbs = genotype.alleleProbabilities(observationBias);
......@@ -26,12 +24,12 @@ probObservedAllelesGivenGenotype(
long double prodQout = 0; // the probability that the reads not in the genotype are all wrong
long double prodSample = 0;
if (standardGLs) {
if (parameters.standardGLs) {
for (Sample::iterator s = sample.begin(); s != sample.end(); ++s) {
const string& base = s->first;
if (!genotype.containsAllele(base)) {
vector<Allele*>& alleles = s->second;
if (useMapQ) {
if (parameters.useMappingQuality) {
for (vector<Allele*>::iterator a = alleles.begin(); a != alleles.end(); ++a) {
// take the lesser of mapping quality and base quality (in log space)
prodQout += max((*a)->lnquality, (*a)->lnmapQuality);
......@@ -71,7 +69,7 @@ probObservedAllelesGivenGenotype(
}
}
Allele& obs = **a;
//cerr << "observation: " << obs << endl;
DEBUG2("observation: " << obs);
long double probi = 0;
ContaminationEstimate& contamination = contaminations.of(obs.readGroupID);
double scale = 1;
......@@ -86,10 +84,12 @@ probObservedAllelesGivenGenotype(
cerr << "partial " << *a << " has empty reverse" << endl;
exit(1);
}
//cerr << "partial " << *a << " supports potentially " << sample.reversePartials[*a].size() << " alleles : " << endl;
//for (set<Allele*>::iterator m = sample.reversePartials[*a].begin();
//m != sample.reversePartials[*a].end(); ++m) cerr << **m << " ";
//cerr << endl;
DEBUG2("partial " << *a << " supports potentially " << sample.reversePartials[*a].size() << " alleles : ");
for (set<Allele*>::iterator m = sample.reversePartials[*a].begin();
m != sample.reversePartials[*a].end(); ++m)
DEBUG2(**m << " ");
scale = (double)1/(double)sample.reversePartials[*a].size();
qual *= scale;
}
......@@ -143,10 +143,10 @@ probObservedAllelesGivenGenotype(
}
// read dependence factor, asymptotically downgrade quality values of
// successive reads to dependenceFactor * quality
if (standardGLs) {
// successive reads to parameters.RDF * quality
if (parameters.standardGLs) {
if (countOut > 1) {
prodQout *= (1 + (countOut - 1) * dependenceFactor) / countOut;
prodQout *= (1 + (countOut - 1) * parameters.RDF) / countOut;
}
if (sum(observationCounts) == 0) {
......@@ -158,7 +158,7 @@ probObservedAllelesGivenGenotype(
}
} else {
if (countOut > 1) {
prodQout *= (1 + (countOut - 1) * dependenceFactor) / countOut;
prodQout *= (1 + (countOut - 1) * parameters.RDF) / countOut;
}
long double probObsGivenGt = prodQout + prodSample;
return isinf(probObsGivenGt) ? 0 : probObsGivenGt;
......@@ -171,13 +171,11 @@ vector<pair<Genotype*, long double> >
probObservedAllelesGivenGenotypes(
Sample& sample,
vector<Genotype*>& genotypes,
double dependenceFactor,
bool useMapQ,
Bias& observationBias,
bool standardGLs,
vector<Allele>& genotypeAlleles,
Contamination& contaminations,
map<string, double>& freqs
map<string, double>& freqs,
Parameters& parameters
) {
vector<pair<Genotype*, long double> > results;
for (vector<Genotype*>::iterator g = genotypes.begin(); g != genotypes.end(); ++g) {
......@@ -187,13 +185,11 @@ probObservedAllelesGivenGenotypes(
probObservedAllelesGivenGenotype(
sample,
**g,
dependenceFactor,
useMapQ,
observationBias,
standardGLs,
genotypeAlleles,
contaminations,
freqs)));
freqs,
parameters)));
}
return results;
}
......@@ -252,21 +248,18 @@ calculateSampleDataLikelihoods(
}
vector<pair<Genotype*, long double> > probs
= probObservedAllelesGivenGenotypes(sample, genotypesWithObs,
parameters.RDF, parameters.useMappingQuality,
observationBias, parameters.standardGLs,
= probObservedAllelesGivenGenotypes(sample,
genotypesWithObs,
observationBias,
genotypeAlleles,
contaminationEstimates,
estimatedAlleleFrequencies);
estimatedAlleleFrequencies,
parameters);
#ifdef VERBOSE_DEBUG
if (parameters.debug2) {
for (vector<pair<Genotype*, long double> >::iterator p = probs.begin(); p != probs.end(); ++p) {
cerr << parser->currentSequenceName << "," << (long unsigned int) parser->currentPosition + 1 << ","
<< sampleName << ",likelihood," << *(p->first) << "," << p->second << endl;
}
DEBUG2(parser->currentSequenceName << "," << (long unsigned int) parser->currentPosition + 1 << ","
<< sampleName << ",likelihood," << *(p->first) << "," << p->second);
}
#endif
Result& sampleData = results[sampleName];
sampleData.name = sampleName;
......
......@@ -26,25 +26,21 @@ long double
probObservedAllelesGivenGenotype(
Sample& sample,
Genotype& genotype,
double dependenceFactor,
bool useMapQ,
Bias& observationBias,
bool standardGLs,
vector<Allele>& genotypeAlleles,
Contamination& contaminations,
map<string, double>& freqs);
map<string, double>& freqs,
Parameters& parameters);
vector<pair<Genotype*, long double> >
probObservedAllelesGivenGenotypes(
Sample& sample,
vector<Genotype*>& genotypes,
double dependenceFactor,
bool useMapQ,
Bias& observationBias,
bool standardGLs,
vector<Allele>& genotypeAlleles,
Contamination& contaminations,
map<string, double>& freqs);
map<string, double>& freqs,
Parameters& parameters);
void
calculateSampleDataLikelihoods(
......
......@@ -87,6 +87,7 @@ ostream& operator<<(ostream& output, FastaIndex& fastaIndex) {
for( vector<FastaIndexEntry>::iterator fit = sortedIndex.begin(); fit != sortedIndex.end(); ++fit) {
output << *fit << endl;
}
return output;
}
void FastaIndex::indexReference(string refname) {
......
......@@ -4,6 +4,10 @@
#define ftell64(a) _ftelli64(a)
#define fseek64(a,b,c) _fseeki64(a,b,c)
typedef __int64 off_type;
#elif defined(__CYGWIN__)
#define ftell64(a) ftell(a)
#define fseek64(a,b,c) fseek(a,b,c)
typedef __int64_t off_type;
#elif defined(__APPLE__)
#define ftell64(a) ftello(a)
#define fseek64(a,b,c) fseeko(a,b,c)
......
......@@ -94,7 +94,7 @@ using namespace BamTools;
#define CIGTYPE Type()
#define ADDCIGAR add
#define CIGOP SeqLib::CigarField
#define FILLREADGROUP(rg, align) (rg) = (align).GetZTag("RG")
#define FILLREADGROUP(rg, align) (align).GetZTag("RG", rg)
#define GETHEADERTEXT HeaderConcat()
#include "SeqLib/BamReader.h"
#include "SeqLib/BamWriter.h"
......
#ifndef LOGGING_H
#define LOGGING_H
// helper debugging macros to improve code readability
#define DEBUG(msg) \
if (parameters.debug) { cerr << msg << endl; }
// lower-priority messages, enabled with "make debug"
#ifdef VERBOSE_DEBUG
#define DEBUG2(msg) \
if (parameters.debug2) { cerr << msg << endl; }
#else
#define DEBUG2(msg)
#endif
// must-see error messages
#define ERROR(msg) \
cerr << "ERROR(freebayes): " << msg << endl;
// must-see warning messages
#define WARNING(msg) \
cerr << "WARNING(freebayes): " << msg << endl;
#endif
......@@ -5,41 +5,46 @@
################################################################################
# Compiler
CXX=g++
CXX=g++ ${CXXFLAGS}
C=gcc
export CXXFLAGS
export C
export CC
export CXX
export LDFLAGS
export LIBFLAGS
# Compiler flags
CFLAGS=-O3 -D_FILE_OFFSET_BITS=64 -g
#CFLAGS=-O3 -static -D VERBOSE_DEBUG # enables verbose debugging via --debug2
BAMTOOLS_ROOT=../bamtools
SEQLIB_ROOT=../SeqLib
VCFLIB_ROOT=../vcflib
TABIX_ROOT=$(VCFLIB_ROOT)/tabixpp
HTSLIB_ROOT=$(TABIX_ROOT)/htslib
HTSLIB_ROOT=$(SEQLIB_ROOT)/htslib
LIBS = -lz -lm -lpthread
INCLUDE = -I../ttmath -I$(BAMTOOLS_ROOT)/src/ -I$(VCFLIB_ROOT)/src/ -I$(TABIX_ROOT)/ -I$(VCFLIB_ROOT)/smithwaterman/ -I$(VCFLIB_ROOT)/multichoose/ -I$(VCFLIB_ROOT)/filevercmp/ -I$(HTSLIB_ROOT) -I$(SEQLIB_ROOT) -I$(SEQLIB_ROOT)/htslib
LIBS = -lz -llzma -lbz2 -lm -lpthread
INCLUDE = -I../src -I../ttmath -I$(VCFLIB_ROOT)/src/ -I$(VCFLIB_ROOT)/smithwaterman/ -I$(VCFLIB_ROOT)/multichoose/ -I$(VCFLIB_ROOT)/filevercmp/ -I$(VCFLIB_ROOT)/fastahack/ -I$(HTSLIB_ROOT) -I$(SEQLIB_ROOT)
#INCLUDE = -I../ttmath -I$(BAMTOOLS_ROOT)/src/ -I$(VCFLIB_ROOT)/src/ -I$(TABIX_ROOT)/ -I$(VCFLIB_ROOT)/smithwaterman/ -I$(VCFLIB_ROOT)/multichoose/ -I$(VCFLIB_ROOT)/filevercmp/ -I$(VCFLIB_ROOT)/fastahack/ -I$(HTSLIB_ROOT) -I$(SEQLIB_ROOT) -I$(SEQLIB_ROOT)/htslib
all: autoversion ../bin/freebayes ../bin/bamleftalign
static:
$(MAKE) CFLAGS="$(CFLAGS) -static" all
$(MAKE) CXXFLAGS="$(CXXFLAGS) -static" all
debug:
$(MAKE) CFLAGS="$(CFLAGS) -D VERBOSE_DEBUG -g -rdynamic" all
$(MAKE) CXXFLAGS="$(CXXFLAGS) -D VERBOSE_DEBUG -g -rdynamic" all
profiling:
$(MAKE) CFLAGS="$(CFLAGS) -g" all
gprof:
$(MAKE) CFLAGS="$(CFLAGS) -pg" all
$(MAKE) CXXFLAGS="$(CXXFLAGS) -pg" all
.PHONY: all static debug profiling gprof
# builds bamtools static lib, and copies into root
$(BAMTOOLS_ROOT)/lib/libbamtools.a:
cd $(BAMTOOLS_ROOT) && mkdir -p build && cd build && cmake .. && $(MAKE)
$(HTSLIB_ROOT)/libhts.a:
cd $(HTSLIB_ROOT) && make
......@@ -71,14 +76,12 @@ OBJECTS=BedReader.o \
NonCall.o \
SegfaultHandler.o \
../vcflib/tabixpp/tabix.o \
../vcflib/tabixpp/htslib/bgzf.o \
../vcflib/smithwaterman/SmithWatermanGotoh.o \
../vcflib/smithwaterman/disorder.cpp \
../vcflib/smithwaterman/LeftAlign.o \
../vcflib/smithwaterman/Repeats.o \
../vcflib/smithwaterman/IndelAllele.o \
Variant.o \
$(BAMTOOLS_ROOT)/lib/libbamtools.a \
$(SEQLIB_ROOT)/src/libseqlib.a \
$(SEQLIB_ROOT)/bwa/libbwa.a \
$(SEQLIB_ROOT)/fermi-lite/libfml.a \
......@@ -88,115 +91,114 @@ HEADERS=multichoose.h version_git.h
# executables
freebayes ../bin/freebayes: freebayes.o $(OBJECTS) $(HEADERS)
$(CXX) $(CFLAGS) $(INCLUDE) freebayes.o $(OBJECTS) -o ../bin/freebayes $(LIBS)
freebayes ../bin/freebayes: freebayes.o $(OBJECTS) $(HEADERS) $(seqlib)
$(CXX) $(CXXFLAGS) $(INCLUDE) freebayes.o $(OBJECTS) -o ../bin/freebayes $(LIBS)
alleles ../bin/alleles: alleles.o $(OBJECTS) $(HEADERS)
$(CXX) $(CFLAGS) $(INCLUDE) alleles.o $(OBJECTS) -o ../bin/alleles $(LIBS)
alleles ../bin/alleles: alleles.o $(OBJECTS) $(HEADERS) $(seqlib)
$(CXX) $(CXXFLAGS) $(INCLUDE) alleles.o $(OBJECTS) -o ../bin/alleles $(LIBS)
dummy ../bin/dummy: dummy.o $(OBJECTS) $(HEADERS)
$(CXX) $(CFLAGS) $(INCLUDE) dummy.o $(OBJECTS) -o ../bin/dummy $(LIBS)
dummy ../bin/dummy: dummy.o $(OBJECTS) $(HEADERS) $(seqlib)
$(CXX) $(CXXFLAGS) $(INCLUDE) dummy.o $(OBJECTS) -o ../bin/dummy $(LIBS)
bamleftalign ../bin/bamleftalign: $(BAMTOOLS_ROOT)/lib/libbamtools.a $(SEQLIB_ROOT)/src/libseqlib.a $(SEQLIB_ROOT)/htslib/libhts.a bamleftalign.o Fasta.o LeftAlign.o IndelAllele.o split.o
$(CXX) $(CFLAGS) $(INCLUDE) bamleftalign.o Fasta.o Utility.o LeftAlign.o IndelAllele.o split.o $(BAMTOOLS_ROOT)/lib/libbamtools.a $(SEQLIB_ROOT)/src/libseqlib.a $(SEQLIB_ROOT)/htslib/libhts.a -o ../bin/bamleftalign $(LIBS)
bamleftalign ../bin/bamleftalign: $(SEQLIB_ROOT)/src/libseqlib.a $(HTSLIB_ROOT)/libhts.a bamleftalign.o Fasta.o LeftAlign.o IndelAllele.o split.o
$(CXX) $(CXXFLAGS) $(INCLUDE) bamleftalign.o $(OBJECTS) -o ../bin/bamleftalign $(LIBS)
bamfiltertech ../bin/bamfiltertech: $(BAMTOOLS_ROOT)/lib/libbamtools.a $(SEQLIB_ROOT)/src/libseqlib.a $(SEQLIB_ROOT)/htslib/libhts.a bamfiltertech.o $(OBJECTS) $(HEADERS)
$(CXX) $(CFLAGS) $(INCLUDE) bamfiltertech.o $(OBJECTS) -o ../bin/bamfiltertech $(LIBS)
bamfiltertech ../bin/bamfiltertech: $(SEQLIB_ROOT)/src/libseqlib.a $(HTSLIB_ROOT)/libhts.a bamfiltertech.o $(OBJECTS) $(HEADERS)
$(CXX) $(CXXFLAGS) $(INCLUDE) bamfiltertech.o $(OBJECTS) -o ../bin/bamfiltertech $(LIBS)
# objects
Fasta.o: Fasta.cpp Utility.o
$(CXX) $(CFLAGS) $(INCLUDE) -c Fasta.cpp
$(CXX) $(CXXFLAGS) $(INCLUDE) -c Fasta.cpp
alleles.o: alleles.cpp AlleleParser.o Allele.o
$(CXX) $(CFLAGS) $(INCLUDE) -c alleles.cpp
$(CXX) $(CXXFLAGS) $(INCLUDE) -c alleles.cpp
dummy.o: dummy.cpp AlleleParser.o Allele.o
$(CXX) $(CFLAGS) $(INCLUDE) -c dummy.cpp
$(CXX) $(CXXFLAGS) $(INCLUDE) -c dummy.cpp
freebayes.o: freebayes.cpp TryCatch.h $(HTSLIB_ROOT)/libhts.a $(BAMTOOLS_ROOT)/lib/libbamtools.a
$(CXX) $(CFLAGS) $(INCLUDE) -c freebayes.cpp
freebayes.o: freebayes.cpp TryCatch.h $(HTSLIB_ROOT)/libhts.a ../vcflib/tabixpp/tabix.o
$(CXX) $(CXXFLAGS) $(INCLUDE) -c freebayes.cpp
fastlz.o: fastlz.c fastlz.h
$(C) $(CFLAGS) $(INCLUDE) -c fastlz.c
Parameters.o: Parameters.cpp Parameters.h Version.h
$(CXX) $(CFLAGS) $(INCLUDE) -c Parameters.cpp
$(CXX) $(CXXFLAGS) $(INCLUDE) -c Parameters.cpp
Allele.o: Allele.cpp Allele.h multichoose.h Genotype.h
$(CXX) $(CFLAGS) $(INCLUDE) -c Allele.cpp
$(CXX) $(CXXFLAGS) $(INCLUDE) -c Allele.cpp
Sample.o: Sample.cpp Sample.h
$(CXX) $(CFLAGS) $(INCLUDE) -c Sample.cpp
$(CXX) $(CXXFLAGS) $(INCLUDE) -c Sample.cpp
Genotype.o: Genotype.cpp Genotype.h Allele.h multipermute.h
$(CXX) $(CFLAGS) $(INCLUDE) -c Genotype.cpp
$(CXX) $(CXXFLAGS) $(INCLUDE) -c Genotype.cpp
Ewens.o: Ewens.cpp Ewens.h
$(CXX) $(CFLAGS) $(INCLUDE) -c Ewens.cpp
$(CXX) $(CXXFLAGS) $(INCLUDE) -c Ewens.cpp
AlleleParser.o: AlleleParser.cpp AlleleParser.h multichoose.h Parameters.h $(BAMTOOLS_ROOT)/lib/libbamtools.a $(HTSLIB_ROOT)/libhts.a
$(CXX) $(CFLAGS) $(INCLUDE) -c AlleleParser.cpp
AlleleParser.o: AlleleParser.cpp AlleleParser.h multichoose.h Parameters.h $(HTSLIB_ROOT)/libhts.a
$(CXX) $(CXXFLAGS) $(INCLUDE) -c AlleleParser.cpp
Utility.o: Utility.cpp Utility.h Sum.h Product.h
$(CXX) $(CFLAGS) $(INCLUDE) -c Utility.cpp
$(CXX) $(CXXFLAGS) $(INCLUDE) -c Utility.cpp
SegfaultHandler.o: SegfaultHandler.cpp SegfaultHandler.h
$(CXX) $(CFLAGS) $(INCLUDE) -c SegfaultHandler.cpp
$(CXX) $(CXXFLAGS) $(INCLUDE) -c SegfaultHandler.cpp
Dirichlet.o: Dirichlet.h Dirichlet.cpp Sum.h Product.h
$(CXX) $(CFLAGS) $(INCLUDE) -c Dirichlet.cpp
$(CXX) $(CXXFLAGS) $(INCLUDE) -c Dirichlet.cpp
Multinomial.o: Multinomial.h Multinomial.cpp Sum.h Product.h Utility.h
$(CXX) $(CFLAGS) $(INCLUDE) -c Multinomial.cpp
$(CXX) $(CXXFLAGS) $(INCLUDE) -c Multinomial.cpp
DataLikelihood.o: DataLikelihood.cpp DataLikelihood.h Sum.h Product.h
$(CXX) $(CFLAGS) $(INCLUDE) -c DataLikelihood.cpp
$(CXX) $(CXXFLAGS) $(INCLUDE) -c DataLikelihood.cpp
Marginals.o: Marginals.cpp Marginals.h
$(CXX) $(CFLAGS) $(INCLUDE) -c Marginals.cpp
$(CXX) $(CXXFLAGS) $(INCLUDE) -c Marginals.cpp
ResultData.o: ResultData.cpp ResultData.h Result.h Result.cpp Allele.h Utility.h Genotype.h AlleleParser.h Version.h
$(CXX) $(CFLAGS) $(INCLUDE) -c ResultData.cpp
$(CXX) $(CXXFLAGS) $(INCLUDE) -c ResultData.cpp
Result.o: Result.cpp Result.h
$(CXX) $(CFLAGS) $(INCLUDE) -c Result.cpp
$(CXX) $(CXXFLAGS) $(INCLUDE) -c Result.cpp
NonCall.o: NonCall.cpp NonCall.h
$(CXX) $(CFLAGS) $(INCLUDE) -c NonCall.cpp
$(CXX) $(CXXFLAGS) $(INCLUDE) -c NonCall.cpp
BedReader.o: BedReader.cpp BedReader.h
$(CXX) $(CFLAGS) $(INCLUDE) -c BedReader.cpp
$(CXX) $(CXXFLAGS) $(INCLUDE) -c BedReader.cpp
CNV.o: CNV.cpp CNV.h
$(CXX) $(CFLAGS) $(INCLUDE) -c CNV.cpp
$(CXX) $(CXXFLAGS) $(INCLUDE) -c CNV.cpp
Bias.o: Bias.cpp Bias.h
$(CXX) $(CFLAGS) $(INCLUDE) -c Bias.cpp
$(CXX) $(CXXFLAGS) $(INCLUDE) -c Bias.cpp
split.o: split.h split.cpp
$(CXX) $(CFLAGS) $(INCLUDE) -c split.cpp
$(CXX) $(CXXFLAGS) $(INCLUDE) -c split.cpp
bamleftalign.o: bamleftalign.cpp LeftAlign.cpp
$(CXX) $(CFLAGS) $(INCLUDE) -c bamleftalign.cpp
$(CXX) $(CXXFLAGS) $(INCLUDE) -c bamleftalign.cpp
bamfiltertech.o: bamfiltertech.cpp
$(CXX) $(CFLAGS) $(INCLUDE) -c bamfiltertech.cpp
$(CXX) $(CXXFLAGS) $(INCLUDE) -c bamfiltertech.cpp
LeftAlign.o: LeftAlign.h LeftAlign.cpp $(BAMTOOLS_ROOT)/lib/libbamtools.a $(HTSLIB_ROOT)/libhts.a
$(CXX) $(CFLAGS) $(INCLUDE) -c LeftAlign.cpp
LeftAlign.o: LeftAlign.h LeftAlign.cpp $(HTSLIB_ROOT)/libhts.a
$(CXX) $(CXXFLAGS) $(INCLUDE) -c LeftAlign.cpp
IndelAllele.o: IndelAllele.cpp IndelAllele.h
$(CXX) $(CFLAGS) $(INCLUDE) -c IndelAllele.cpp
$(CXX) $(CXXFLAGS) $(INCLUDE) -c IndelAllele.cpp
Variant.o: $(VCFLIB_ROOT)/src/Variant.h $(VCFLIB_ROOT)/src/Variant.cpp
$(CXX) $(CFLAGS) $(INCLUDE) -c $(VCFLIB_ROOT)/src/Variant.cpp
$(CXX) $(CXXFLAGS) $(INCLUDE) -c $(VCFLIB_ROOT)/src/Variant.cpp
# $(CXX) -std=c++11 $(CFLAGS) $(INCLUDE) -c $(VCFLIB_ROOT)/src/Variant.cpp
../vcflib/tabixpp/tabix.o:
cd $(TABIX_ROOT)/ && make
../vcflib/tabixpp/htslib/bgzf.o: ../vcflib/tabixpp/htslib/bgzf.c ../vcflib/tabixpp/htslib/htslib/bgzf.h
cd ../vcflib/tabixpp && $(MAKE)
cd $(TABIX_ROOT)/ && $(MAKE) && cp tabix.hpp ../../src/
../vcflib/smithwaterman/SmithWatermanGotoh.o: ../vcflib/smithwaterman/SmithWatermanGotoh.h ../vcflib/smithwaterman/SmithWatermanGotoh.cpp
cd ../vcflib/smithwaterman && $(MAKE)
......@@ -274,7 +276,6 @@ autoversion:
clean:
rm -rf *.o *.cgh *~ freebayes alleles ../bin/freebayes ../bin/alleles ../vcflib/*.o ../vcflib/tabixpp/*.{o,a}
cd $(BAMTOOLS_ROOT)/build && make clean
cd ../vcflib/smithwaterman && make clean
rm -rf *.o *.cgh *~ freebayes alleles ../bin/freebayes ../bin/alleles ../vcflib/*.o ../vcflib/tabixpp/*.{o,a} tabix.hpp
if [ -d $(BAMTOOLS_ROOT)/build ]; then make -C $(BAMTOOLS_ROOT)/build clean; fi
make -C $(VCFLIB_ROOT)/smithwaterman clean
################################################################################
# Makefile for FreeBayes
# Erik Garrison, 2010
# Boston College
################################################################################
# Compiler
CXX=g++
C=gcc
# Compiler flags
CFLAGS=-O3 -D_FILE_OFFSET_BITS=64 -g
#CFLAGS=-O3 -static -D VERBOSE_DEBUG # enables verbose debugging via --debug2
BAMTOOLS_ROOT=../bamtools
VCFLIB_ROOT=../vcflib
TABIX_ROOT=$(VCFLIB_ROOT)/tabixpp
HTSLIB_ROOT=$(TABIX_ROOT)/htslib
LIBS = -lz -lm -lpthread
INCLUDE = -I../ttmath -I$(BAMTOOLS_ROOT)/src/ -I$(VCFLIB_ROOT)/src/ -I$(TABIX_ROOT)/ -I$(VCFLIB_ROOT)/smithwaterman/ -I$(VCFLIB_ROOT)/multichoose/ -I$(VCFLIB_ROOT)/filevercmp/ -I$(HTSLIB_ROOT) -DHAVE_BAMTOOLS=1
all: autoversion ../bin/freebayes ../bin/bamleftalign
static:
$(MAKE) CFLAGS="$(CFLAGS) -static" all
debug:
$(MAKE) CFLAGS="$(CFLAGS) -D VERBOSE_DEBUG -g -rdynamic" all
profiling:
$(MAKE) CFLAGS="$(CFLAGS) -g" all
gprof:
$(MAKE) CFLAGS="$(CFLAGS) -pg" all
.PHONY: all static debug profiling gprof
# builds bamtools static lib, and copies into root
$(BAMTOOLS_ROOT)/lib/libbamtools.a:
cd $(BAMTOOLS_ROOT) && mkdir -p build && cd build && cmake .. && $(MAKE)
$(HTSLIB_ROOT)/libhts.a:
cd $(HTSLIB_ROOT) && make
OBJECTS=BedReader.o \
CNV.o \
fastlz.o \
Fasta.o \
Parameters.o \
Allele.o \
Sample.o \
Result.o \
AlleleParser.o \
Utility.o \
Genotype.o \
DataLikelihood.o \
Multinomial.o \
Ewens.o \
ResultData.o \
Dirichlet.o \
Marginals.o \
split.o \
LeftAlign.o \
IndelAllele.o \
Bias.o \
Contamination.o \
NonCall.o \
SegfaultHandler.o \
../vcflib/tabixpp/tabix.o \
../vcflib/tabixpp/htslib/bgzf.o \
../vcflib/smithwaterman/SmithWatermanGotoh.o \
../vcflib/smithwaterman/disorder.cpp \
../vcflib/smithwaterman/LeftAlign.o \
../vcflib/smithwaterman/Repeats.o \
../vcflib/smithwaterman/IndelAllele.o \
Variant.o \
$(BAMTOOLS_ROOT)/lib/libbamtools.a \
$(TABIX_ROOT)/htslib/libhts.a
HEADERS=multichoose.h version_git.h
# executables
freebayes ../bin/freebayes: freebayes.o $(OBJECTS) $(HEADERS)
$(CXX) $(CFLAGS) $(INCLUDE) freebayes.o $(OBJECTS) -o ../bin/freebayes $(LIBS)
alleles ../bin/alleles: alleles.o $(OBJECTS) $(HEADERS)
$(CXX) $(CFLAGS) $(INCLUDE) alleles.o $(OBJECTS) -o ../bin/alleles $(LIBS)
dummy ../bin/dummy: dummy.o $(OBJECTS) $(HEADERS)
$(CXX) $(CFLAGS) $(INCLUDE) dummy.o $(OBJECTS) -o ../bin/dummy $(LIBS)
bamleftalign ../bin/bamleftalign: $(BAMTOOLS_ROOT)/lib/libbamtools.a bamleftalign.o Fasta.o LeftAlign.o IndelAllele.o split.o
$(CXX) $(CFLAGS) $(INCLUDE) bamleftalign.o Fasta.o Utility.o LeftAlign.o IndelAllele.o split.o $(BAMTOOLS_ROOT)/lib/libbamtools.a -o ../bin/bamleftalign $(LIBS)
bamfiltertech ../bin/bamfiltertech: $(BAMTOOLS_ROOT)/lib/libbamtools.a bamfiltertech.o $(OBJECTS) $(HEADERS)
$(CXX) $(CFLAGS) $(INCLUDE) bamfiltertech.o $(OBJECTS) -o ../bin/bamfiltertech $(LIBS)
# objects
Fasta.o: Fasta.cpp Utility.o
$(CXX) $(CFLAGS) $(INCLUDE) -c Fasta.cpp
alleles.o: alleles.cpp AlleleParser.o Allele.o
$(CXX) $(CFLAGS) $(INCLUDE) -c alleles.cpp
dummy.o: dummy.cpp AlleleParser.o Allele.o
$(CXX) $(CFLAGS) $(INCLUDE) -c dummy.cpp
freebayes.o: freebayes.cpp TryCatch.h $(HTSLIB_ROOT)/libhts.a $(BAMTOOLS_ROOT)/lib/libbamtools.a
$(CXX) $(CFLAGS) $(INCLUDE) -c freebayes.cpp
fastlz.o: fastlz.c fastlz.h
$(C) $(CFLAGS) $(INCLUDE) -c fastlz.c
Parameters.o: Parameters.cpp Parameters.h Version.h
$(CXX) $(CFLAGS) $(INCLUDE) -c Parameters.cpp
Allele.o: Allele.cpp Allele.h multichoose.h Genotype.h
$(CXX) $(CFLAGS) $(INCLUDE) -c Allele.cpp
Sample.o: Sample.cpp Sample.h
$(CXX) $(CFLAGS) $(INCLUDE) -c Sample.cpp
Genotype.o: Genotype.cpp Genotype.h Allele.h multipermute.h
$(CXX) $(CFLAGS) $(INCLUDE) -c Genotype.cpp
Ewens.o: Ewens.cpp Ewens.h
$(CXX) $(CFLAGS) $(INCLUDE) -c Ewens.cpp
AlleleParser.o: AlleleParser.cpp AlleleParser.h multichoose.h Parameters.h $(BAMTOOLS_ROOT)/lib/libbamtools.a $(HTSLIB_ROOT)/libhts.a
$(CXX) $(CFLAGS) $(INCLUDE) -c AlleleParser.cpp
Utility.o: Utility.cpp Utility.h Sum.h Product.h
$(CXX) $(CFLAGS) $(INCLUDE) -c Utility.cpp
SegfaultHandler.o: SegfaultHandler.cpp SegfaultHandler.h
$(CXX) $(CFLAGS) $(INCLUDE) -c SegfaultHandler.cpp
Dirichlet.o: Dirichlet.h Dirichlet.cpp Sum.h Product.h
$(CXX) $(CFLAGS) $(INCLUDE) -c Dirichlet.cpp
Multinomial.o: Multinomial.h Multinomial.cpp Sum.h Product.h Utility.h
$(CXX) $(CFLAGS) $(INCLUDE) -c Multinomial.cpp
DataLikelihood.o: DataLikelihood.cpp DataLikelihood.h Sum.h Product.h
$(CXX) $(CFLAGS) $(INCLUDE) -c DataLikelihood.cpp
Marginals.o: Marginals.cpp Marginals.h
$(CXX) $(CFLAGS) $(INCLUDE) -c Marginals.cpp
ResultData.o: ResultData.cpp ResultData.h Result.h Result.cpp Allele.h Utility.h Genotype.h AlleleParser.h Version.h
$(CXX) $(CFLAGS) $(INCLUDE) -c ResultData.cpp
Result.o: Result.cpp Result.h
$(CXX) $(CFLAGS) $(INCLUDE) -c Result.cpp
NonCall.o: NonCall.cpp NonCall.h
$(CXX) $(CFLAGS) $(INCLUDE) -c NonCall.cpp
BedReader.o: BedReader.cpp BedReader.h
$(CXX) $(CFLAGS) $(INCLUDE) -c BedReader.cpp
CNV.o: CNV.cpp CNV.h
$(CXX) $(CFLAGS) $(INCLUDE) -c CNV.cpp
Bias.o: Bias.cpp Bias.h
$(CXX) $(CFLAGS) $(INCLUDE) -c Bias.cpp
split.o: split.h split.cpp
$(CXX) $(CFLAGS) $(INCLUDE) -c split.cpp
bamleftalign.o: bamleftalign.cpp LeftAlign.cpp
$(CXX) $(CFLAGS) $(INCLUDE) -c bamleftalign.cpp
bamfiltertech.o: bamfiltertech.cpp
$(CXX) $(CFLAGS) $(INCLUDE) -c bamfiltertech.cpp
LeftAlign.o: LeftAlign.h LeftAlign.cpp $(BAMTOOLS_ROOT)/lib/libbamtools.a $(HTSLIB_ROOT)/libhts.a
$(CXX) $(CFLAGS) $(INCLUDE) -c LeftAlign.cpp
IndelAllele.o: IndelAllele.cpp IndelAllele.h
$(CXX) $(CFLAGS) $(INCLUDE) -c IndelAllele.cpp
Variant.o: $(VCFLIB_ROOT)/src/Variant.h $(VCFLIB_ROOT)/src/Variant.cpp
$(CXX) $(CFLAGS) $(INCLUDE) -c $(VCFLIB_ROOT)/src/Variant.cpp
../vcflib/tabixpp/tabix.o:
cd $(TABIX_ROOT)/ && make
../vcflib/tabixpp/htslib/bgzf.o: ../vcflib/tabixpp/htslib/bgzf.c ../vcflib/tabixpp/htslib/htslib/bgzf.h
cd ../vcflib/tabixpp && $(MAKE)
../vcflib/smithwaterman/SmithWatermanGotoh.o: ../vcflib/smithwaterman/SmithWatermanGotoh.h ../vcflib/smithwaterman/SmithWatermanGotoh.cpp
cd ../vcflib/smithwaterman && $(MAKE)
VERSION_FILE=./version_git.h
RELEASED_VERSION_FILE=./version_release.txt
## versioning system from BedTools
##
## For freebayes developers (not users):
## When you want to release (and tag) a new version, run:
## $ make setversion VERSION=v2.17.2
## This will:
## 1. Update the "/src/utils/version/version_release.txt" file
## 2. Commit the file
## 3. Git-Tag the commit with the latest version
##
.PHONY: setversion
setversion:
ifeq "$(VERSION)" ""
$(error please set VERSION variable to the new version (e.g "make setversion VERSION=v2.17.2"))
endif
@echo "# This file was auto-generated by running \"make setversion VERSION=$(VERSION)\"" > "$(RELEASED_VERSION_FILE)"
@echo "# on $$(date) ." >> "$(RELEASED_VERSION_FILE)"
@echo "# Please do not edit or commit this file manually." >> "$(RELEASED_VERSION_FILE)"
@echo "#" >> "$(RELEASED_VERSION_FILE)"
@echo "$(VERSION)" >> $(RELEASED_VERSION_FILE)
@git add $(RELEASED_VERSION_FILE)
@git commit -q -m "Setting Release-Version $(VERSION)"
@git tag "$(VERSION)"
@echo "Version updated to $(VERSION)."
@echo ""
@echo "Don't forget to push the commits AND the tags:"
@echo " git push --all --tags"
@echo ""
## Automatic version detection
##
## What's going on here?
## 1. If there's a ".git" repository - use the version from the repository.
## ignore any released-version file. git repository is authorative.
##
## 2, If there's no ".git" repository,
## get the "released" version number from the release-version file.
##
## 3. Compare the detected version (from steps 1,2) to the current string
## in ./src/utils/version/version_git.h .
## If they differ, update the header file - will cause a recompilation
## of version.o .
##
.PHONY: autoversion
autoversion:
@( \
if [ -d "../.git" ] && which git > /dev/null ; then \
DETECTED_VERSION=$$(git describe --always --tags --dirty) ; \
else \
DETECTED_VERSION=$$(grep -v "^#" "$(RELEASED_VERSION_FILE)") ; \
fi ; \
\
CURRENT_VERSION="" ; \
[ -e "$(VERSION_FILE)" ] && CURRENT_VERSION=$$(grep "define VERSION_GIT " "$(VERSION_FILE)" | cut -f3 -d" " | sed 's/"//g') ; \
\
echo "DETECTED_VERSION = $$DETECTED_VERSION" ; \
echo "CURRENT_VERSION = $$CURRENT_VERSION" ; \
if [ "$${DETECTED_VERSION}" != "$${CURRENT_VERSION}" ] ; then \
echo "Updating version file." ; \
echo "#ifndef VERSION_GIT_H" > $(VERSION_FILE) ; \
echo "#define VERSION_GIT_H" >> $(VERSION_FILE) ; \
echo "#define VERSION_GIT \"$${DETECTED_VERSION}\"" >> $(VERSION_FILE) ; \
echo "#endif /* VERSION_GIT_H */" >> $(VERSION_FILE) ; \
fi )
clean:
rm -rf *.o *.cgh *~ freebayes alleles ../bin/freebayes ../bin/alleles ../vcflib/*.o ../vcflib/tabixpp/*.{o,a}
cd $(BAMTOOLS_ROOT)/build && make clean
cd ../vcflib/smithwaterman && make clean
......@@ -125,7 +125,9 @@ void Parameters::usage(char** argv) {
<< " will then be partitioned on the basis of the populations." << endl
<< " -A --cnv-map FILE" << endl
<< " Read a copy number map from the BED file FILE, which has" << endl
<< " the format:" << endl
<< " either a sample-level ploidy:" << endl
<< " sample name, copy number" << endl
<< " or a region-specific format:" << endl
<< " reference sequence, start, end, sample name, copy number" << endl
<< " ... for each region in each sample which does not have the" << endl
<< " default copy number as set by --ploidy." << endl
......@@ -202,13 +204,13 @@ void Parameters::usage(char** argv) {
<< " -E --max-complex-gap N" << endl
<< " --haplotype-length N" << endl
<< " Allow haplotype calls with contiguous embedded matches of up" << endl
<< " to this length. (default: 3)" << endl
<< " to this length. Set N=-1 to disable clumping. (default: 3)" << endl
<< " --min-repeat-size N" << endl
<< " When assembling observations across repeats, require the total repeat" << endl
<< " length at least this many bp. (default: 5)" << endl
<< " --min-repeat-entropy N" << endl
<< " To detect interrupted repeats, build across sequence until it has" << endl
<< " entropy > N bits per bp. (default: 0, off)" << endl
<< " entropy > N bits per bp. Set to 0 to turn off. (default: 1)" << endl
<< " --no-partial-observations" << endl
<< " Exclude observations which do not fully span the dynamically-determined" << endl
<< " detection window. (default, use all observations, dividing partial" << endl
......@@ -259,7 +261,7 @@ void Parameters::usage(char** argv) {
<< " -F --min-alternate-fraction N" << endl
<< " Require at least this fraction of observations supporting" << endl
<< " an alternate allele within a single individual in the" << endl
<< " in order to evaluate the position. default: 0.2" << endl
<< " in order to evaluate the position. default: 0.05" << endl
<< " -C --min-alternate-count N" << endl
<< " Require at least this count of observations supporting" << endl
<< " an alternate allele within a single individual in order" << endl
......@@ -404,7 +406,7 @@ Parameters::Parameters(int argc, char** argv) {
maxComplexGap = 3;
//maxHaplotypeLength = 100;
minRepeatSize = 5;
minRepeatEntropy = 0;
minRepeatEntropy = 1;
usePartialObservations = true;
pooledDiscrete = false; // -J --pooled
pooledContinuous = false;
......@@ -451,7 +453,7 @@ Parameters::Parameters(int argc, char** argv) {
TB = 3;
posteriorIntegrationDepth = 0;
calculateMarginals = false;
minAltFraction = 0.2; // require 20% of reads from sample to be supporting the same alternate to consider
minAltFraction = 0.05; // require 5% of reads from sample to be supporting the same alternate to consider
minAltCount = 2; // require 2 reads in same sample call
minAltTotal = 1;
minAltQSum = 0;
......@@ -785,7 +787,7 @@ Parameters::Parameters(int argc, char** argv) {
// -m --min-mapping-quality
case 'm':
if (!convert(optarg, MQL0)) {
cerr << "could not parse min-base-quality" << endl;
cerr << "could not parse min-mapping-quality" << endl;
exit(1);
}
break;
......