projects
/
htsworkflow.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e0cfc75
)
Fixed bug that bailed on empty alignment files. (weird exception case)
author
Tim Reddy Tim
<treddy@hudsonalpha.org>
Thu, 14 Aug 2008 18:29:52 +0000
(18:29 +0000)
committer
Tim Reddy Tim
<treddy@hudsonalpha.org>
Thu, 14 Aug 2008 18:29:52 +0000
(18:29 +0000)
htswanalysis/src/complexity_count.cpp
patch
|
blob
|
history
diff --git
a/htswanalysis/src/complexity_count.cpp
b/htswanalysis/src/complexity_count.cpp
index 965272d008250b43c4a00ccb10ed5f3c4999cd3a..28e42953c6a8490e3cfdc3166002953fe7805830 100644
(file)
--- a/
htswanalysis/src/complexity_count.cpp
+++ b/
htswanalysis/src/complexity_count.cpp
@@
-117,7
+117,8
@@
int main(int argc, char** argv) {
char label1[128]; strcpy(label1,argv[1]);
Hits align1; read_align_file(argv[2], align1);
- int complexity = count_complexity(align1);
+ int complexity;
+ if(align1.size() == 0) complexity = 0; else complexity = count_complexity(align1);
cout << label1 << "\t" << complexity << "\t" << align1.size()/1000000 << "M\t" << (double)complexity/(double)align1.size() << endl;
}