double sum;
double bChange = 0.0, change = 0.0; // bChange : biggest change
- READ_INT_TYPE totNum = 0;
+ int totNum = 0;
ModelType model(mparams); //master model
ReadReader<ReadType> **readers;
Params fparams[nThreads];
pthread_t threads[nThreads];
pthread_attr_t attr;
- void *status;
int rc;
}
for (int i = 0; i < nThreads; i++) {
- rc = pthread_join(threads[i], &status);
+ rc = pthread_join(threads[i], NULL);
pthread_assert(rc, "pthread_join", "Cannot join thread " + itos(i) + " (numbered from 0) at ROUND " + itos(ROUND) + "!");
}
if (bChange < change) bChange = change;
}
- if (verbose) { cout<< "ROUND = "<< ROUND<< ", SUM = "<< setprecision(15)<< sum<< ", bChange = " << setprecision(6)<< bChange<< ", totNum = %" << totNum<< endl; }
+ if (verbose) { cout<< "ROUND = "<< ROUND<< ", SUM = "<< setprecision(15)<< sum<< ", bChange = " << setprecision(6)<< bChange<< ", totNum = " << totNum<< endl; }
} while (ROUND < MIN_ROUND || (totNum > 0 && ROUND < MAX_ROUND));
// } while (ROUND < 1);
pthread_assert(rc, "pthread_create", "Cannot create thread " + itos(i) + " (numbered from 0) when generating files for Gibbs sampler!");
}
for (int i = 0; i < nThreads; i++) {
- rc = pthread_join(threads[i], &status);
+ rc = pthread_join(threads[i], NULL);
pthread_assert(rc, "pthread_join", "Cannot join thread " + itos(i) + " (numbered from 0) when generating files for Gibbs sampler!");
}
}
pthread_assert(rc, "pthread_create", "Cannot create thread " + itos(i) + " (numbered from 0) when calculating expected weights!");
}
for (int i = 0; i < nThreads; i++) {
- rc = pthread_join(threads[i], &status);
+ rc = pthread_join(threads[i], NULL);
pthread_assert(rc, "pthread_join", "Cannot join thread " + itos(i) + " (numbered from 0) when calculating expected weights!");
}
model.setNeedCalcConPrb(false);
ifstream fin;
bool quiet = false;
- if (argc < 5) {
- printf("Usage : rsem-run-em refName read_type sampleName sampleToken [-p #Threads] [-b samInpType samInpF has_fn_list_? [fn_list]] [-q] [--gibbs-out] [--sampling]\n\n");
+ if (argc < 6) {
+ printf("Usage : rsem-run-em refName read_type sampleName imdName statName [-p #Threads] [-b samInpType samInpF has_fn_list_? [fn_list]] [-q] [--gibbs-out] [--sampling]\n\n");
printf(" refName: reference name\n");
printf(" read_type: 0 single read without quality score; 1 single read with quality score; 2 paired-end read without quality score; 3 paired-end read with quality score.\n");
printf(" sampleName: sample's name, including the path\n");
strcpy(refName, argv[1]);
read_type = atoi(argv[2]);
strcpy(outName, argv[3]);
- sprintf(imdName, "%s.temp/%s", argv[3], argv[4]);
- sprintf(statName, "%s.stat/%s", argv[3], argv[4]);
+ strcpy(imdName, argv[4]);
+ strcpy(statName, argv[5]);
nThreads = 1;
genGibbsOut = false;
pt_fn_list = pt_chr_list = NULL;
- for (int i = 5; i < argc; i++) {
+ for (int i = 6; i < argc; i++) {
if (!strcmp(argv[i], "-p")) { nThreads = atoi(argv[i + 1]); }
if (!strcmp(argv[i], "-b")) {
genBamF = true;