Skip to content

Commit

Permalink
Fixed a bug with causing seg-faults when combining --twopassMode Basi…
Browse files Browse the repository at this point in the history
…c --outSAMorder PairedKeepInputOrder .
  • Loading branch information
alexdobin committed May 25, 2016
1 parent 487b836 commit a7756f5
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
* Fixed a bug with causing seg-faults when combining --twopassMode Basic --outSAMorder PairedKeepInputOrder .
* Fixed a problem with SAM header in cases where reference sequences are added at the mapping stage.

STAR 2.5.2a 2016/05/10
Expand Down
Binary file modified bin/Linux_x86_64/STAR
Binary file not shown.
Binary file modified bin/Linux_x86_64/STARlong
Binary file not shown.
Binary file modified bin/Linux_x86_64_static/STAR
Binary file not shown.
Binary file modified bin/Linux_x86_64_static/STARlong
Binary file not shown.
8 changes: 7 additions & 1 deletion source/Parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -624,9 +624,15 @@ void Parameters::inputParameters (int argInN, char* argIn[]) {//input parameters
if (outFilterType=="BySJout" && outSAMorder=="PairedKeepInputOrder") {
ostringstream errOut;
errOut <<"EXITING: fatal input ERROR: --outFilterType=BySJout is not presently compatible with --outSAMorder=PairedKeepInputOrder\n";
errOut <<"SOLUTION: re-run STAR without setting one of those parameters. Send a feature request to the Authors\n";
errOut <<"SOLUTION: re-run STAR without setting one of those parameters.\n";
exitWithError(errOut.str(), std::cerr, inOut->logMain, EXIT_CODE_PARAMETER, *this);
};
if (!outSAMbool && outSAMorder=="PairedKeepInputOrder") {
ostringstream errOut;
errOut <<"EXITING: fatal input ERROR: --outSAMorder=PairedKeepInputOrder is presently only compatible with SAM output, i.e. default --outSMAtype SAM\n";
errOut <<"SOLUTION: re-run STAR without --outSAMorder=PairedKeepInputOrder, or with --outSAMorder=PairedKeepInputOrder --outSMAtype SAM .\n";
exitWithError(errOut.str(), std::cerr, inOut->logMain, EXIT_CODE_PARAMETER, *this);
};
//SJ filtering
for (int ii=0;ii<4;ii++) {
if (outSJfilterOverhangMin.at(ii)<0) outSJfilterOverhangMin.at(ii)=numeric_limits<int32>::max();
Expand Down
2 changes: 1 addition & 1 deletion source/ReadAlignChunk_mapChunk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void ReadAlignChunk::mapChunk() {//map one chunk. Input reads stream has to be s

}; //reads cycle

if ( P->outSAMorder == "PairedKeepInputOrder" && P->runThreadN>1 ) {//write the remaining part of the buffer, close and rename chunk files
if ( P->outSAMbool && P->outSAMorder == "PairedKeepInputOrder" && P->runThreadN>1 ) {//write the remaining part of the buffer, close and rename chunk files
chunkOutBAMfile.write(chunkOutBAM,chunkOutBAMtotal);
chunkOutBAMfile.clear(); //in case 0 bytes were written which could set fail bit
chunkOutBAMfile.close();
Expand Down

0 comments on commit a7756f5

Please sign in to comment.