Skip to content

Commit

Permalink
Update copyrights.
Browse files Browse the repository at this point in the history
  • Loading branch information
brianwalenz committed Apr 17, 2017
1 parent 0b7f18e commit 5ad2434
Show file tree
Hide file tree
Showing 24 changed files with 93 additions and 33 deletions.
8 changes: 4 additions & 4 deletions src/AS_UTL/AS_UTL_stackTrace.C
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ AS_UTL_catchCrash(int sig_num, siginfo_t *UNUSED(info), void *UNUSED(ctx)) {
WRITE_STRING("'; backtrace (libbacktrace):\n");
backtrace_full(backtraceState, 0, AS_UTL_catchCrash_full, NULL, NULL);

//WRITE_STRING("\nBacktrace (libbacktrace print):\n\n");
//backtrace_print(backtraceState, 0, stderr);
//WRITE_STRING("\nBacktrace (libbacktrace print):\n\n");
//backtrace_print(backtraceState, 0, stderr);

// Pass the signal through, only so a core file can get generated.
// Pass the signal through, only so a core file can get generated.

struct sigaction sa;

Expand Down Expand Up @@ -186,7 +186,7 @@ AS_UTL_catchCrash(int sig_num, siginfo_t *UNUSED(info), void *UNUSED(ctx)) {

void
AS_UTL_catchCrash(int sig_num, siginfo_t *UNUSED(info), void *UNUSED(ctx)) {

// Report the signal we failed on, be careful to not allocate memory.

WRITE_STRING("\nFailed with '");
Expand Down
2 changes: 1 addition & 1 deletion src/bogart/AS_BAT_CreateUnitigs.C
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ createUnitigs(AssemblyGraph *AG,
unitigSource[id].uID = id;
}
}

// Reset for the next iteration.

ss = ee;
Expand Down
6 changes: 5 additions & 1 deletion src/bogart/AS_BAT_MergeOrphans.H
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@
* Canu branched from Celera Assembler at its revision 4587.
* Canu branched from the kmer project at its revision 1994.
*
* This file is derived from:
*
* src/bogart/AS_BAT_PopBubbles.H
*
* Modifications by:
*
* Brian P. Walenz beginning on 2016-MAR-11
* Brian P. Walenz beginning on 2016-DEC-07
* are a 'United States Government Work', and
* are released in the public domain
*
Expand Down
10 changes: 7 additions & 3 deletions src/falcon_sense/falcon_sense.C
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
* are a 'United States Government Work', and
* are released in the public domain
*
* Brian P. Walenz beginning on 2016-NOV-28
* are a 'United States Government Work', and
* are released in the public domain
*
* File 'README.licenses' in the root directory of this distribution contains
* full conditions and disclaimers for each license.
*/
Expand Down Expand Up @@ -107,7 +111,7 @@ main (int argc, char **argv) {
if (W[0][0] == '+') {
uint32 splitSeqID = 0;
FConsensus::consensus_data *consensus_data_ptr = FConsensus::generate_consensus( seqs, min_cov, K, min_idy, min_ovl_len, max_read_len );

#ifdef TRACK_POSITIONS
//const std::string& sequenceToCorrect = seqs.at(0);
char * originalStringPointer = consensus_data_ptr->sequence;
Expand All @@ -122,9 +126,9 @@ main (int argc, char **argv) {
#ifdef TRACK_POSITIONS
int distance_from_beginning = split - originalStringPointer;
std::vector<int> relevantOriginalPositions(consensus_data_ptr->originalPos.begin() + distance_from_beginning, consensus_data_ptr->originalPos.begin() + distance_from_beginning + strlen(split));
int firstRelevantPosition = relevantOriginalPositions.front();
int firstRelevantPosition = relevantOriginalPositions.front();
int lastRelevantPosition = relevantOriginalPositions.back();

std::string relevantOriginalTemplate = seqs.at(0).substr(firstRelevantPosition, lastRelevantPosition - firstRelevantPosition + 1);

// store relevantOriginalTemplate along with corrected read - not implemented
Expand Down
6 changes: 3 additions & 3 deletions src/gfa/alignGFA.C
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

/******************************************************************************
*
* This file is part of canu, a software program that assembles whole-genome
Expand All @@ -15,7 +15,7 @@
*
* Modifications by:
*
* Brian P. Walenz beginning on 2017-MAR-23
* Brian P. Walenz beginning on 2017-APR-04
* are a 'United States Government Work', and
* are released in the public domain
*
Expand Down Expand Up @@ -235,7 +235,7 @@ checkLink(gfaLink *link,

edlibFreeAlignResult(result);

success = true;
success = true;
} else {
if (beVerbose)
fprintf(stderr, " - FAILED\n");
Expand Down
6 changes: 3 additions & 3 deletions src/gfa/gfa.C
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
* Modifications by:
*
* Brian P. Walenz beginning on 2017-APR-03
* Brian P. Walenz beginning on 2017-APR-04
* are a 'United States Government Work', and
* are released in the public domain
*
Expand Down Expand Up @@ -149,7 +149,7 @@ gfaLink::~gfaLink() {
delete [] _features;
}


void
gfaLink::load(char *inLine) {
splitToWords W(inLine);
Expand Down Expand Up @@ -214,7 +214,7 @@ gfaLink::alignmentLength(int32 &queryLen, int32 &refceLen, int32 &alignLen) {
alignLen += val;
break;
case 'D': // Deletion from the reference - gap in reference
refceLen += val;
refceLen += val;
alignLen += val;
break;
case 'N': // Skipped in the reference (e.g., intron)
Expand Down
4 changes: 2 additions & 2 deletions src/gfa/gfa.H
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
* Modifications by:
*
* Brian P. Walenz beginning on 2017-APR-03
* Brian P. Walenz beginning on 2017-APR-04
* are a 'United States Government Work', and
* are released in the public domain
*
Expand Down Expand Up @@ -59,7 +59,7 @@ public:
gfaLink();
gfaLink(char *inLine);
~gfaLink();

void load(char *inLine);
void save(FILE *outFile);

Expand Down
4 changes: 4 additions & 0 deletions src/meryl/compare-counts.C
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
* are Copyright 2014 Battelle National Biodefense Institute, and
* are subject to the BSD 3-Clause License
*
* Brian P. Walenz beginning on 2016-NOV-22
* are a 'United States Government Work', and
* are released in the public domain
*
* File 'README.licenses' in the root directory of this distribution contains
* full conditions and disclaimers for each license.
*/
Expand Down
4 changes: 4 additions & 0 deletions src/meryl/maskMers.C
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
* are Copyright 2014 Battelle National Biodefense Institute, and
* are subject to the BSD 3-Clause License
*
* Brian P. Walenz beginning on 2016-NOV-22
* are a 'United States Government Work', and
* are released in the public domain
*
* File 'README.licenses' in the root directory of this distribution contains
* full conditions and disclaimers for each license.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
* are Copyright 2015 Battelle National Biodefense Institute, and
* are subject to the BSD 3-Clause License
*
* Brian P. Walenz beginning on 2017-FEB-02
* are a 'United States Government Work', and
* are released in the public domain
*
* File 'README.licenses' in the root directory of this distribution contains
* full conditions and disclaimers for each license.
*/
Expand Down
4 changes: 4 additions & 0 deletions src/overlapInCore/liboverlap/prefixEditDistance-forward.C
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
* are Copyright 2015 Battelle National Biodefense Institute, and
* are subject to the BSD 3-Clause License
*
* Brian P. Walenz beginning on 2017-FEB-02
* are a 'United States Government Work', and
* are released in the public domain
*
* File 'README.licenses' in the root directory of this distribution contains
* full conditions and disclaimers for each license.
*/
Expand Down
4 changes: 4 additions & 0 deletions src/overlapInCore/liboverlap/prefixEditDistance-reverse.C
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
* are Copyright 2015 Battelle National Biodefense Institute, and
* are subject to the BSD 3-Clause License
*
* Brian P. Walenz beginning on 2017-FEB-02
* are a 'United States Government Work', and
* are released in the public domain
*
* File 'README.licenses' in the root directory of this distribution contains
* full conditions and disclaimers for each license.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/overlapInCore/overlapPair.C
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ recomputeOverlaps(void *ptr) {
}
localStats.nExt3b++;
}

// Now reset the overlap.

ovl->dat.ovl.ahg5 = ahg5;
Expand Down
2 changes: 1 addition & 1 deletion src/pipelines/canu-object-store.pl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#
# Modifications by:
#
# Brian P. Walenz beginning on 2015-MAR-14
# Brian P. Walenz beginning on 2017-MAR-14
# are a 'United States Government Work', and
# are released in the public domain
#
Expand Down
2 changes: 1 addition & 1 deletion src/pipelines/canu/Configure.pm
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ sub getAllowedResources ($$$$@) {
my $job = substr(" $concurrent", -3) . " job" . (($concurrent == 1) ? " " : "s");
my $thr = substr(" $taskThreads", -3) . " CPU" . (($taskThreads == 1) ? " " : "s");
my $mem = substr(" $taskMemory", -4) . " GB";

$all .= "-- Run $job concurrently using $mem and $thr for stage '$nam'.\n" if ( defined($concurrent));
$all .= "-- Run under grid control using $mem and $thr for stage '$nam'.\n" if (!defined($concurrent));

Expand Down
4 changes: 4 additions & 0 deletions src/pipelines/canu/ErrorEstimate.pm
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
# are a 'United States Government Work', and
# are released in the public domain
#
# Brian P. Walenz beginning on 2016-DEC-12
# are a 'United States Government Work', and
# are released in the public domain
#
# File 'README.licenses' in the root directory of this distribution contains
# full conditions and disclaimers for each license.
##
Expand Down
2 changes: 1 addition & 1 deletion src/pipelines/canu/Grid_Cloud.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#
# Modifications by:
#
# Brian P. Walenz beginning on 2017-JAN-17
# Brian P. Walenz beginning on 2017-FEB-15
# are a 'United States Government Work', and
# are released in the public domain
#
Expand Down
4 changes: 2 additions & 2 deletions src/pipelines/canu/Grid_DNANexus.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#
# Modifications by:
#
# Brian P. Walenz beginning on 2015-FEB-11
# Brian P. Walenz beginning on 2017-FEB-11
# are a 'United States Government Work', and
# are released in the public domain
#
Expand Down Expand Up @@ -78,7 +78,7 @@ sub configureDNANexus () {

my %hosts;

# Probe for how to request multiple CPUs on each node, set
# Probe for how to request multiple CPUs on each node, set

# .
# .
Expand Down
2 changes: 1 addition & 1 deletion src/pipelines/canu/Meryl.pm
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ sub merylProcess ($$) {
fetchFile("$path/$ofile.mcdat");
fetchFile("$path/$ofile.mcidx");

if ((! -e "$path/$ofile.mcdat") ||
if ((! -e "$path/$ofile.mcdat") ||
(! -e "$path/$ofile.mcdat")) {
caFailure("meryl can't dump frequent mers, databases don't exist. Remove $path/meryl.success to try again.", undef);
}
Expand Down
4 changes: 4 additions & 0 deletions src/pipelines/canu/OverlapBasedTrimming.pm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
# are a 'United States Government Work', and
# are released in the public domain
#
# Sergey Koren beginning on 2017-MAR-03
# are a 'United States Government Work', and
# are released in the public domain
#
# File 'README.licenses' in the root directory of this distribution contains
# full conditions and disclaimers for each license.
##
Expand Down
2 changes: 1 addition & 1 deletion src/pipelines/canu/OverlapMMap.pm
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ sub mmapConfigure ($$$) {
print F " exit\n";
print F "fi\n";
print F "\n";

print F fetchFileShellCode("$path", "queries.tar", "");
print F "\n";
print F "if [ -e ./queries.tar -a ! -d ./queries ] ; then\n";
Expand Down
6 changes: 3 additions & 3 deletions src/pipelines/canu/Report.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#
# Modifications by:
#
# Brian P. Walenz beginning on 2015-NOV-08
# Brian P. Walenz beginning on 2017-MAR-20
# are a 'United States Government Work', and
# are released in the public domain
#
Expand Down Expand Up @@ -118,7 +118,7 @@ sub saveReport ($) {
my $tag;

open(F, "> $asm.report") or caExit("can't open '$asm.report' for writing: $!", undef);

saveReportItem("CORRECTION/READS", $report{"corGkpStore"});
saveReportItem("CORRECTION/MERS", $report{"corMeryl"});
saveReportItem("CORRECTION/FILTERING", $report{"correctionFiltering"});
Expand Down Expand Up @@ -168,5 +168,5 @@ sub getFromReport ($) {
return($report{$_[0]});
}


1;
26 changes: 25 additions & 1 deletion src/pipelines/simple-repeat-test.pl
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
#!/usr/bin/env perl

###############################################################################
#
# This file is part of canu, a software program that assembles whole-genome
# sequencing reads into contigs.
#
# This software is based on:
# 'Celera Assembler' (http://wgs-assembler.sourceforge.net)
# the 'kmer package' (http://kmer.sourceforge.net)
# both originally distributed by Applera Corporation under the GNU General
# Public License, version 2.
#
# Canu branched from Celera Assembler at its revision 4587.
# Canu branched from the kmer project at its revision 1994.
#
# Modifications by:
#
# Brian P. Walenz beginning on 2017-JAN-09
# are a 'United States Government Work', and
# are released in the public domain
#
# File 'README.licenses' in the root directory of this distribution contains
# full conditions and disclaimers for each license.
##

use strict;

# Generate a circular 'genome' with nUnique pieces and nUnique+1 repeats, the pair at the start/end
Expand Down Expand Up @@ -42,7 +66,7 @@ ($)
print STDERR "REPEAT $len ", $len + $Rlen, "\n";
print O "$R\n";
$len += $Rlen;

my $U = randomSequence($uniqueSize);
my $Ulen = length($U);

Expand Down
8 changes: 4 additions & 4 deletions src/utgcns/libcns/unitigConsensus.C
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,9 @@ unitigConsensus::generatePBDAG(char aligner,

while ((aligned == false) && (bandTolerance < errorRate * (aLen + bLen))) {
bandTolerance *= 2;
if (aligner == 'E')
if (aligner == 'E')
edlibFreeAlignResult(align);

fprintf(stderr, "generatePBDAG()-- retry with bandTolerance = %d\n",
bandTolerance);

Expand Down Expand Up @@ -459,7 +459,7 @@ unitigConsensus::generatePBDAG(char aligner,
aln.end = aln.start + (ndaln._tgt_end - ndaln._tgt_bgn) - 1;
aln.qstr = std::string(ndaln._qry_aln_str);
aln.tstr = std::string(ndaln._tgt_aln_str);
}
}
aln.start++;
cnspos[i].setMinMax(aln.start, aln.end);
assert(aln.qstr.length() == aln.tstr.length());
Expand Down Expand Up @@ -509,7 +509,7 @@ unitigConsensus::generatePBDAG(char aligner,
memcpy(tig->getChild(0), cnspos, sizeof(tgPosition) * numfrags);

// trim consensus if needed
if (maxPos < cns.size())
if (maxPos < cns.size())
cns = cns.substr(0, maxPos);
assert(minPos == 0);
assert(maxPos == cns.size());
Expand Down

0 comments on commit 5ad2434

Please sign in to comment.