[med-svn] [Git][med-team/stacks][master] 4 commits: routine-update: New upstream version

Nilesh Patra (@nilesh) gitlab at salsa.debian.org
Sat May 15 13:01:59 BST 2021



Nilesh Patra pushed to branch master at Debian Med / stacks


Commits:
df3f7a35 by Nilesh Patra at 2021-05-15T17:08:33+05:30
routine-update: New upstream version

- - - - -
eadf99be by Nilesh Patra at 2021-05-15T17:08:34+05:30
New upstream version 2.57+dfsg
- - - - -
fa3b116f by Nilesh Patra at 2021-05-15T17:08:38+05:30
Update upstream source from tag 'upstream/2.57+dfsg'

Update to upstream version '2.57+dfsg'
with Debian dir 1df1083bc91edf7ba04754b98104750abea78672
- - - - -
45ba2bd2 by Nilesh Patra at 2021-05-15T17:12:30+05:30
Interim changelog entry

- - - - -


14 changed files:

- ChangeLog
- configure.ac
- debian/changelog
- src/PopSum.cc
- src/PopSum.h
- src/clean.cc
- src/clean.h
- src/export_formats.cc
- src/file_io.cc
- src/file_io.h
- src/ordered.h
- src/populations.cc
- src/process_radtags.cc
- src/smoothing.h


Changes:

=====================================
ChangeLog
=====================================
@@ -1,3 +1,21 @@
+Stacks 2.57 - May, 10, 2021
+---------------------------
+    Feature: updated process_radtags so that if you specify the same sample name in the barcodes file for multiple
+             barcodes, the program will merge the output for those barcodes into the single, specified output file.
+    Feature: changed the default 'smoothed' and 'bootstrap' values in output files to contain a -1.0 if a particular locus
+             was not included in the smoothing/bootstrap algorithms (this occurs when RAD loci overlap the same genomic
+             region and only one of the loci can be included in the smoothing/bootstrapping).
+    Bugfix: Reverted earlier changes to ensure all mentions of column position (within a RAD locus) are zero-based, while
+            reference-based coordinates are one-based.
+    Bugfix: Updated populations VCF export so that snp_cols variable (tells you where the individual SNPs come from for a
+	    set of haplotypes is in the proper order when the locus is on the negative strand (we reversed the order here).
+
+Stacks 2.56 - March 16, 2021
+----------------------------
+    Bugfix: Corrected process_radtags when processing dual index barcodes but only the second, i7 barcode is an actual
+            barcode, referred to as --null_index in the process_radtags barcodes options. In these cases, the first, i5
+            index barcode is being used as a random oligo to remove PCR duplicates.
+
 Stacks 2.55 - January 07, 2021
 ------------------------------
     Feature: Added NgoMIV restriction enzyme to process_radtags.


=====================================
configure.ac
=====================================
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.59)
-AC_INIT([Stacks], [2.55])
+AC_INIT([Stacks], [2.57])
 AC_CONFIG_AUX_DIR([config])
 AM_INIT_AUTOMAKE([-Wall -Werror foreign parallel-tests subdir-objects])
 AC_CONFIG_SRCDIR([src/ustacks.cc])


=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+stacks (2.57+dfsg-1) UNRELEASED; urgency=medium
+
+  * Team upload.
+  * New upstream version 2.57+dfsg
+
+ -- Nilesh Patra <nilesh at debian.org>  Sat, 15 May 2021 17:12:18 +0530
+
 stacks (2.55+dfsg-1) unstable; urgency=medium
 
   * Team upload.


=====================================
src/PopSum.cc
=====================================
@@ -1,6 +1,6 @@
 // -*-mode:c++; c-style:k&r; c-basic-offset:4;-*-
 //
-// Copyright 2011-2018, Julian Catchen <jcatchen at illinois.edu>
+// Copyright 2011-2021, Julian Catchen <jcatchen at illinois.edu>
 //
 // This file is part of Stacks.
 //
@@ -66,9 +66,8 @@ LocPopSum::sum_pops(const CSLocus *cloc, Datum const*const* d, const MetaPopInfo
                 filtered = false;
         }
         if (filtered == true) {
-            for (uint k = 0; k < len; k++) {
+            for (uint k = 0; k < len; k++)
                 s->nucs[k].filtered_site = true;
-            }
             continue;
         }
 
