Skip to content

Commit

Permalink
fixed bwa link collision. trimmed warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremiah Wala committed Oct 13, 2016
1 parent f3513af commit 3fbab28
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 54 deletions.
2 changes: 0 additions & 2 deletions SeqLib/GenomicRegionCollection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ bool GenomicRegionCollection<T>::ReadBED(const std::string & file, const BamHead
}

// http://www.lemoda.net/c/gzfile-read/
size_t c = 0;
while (1) {

int err;
Expand Down Expand Up @@ -245,7 +244,6 @@ bool GenomicRegionCollection<T>::ReadVCF(const std::string & file, const BamHead
}

// http://www.lemoda.net/c/gzfile-read/
size_t c = 0;
while (1) {

int err;
Expand Down
2 changes: 1 addition & 1 deletion bwa
Submodule bwa updated from 88a5ca to c02766
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
noinst_LIBRARIES = libseqlib.a

libseqlib_a_CPPFLAGS = -I../ -I../htslib
libseqlib_a_CPPFLAGS = -I../ -I../htslib -Wno-sign-compare

libseqlib_a_SOURCES = FastqReader.cpp BFC.cpp ReadFilter.cpp SeqPlot.cpp jsoncpp.cpp ssw_cpp.cpp ssw.c \
GenomicRegion.cpp RefGenome.cpp BamWriter.cpp BamReader.cpp \
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
noinst_LIBRARIES = libseqlib.a
libseqlib_a_CPPFLAGS = -I../ -I../htslib
libseqlib_a_CPPFLAGS = -I../ -I../htslib -Wno-sign-compare
libseqlib_a_SOURCES = FastqReader.cpp BFC.cpp ReadFilter.cpp SeqPlot.cpp jsoncpp.cpp ssw_cpp.cpp ssw.c \
GenomicRegion.cpp RefGenome.cpp BamWriter.cpp BamReader.cpp \
BWAWrapper.cpp BamRecord.cpp FermiAssembler.cpp BamHeader.cpp
Expand Down
57 changes: 8 additions & 49 deletions src/seqtools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,6 @@ static const char *BFC_USAGE_MESSAGE =
" --reference, -G <file> Reference genome if using BWA-MEM realignment\n"
"\nReport bugs to jwala@broadinstitute.org \n\n";

static const char *GOFISH_USAGE_MESSAGE =
"Program: seqtools gofish \n"
"Contact: Jeremiah Wala [ jwala@broadinstitute.org ]\n"
"Description: Enrich for reads that align to a target\n"
"Usage: seqtools gofish [options]\n\n"
"Commands:\n"
" --verbose, -v Set verbose output\n"
" --infasta, -F <file> Input a FASTA insted of BAM/SAM/CRAM stream\n"
" --target, -T <file> Target sequence to index and enrich for\n"
"\nReport bugs to jwala@broadinstitute.org \n\n";

static const char *FML_USAGE_MESSAGE =
"Program: seqtools fml \n"
"Contact: Jeremiah Wala [ jwala@broadinstitute.org ]\n"
Expand All @@ -64,7 +53,6 @@ static const char *FML_USAGE_MESSAGE =

void runbfc(int argc, char** argv);
void runfml(int argc, char** argv);
void rungofish(int argc, char** argv);
void parseOptions(int argc, char** argv, const char* msg);

namespace opt {
Expand All @@ -90,8 +78,6 @@ static const struct option longopts[] = {
{ NULL, 0, NULL, 0 }
};

static void* gofish_worker(void* shared, int step, void *_data);

int main(int argc, char** argv) {

if (argc <= 1) {
Expand All @@ -106,8 +92,6 @@ int main(int argc, char** argv) {
runbfc(argc -1, argv + 1);
} else if (command == "fml") {
runfml(argc -1, argv + 1);
} else if (command == "gofish") {
rungofish(argc - 1, argv + 1);
} else {
std::cerr << SEQTOOLS_USAGE_MESSAGE;
return 0;
Expand Down Expand Up @@ -209,11 +193,11 @@ void runfml(int argc, char** argv) {
std::stringstream ss;
for (std::vector<std::string>::const_iterator i = contigs.begin(); i != contigs.end(); ++i) {
SeqLib::BamRecordVector brv;
bool hardclip = false;
double frac = 0.9;
int max_secondary = 10;
const bool hardclip = false;
const double frac = 0.9;
ss << "contig" << ++count;
bwa.AlignSequence(*i, ss.str(), brv, false, frac, 10);
const int max_secondary = 10;
bwa.AlignSequence(*i, ss.str(), brv, hardclip, frac, max_secondary);
ss.str(std::string());
for (SeqLib::BamRecordVector::iterator r = brv.begin();
r != brv.end(); ++r) {
Expand Down Expand Up @@ -320,10 +304,10 @@ void runbfc(int argc, char** argv) {
// run through and read
for (SeqLib::UnalignedSequenceVector::const_iterator i = u.begin(); i != u.end(); ++i) {
SeqLib::BamRecordVector brv;
bool hardclip = false;
double frac = 0.9;
int max_secondary = 10;
bwa.AlignSequence(i->Seq, i->Name, brv, false, frac, 10);
const bool hardclip = false;
const double frac = 0.9;
const int max_secondary = 10;
bwa.AlignSequence(i->Seq, i->Name, brv, hardclip, frac, max_secondary);
for (SeqLib::BamRecordVector::iterator r = brv.begin();
r != brv.end(); ++r) {
if (!i->Qual.empty())
Expand All @@ -333,18 +317,6 @@ void runbfc(int argc, char** argv) {
}

}

// fish for target sequence
void rungofish(int argc, char** argv) {

parseOptions(argc, argv, GOFISH_USAGE_MESSAGE);

const int n_threads = 1;
//kt_pipeline(n_threads, gofish_worker, &aux, 3);


}

// parse the command line options
void parseOptions(int argc, char** argv, const char* msg) {

Expand Down Expand Up @@ -377,16 +349,3 @@ void parseOptions(int argc, char** argv, const char* msg) {
exit(EXIT_SUCCESS);
}
}

typedef struct {
bseq1_t *seqs;
int n_seqs;
} fish_data_t;


// gofish process
static void* gofish_worker(void* shared, int step, void *_data) {



}

0 comments on commit 3fbab28

Please sign in to comment.