Permalink
Browse files

Get rid of nearly all warnings

  • Loading branch information...
milot-mirdita committed Aug 14, 2018
1 parent 33fe82f commit 42ee41a75750d348f3701822836f5a1b1b5eb4fa
View
@@ -98,7 +98,7 @@ int ksw_ll_i16(void *q, int tlen, const uint8_t *target, int gapo, int gape, int
#include <stdio.h>
static inline uint32_t *ksw_push_cigar(void *km, int *n_cigar, int *m_cigar, uint32_t *cigar, uint32_t op, int len)
static inline uint32_t *ksw_push_cigar(void*, int *n_cigar, int *m_cigar, uint32_t *cigar, uint32_t op, int len)
{
if (*n_cigar == 0 || op != (cigar[(*n_cigar) - 1]&0xf)) {
if (*n_cigar == *m_cigar) {
View
@@ -32,7 +32,8 @@ add_library(mmseqs-framework
${util_header_files}
${util_source_files}
${workflow_source_files}
util/Aggregation.cpp util/Aggregation.h)
# util/Aggregation.cpp util/Aggregation.h
)
target_include_directories(mmseqs-framework PUBLIC ${CMAKE_BINARY_DIR}/generated)
target_include_directories(mmseqs-framework PUBLIC ${PROJECT_BINARY_DIR}/generated)
@@ -67,7 +67,7 @@ extern int proteinaln2nucl(int argc, const char **argv, const Command& command);
extern int apply(int argc, const char **argv, const Command& command);
extern int versionstring(int argc, const char **argv, const Command& command);
extern int shellcompletion(int argc, const char **argv, const Command& command);
extern int aggregate(int argc, const char **argv, const Command& command);
//extern int aggregate(int argc, const char **argv, const Command& command);
extern int map(int argc, const char **argv, const Command& command);
#endif
@@ -44,7 +44,7 @@ struct UniprotHeader {
priority = 1;
}
priority += (std::min(std::max(existence, 0u), 5u) - 5u);
priority += (std::min(existence, 5u) - 5u);
}
friend bool operator<(const UniprotHeader& h1, const UniprotHeader& h2)
@@ -1,6 +1,8 @@
#include "NucleotideMatrix.h"
#include <climits>
NucleotideMatrix::NucleotideMatrix(const char *scoringMatrixFileName_, float bitFactor, float scoreBias)
// TODO think about making the matrix dynamic
NucleotideMatrix::NucleotideMatrix(const char* /*scoringMatrixFileName_*/, float bitFactor, float scoreBias)
: SubstitutionMatrix("nucleotide.out", bitFactor, scoreBias) {
// this->alphabetSize = 5;
setupLetterMapping();
@@ -303,7 +303,7 @@ void ProfileStates::discretize(const float* sequence, size_t length, std::string
profileCol = (float *)sequence + i*Sequence::PROFILE_AA_SIZE;
float maxScore = -FLT_MIN;
size_t maxScoreIndex = 0;
// size_t maxScoreIndex = 0;
/*for (size_t a = 0 ; a < 20 ; a++)
{
@@ -317,7 +317,7 @@ void ProfileStates::discretize(const float* sequence, size_t length, std::string
if (repScore[k]>maxScore)
{
maxScore = repScore[k];
maxScoreIndex = k;
// maxScoreIndex = k;
}
}
View
@@ -114,7 +114,7 @@ void Util::decomposeDomainByAminoAcid(size_t dbSize, T entrySizes, size_t dbEntr
}
}
delete(entriesPerWorker);
delete[] entriesPerWorker;
}
template
View
@@ -215,12 +215,12 @@ std::vector<struct Command> commands = {
"Martin Steinegger <martin.steinegger@mpibpc.mpg.de>",
"<i:sequenceDB> <o:resultDB> <i:resultDB1> ... <i:resultDBn>",
CITATION_MMSEQS2},
{"aggregate", aggregate, &par.aggregate, COMMAND_DB,
"Aggregate search results by genomes",
NULL,
"Clovis Norroy <clovis.norroy@gmail.com>",
"<i:searchResults> <o:aggregated_file>",
CITATION_MMSEQS2},
// {"aggregate", aggregate, &par.aggregate, COMMAND_DB,
// "Aggregate search results by genomes",
// NULL,
// "Clovis Norroy <clovis.norroy@gmail.com>",
// "<i:searchResults> <o:aggregated_file>",
// CITATION_MMSEQS2},
{"splitdb", splitdb, &par.splitdb, COMMAND_DB,
"Split a mmseqs DB into multiple DBs",
NULL,
@@ -407,7 +407,8 @@ ScoreMatrix *Prefiltering::getScoreMatrix(const BaseMatrix& matrix, const size_t
}
void Prefiltering::getIndexTable(int split, size_t dbFrom, size_t dbSize) {
// TODO reimplement split index feature
void Prefiltering::getIndexTable(int /*split*/, size_t dbFrom, size_t dbSize) {
if (templateDBIsIndex == true) {
indexTable = PrefilteringIndexReader::generateIndexTable(tidxdbr, false);
View
@@ -35,19 +35,22 @@ int translatenucs(int argc, const char **argv, const Command& command) {
TranslateNucl translateNucl(static_cast<TranslateNucl::GenCode>(par.translationTable));
#pragma omp parallel
{
int thread_idx = 0;
#ifdef OPENMP
thread_idx = omp_get_thread_num();
#endif
char* aa = new char[par.maxSeqLen + 3 + 1];
#pragma omp for schedule(dynamic, 5)
for (size_t i = 0; i < entries; ++i) {
int thread_idx = 0;
#ifdef OPENMP
thread_idx = omp_get_thread_num();
#endif
unsigned int key = reader.getDbKey(i);
char* data = reader.getData(i);
Debug::printProgress(i);
bool addStopAtStart = false;
bool addStopAtEnd = false;
if(addOrfStop == true){
unsigned int key = reader.getDbKey(i);
char* data = reader.getData(i);
if (addOrfStop == true) {
char* headData = header->getDataByDBKey(key);
char * entry[255];
size_t columns = Util::getWordsOfLine(headData, entry, 255);
@@ -59,12 +62,12 @@ int translatenucs(int argc, const char **argv, const Command& command) {
break;
}
}
if (found==false) {
if (found == false) {
Debug(Debug::ERROR) << "Could not find Orf information in header.\n";
EXIT(EXIT_FAILURE);
}
Orf::SequenceLocation loc=Orf::parseOrfHeader(entry[col]);
Orf::SequenceLocation loc = Orf::parseOrfHeader(entry[col]);
addStopAtStart=!(loc.hasIncompleteStart);
addStopAtEnd=!(loc.hasIncompleteEnd);
@@ -73,20 +76,20 @@ int translatenucs(int argc, const char **argv, const Command& command) {
//190344_chr1_1_129837240_129837389_3126_JFOA01000125.1 Prochlorococcus sp. scB245a_521M10 contig_244, whole genome shotgun sequence [Orf: 1, 202, -1, 1, 0]
// ignore null char at the end
// needs to be int in order to be able to check
int length = reader.getSeqLens(i) - 1;
size_t length = reader.getSeqLens(i) - 1;
if ((data[length] != '\n' && length % 3 != 0) && (data[length - 1] == '\n' && (length - 1) % 3 != 0)) {
Debug(Debug::WARNING) << "Nucleotide sequence entry " << key << " length (" << length << ") is not divisible by three. Adjust length to (lenght=" << length - (length % 3) << ").\n";
length = length - (length % 3);
}
if (length < 3) {
if (length < 3) {
Debug(Debug::WARNING) << "Nucleotide sequence entry " << key << " length (" << length << ") is too short. Skipping entry.\n";
continue;
}
if(length > 3*par.maxSeqLen) {
if (length > (3 * par.maxSeqLen)) {
Debug(Debug::WARNING) << "Nucleotide sequence entry " << key << " length (" << length << ") is too long. Trimming entry.\n";
length = 3*par.maxSeqLen;
length = (3 * par.maxSeqLen);
}
char * writeAA;

0 comments on commit 42ee41a

Please sign in to comment.