Skip to content
Commits on Source (4)
......@@ -13,3 +13,4 @@ config.sub
ltmain.sh
*_cmdline.hpp
test-driver
build-*
This diff is collapsed.
Copyright 2018 Guillaume Marcais <gmarcais@cs.cmu.edu>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the
distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This diff is collapsed.
......@@ -210,8 +210,8 @@ bin_test_all_SOURCES = unit_tests/test_main.cc \
unit_tests/test_stdio_filebuf.cc
bin_test_all_SOURCES += jellyfish/backtrace.cc
bin_test_all_CPPFLAGS = -DJSON_IS_AMALGAMATION=1
bin_test_all_CXXFLAGS = $(AM_CXXFLAGS) -I$(srcdir)/unit_tests/gtest/include -I$(srcdir)/unit_tests -I$(srcdir)/include
bin_test_all_CPPFLAGS = $(AM_CPPFLAGS) -DJSON_IS_AMALGAMATION=1
bin_test_all_CXXFLAGS = $(AM_CXXFLAGS) -I$(srcdir)/unit_tests/gtest/include -I$(srcdir)/unit_tests -I$(srcdir)/include -Wno-unused-variable
bin_test_all_LDADD = libgtest.la $(LDADD)
YAGGO_SOURCES += unit_tests/test_main_cmdline.hpp
noinst_HEADERS += unit_tests/test_main.hpp
......
......@@ -16,14 +16,12 @@ Then make sure the following environment variables contain the correct
paths:
PATH -> /my/dir/bin
LD_LIBRARY_PATH -> /my/dir/lib
MANPATH -> /my/dir/share/man
PKG_CONFIG_PATH -> /my/dir/lib/pkgconfig
Only the PATH environment variables is necessary to run
jellyfish. MANPATH is used by the man command. PKG_CONFIG_PATH and
LD_LIBRARY_PATH are used to compile software against the jellyfish
shared library.
jellyfish. MANPATH is used by the man command. PKG_CONFIG_PATH is used
to compile software against the jellyfish shared library.
GCC requirement
===============
......@@ -84,15 +82,4 @@ License
Magic and is distributed under the license described in the
HalfLICENSE file.
* This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
* This software is dual licenced. See LICENSE file.
......@@ -23,7 +23,7 @@ make -j 4
make install
```
To compile from the git tree, you will also need autoconf/automake, and [yaggo](https://github.com/gmarcais/yaggo/releases "Yaggo release on github"). Then to compile and install (in `/usr/local` in that example) with:
To compile from the git tree, you will also need autoconf, automake, libool, gettext, pkg-config and [yaggo](https://github.com/gmarcais/yaggo/releases "Yaggo release on github"). Then to compile and install (in `/usr/local` in that example) with:
```Shell
autoreconf -i
......@@ -38,6 +38,11 @@ If the software is installed in system directories (hint: you needed to use `sud
sudo ldconfig
```
Usage
-----
Instruction of use are available in the [doc](https://github.com/gmarcais/Jellyfish/tree/master/doc) directory.
Extra / Examples
----------------
......
......@@ -19,6 +19,7 @@ PYTHON="@PYTHON@"
ENABLE_PERL_BINDING="@PERL_EXT_LIB@"
PERL="@PERL@"
SAMTOOLS="@SAMTOOLS@"
UNIX2DOS="@UNIX2DOS@"
if [ -n "$DEBUG" ]; then
set -x;
......
AC_INIT([jellyfish], [2.2.10], [gmarcais@umd.edu])
AC_INIT([jellyfish], [2.3.0], [gmarcais@umd.edu])
AC_CANONICAL_HOST
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([subdir-objects foreign parallel-tests color-tests])
......@@ -34,6 +34,10 @@ AS_IF([test "x$enable_htslib" = "xyes" -o "x$enable_htslib" = "x"],
AC_ARG_VAR([SAMTOOLS], [Path to samtools program])
AS_IF([test "x$SAMTOOLS" = "x"],
[AC_PATH_PROG([SAMTOOLS], [samtools])])
# Look for unix2dos
AC_ARG_VAR([UNIX2DOS], [Path to unix2dos program])
AS_IF([test "x$UNIX2DOS" = "x"],
[AC_PATH_PROG([UNIX2DOS], [unix2dos])])
# Check for md5 or md5sum
AC_ARG_VAR([MD5], [Path to md5 hashing program])
......@@ -49,7 +53,7 @@ dnl define([concat], $1$2$3)dnl
define([PC_FILE], jellyfish-2.0.pc)
AC_CONFIG_FILES([
Makefile
tests/compat.sh
compat.sh
]
PC_FILE
)
......@@ -160,5 +164,3 @@ AM_COND_IF([PERL_BINDING],
AC_CHECK_FUNCS([posix_memalign aligned_alloc])
AC_OUTPUT
jellyfish (2.2.10-3) UNRELEASED; urgency=medium
jellyfish (2.3.0-1) UNRELEASED; urgency=medium
* Install config.h which is needed by sailfish package
* New upstream version
* debhelper-compat 12
-- Andreas Tille <tille@debian.org> Wed, 27 Mar 2019 13:46:52 +0100
-- Andreas Tille <tille@debian.org> Thu, 01 Aug 2019 13:37:07 +0200
jellyfish (2.2.10-2) unstable; urgency=medium
......
......@@ -5,7 +5,7 @@ Uploaders: Shaun Jackman <sjackman@debian.org>,
Michael R. Crusoe <michael.crusoe@gmail.com>
Section: science
Priority: optional
Build-Depends: debhelper (>= 11~),
Build-Depends: debhelper-compat (= 12),
d-shlibs,
yaggo,
pkg-config,
......
......@@ -146,6 +146,42 @@ reads data set twice and the memory usage of the Bloom counter is
greater than that of the Bloom filter (slightly less than twice as
much).
## Counting a subset of k-mers
It is possible to count the number of occurrences of only a subset of predefined k-mers, using the `--if` switch.
Suppose one wants to count the number of occurrences of the 20-mers of chromosome 20 in chromosome 1 of human.
Use the following command:
```Shell
jellyfish count -m 20 -s 100M -C -t 10 -o 20and1.jf --if chr20.fa chr1.fa
```
This reads all the canonical 20-mers from the file `chr20.fa` (but don't count them) and loads them in memory.
Then it reads `chr1.fa` and counts the number of occurrences of the 20-mers only of the k-mers already loaded in memory.
Now, the histogram will also report k-mers with a 0 count (the 20-mers of chr20 which do not exists in chr1):
```Shell
$ jellyfish histo 20and1.jf | head
0 49401674
1 1116213
2 425471
3 250702
4 170160
5 124391
6 102038
7 74168
8 57631
9 47173
```
Note that the file given to `--if` is a fasta file.
If a list of k-mers is available instead (say one per line in a text file), it can be transformed into a fasta file with one k-mer per line using the following one liner Perl command:
```Shell
perl -ne 'print(">\n$_")'
```
# FAQ
## How to read compressed files (or other format)?
......
......@@ -7,7 +7,7 @@ check_LTLIBRARIES = libgtest.la libgtest_main.la
libgtest_la_SOURCES = unit_tests/gtest/src/gtest-all.cc
libgtest_main_la_SOURCES = unit_tests/gtest/src/gtest_main.cc
libgtest_main_la_LIBADD = libgtest.la
libgtest_la_CXXFLAGS = -I$(srcdir)/unit_tests
libgtest_la_CXXFLAGS = -I$(srcdir)/unit_tests -I$(srcdir)/unit_tests/gtest
libgtest_main_la_CXXFLAGS = -I$(srcdir)/unit_tests
GTEST_SRC = unit_tests/gtest/src/gtest-all.cc \
......
/* This file is part of Jellyfish.
Jellyfish is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This work is dual-licensed under 3-Clause BSD License or GPL 3.0.
You can choose between one of them if you use this work.
Jellyfish is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Jellyfish. If not, see <http://www.gnu.org/licenses/>.
`SPDX-License-Identifier: BSD-3-Clause OR GPL-3.0`
*/
/* This file is part of Jellyfish.
Jellyfish is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This work is dual-licensed under 3-Clause BSD License or GPL 3.0.
You can choose between one of them if you use this work.
Jellyfish is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Jellyfish. If not, see <http://www.gnu.org/licenses/>.
`SPDX-License-Identifier: BSD-3-Clause OR GPL-3.0`
*/
#ifndef __JELLYFISH_ALLOCATORS_MMAP_HPP__
......
/* Quorum
* Copyright (C) 2012 Genome group at University of Maryland.
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
/* This file is part of Jellyfish.
This work is dual-licensed under 3-Clause BSD License or GPL 3.0.
You can choose between one of them if you use this work.
`SPDX-License-Identifier: BSD-3-Clause OR GPL-3.0`
*/
#ifndef __JELLYFISH_ATOMIC_BITS_ARRAY_HPP__
......@@ -35,7 +26,6 @@ class atomic_bits_array_base {
const jflib::divisor64 d_;
size_t size_bytes_;
T* data_;
static atomic::gcc atomic_;
friend class iterator;
class iterator : public std::iterator<std::input_iterator_tag, Value> {
......@@ -96,7 +86,7 @@ class atomic_bits_array_base {
do {
pval = cval;
const T new_word = (prev_word_ & ~mask_) | ((static_cast<T>(nval) << off_) & mask_);
const T actual_word = atomic_.cas(word_, prev_word_, new_word);
const T actual_word = atomic::gcc::cas(word_, prev_word_, new_word);
if(__builtin_expect(actual_word == prev_word_, 1))
return true;
prev_word_ = actual_word;
......
/* This file is part of Jellyfish.
Jellyfish is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Jellyfish is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Jellyfish. If not, see <http://www.gnu.org/licenses/>.
This work is dual-licensed under 3-Clause BSD License or GPL 3.0.
You can choose between one of them if you use this work.
`SPDX-License-Identifier: BSD-3-Clause OR GPL-3.0`
*/
......
/* This file is part of Jellyfish.
Jellyfish is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This work is dual-licensed under 3-Clause BSD License or GPL 3.0.
You can choose between one of them if you use this work.
Jellyfish is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Jellyfish. If not, see <http://www.gnu.org/licenses/>.
`SPDX-License-Identifier: BSD-3-Clause OR GPL-3.0`
*/
#ifndef __JELLYFISH_ATOMIC_GCC_HPP__
......
/* This file is part of Jellyfish.
Jellyfish is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This work is dual-licensed under 3-Clause BSD License or GPL 3.0.
You can choose between one of them if you use this work.
Jellyfish is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Jellyfish. If not, see <http://www.gnu.org/licenses/>.
`SPDX-License-Identifier: BSD-3-Clause OR GPL-3.0`
*/
void print_backtrace();
......