[med-svn] [swarm-cluster] 01/04: Imported Upstream version 2.1.8
Andreas Tille
tille at debian.org
Sat Mar 19 18:17:00 UTC 2016
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch master
in repository swarm-cluster.
commit 9361ccb399fd790fe1fdb6da3fd68f249a376bc4
Author: Andreas Tille <tille at debian.org>
Date: Sat Mar 19 19:07:34 2016 +0100
Imported Upstream version 2.1.8
---
README.md | 28 ++++++++++++++++++++++------
man/swarm.1 | 7 ++++++-
src/algod1.cc | 21 ++++++++++++---------
src/swarm.cc | 4 ++++
src/swarm.h | 2 +-
5 files changed, 45 insertions(+), 17 deletions(-)
diff --git a/README.md b/README.md
index 2a03948..6ffab2a 100644
--- a/README.md
+++ b/README.md
@@ -42,6 +42,8 @@ Table of Content
* [Third-party pipelines](#pipelines)
* [Alternatives](#alternatives)
* [New features](#features)
+ * [version 2.1.8](#version218)
+ * [version 2.1.7](#version217)
* [version 2.1.6](#version216)
* [version 2.1.5](#version215)
* [version 2.1.4](#version214)
@@ -426,14 +428,27 @@ If you want to try alternative free and open-source clustering
methods, here are some links:
* [Vsearch](https://github.com/torognes/vsearch)
+* [Oligotyping](http://merenlab.org/projects/oligotyping/)
* [DNAclust](http://dnaclust.sourceforge.net/)
-* [Crunchclust](https://code.google.com/p/crunchclust/)
* [Sumaclust](http://metabarcoding.org/sumatra)
-
+* [Crunchclust](https://code.google.com/p/crunchclust/)
<a name="features"/>
## New features##
+<a name="version218"/>
+### version 2.1.8 ###
+
+**swarm** 2.1.8 fixes a rare bug triggered when clustering extremely
+short undereplicated sequences. Also, alignment parameters are not
+shown when d=1.
+
+<a name="version217"/>
+### version 2.1.7 ###
+
+**swarm** 2.1.7 fixes more problems with seed output. Ignore CR
+ characters in FASTA files. Improved help and error messsages.
+
<a name="version216"/>
### version 2.1.6 ###
@@ -459,10 +474,11 @@ with the `-w` option when d>1.
<a name="version212"/>
### version 2.1.2 ###
-**swarm** 2.1.2 adds the -a (--append-abundance) option to set a default
-abundance value to be used when abundance information is missing from
-the input file. If this option is not specified, missing abundance information
-will result in a fatal error. The error message in that case is improved.
+**swarm** 2.1.2 adds the -a (--append-abundance) option to set a
+default abundance value to be used when abundance information is
+missing from the input file. If this option is not specified, missing
+abundance information will result in a fatal error. The error message
+in that case is improved.
<a name="version211"/>
### version 2.1.1 ###
diff --git a/man/swarm.1 b/man/swarm.1
index 9874c8f..b2af08d 100644
--- a/man/swarm.1
+++ b/man/swarm.1
@@ -1,5 +1,5 @@
.\" ============================================================================
-.TH swarm 1 "February 24, 2016" "version 2.1.7" "USER COMMANDS"
+.TH swarm 1 "March 11, 2016" "version 2.1.8" "USER COMMANDS"
.\" ============================================================================
.SH NAME
swarm \(em find clusters of nearly-identical nucleotide amplicons
@@ -329,6 +329,11 @@ New features and important modifications of \fBswarm\fR (short lived
or minor bug releases are not mentioned):
.RS
.TP
+.BR v2.1.8\~ "released March 11, 2016"
+Version 2.1.8 fixes a rare bug triggered when clustering extremely
+short undereplicated sequences. Also, alignment parameters are not
+shown when \fId\rR=1.
+.TP
.BR v2.1.7\~ "released February 24, 2016"
Version 2.1.7 fixes a bug in the output of seeds with the \-w option
when \fId\fR > 1 that was not properly fixed in version 2.1.6. It also
diff --git a/src/algod1.cc b/src/algod1.cc
index 57336e9..14cebe9 100644
--- a/src/algod1.cc
+++ b/src/algod1.cc
@@ -119,6 +119,8 @@ static int * global_hits_data = 0;
static int global_hits_alloc = 0;
static int global_hits_count = 0;
+static unsigned long threads_used = 0;
+
inline unsigned int hash_getindex(unsigned long hash)
{
#ifdef POWEROFTWO
@@ -315,7 +317,7 @@ void generate_variants(unsigned long thread,
#if 1
/* identical non-variant */
- if (thread == threads - 1)
+ if (thread == threads_used - 1)
find_variant_matches(thread, varseq, seqlen, seed);
#endif
@@ -470,16 +472,17 @@ void process_seed(int seed, int subseed)
{
unsigned long seqlen = db_getsequencelen(subseed);
- unsigned long thr = threads;
- if (thr > seqlen + 1)
- thr = seqlen+1;
+ threads_used = threads;
+ if (threads_used > seqlen + 1)
+ threads_used = seqlen+1;
/* prepare work for the threads */
unsigned long start = 0;
- for(unsigned long t=0; t<thr; t++)
+ for(unsigned long t=0; t<threads_used; t++)
{
struct thread_info_s * tip = ti + t;
- unsigned long length = (seqlen - start + thr - t) / (thr - t);
+ unsigned long length =
+ (seqlen - start + threads_used - t) / (threads_used - t);
tip->seed = subseed;
tip->mut_start = start;
tip->mut_length = length;
@@ -491,8 +494,8 @@ void process_seed(int seed, int subseed)
pthread_mutex_unlock(&tip->workmutex);
}
- /* wait for theads to finish their work */
- for(unsigned int t=0; t<thr; t++)
+ /* wait for threads to finish their work */
+ for(unsigned int t=0; t<threads_used; t++)
{
struct thread_info_s * tip = ti + t;
pthread_mutex_lock(&tip->workmutex);
@@ -503,7 +506,7 @@ void process_seed(int seed, int subseed)
/* join hits from the threads */
- for(unsigned int t=0; t<thr; t++)
+ for(unsigned int t=0; t<threads_used; t++)
{
if (global_hits_count + ti[t].hits_count > global_hits_alloc)
{
diff --git a/src/swarm.cc b/src/swarm.cc
index 3e822f7..e6276d7 100644
--- a/src/swarm.cc
+++ b/src/swarm.cc
@@ -173,9 +173,13 @@ void args_show()
fprintf(logfile, "Uclust file: %s\n", uclustfilename);
fprintf(logfile, "Resolution (d): %ld\n", resolution);
fprintf(logfile, "Threads: %lu\n", threads);
+
+ if (resolution > 1)
+ {
fprintf(logfile, "Scores: match: %ld, mismatch: %ld\n", matchscore, mismatchscore);
fprintf(logfile, "Gap penalties: opening: %ld, extension: %ld\n", gapopen, gapextend);
fprintf(logfile, "Converted costs: mismatch: %ld, gap opening: %ld, gap extension: %ld\n", penalty_mismatch, penalty_gapopen, penalty_gapextend);
+ }
fprintf(logfile, "Break OTUs: %s\n", opt_no_otu_breaking ? "No" : "Yes");
if (opt_fastidious)
fprintf(logfile, "Fastidious: Yes, with boundary %ld\n", opt_boundary);
diff --git a/src/swarm.h b/src/swarm.h
index 2137e91..e7eb55f 100644
--- a/src/swarm.h
+++ b/src/swarm.h
@@ -52,7 +52,7 @@
#define LINE_MAX 2048
#endif
-#define SWARM_VERSION "2.1.7"
+#define SWARM_VERSION "2.1.8"
#define WIDTH 32
#define WIDTH_SHIFT 5
#define BLOCKWIDTH 32
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/swarm-cluster.git
More information about the debian-med-commit
mailing list