Code Monkey home page Code Monkey logo

joinx's Introduction

joinx

Joinx is a lightweight tool for performing operations (e.g., intersection, difference, …) on genomic data contained in vcf and .bed files. It also provides some limited analysis functions (concordance reports). An important assumption that joinx makes is that the input data is always sorted. This allows it to compute its results in an efficient manner.

Build instructions

Setup repository

  • Clone the git repository
  • Initialize submodules:
    git submodule update --init

Install build dependencies

Building requires:

  • gcc 4.4+ or clang 3.2+
  • cmake 2.8+

Integration tests require:

  • Python
  • Valgrind (optional, but recommended)

To install the packages required to build on Ubuntu, try:

sudo apt-get install cmake build-essential

Build, test, and install

Note: if using clang, export the environment variables CC=clang, CXX=clang++.

Joinx does not support in source builds. Create a new build directory, enter it, and run:

  • cmake /path/to/joinx/repo [opts]
    • Some useful options to cmake are:
      • -DBOOST_BUILD_OPTS=“-j 8” to build boost with 8 threads (or to pass other options to b2)
      • -DCMAKE_INSTALL_PREFIX=/path change the installation location (default: /usr)
  • make deps
  • make
  • ctest (to run unit tests)
  • make install

Running ctest with run both unit and integration tests. you can run one or the other with
ctest -L <unit|integration>

LICENSE

GPL v3.0

joinx's People

Contributors

ernfrid avatar iferguson90 avatar indraniel avatar sakoht avatar tabbott avatar tmooney avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

joinx's Issues

My HPC cluster use cuda and get error

Hi
My HPC cluster use cuda cpu and during install joinx i got the error. There are the error message

