Skip to content

Commit

Permalink
Issue #988: proceed reading from GTF after a warning that exon end is…
Browse files Browse the repository at this point in the history
… past chromosome end.
  • Loading branch information
alexdobin committed Aug 15, 2020
1 parent 10930be commit 1fe083b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
* Issue #988: proceed reading from GTF after a warning that exon end is past chromosome end.
* Issue #978: fixed corrupted transcriptInfo.tab in genome generation for cases where GTF file contains extra chromosomes not present in FASTA files.
* Issue #945: otuput GX/GN for --soloFeatures GeneFull .

Expand Down
16 changes: 10 additions & 6 deletions source/ErrorWarning.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
#include "TimeFunctions.h"
#include "GlobalVariables.h"

void exitWithError(string messageOut, ostream &streamOut1, ostream &streamOut2, int errorInt, Parameters &P) {
void exitWithError(string messageOut, ostream &streamOut1, ostream &streamOut2, int errorInt, Parameters &P)
{
if (P.runThreadN>1)
pthread_mutex_lock(&g_threadChunks.mutexError);
time_t timeCurrent;
time( &timeCurrent);
if (P.runThreadN>1) pthread_mutex_lock(&g_threadChunks.mutexError);
if (streamOut1.good()) {
streamOut1 << "\n" << messageOut << endl << timeMonthDayTime(timeCurrent) <<" ...... FATAL ERROR, exiting\n" <<flush;
};
Expand All @@ -20,14 +22,16 @@ void exitWithError(string messageOut, ostream &streamOut1, ostream &streamOut2,
exit(errorInt);
};

void warningMessage(string messageOut, ostream &streamOut1, ostream &streamOut2, Parameters &P) {
time_t timeCurrent;
time( &timeCurrent);
if (P.runThreadN>1) pthread_mutex_lock(&g_threadChunks.mutexError);
void warningMessage(string messageOut, ostream &streamOut1, ostream &streamOut2, Parameters &P)
{
if (P.runThreadN>1)
pthread_mutex_lock(&g_threadChunks.mutexError);
if (streamOut1.good()) {
streamOut1 << "!!!!! WARNING: " << messageOut <<endl;
};
if (streamOut2.good()) {
streamOut2 << "!!!!! WARNING: " << messageOut <<endl;
};
if (P.runThreadN>1)
pthread_mutex_unlock(&g_threadChunks.mutexError);
};

0 comments on commit 1fe083b

Please sign in to comment.