aboutsummaryrefslogtreecommitdiff
path: root/src/c/multifasta_to_otu.c
diff options
context:
space:
mode:
authorCalvin Morrison <mutantturkey@gmail.com>2014-03-04 14:19:46 -0500
committerCalvin Morrison <mutantturkey@gmail.com>2014-03-04 14:19:46 -0500
commit592e0945fcfb94d641c16f2cf02add0c0430b226 (patch)
tree8f4ce109ddf3ee8a51753b1b84e193d8f0155252 /src/c/multifasta_to_otu.c
parent2aa4254c4368fd85ca6d37e17c786eb295a79c5a (diff)
fix all warnings and that weird bug
Diffstat (limited to 'src/c/multifasta_to_otu.c')
-rw-r--r--src/c/multifasta_to_otu.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/c/multifasta_to_otu.c b/src/c/multifasta_to_otu.c
index 7513b11..fcb0822 100644
--- a/src/c/multifasta_to_otu.c
+++ b/src/c/multifasta_to_otu.c
@@ -38,7 +38,7 @@ char **get_fasta_files(char *directory) {
exit(EXIT_FAILURE);
}
- while(e = readdir(dh))
+ while((e = readdir(dh)))
count++;
e = NULL;
@@ -226,11 +226,11 @@ int main(int argc, char **argv) {
struct matrix *sensing_matrix = load_sensing_matrix(sensing_matrix_filename, kmer);
double *sensing_matrix_ptr = sensing_matrix->matrix;
- unsigned long long sequences = sensing_matrix->matrix;
+ unsigned long long sequences = sensing_matrix->sequences;
if(verbose) {
printf("directory count: %llu\n", dir_count);
- printf("width: %llu\nsequences %llu\n", width, sensing_matrix->sequences);
+ printf("width: %llu\nsequences %llu\n", width, sequences);
}
unsigned long long *solutions = malloc(dir_count * sequences * sizeof(unsigned long long));
@@ -244,7 +244,7 @@ int main(int argc, char **argv) {
#endif
printf("Beginning to process samples\n");
#pragma omp parallel for shared(solutions, sensing_matrix_ptr, width, done, sequences)
- for(long i = 0; i < dir_count; i++ ) {
+ for(size_t i = 0; i < dir_count; i++ ) {
unsigned long long x = 0;
unsigned long long y = 0;
@@ -343,7 +343,7 @@ int main(int argc, char **argv) {
double *solution = nnls(sensing_matrix_rare, count_matrix_rare, sequences, rare_width);
// add the current solution to the solutions array
- for(int z = 0; z < sequences; z++ ) {
+ for(unsigned long long z = 0; z < sequences; z++ ) {
solutions[sensing_matrix->sequences*i + z] = (unsigned long long)round(solution[z] * file_sequence_count);
}