@@ -77,6 +76,7 @@ LocPopSum::sum_pops(const CSLocus *cloc, Datum const*const* d, const MetaPopInfo
         // calculate observed genotype frequencies, allele frequencies, and expected genotype frequencies.
         //
         for (uint k = 0; k < cloc->snps.size(); k++) {
+
             res = this->tally_heterozygous_pos(cloc, d, s,
                                                cloc->snps[k]->col, k, pop.first_sample, pop.last_sample);
             //
@@ -106,6 +106,7 @@ LocPopSum::sum_pops(const CSLocus *cloc, Datum const*const* d, const MetaPopInfo
         //
         for (uint k = 0; k < len; k++) {
             if (snp_cols.count(k)) continue;
+
             this->tally_fixed_pos(cloc, d, s, k, pop.first_sample, pop.last_sample);
         }
 


=====================================
src/PopSum.h
=====================================
@@ -1,6 +1,6 @@
 // -*-mode:c++; c-style:k&r; c-basic-offset:4;-*-
 //
-// Copyright 2011-2019, Julian Catchen <jcatchen at illinois.edu>
+// Copyright 2011-2021, Julian Catchen <jcatchen at illinois.edu>
 //
 // This file is part of Stacks.
 //
@@ -64,9 +64,9 @@ public:
         this->snp_cnt  = 0;
 
         for (uint i = 0; i < PopStatSize; i++) {
-            this->stat[i]     = 0.0;
-            this->smoothed[i] = 0.0;
-            this->bs[i]       = 0.0;
+            this->stat[i]     =  0.0;
+            this->smoothed[i] = -1.0;
+            this->bs[i]       = -1.0;
         }
     }
     int reset() {
@@ -77,9 +77,9 @@ public:
         this->snp_cnt  = 0;
 
         for (uint i = 0; i < PopStatSize; i++) {
-            this->stat[i]     = 0.0;
-            this->smoothed[i] = 0.0;
-            this->bs[i]       = 0.0;
+            this->stat[i]     =  0.0;
+            this->smoothed[i] = -1.0;
+            this->bs[i]       = -1.0;
         }
         return 0;
     }


=====================================
src/clean.cc
=====================================
@@ -237,19 +237,30 @@ parse_input_record(Seq *s, RawRead *r)
                     strncpy(r->index_bc, p, lim);
                     r->index_bc[lim] = '\0';
                     break;
+                case null_index:
+		    if (*z == '+')
+			p = z + 1;
+		    for (z = p; *z != '\0'; z++);
+		    lim = z - p;
+		    lim = lim < max_bc_size_1 ? lim : max_bc_size_1;
+		    strncpy(r->index_bc, p,  lim);
+                    r->index_bc[lim] = '\0';
+                    break;		    
                 default:
                     break;
                 }
             } else if (r->read == 2) {
                 if (*z == '+')
                     p = z + 1;
+		for (z = p; *z != '\0'; z++);
+		lim = z - p;
 
                 switch (barcode_type) {
-                case null_index:
                 case index_index:
                 case inline_index:
-                    strncpy(r->index_bc, p,  max_bc_size_2);
-                    r->index_bc[max_bc_size_2] = '\0';
+		    lim = lim < max_bc_size_2 ? lim : max_bc_size_2;
+                    strncpy(r->index_bc, p,  lim);
+                    r->index_bc[lim] = '\0';
                     break;
                 default:
                     break;


=====================================
src/clean.h
=====================================
@@ -214,6 +214,7 @@ public:
                 this->inline_bc_len = barcode_size;
                 break;
             case index_null:
+	    case null_index:
             case index_index:
                 this->se_bc = this->index_bc;
                 break;


=====================================
src/export_formats.cc
=====================================
@@ -2186,8 +2186,7 @@ PhylipVarAllExport::open(const MetaPopInfo *mpopi)
 int
 PhylipVarAllExport::write_header()
 {
-    char   s[id_len];
-    size_t len;
+    char s[id_len];
     
     for (size_t p = 0; p < this->_mpopi->pops().size(); ++p) {
         const Pop& pop = this->_mpopi->pops()[p];
@@ -2541,7 +2540,7 @@ VcfExport::write_site(const CSLocus* cloc,
     VcfRecord rec;
     string id = to_string(cloc->id);
     id += ":";
-    id += to_string(col + 1);
+    id += to_string(col);
     if (loci_ordered) {
         rec.append_chrom(string(cloc->loc.chr()));
         rec.append_pos(cloc->sort_bp(col));
@@ -2658,14 +2657,22 @@ int VcfHapsExport::write_batch(const vector<LocBin*>& loci){
                 rec.append_allele(DNASeq4(sorted_haps[i].first).rev_compl().str());
             }
         }
+
         rec.append_qual();
         rec.append_filters("PASS");
+
         stringstream info;
-        info << "snp_columns=";
+	info << "snp_columns=";
+	
         vector<size_t> cols;
-        for (const SNP* snp : cloc->snps)
-            cols.push_back(snp->col + 1);
-        join(cols, ',', info);
+	for (const SNP* snp : cloc->snps)
+            cols.push_back(snp->col);
+
+	if (loci_ordered && cloc->loc.strand == strand_minus)
+	    reverse(cols.begin(), cols.end());
+
+	join(cols, ',', info);
+	
         rec.append_info(info.str());
         rec.append_format("GT");
 
@@ -3058,7 +3065,7 @@ GtfExport::write_header()
     //
     time_t     rawtime;
     struct tm *timeinfo;
-    char       date[32], date2[32];
+    char       date[32];
     time(&rawtime);
     timeinfo = localtime(&rawtime);
     strftime(date, 32, "%B %d, %Y", timeinfo);


=====================================
src/file_io.cc
=====================================
@@ -1,6 +1,6 @@
 // -*-mode:c++; c-style:k&r; c-basic-offset:4;-*-
 //
-// Copyright 2012-2014, Julian Catchen <jcatchen at uoregon.edu>
+// Copyright 2012-2021, Julian Catchen <jcatchen at illinois.edu>
 //
 // This file is part of Stacks.
 //
@@ -35,7 +35,8 @@ open_files(vector<pair<string, string> > &files,
            map<BarcodePair, ofstream *> &pair_2_fhs,
            map<BarcodePair, ofstream *> &rem_1_fhs,
            map<BarcodePair, ofstream *> &rem_2_fhs,
-           map<string, map<string, long> > &counters) {
+           map<string, map<string, long> > &counters)
+{
     string path, suffix_1, suffix_2, filepath, file;
 
     if (paired) {
@@ -246,47 +247,59 @@ open_files(vector<pair<string, string> > &files,
     }
 
     string filename;
-
+    map<string, SampleFH> filehandles;
+    
     for (uint i = 0; i < barcodes.size(); i++) {
 
         filename = barcodes[i].name_exists() ? barcodes[i].name : "sample_" + barcodes[i].str();
 
-        path = out_path + filename + suffix_1;
-        fh = new ofstream(path.c_str(), ifstream::out);
-        pair_1_fhs[barcodes[i]] = fh;
-
-        if (pair_1_fhs[barcodes[i]]->fail()) {
-            cerr << "Error opening output file '" << path << "'\n";
-            exit(1);
-        }
-
+	//
+	// If this is the first time we have seen this sample name, create the file handles and record them.
+	//
+	if (filehandles.count(filename) == 0) {
+	    path = out_path + filename + suffix_1;
+	    fh   = new ofstream(path.c_str(), ifstream::out);
+	    if (fh->fail()) {
+		cerr << "Error opening single-end output file '" << path << "'\n";
+		exit(1);
+	    }
+	    filehandles[filename].se_fh = fh;
+
+	    if (paired) {
+		path = out_path + filename + suffix_2;
+		fh   = new ofstream(path.c_str(), ifstream::out);
+		if (fh->fail()) {
+		    cerr << "Error opening paired-end output file '" << path << "'\n";
+		    exit(1);
+		}
+		filehandles[filename].pe_fh = fh;
+
+		path = out_path + filename + ".rem" + suffix_1;
+		fh   = new ofstream(path.c_str(), ifstream::out);
+		if (fh->fail()) {
+		    cerr << "Error opening single-end remainder output file '" << path << "'\n";
+		    exit(1);
+		}
+		filehandles[filename].se_rem_fh = fh;
+
+		path = out_path + filename + ".rem" + suffix_2;
+		fh   = new ofstream(path.c_str(), ifstream::out);
+		if (fh->fail()) {
+		    cerr << "Error opening paired-end remainder output file '" << path << "'\n";
+		    exit(1);
+		}
+		filehandles[filename].pe_rem_fh = fh;
+	    }
+	}
+
+	//
+	// Assign the file handles, if we have seen this file already, assign a pre-existing file handle.
+	//
+        pair_1_fhs[barcodes[i]] = (ofstream *) filehandles[filename].se_fh;
         if (paired) {
-            path = out_path + filename + suffix_2;
-            fh = new ofstream(path.c_str(), ifstream::out);
-            pair_2_fhs[barcodes[i]] = fh;
-
-            if (pair_2_fhs[barcodes[i]]->fail()) {
-                cerr << "Error opening output file '" << path << "'\n";
-                exit(1);
-            }
-
-            path = out_path + filename + ".rem" + suffix_1;
-            fh = new ofstream(path.c_str(), ifstream::out);
-            rem_1_fhs[barcodes[i]] = fh;
-
-            if (rem_1_fhs[barcodes[i]]->fail()) {
-                cerr << "Error opening remainder output file '" << path << "'\n";
-                exit(1);
-            }
-
-            path = out_path + filename + ".rem" + suffix_2;
-            fh = new ofstream(path.c_str(), ifstream::out);
-            rem_2_fhs[barcodes[i]] = fh;
-
-            if (rem_2_fhs[barcodes[i]]->fail()) {
-                cerr << "Error opening remainder output file '" << path << "'\n";
-                exit(1);
-            }
+            pair_2_fhs[barcodes[i]] = (ofstream *) filehandles[filename].pe_fh;
+            rem_1_fhs[barcodes[i]]  = (ofstream *) filehandles[filename].se_rem_fh;
+            rem_2_fhs[barcodes[i]]  = (ofstream *) filehandles[filename].pe_rem_fh;
         }
     }
 
@@ -300,7 +313,8 @@ open_files(vector<pair<string, string> > &files,
            map<BarcodePair, gzFile *> &pair_2_fhs,
            map<BarcodePair, gzFile *> &rem_1_fhs,
            map<BarcodePair, gzFile *> &rem_2_fhs,
-           map<string, map<string, long> > &counters) {
+           map<string, map<string, long> > &counters)
+{
     string path, suffix_1, suffix_2, filepath, file;
 
     if (paired) {
@@ -518,51 +532,63 @@ open_files(vector<pair<string, string> > &files,
     }
 
     string filename;
+    map<string, SampleFH> filehandles;
 
     for (uint i = 0; i < barcodes.size(); i++) {
 
         filename = barcodes[i].name_exists() ? barcodes[i].name : "sample_" + barcodes[i].str();
 
-        path = out_path + filename + suffix_1;
-        fh   = new gzFile;
-        *fh  = gzopen(path.c_str(), "wb");
-        pair_1_fhs[barcodes[i]] = fh;
-
-        if (!(*pair_1_fhs[barcodes[i]])) {
-            cerr << "Error opening output file '" << path << "'\n";
-            exit(1);
-        }
-
+	//
+	// If this is the first time we have seen this sample name, create the file handles and record them.
+	//
+	if (filehandles.count(filename) == 0) {
+	    path = out_path + filename + suffix_1;
+	    fh   = new gzFile;
+	    *fh  = gzopen(path.c_str(), "wb");
+	    if (!(*fh)) {
+		cerr << "Error opening output file '" << path << "'\n";
+		exit(1);
+	    }
+	    filehandles[filename].se_fh = fh;
+
+	    if (paired) {
+		path = out_path + filename + suffix_2;
+		fh   = new gzFile;
+		*fh  = gzopen(path.c_str(), "wb");
+		if (!(*fh)) {
+		    cerr << "Error opening output file '" << path << "'\n";
+		    exit(1);
+		}
+		filehandles[filename].pe_fh = fh;
+
+		path = out_path + filename + ".rem" + suffix_1;
+		fh   = new gzFile;
+		*fh  = gzopen(path.c_str(), "wb");
+		if (!(*fh)) {
+		    cerr << "Error opening remainder output file '" << path << "'\n";
+		    exit(1);
+		}
+		filehandles[filename].se_rem_fh = fh;
+
+		path = out_path + filename + ".rem" + suffix_2;
+		fh   = new gzFile;
+		*fh  = gzopen(path.c_str(), "wb");
+		if (!(*fh)) {
+		    cerr << "Error opening remainder output file '" << path << "'\n";
+		    exit(1);
+		}
+		filehandles[filename].pe_rem_fh = fh;
+	    }
+	}
+
+	//
+	// Assign the file handles, file handles may be pre-existing if we have seen this output file name already.
+	//
+        pair_1_fhs[barcodes[i]] = (gzFile *) filehandles[filename].se_fh;
         if (paired) {
-            path = out_path + filename + suffix_2;
-            fh   = new gzFile;
-            *fh  = gzopen(path.c_str(), "wb");
-            pair_2_fhs[barcodes[i]] = fh;
-
-            if (!(*pair_2_fhs[barcodes[i]])) {
-                cerr << "Error opening output file '" << path << "'\n";
-                exit(1);
-            }
-
-            path = out_path + filename + ".rem" + suffix_1;
-            fh   = new gzFile;
-            *fh  = gzopen(path.c_str(), "wb");
-            rem_1_fhs[barcodes[i]] = fh;
-
-            if (!(*rem_1_fhs[barcodes[i]])) {
-                cerr << "Error opening remainder output file '" << path << "'\n";
-                exit(1);
-            }
-
-            path = out_path + filename + ".rem" + suffix_2;
-            fh   = new gzFile;
-            *fh  = gzopen(path.c_str(), "wb");
-            rem_2_fhs[barcodes[i]] = fh;
-
-            if (!(*rem_2_fhs[barcodes[i]])) {
-                cerr << "Error opening remainder output file '" << path << "'\n";
-                exit(1);
-            }
+	    pair_2_fhs[barcodes[i]] = (gzFile *) filehandles[filename].pe_fh;
+	    rem_1_fhs[barcodes[i]]  = (gzFile *) filehandles[filename].se_rem_fh;
+	    rem_2_fhs[barcodes[i]]  = (gzFile *) filehandles[filename].pe_rem_fh;
         }
     }
 
@@ -573,15 +599,14 @@ int
 close_file_handles(map<BarcodePair, ofstream *> &fhs)
 {
     map<BarcodePair, ofstream*>::iterator i;
-    set<ofstream*> ptrs;
-    set<ofstream*>::iterator j;
+    set<ofstream *> ptrs;
+    set<ofstream *>::iterator j;
 
-    for (i = fhs.begin(); i != fhs.end(); i++) {
-        i->second->close();
+    for (i = fhs.begin(); i != fhs.end(); i++)
         ptrs.insert(i->second);
-    }
 
     for (j = ptrs.begin(); j != ptrs.end(); j++) {
+	(*j)->close();
         delete *j;
     }
 
@@ -595,12 +620,11 @@ close_file_handles(map<BarcodePair, gzFile *> &fhs)
     set<gzFile *> ptrs;
     set<gzFile *>::iterator j;
 
-    for (i = fhs.begin(); i != fhs.end(); i++) {
-        gzclose(*(i->second));
+    for (i = fhs.begin(); i != fhs.end(); i++)
         ptrs.insert(i->second);
-    }
 
     for (j = ptrs.begin(); j != ptrs.end(); j++) {
+	gzclose(*(*j));
         delete *j;
     }
 
@@ -854,7 +878,8 @@ load_barcodes(string barcode_file, vector<BarcodePair> &barcodes,
         }
     } else {
         if (barcode_type != inline_null &&
-            barcode_type != index_null) {
+            barcode_type != index_null  &&
+	    barcode_type != null_index) {
             cerr << "You provided single-end barcodes but did not specify a single-end barcode type.\n";
             help();
         }


=====================================
src/file_io.h
=====================================
@@ -57,6 +57,19 @@ extern string    in_file_p2;
 extern string    in_path_1;
 extern string    in_path_2;
 
+//
+// Class for storing a set of file handles for one sample.
+//
+class SampleFH {
+public:
+    SampleFH(): se_fh(NULL), pe_fh(NULL), se_rem_fh(NULL), pe_rem_fh(NULL) {}
+    // Either ofstream or gzFile pointers can be stored here.
+    void *se_fh; // Single-end filehandle 
+    void *pe_fh; // Paired-end filehandle 
+    void *se_rem_fh; // Single-end remainder filehandle
+    void *pe_rem_fh; // Paired-end remainder filehandle
+};
+
 //
 // Defined externally in process_radtags and process_shortreads.
 //


=====================================
src/ordered.h
=====================================
@@ -1,6 +1,6 @@
 // -*-mode:c++; c-style:k&r; c-basic-offset:4;-*-
 //
-// Copyright 2014-2017, Julian Catchen <jcatchen at illinois.edu>
+// Copyright 2014-2021, Julian Catchen <jcatchen at illinois.edu>
 //
 // This file is part of Stacks.
 //


=====================================
src/populations.cc
=====================================
@@ -3635,7 +3635,7 @@ parse_command_line(int argc, char* argv[])
             {"hzar",           no_argument,       NULL, 'Z'},
             {"treemix",        no_argument,       NULL, 'U'},
             {"gtf",            no_argument,       NULL, 1018},
-            {"merge-sites",    no_argument,       NULL, 'D'},
+            // {"merge-sites",    no_argument,       NULL, 'D'},
             {"sigma",          required_argument, NULL, 1005},
             {"threads",        required_argument, NULL, 't'},
             {"in-path",        required_argument, NULL, 'P'},
@@ -3674,7 +3674,7 @@ parse_command_line(int argc, char* argv[])
             {"min-maf",           required_argument, NULL, 'a'},
             {"min-mac",           required_argument, NULL, 1016},
             {"max-obs-het",       required_argument, NULL, 1013},
-            {"merge-prune-lim",   required_argument, NULL, 'i'},
+            // {"merge-prune-lim",   required_argument, NULL, 'i'},
             {"fst-correction",    no_argument,       NULL, 'f'},
             {"p-value-cutoff",    required_argument, NULL, 'u'},
             {"map-type",          required_argument, NULL, 3000},
@@ -3735,19 +3735,19 @@ parse_command_line(int argc, char* argv[])
         case 1017: //no-popmap
             pmap_path.clear();
             break;
-        case 'D':
-            merge_sites = true;
-            break;
-        case 'i':
-            merge_prune_lim = is_double(optarg);
-            if (merge_prune_lim > 1.0)
-                merge_prune_lim = merge_prune_lim / 100;
-
-            if (merge_prune_lim < 0 || merge_prune_lim > 1.0) {
-                cerr << "Error: Unable to parse the merge sites pruning limit.\n";
-                help();
-            }
-            break;
+        // case 'D':
+        //     merge_sites = true;
+        //     break;
+        // case 'i':
+        //     merge_prune_lim = is_double(optarg);
+        //     if (merge_prune_lim > 1.0)
+        //         merge_prune_lim = merge_prune_lim / 100;
+
+        //     if (merge_prune_lim < 0 || merge_prune_lim > 1.0) {
+        //         cerr << "Error: Unable to parse the merge sites pruning limit.\n";
+        //         help();
+        //     }
+        //     break;
         case 1013:
             max_obs_het = is_double(optarg);
             if (max_obs_het > 1)
@@ -4159,11 +4159,11 @@ void help() {
          << "  -B,--blacklist: path to a file containing Blacklisted markers to be excluded from the export.\n"
          << "  -W,--whitelist: path to a file containing Whitelisted markers to include in the export.\n"
          << "\n"
-         << "Merging and Phasing:\n"
-         << "  -e,--renz: restriction enzyme name.\n"
-         << "  --merge-sites: merge loci that were produced from the same restriction enzyme cutsite (requires reference-aligned data).\n"
-         << "  --merge-prune-lim: when merging adjacent loci, if at least X% samples posses both loci prune the remaining samples out of the analysis.\n"
-         << "\n"
+         // << "Merging and Phasing:\n"
+         // << "  -e,--renz: restriction enzyme name.\n"
+         // << "  --merge-sites: merge loci that were produced from the same restriction enzyme cutsite (requires reference-aligned data).\n"
+         // << "  --merge-prune-lim: when merging adjacent loci, if at least X% samples posses both loci prune the remaining samples out of the analysis.\n"
+         // << "\n"
          << "Locus stats:\n"
          << "  --hwe: calculate divergence from Hardy-Weinberg equilibrium for each locus.\n"
          << "\n"


=====================================
src/process_radtags.cc
=====================================
@@ -1,6 +1,6 @@
 // -*-mode:c++; c-style:k&r; c-basic-offset:4;-*-
 //
-// Copyright 2011-2018, Julian Catchen <jcatchen at illinois.edu>
+// Copyright 2011-2021, Julian Catchen <jcatchen at illinois.edu>
 //
 // This file is part of Stacks.
 //
@@ -348,12 +348,22 @@ process_paired_reads(string prefix_1,
                 transpose_reads(&r_1, &r_2);
         }
 
-        if (barcode_type != null_null &&
-            barcode_type != inline_null &&
-            barcode_type != index_null)
-            bc.set(r_1->se_bc, r_2->pe_bc);
-        else if (barcode_type != null_null)
-            bc.set(r_1->se_bc);
+	switch (barcode_type) {
+	case inline_null:
+        case index_null:
+        case null_index:
+	    bc.set(r_1->se_bc);
+	    break;
+        case index_inline:
+	case inline_index:
+	case inline_inline:
+	case index_index:
+	    bc.set(r_1->se_bc, r_2->pe_bc);
+            break;
+	case null_null:
+        default:
+            break;
+	}
 
         process_barcode(r_1, r_2, bc, pair_1_fhs, se_bc, pe_bc, barcode_log, counter);
 
@@ -1409,8 +1419,8 @@ void help() {
          << "  f: path to the input file if processing single-end sequences.\n"
          << "  1: first input file in a set of paired-end sequences.\n"
          << "  2: second input file in a set of paired-end sequences.\n"
-         << "  c,--clean: clean data, remove any read with an uncalled base.\n"
-         << "  q,--quality: discard reads with low quality scores.\n"
+         << "  c,--clean: clean data, remove any read with an uncalled base ('N').\n"
+         << "  q,--quality: discard reads with low quality (phred) scores.\n"
          << "  r,--rescue: rescue barcodes and RAD-Tags.\n"
          << "  t: truncate final read length to this value.\n"
          << "  D: capture discarded reads to a file.\n"
@@ -1463,7 +1473,7 @@ void help() {
          << "    --merge: if no barcodes are specified, merge all input files into a single output file.\n\n"
          << "  Advanced options:\n"
          << "    --filter-illumina: discard reads that have been marked by Illumina's chastity/purity filter as failing.\n"
-         << "    --disable-rad-check: disable checking if the RAD site is intact.\n"
+         << "    --disable-rad-check: disable checking if the RAD cut site is intact.\n"
          << "    --len-limit <limit>: specify a minimum sequence length (useful if your data has already been trimmed).\n"
          << "    --barcode-dist-1: the number of allowed mismatches when rescuing single-end barcodes (default 1).\n"
          << "    --barcode-dist-2: the number of allowed mismatches when rescuing paired-end barcodes (defaults to --barcode-dist-1).\n";


=====================================
src/smoothing.h
=====================================
@@ -1,6 +1,6 @@
 // -*-mode:c++; c-style:k&r; c-basic-offset:4;-*-
 //
-// Copyright 2014-2018, Julian Catchen <jcatchen at illinois.edu>
+// Copyright 2014-2021, Julian Catchen <jcatchen at illinois.edu>
 //
 // This file is part of Stacks.
 //
@@ -121,14 +121,17 @@ KSmooth<StatT>::smooth(vector<const StatT *> &popstats)
                         sum[i]         += final_weight;
                     }
                 }
-                // if (c->loc_id == 9314) {
-                //     cerr << "    id: " << p->loc_id
+		
+                // if (c->loc_id == 408996) {
+                //     cerr << "  c->id: " << c->loc_id
+		// 	 << "; p->id: " << p->loc_id
                 //          << "; dist: " << dist
                 //          << "; weight: " << weights[dist]
                 //          << "; final_weight: " << final_weight
-                //          << "; fst': " << p->stat[3]
-                //          << "; sum: " << sum
-                //          << "; smoothed: " << c->smoothed[3] << "\n";
+		// 	//<< "; fst': " << p->stat[3]
+		// 	 << "; pi: " << p->stat[0]
+                //          << "; sum: " << sum[0]
+                //          << "; smoothed: " << c->smoothed[0] << "\n";
                 // }
             }
 



View it on GitLab: https://salsa.debian.org/med-team/stacks/-/compare/a35f457e805e0921db2d8934c936833b9c85570c...45ba2bd2e6aecab03b507669aa1d377c44f753aa

-- 
View it on GitLab: https://salsa.debian.org/med-team/stacks/-/compare/a35f457e805e0921db2d8934c936833b9c85570c...45ba2bd2e6aecab03b507669aa1d377c44f753aa
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20210515/1b5eb999/attachment-0001.htm>


More information about the debian-med-commit mailing list