Skip to content

Commit

Permalink
Fixed a bug causing crashed introduced in the previous patch.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdobin committed Jan 15, 2016
1 parent e585bd4 commit c1feaac
Show file tree
Hide file tree
Showing 8 changed files with 856 additions and 850 deletions.
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.
12 changes: 9 additions & 3 deletions source/BAMbinSortByCoordinate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,21 @@ void BAMbinSortByCoordinate(uint32 iBin, uint binN, uint binS, uint nThreads, st

if (binS==0) return; //nothing to do for empty bins
//allocate arrays
char *bamIn=new char[binS];
char *bamIn=new char[binS+1];
uint *startPos=new uint[binN*3];

uint bamInBytes=0;
//load all aligns
for (uint it=0; it<nThreads; it++) {
string bamInFile=dirBAMsort+to_string(it)+"/"+to_string((uint) iBin);
ifstream bamInStream (bamInFile.c_str());
bamInStream.read(bamIn+bamInBytes,binS);//read the whole file
ifstream bamInStream;
bamInStream.open(bamInFile.c_str(),std::ios::binary | std::ios::ate);//open at the end to get file size
uint s1=bamInStream.tellg();
if (s1>0)
{
bamInStream.seekg(std::ios::beg);
bamInStream.read(bamIn+bamInBytes,s1);//read the whole file
};
bamInBytes += bamInStream.gcount();
bamInStream.close();
remove(bamInFile.c_str());
Expand Down
2 changes: 1 addition & 1 deletion source/ReadAlign_outputAlignments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void ReadAlign::outputAlignments() {
{//write all transcripts
//mate mapped = true if a mate was present in one of the trancsripts
mateMapped[trMult[iTr]->exons[0][EX_iFrag]]=true;
mateMapped[trMult[iTr]->exons[trBest->nExons-1][EX_iFrag]]=true;
mateMapped[trMult[iTr]->exons[trMult[iTr]->nExons-1][EX_iFrag]]=true;

//mateMapped1 = true if a mate is present in this transcript
bool mateMapped1[2]={false,false};
Expand Down
8 changes: 4 additions & 4 deletions source/parametersDefault
Original file line number Diff line number Diff line change
Expand Up @@ -331,17 +331,17 @@ outFilterMismatchNmax 10
int: alignment will be output only if it has no more mismatches than this value.

outFilterMismatchNoverLmax 0.3
int: alignment will be output only if its ratio of mismatches to *mapped* length is less than or equal to this value.
float: alignment will be output only if its ratio of mismatches to *mapped* length is less than or equal to this value.

outFilterMismatchNoverReadLmax 1
int: alignment will be output only if its ratio of mismatches to *read* length is less than or equal to this value.
outFilterMismatchNoverReadLmax 1.0
float: alignment will be output only if its ratio of mismatches to *read* length is less than or equal to this value.


outFilterScoreMin 0
int: alignment will be output only if its score is higher than or equal to this value.

outFilterScoreMinOverLread 0.66
float: same as outFilterScoreMin, but normalized to read length (sum of mates' lengths for paired-end reads)
float: same as outFilterScoreMin, but normalized to read length (sum of mates' lengths for paired-end reads)

outFilterMatchNmin 0
int: alignment will be output only if the number of matched bases is higher than or equal to this value.
Expand Down
1,684 changes: 842 additions & 842 deletions source/parametersDefault.xxd

Large diffs are not rendered by default.

0 comments on commit c1feaac

Please sign in to comment.