Skip to content
Commits on Source (9)
......@@ -15,5 +15,5 @@ install:
- if [[ "$CXX" == "g++" ]]; then if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -qq g++-4.8; fi; fi
- if [[ "$CXX" == "g++" ]]; then if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50; fi; fi
script:
- if [[ "$CC" == "gcc" ]]; then if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make all; fi; fi
- if [[ "$CC" == "clang" ]]; then if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then make all; fi; fi
\ No newline at end of file
- if [[ "$CC" == "gcc" ]]; then if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make all; make install_all; fi; fi
- if [[ "$CC" == "clang" ]]; then if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then make all; make install_all; fi; fi
......@@ -22,7 +22,7 @@ WRAPPERS = $(wildcard ${APPDIR}/conversion/src/wrappers/*)
CWD := $(shell pwd)
BINDIR = bin
BINDIR_MODULE = modules
export DESTBINDIR = .
default:
ifeq ($(KERNEL), Darwin)
......@@ -45,7 +45,7 @@ all:
$(MAKE) megarow -f ${SELF}
$(MAKE) float128 -f ${SELF}
$(MAKE) install_all -f ${SELF}
$(MAKE) symlink_typical -f ${SELF}
$(MAKE) symlink_post_install_all -f ${SELF}
module_all:
$(MAKE) support -f ${SELF}
......@@ -64,6 +64,9 @@ megarow:
typical:
$(MAKE) BINARY_TYPE=$(TYPICAL) -f ${SELF}
symlink_post_install_all:
cd ${BINDIR} && ./switch-BEDOPS-binary-type --typical . && cd ${CWD}
symlink_typical:
$(eval SRCNAMES=`find $(BINDIR)/ -maxdepth 1 -mindepth 1 -type f -name '*$(TYPICAL)' -print0 | xargs -L1 -0 -I{} sh -c 'basename {}'`)
for SRCNAME in ${SRCNAMES}; do \
......@@ -242,7 +245,7 @@ install_starch_scripts_all: prep_c
install_conversion_scripts: prep_c
cp $(WRAPPERS) ${BINDIR}
.PHONY: $(WRAPPERS)
.PHONY: $(WRAPPERS) tests
install_conversion_scripts_all: $(WRAPPERS)
......@@ -396,6 +399,9 @@ else
find . -exec sed -i "s/"$$OLD_CPD"/"$$NEW_CPD"/g" {} \;
endif
#######################
# packaging
docker: packaging/docker/Dockerfile
docker build -t bedops -f packaging/docker/Dockerfile .
......@@ -404,3 +410,9 @@ rpm: packaging/rpm/Dockerfile
deb: packaging/deb/Dockerfile
docker build -t bedops:deb -f packaging/deb/Dockerfile .
#######################
# tests
tests:
$(MAKE) all -f tests/Makefile
## BEDOPS v2.4.35: high-performance genomic feature operations ##
## BEDOPS v2.4.36: high-performance genomic feature operations ##
[![Build Status](https://travis-ci.org/bedops/bedops.svg?branch=master)](https://travis-ci.org/bedops/bedops) [![GitHub stars](https://img.shields.io/github/stars/bedops/bedops.svg)](https://github.com/bedops/bedops/stargazers) [![Project license](https://img.shields.io/badge/license-GPLv2-blue.svg)](https://github.com/bedops/bedops/blob/master/LICENSE) [![Documentation Status](https://readthedocs.org/projects/bedops/badge/?version=latest)](https://readthedocs.org/projects/bedops/?badge=latest)
......@@ -6,9 +6,9 @@
### About ###
**BEDOPS v2.4.35** is a suite of tools to address common questions raised in genomic studies — mostly with regard to overlap and proximity relationships between data sets. It aims to be scalable and flexible, facilitating the efficient and accurate analysis and management of large-scale genomic data.
**BEDOPS v2.4.36** is a suite of tools to address common questions raised in genomic studies — mostly with regard to overlap and proximity relationships between data sets. It aims to be scalable and flexible, facilitating the efficient and accurate analysis and management of large-scale genomic data.
The <a href="https://bedops.readthedocs.io/en/latest/content/overview.html#overview">overview</a> section of the **BEDOPS v2.4.35** documentation summarizes the toolkit, functionality and performance enhancements. The <a href="https://bedops.readthedocs.io/en/latest/index.html#reference">reference</a> table offers documentation for all applications and scripts.
The <a href="https://bedops.readthedocs.io/en/latest/content/overview.html#overview">overview</a> section of the **BEDOPS v2.4.36** documentation summarizes the toolkit, functionality and performance enhancements. The <a href="https://bedops.readthedocs.io/en/latest/index.html#reference">reference</a> table offers documentation for all applications and scripts.
### Downloads ###
......@@ -28,20 +28,20 @@ The <a href="https://bedops.readthedocs.io/en/latest/content/overview.html#overv
<tr>
<td valign="top">
<ul style="list-style-type:square; font-size:smaller; margin-left:0; margin-right:0px; padding-right:0px; padding-left:20px;">
<li><a href="https://github.com/bedops/bedops/releases/download/v2.4.35/bedops_linux_x86_64-v2.4.35.tar.bz2">x86-64 (64-bit)</a> binaries</li>
<li><a href="https://github.com/bedops/bedops/releases/download/v2.4.36/bedops_linux_x86_64-v2.4.36.tar.bz2">x86-64 (64-bit)</a> binaries</li>
<li><a href="http://bedops.readthedocs.io/en/latest/content/installation.html#linux">Installation instructions</a> for Linux hosts</li>
</ul>
</td>
<td valign="top">
<ul style="list-style-type:square; font-size:smaller; margin-left:0; margin-right:0px; padding-right:0px; padding-left:20px;">
<li><a href="https://github.com/bedops/bedops/releases/download/v2.4.35/BEDOPS.2.4.35.pkg.zip">Intel (64-bit, 10.10-10.13)</a> installer package</li>
<li><a href="https://github.com/bedops/bedops/releases/download/v2.4.36/BEDOPS.2.4.36.pkg.zip">Intel (64-bit, 10.10-10.13)</a> installer package</li>
<li><a href="http://bedops.readthedocs.io/en/latest/content/installation.html#mac-os-x">Installation instructions</a> for Mac OS X hosts</li>
</ul>
</td>
<td valign="top">
<ul style="list-style-type:square; font-size:smaller; margin-left:0; margin-right:0px; padding-right:0px; padding-left:20px;">
<li><a href="https://github.com/bedops/bedops/archive/v2.4.35.tar.gz">Source code</a> (tar.gz)</li>
<li><a href="https://github.com/bedops/bedops/archive/v2.4.35.zip">Source code</a> (zip)</li>
<li><a href="https://github.com/bedops/bedops/archive/v2.4.36.tar.gz">Source code</a> (tar.gz)</li>
<li><a href="https://github.com/bedops/bedops/archive/v2.4.36.zip">Source code</a> (zip)</li>
<li><a href="http://bedops.readthedocs.io/en/latest/content/installation.html#installation-via-source-code">Compilation instructions</a></li>
</ul>
</td>
......@@ -50,11 +50,11 @@ The <a href="https://bedops.readthedocs.io/en/latest/content/overview.html#overv
### Documentation ###
Complete documentation for **BEDOPS v2.4.35** tools is available at: <a href="https://bedops.readthedocs.io/en/latest/index.html">https://bedops.readthedocs.io/</a>
Complete documentation for **BEDOPS v2.4.36** tools is available at: <a href="https://bedops.readthedocs.io/en/latest/index.html">https://bedops.readthedocs.io/</a>
### Citation ###
If you use **BEDOPS v2.4.35** in your research, please cite the following manuscript:
If you use **BEDOPS v2.4.36** in your research, please cite the following manuscript:
> Shane Neph, M. Scott Kuehn, Alex P. Reynolds, et al.
> [**BEDOPS: high-performance genomic feature operations**
......@@ -62,7 +62,7 @@ If you use **BEDOPS v2.4.35** in your research, please cite the following manusc
### Copyright ###
> Copyright (C) 2011-2018 Shane J. Neph, M. Scott Kuehn and Alex P. Reynolds
> Copyright (C) 2011-2019 Shane J. Neph, M. Scott Kuehn and Alex P. Reynolds
>
> Source code, documentation and media assets released under <a href="https://github.com/bedops/bedops/blob/master/LICENSE">GNU Public License Version 2</a> (GPL v2).
This diff is collapsed.
......@@ -79,7 +79,7 @@ namespace BedMap {
precision_(6), useScientific_(false), useMinMemory_(false), setPrec_(false), numFiles_(0),
minRefFields_(0), minMapFields_(0), errorCheck_(false), sweepAll_(false),
outDelim_("|"), multiDelim_(";"), fastMode_(false), rangeAlias_(false),
chrom_("all"), skipUnmappedRows_(false) {
chrom_("all"), skipUnmappedRows_(false), unmappedVal_("") {
// Process user's operation options
if ( argc <= 1 )
......@@ -108,6 +108,12 @@ namespace BedMap {
fastMode_ = true;
} else if ( next == "sweep-all" ) { // --> sweep through all of second file
sweepAll_ = true;
} else if ( next == "unmapped-val" ) {
Ext::Assert<ArgError>(unmappedVal_.empty(), "--unmapped-val specified multiple times");
Ext::Assert<ArgError>(argcntr < argc, "No value given for --unmapped-val");
unmappedVal_ = argv[argcntr++];
Ext::Assert<ArgError>(unmappedVal_.find("--") != 0,
"Apparent option: " + std::string(argv[argcntr]) + " where <val> expected for --unmapped-val.");
} else if ( next == "delim" ) {
Ext::Assert<ArgError>(outDelim_ == "|", "--delim specified multiple times");
Ext::Assert<ArgError>(argcntr < argc, "No output delimiter given");
......@@ -399,6 +405,7 @@ namespace BedMap {
bool rangeAlias_;
std::string chrom_;
bool skipUnmappedRows_;
std::string unmappedVal_;
private:
struct MapFields {
......@@ -480,6 +487,8 @@ namespace BedMap {
usage << " --sci Use scientific notation for score outputs. \n";
usage << " --skip-unmapped Print no output for a row with no mapped elements. \n";
usage << " --sweep-all Ensure <map-file> is read completely (helps to prevent broken pipes). \n";
usage << " --unmapped-val <val> Print <val> on unmapped --echo-map* and --min/max-element* operations. \n";
usage << " The default is to print nothing. \n";
usage << " --version Print program information. \n";
usage << " \n";
usage << " \n";
......
......@@ -196,7 +196,7 @@ class Test implements Comparable {
}
private int order_ = -1;
private String call_ = "../../bin/bedops --ec ";
private String call_ = "../../bin/bedops-typical --ec ";
private String inputFiles_ = "";
private String answer_ = "";
private String output_ = "";
......
......@@ -53,7 +53,7 @@
#include "suite/BEDOPS.Constants.hpp"
#define C2B_VERSION "2.4.35"
#define C2B_VERSION "2.4.36"
typedef int boolean;
extern const boolean kTrue;
......
......@@ -32,7 +32,7 @@ import logging
name = "update-sort-bed-migrate-candidates"
citation = " citation: http://bioinformatics.oxfordjournals.org/content/28/14/1919.abstract"
authors = " authors: Alex Reynolds and Shane Neph"
version = " version: 2.4.35"
version = " version: 2.4.36"
usage = """ $ update-sort-bed-migrate-candidates [ --dry-run ] [ --debug ]
[ --write-list |
--resort-immediately |
......
......@@ -33,7 +33,7 @@ import logging
name = "update-sort-bed-slurm"
citation = " citation: http://bioinformatics.oxfordjournals.org/content/28/14/1919.abstract"
authors = " authors: Alex Reynolds and Shane Neph"
version = " version: 2.4.35"
version = " version: 2.4.36"
usage = """ $ update-sort-bed-slurm [ --slurm-memory <MB> ]
[ --slurm-partition <SLURM partition> ]
[ --slurm-workdir <working directory> ]
......
......@@ -33,7 +33,7 @@ import logging
name = "update-sort-bed-starch-slurm"
citation = " citation: http://bioinformatics.oxfordjournals.org/content/28/14/1919.abstract"
authors = " authors: Alex Reynolds and Shane Neph"
version = " version: 2.4.35"
version = " version: 2.4.36"
usage = """ $ update-sort-bed-starch-slurm [ --slurm-memory <MB> ]
[ --slurm-partition <SLURM partition> ]
[ --slurm-workdir <working directory> ]
......
......@@ -49,9 +49,9 @@ STARCH_OBJECTS = $(addprefix $(LOCALOBJDIR)/, $(addsuffix .o, $(STARC
build: starch unstarch starchcat starchcluster starch-diff starchstrip
rm -rf ${LOCALOBJDIR}
build_debug: $(BINDIR)/debug.starch $(BINDIR)/debug.unstarch $(BINDIR)/debug.starchcat $(BINDIR)/debug.starchstrip
build_debug: $(BINDIR)/debug.starch $(BINDIR)/debug.unstarch $(BINDIR)/debug.starchcat $(BINDIR)/debug.starchstrip starchcluster starch-diff
rm -rf ${LOCALOBJDIR}
build_gprof: $(BINDIR)/gprof.starch $(BINDIR)/gprof.unstarch $(BINDIR)/gprof.starchcat $(BINDIR)/gprof.starchstrip
build_gprof: $(BINDIR)/gprof.starch $(BINDIR)/gprof.unstarch $(BINDIR)/gprof.starchcat $(BINDIR)/gprof.starchstrip starchcluster starch-diff
rm -rf ${LOCALOBJDIR}
# Cancel implicit compilation rules
......
......@@ -31,7 +31,7 @@ LIBRARIES = ${LOCALJANSSONLIB} ${LOCALBZIP2LIB} ${LOCALZLIBLIB}
BINDIR = ../bin
WARNINGS = -Weverything -Wno-c++98-compat-pedantic -Wno-padded
ARCH_VERSION = v2.2
BIN_VERSION = v2.4.35
BIN_VERSION = v2.4.36
TEST = ../test
TEST_OSX_BINDIR = ${TEST}/binaries/osx/${ARCH_VERSION}/bin
......
......@@ -32,7 +32,7 @@ import logging
name = "starch-diff"
citation = " citation: http://bioinformatics.oxfordjournals.org/content/28/14/1919.abstract"
authors = " authors: Alex Reynolds and Shane Neph"
version = " version: 2.4.35"
version = " version: 2.4.36"
usage = " $ starch-diff [ --chr <chr> ] starch-file-1 starch-file-2 [ starch-file-3 ... ]"
help = """
The 'starch-diff' utility compares the signatures of two or more specified
......
......@@ -46,18 +46,27 @@ main(int argc, char **argv)
#ifdef DEBUG
fprintf (stderr, "\n--- starch main() - enter ---\n");
#endif
int parseValue = 0;
CompressionType type;
#ifdef __cplusplus
char *note = nullptr;
char *tag = nullptr;
char *bedFn = nullptr;
FILE *bedFnPtr = nullptr;
Metadata *metadata = nullptr;
unsigned char *starchHeader = nullptr;
#else
char *note = NULL;
char *tag = NULL;
char *bedFn = NULL;
FILE *bedFnPtr = NULL;
Metadata *metadata = NULL;
unsigned char *starchHeader = NULL;
#endif
int parseValue = 0;
CompressionType type;
Boolean bedGeneratePerChrSignatureFlag = kStarchFalse;
Boolean bedReportProgressFlag = kStarchFalse;
LineCountType bedReportProgressN = 0;
Boolean bedHeaderFlag = kStarchFalse;
unsigned char *starchHeader = NULL;
setlocale (LC_ALL, "POSIX");
......@@ -93,7 +102,7 @@ main(int argc, char **argv)
if ((bedHeaderFlag == kStarchTrue) &&
#ifdef __cplusplus
(STARCH_transformInput(&metadata,
NULL,
nullptr,
static_cast<const CompressionType>( type ),
reinterpret_cast<const char *>( tag ),
reinterpret_cast<const char *>( note )) != 0))
......@@ -108,7 +117,7 @@ main(int argc, char **argv)
else if ((bedHeaderFlag == kStarchFalse) &&
#ifdef __cplusplus
(STARCH_transformHeaderlessInput(&metadata,
NULL,
nullptr,
static_cast<const CompressionType>( type ),
reinterpret_cast<const char *>( tag ),
static_cast<const Boolean>( kStarchFinalizeTransformTrue ),
......@@ -212,6 +221,22 @@ main(int argc, char **argv)
}
/* cleanup */
#ifdef __cplusplus
if (bedFnPtr != nullptr) {
fclose (bedFnPtr);
bedFnPtr = nullptr;
}
if (metadata != nullptr)
STARCH_freeMetadata (&metadata);
if (starchHeader) {
free (starchHeader);
starchHeader = nullptr;
}
if (starch_client_global_args.uniqueTag) {
free (starch_client_global_args.uniqueTag);
starch_client_global_args.uniqueTag = nullptr;
}
#else
if (bedFnPtr != NULL) {
fclose (bedFnPtr);
bedFnPtr = NULL;
......@@ -226,6 +251,7 @@ main(int argc, char **argv)
free (starch_client_global_args.uniqueTag);
starch_client_global_args.uniqueTag = NULL;
}
#endif
#ifdef DEBUG
fprintf (stderr, "\n--- starch main() - exit ---\n");
......@@ -244,16 +270,23 @@ STARCH_initializeGlobals()
#ifdef DEBUG
fprintf (stderr, "\n--- STARCH_initializeGlobals() ---\n");
#endif
#ifdef __cplusplus
starch_client_global_args.note = nullptr;
starch_client_global_args.inputFile = nullptr;
starch_client_global_args.uniqueTag = nullptr;
starch_client_global_args.inputFiles = nullptr;
#else
starch_client_global_args.note = NULL;
starch_client_global_args.inputFile = NULL;
starch_client_global_args.uniqueTag = NULL;
starch_client_global_args.inputFiles = NULL;
#endif
starch_client_global_args.compressionType = STARCH_DEFAULT_COMPRESSION_TYPE;
starch_client_global_args.generatePerChromosomeSignatureFlag = kStarchTrue;
starch_client_global_args.reportProgressFlag = kStarchFalse;
starch_client_global_args.reportProgressN = 0;
starch_client_global_args.headerFlag = kStarchFalse;
starch_client_global_args.inputFile = NULL;
starch_client_global_args.uniqueTag = NULL;
starch_client_global_args.numberInputFiles = 0;
starch_client_global_args.inputFiles = NULL;
}
int
......@@ -294,7 +327,11 @@ STARCH_parseCommandLineOptions(int argc, char **argv)
case 'r':
starch_client_global_args.reportProgressFlag = kStarchTrue;
errno = 0;
#ifdef __cplusplus
starch_client_global_args.reportProgressN = strtoumax(optarg, nullptr, 10);
#else
starch_client_global_args.reportProgressN = strtoumax(optarg, NULL, 10);
#endif
if (errno == ERANGE) {
fprintf (stderr, "ERROR: Numerical value is outside of range.\n");
return STARCH_FATAL_ERROR;
......@@ -353,13 +390,15 @@ STARCH_printUsage(int errorType)
#ifdef DEBUG
fprintf (stderr, "\n--- STARCH_printUsage() ---\n");
#endif
char *avStr = NULL;
#ifdef __cplusplus
char *avStr = nullptr;
avStr = static_cast<char *>( malloc (STARCH_ARCHIVE_VERSION_STRING_LENGTH) );
if (avStr != nullptr) {
#else
char *avStr = NULL;
avStr = malloc (STARCH_ARCHIVE_VERSION_STRING_LENGTH);
#endif
if (avStr != NULL) {
#endif
int result = sprintf (avStr, "%d.%d.%d", STARCH_MAJOR_VERSION, STARCH_MINOR_VERSION, STARCH_REVISION_VERSION);
if (result != -1) {
switch (errorType) {
......@@ -381,13 +420,15 @@ STARCH_printRevision()
#ifdef DEBUG
fprintf (stderr, "\n--- STARCH_printRevision() ---\n");
#endif
char *avStr = NULL;
#ifdef __cplusplus
char *avStr = nullptr;
avStr = static_cast<char *>( malloc (STARCH_ARCHIVE_VERSION_STRING_LENGTH) );
if (avStr != nullptr) {
#else
char *avStr = NULL;
avStr = malloc (STARCH_ARCHIVE_VERSION_STRING_LENGTH);
#endif
if (avStr != NULL) {
#endif
int result = sprintf (avStr, "%d.%d.%d", STARCH_MAJOR_VERSION, STARCH_MINOR_VERSION, STARCH_REVISION_VERSION);
if (result != -1)
fprintf (stderr, "%s\n binary version: %s (creates archive version: %s)\n", name, BEDOPS::version(), avStr);
......
......@@ -83,6 +83,19 @@ static struct starch_client_global_args_t {
size_t numberInputFiles;
} starch_client_global_args;
#ifdef __cplusplus
static struct option starch_client_long_options[] = {
{"note", required_argument, nullptr, 'n'},
{"bzip2", no_argument, nullptr, 'b'},
{"gzip", no_argument, nullptr, 'g'},
{"omit-signature", no_argument, nullptr, 'o'},
{"report-progress", required_argument, nullptr, 'r'},
{"header", no_argument, nullptr, 'e'},
{"version", no_argument, nullptr, 'v'},
{"help", no_argument, nullptr, 'h'},
{nullptr, no_argument, nullptr, 0 }
};
#else
static struct option starch_client_long_options[] = {
{"note", required_argument, NULL, 'n'},
{"bzip2", no_argument, NULL, 'b'},
......@@ -94,6 +107,7 @@ static struct option starch_client_long_options[] = {
{"help", no_argument, NULL, 'h'},
{NULL, no_argument, NULL, 0 }
};
#endif
static const char *starch_client_opt_string = "n:bgorevh?";
......
This diff is collapsed.
......@@ -57,8 +57,11 @@ namespace starch {
#define STARCHCAT_RETRANSFORM_BUFFER_SIZE 1024*1024
#define STARCHCAT_FIELD_BUFFER_MAX_LENGTH 16
#define GCC_COMPILER (defined(__GNUC__) && !defined(__clang__))
#define CLANG_COMPILER defined(__clang__)
#if defined(__GNUC__) && !defined(__clang__)
#define HAS_GNU 1
#else
#define HAS_GNU 0
#endif
/*
This is simply a struct containing a starch file's
......@@ -177,6 +180,18 @@ static struct starchcat_client_global_args_t {
LineCountType reportProgressN;
} starchcat_client_global_args;
#ifdef __cplusplus
static struct option starchcat_client_long_options[] = {
{"note", required_argument, nullptr, 'n'},
{"bzip2", no_argument, nullptr, 'b'},
{"gzip", no_argument, nullptr, 'g'},
{"omit-signature", no_argument, nullptr, 'o'},
{"report-progress", required_argument, nullptr, 'r'},
{"version", no_argument, nullptr, 'v'},
{"help", no_argument, nullptr, 'h'},
{nullptr, no_argument, nullptr, 0 }
};
#else
static struct option starchcat_client_long_options[] = {
{"note", required_argument, NULL, 'n'},
{"bzip2", no_argument, NULL, 'b'},
......@@ -187,6 +202,7 @@ static struct option starchcat_client_long_options[] = {
{"help", no_argument, NULL, 'h'},
{NULL, no_argument, NULL, 0 }
};
#endif
static const char *starchcat_client_opt_string = "n:bgorvh?";
......
......@@ -2,7 +2,7 @@
# author : sjn and apr
# date : Feb 2012
# version : v2.4.35
# version : v2.4.36
#
# BEDOPS
......
......@@ -2,7 +2,7 @@
# author : sjn and apr
# date : Feb 2012
# version : v2.4.35
# version : v2.4.36
#
# BEDOPS
......
......@@ -2,7 +2,7 @@
# author : sjn and apr
# date : 13 Sep 2016
# version : v2.4.35
# version : v2.4.36
#
# BEDOPS
......