[ 89%] Linking CXX executable ../../../../bin/TestProcessors
Error running link command: No such file or directory
build/test/lib/processors/CMakeFiles/TestProcessors.dir/build.make:288: recipe for target 'bin/TestProcessors' failed
make[2]: *** [bin/TestProcessors] Error 2
CMakeFiles/Makefile2:643: recipe for target 'build/test/lib/processors/CMakeFiles/TestProcessors.dir/all' failed
make[1]: *** [build/test/lib/processors/CMakeFiles/TestProcessors.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

please provide me some suggestion.

joinx --version fails

joinx --version returns an exit status of 1. It should be 0.

$ joinx --version || echo FAILED $?
joinx version unstable (commit nogit) (None)
install prefix: /home/sjackman/local/Cellar/joinx/1.7.4
share directory: /home/sjackman/local/Cellar/joinx/1.7.4/share/joinx-unstable
FAILED 1

Build fails on RHEL6.7

Hi

I am building on RHEL 6.7, but I get a failure:
Linking CXX executable ../../../../bin/TestProcessors ../../../../vendor/boost/boost/lib/libboost_regex.a(instances.o): In functionboost::exception_detail::error_info_injectorstd::invalid_argument::~error_info_injector()':
instances.cpp:(.text._ZN5boost16exception_detail19error_info_injectorISt16invalid_argumentED2Ev[_ZN5boost16exception_detail19error_info_injectorISt16invalid_argumentED5Ev]+0x41): undefined reference to std::invalid_argument::~invalid_argument()' ../../../../vendor/boost/boost/lib/libboost_regex.a(instances.o): In functionboost::exception_detail::clone_implboost::exception_detail::error_info_injector<std::invalid_argument >::~clone_impl()':
instances.cpp:(.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorISt16invalid_argumentEEED1Ev[boost::exception_detail::clone_implboost::exception_detail::error_info_injector<std::invalid_argument >::~clone_impl()]+0x51): undefined reference to std::invalid_argument::~invalid_argument()' ../../../../vendor/boost/boost/lib/libboost_regex.a(instances.o): In functionboost::exception_detail::error_info_injectorstd::invalid_argument::~error_info_injector()':
instances.cpp:(.text._ZN5boost16exception_detail19error_info_injectorISt16invalid_argumentED0Ev[boost::exception_detail::error_info_injectorstd::invalid_argument::~error_info_injector()]+0x40): undefined reference to std::invalid_argument::~invalid_argument()' ../../../../vendor/boost/boost/lib/libboost_regex.a(instances.o): In functionboost::exception_detail::clone_implboost::exception_detail::error_info_injector<std::invalid_argument >::~clone_impl()':
instances.cpp:(.text._ZN5boost16exception_detail10clone_implINS0_19error_info_injectorISt16invalid_argumentEEED0Ev[boost::exception_detail::clone_implboost::exception_detail::error_info_injector<std::invalid_argument >::~clone_impl()]+0x51): undefined reference to std::invalid_argument::~invalid_argument()' ../../../../vendor/boost/boost/lib/libboost_regex.a(instances.o): In functionboost::exception_detail::clone_implboost::exception_detail::error_info_injector<std::invalid_argument >::rethrow() const':
instances.cpp:(.text._ZNK5boost16exception_detail10clone_implINS0_19error_info_injectorISt16invalid_argumentEEE7rethrowEv[boost::exception_detail::clone_implboost::exception_detail::error_info_injector<std::invalid_argument >::rethrow() const]+0xe6): undefined reference to std::invalid_argument::~invalid_argument()' ../../../../vendor/boost/boost/lib/libboost_regex.a(instances.o):instances.cpp:(.text._ZNK5boost16exception_detail10clone_implINS0_19error_info_injectorISt16invalid_argumentEEE5cloneEv[boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::invalid_argument> >::clone() const]+0x1b3): more undefined references tostd::invalid_argument::~invalid_argument()' follow
../../../../vendor/boost/boost/lib/libboost_regex.a(instances.o): In function boost::object_cache<boost::re_detail::cpp_regex_traits_base<char>, boost::re_detail::cpp_regex_traits_implementation<char> >::do_get(boost::re_detail::cpp_regex_traits_base<char> const&, unsigned long)': instances.cpp:(.text._ZN5boost12object_cacheINS_9re_detail21cpp_regex_traits_baseIcEENS1_31cpp_regex_traits_implementationIcEEE6do_getERKS3_m[boost::object_cache<boost::re_detail::cpp_regex_traits_base<char>, boost::re_detail::cpp_regex_traits_implementation<char> >::do_get(boost::re_detail::cpp_regex_traits_base<char> const&, unsigned long)]+0xdf): undefined reference tostd::__detail::_List_node_base::_M_transfer(std::__detail::List_node_base, std::__detail::List_node_base)'
instances.cpp:(.text._ZN5boost12object_cacheINS_9re_detail21cpp_regex_traits_baseIcEENS1_31cpp_regex_traits_implementationIcEEE6do_getERKS3_m[boost::object_cacheboost::re_detail::cpp_regex_traits_base<char, boost::re_detail::cpp_regex_traits_implementation >::do_get(boost::re_detail::cpp_regex_traits_base const&, unsigned long)]+0x100): undefined reference to std::__detail::_List_node_base::_M_transfer(std::__detail::_List_node_base*, std::__detail::_List_node_base*)' instances.cpp:(.text._ZN5boost12object_cacheINS_9re_detail21cpp_regex_traits_baseIcEENS1_31cpp_regex_traits_implementationIcEEE6do_getERKS3_m[boost::object_cache<boost::re_detail::cpp_regex_traits_base<char>, boost::re_detail::cpp_regex_traits_implementation<char> >::do_get(boost::re_detail::cpp_regex_traits_base<char> const&, unsigned long)]+0x330): undefined reference tostd::__detail::_List_node_base::_M_hook(std::__detail::List_node_base)'
instances.cpp:(.text._ZN5boost12object_cacheINS_9re_detail21cpp_regex_traits_baseIcEENS1_31cpp_regex_traits_implementationIcEEE6do_getERKS3_m[boost::object_cacheboost::re_detail::cpp_regex_traits_base<char, boost::re_detail::cpp_regex_traits_implementation >::do_get(boost::re_detail::cpp_regex_traits_base const&, unsigned long)]+0x547): undefined reference to std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base_)' instances.cpp:(.text._ZN5boost12object_cacheINS_9re_detail21cpp_regex_traits_baseIcEENS1_31cpp_regex_traits_implementationIcEEE6do_getERKS3_m[boost::object_cacheboost::re_detail::cpp_regex_traits_base<char, boost::re_detail::cpp_regex_traits_implementation<char> >::do_get(boost::re_detail::cpp_regex_traits_base<char> const&, unsigned long)]+0x5d6): undefined reference to std::__detail::_List_node_base::_M_unhook()'
collect2: ld returned 1 exit status
make[2]: *** [bin/TestProcessors] Error 1
make[1]: *** [build/test/lib/processors/CMakeFiles/TestProcessors.dir/all] Error 2
make: *** [all] Error 2
`

I have no idea where to start looking at as the boostlib is included in the package. Please advice...

Filip Nollet

integration-test/test_cmdline.py:: incomplete subcommands set

cmdline test check for the following subcomands:

cmds = ['bed-merge', 'check-ref', 'create-contigs', 'intersect', 'ref-stats', 'sort', 'vcf-annotate', 'vcf-filter', 'vcf-merge', 'vcf-normalize-indels', 'vcf-report', 'vcf-site-filter', 'vcf2raw', 'wig2bed']
it misses: the following sub-commands:
vcf-annotate-homopolymers
vcf-remove-filtered-gt
vcf-compare
find-homopolymers

should be.
cmds = ['bed-merge', 'check-ref', 'create-contigs', 'find-homopolymers', 'intersect', 'ref-stats', 'sort', 'vcf-annotate', 'vcf-annotate-homopolymers', 'vcf-compare', 'vcf-filter', 'vcf-merge', 'vcf-normalize-indels', 'vcf-remove-filtered-gt', 'vcf-report', 'vcf-site-filter', 'vcf2raw', 'wig2bed']

regards

joinx release miss the build-common directory content

Hi,

for production us we only install "releases" (we need to be abble to rebuild exactly the same tools at any moment)
trying to install joinx-1.10.1 (https://github.com/genome/joinx/archive/v1.10.1.tar.gz)
we found that the corresponding archive miss the build common directory content, so render it impossible buildable from stock.
also are the previous release to.

any reason that build-common is not included in the release ?

best regards

Eric

PS I have read the issue #5

Unbundle boost-1.56 and zlib-1.28 local copies from source code tarballs

Please remove the bundled copy of boot libraries from the tree and let cmake to use those installed system-wide.

Running some kind of install procedure during compile target is not acceptable.

[  5%] Performing install step for 'zlib-1.2.8'
cp libz.so.1.2.8 /scratch/var/tmp/portage/sci-biology/joinx-1.12.0/work/joinx-1.12.0/build/vendor/zlib/lib
chmod 755 /scratch/var/tmp/portage/sci-biology/joinx-1.12.0/work/joinx-1.12.0/build/vendor/zlib/lib/libz.so.1.2.8
 * ACCESS DENIED:  SYMLINK:      /usr/lib64/libperl.so.5.27
 * ACCESS DENIED:  open_wr:      /etc/ld.so.cache~
[  5%] Completed 'zlib-1.2.8'

Why are you even trying to mangle my libperl.so and ld.so.cache?

build.log.txt

joinx vcf-annotate-homopolymers duplicates lines

In the case where an indel falls at the border of two adjacent homopolymer runs, joinx duplicates the line. It also appears to duplicate an adjacent VCF line, although that may be unrelated.

The error can be duplicated by running joinx vcf-annotate-vcf --vcf-file test.vcf --bed-file homopolymer.both.bed --max-length 2 --info-field-name HOMP_FILTER

Files are below (all whitespace should be tabs):

homopolymer.both.bed

1   19983856    19983863    T
1   19983863    19983871    G

test.vcf

##fileformat=VCFv4.1
#CHROM  POS ID  REF ALT QUAL    FILTER  INFO    FORMAT  Sample1
1   19983863    rs35989027  T   TGG .   .   .   GT  0/1
1   19983864    rs66480868  G   GGT .   .   .   GT  0/1

Output:

##INFO=<ID=HOMP_FILTER,Number=A,Type=Integer,Description="short (maximum of 2bp) homopolymer indel">
#CHROM  POS ID  REF ALT QUAL    FILTER  INFO    FORMAT  Sample1
1   19983863    rs35989027  T   TGG .   .   HOMP_FILTER=0   GT  0/1
1   19983864    rs66480868  G   GGT .   .   HOMP_FILTER=0   GT  0/1
1   19983863    rs35989027  T   TGG .   .   HOMP_FILTER=1   GT  0/1
1   19983864    rs66480868  G   GGT .   .   HOMP_FILTER=0   GT  0/1

v1.10.1 outdated doc ?

while reading the doc, it appears that we can use some -Dflag.

bic-soft:joinx-1.10.1/build > cmake28 -DBoost_USE_STATIC_LIBS=on -DBoost_NO_SYSTEM_PATHS=on ../
ends with
CMake Warning:
Manually-specified variables were not used by the project:

Boost_NO_SYSTEM_PATHS
Boost_USE_STATIC_LIBS

-DBOOST_ROOT seems to be ignored, it always ends up building the vendor provided boost.

regards

Eric

joinx build on Centos 6.4 failed

A build of joinx on Centos6.4 with the newest cmake-2.8.12.2 shows the following errors:

CMake Error at CMakeLists.txt:17 (include)
include could not find load file:

 TestHelper

CMake Error at CMakeLists.txt:18 (include)
include could not find load file:

 VersionHelper

CMake Error at CMakeLists.txt:19 (include)
include could not find load file:

 ProjectHelper

CMake Error at CMakeLists.txt:102 (add_projects):
Unknown CMake command "add_projects".

Is there something I'm missing?

Sanford M. Orlow, PhD
Computer Engineer
National Institutes of Health CIT/DCSS/SCB
12 South Dr. 12/2208 , Bethesda, MD 20892-5680
PHONE 301.496.5362 EMAIL [email protected]

Make errors on Ubuntu

Hi!I tried to make joinx on Ubuntu, but I ran into a few errors.Here's a few snippets:
/home/hexiaoyu/biosoft/joinx/joinx-1.12.0/vendor/src/gtest160/include/gtest/internal/gtest-internal.h:1179:44: error: no matching function for call to ‘testing::AssertionResult::AssertionResult(std::basic_istream<char>&)’ ::testing::AssertionResult(expression)) \ ^ /home/hexiaoyu/biosoft/joinx/joinx-1.12.0/vendor/src/gtest160/include/gtest/gtest.h:1790:3: note: in expansion of macro ‘GTEST_TEST_BOOLEAN_’ GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \ ^ /home/hexiaoyu/biosoft/joinx/joinx-1.12.0/test/lib/fileformats/TestVcfEntry.cpp:417:5: note: in expansion of macro ‘ASSERT_TRUE’ ASSERT_TRUE(getline(vcfss, line)); ^ In file included from /home/hexiaoyu/biosoft/joinx/joinx-1.12.0/test/lib/fileformats/TestVcfEntry.cpp:13:0: /home/hexiaoyu/biosoft/joinx/joinx-1.12.0/vendor/src/gtest160/include/gtest/gtest.h:271:12: note: candidate: testing::AssertionResult::AssertionResult(bool) explicit AssertionResult(bool success) : success_(success) {} ^ /home/hexiaoyu/biosoft/joinx/joinx-1.12.0/vendor/src/gtest160/include/gtest/gtest.h:271:12: note: no known conversion for argument 1 from ‘std::basic_istream<char>’ to ‘bool’ /home/hexiaoyu/biosoft/joinx/joinx-1.12.0/vendor/src/gtest160/include/gtest/gtest.h:269:3: note: candidate: testing::AssertionResult::AssertionResult(const testing::AssertionResult&) AssertionResult(const AssertionResult& other); ^ /home/hexiaoyu/biosoft/joinx/joinx-1.12.0/vendor/src/gtest160/include/gtest/gtest.h:269:3: note: no known conversion for argument 1 from ‘std::basic_istream<char>’ to ‘const testing::AssertionResult&’
Looking forward to your response.

Build error on Ubuntu

When I try to compile with gcc 5.4.0 on Ubuntu, I get an error in 'Building CXX object build/src/lib/io/CMakeFiles/io.dir/StreamLineSource.cpp.o':

in member function 'virtual bool StreamLineSource::getline(std::__cxx11::string&)':
joinx/src/lib/io/StreamLineSource.cpp:9:34: error: cannot convert \
'std::basic_istream(char)' to 'bool' in return 
return std::getline(_in, line);
                             ^

Upon googling the error I find http://stackoverflow.com/questions/22330765/how-to-fix-istringstream-compiler-error which seems to imply a static casting of the return object is needed.

Merge vcf files

I try to merge some files from different variant caller. I use vcf-merge. How can merge vcf files?

joinx  vcf-merge -i $PWD/432.somaicsniper_sort.vcf $PWD/432.mutect2_sort.vcf -o pippo.merge.vcf -M  enforce-equal
Duplicate (non-identical) value for FORMAT:

Installation Fails on Ubuntu 12.10 x86_64

Installation fails while compiling the WiggleReader.cpp

[ 27%] Building CXX object build/src/lib/fileformats/CMakeFiles/fileformats.dir/WiggleReader.cpp.o
 /home/saket/softwares/joinx/src/lib/fileformats/WiggleReader.cpp: In member function ‘void WiggleReader::getEntry(Bed&)’:
 /home/saket/softwares/joinx/src/lib/fileformats/WiggleReader.cpp:74:51: error: use of deleted function ‘Bed& Bed::operator=(const Bed&)’
  In file included from /home/saket/softwares/joinx/src/lib/fileformats/WiggleReader.hpp:3:0,
  from /home/saket/softwares/joinx/src/lib/fileformats/WiggleReader.cpp:1:
  /home/saket/softwares/joinx/src/lib/fileformats/Bed.hpp:23:7: note: ‘Bed&  Bed::operator=(const Bed&)’ is implicitly declared as deleted because ‘Bed’ declares a move constructor or move assignment operator
   make[2]: *** [build/src/lib/fileformats/CMakeFiles/fileformats.dir/WiggleReader.cpp.o] Error 1
   make[1]: *** [build/src/lib/fileformats/CMakeFiles/fileformats.dir/all] Error 2
   make: *** [all] Error 2

Build errors on OS X

I attempted to build joinx on OS X. I ran into a few errors. Here's a gist of the complete build log:
https://gist.github.com/sjackman/6720321

And a few snippets:

src/lib/common/MutationSpectrum.hpp:3:10: fatal error: 'array' file not found
src/lib/common/CigarString.hpp:3:10: fatal error: 'cstdint' file not found
src/lib/fileformats/Bed.hpp:4:10: fatal error: 'cstdint' file not found
src/lib/fileformats/ChromPos.hpp:4:10: fatal error: 'cstdint' file not found
src/lib/fileformats/InputStream.hpp:23:18: error: no template named 'shared_ptr' in namespace 'std'; did you mean 'boost::shared_ptr'?
src/lib/fileformats/TypedStream.hpp:45:18: error: no template named 'shared_ptr' in namespace 'std'; did you mean 'boost::shared_ptr'?
src/lib/fileformats/Bed.hpp:4:10: fatal error: 'cstdint' file not found

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.