# Author: Maxime Schmitt, University of Luxembourg
# Author: Adam Huffman, The Francis Crick Institute
#
# Based on the work of: Pablo Escobar Lopez
# Swiss Institute of Bioinformatics (SIB)
# Biozentrum - University of Basel

easyblock = 'MakeCp'

name = 'BEDTools'
version = '2.27.1'

homepage = "https://github.com/arq5x/bedtools2"
description = """The BEDTools utilities allow one to address common genomics tasks such as finding feature overlaps
 and computing coverage. The utilities are largely based on four widely-used file formats: BED, GFF/GTF, VCF,
 and SAM/BAM."""

toolchain = {'name': 'intel', 'version': '2017a'}

# https://github.com/arq5x/bedtools2/releases/download/v2.26.0/bedtools-2.26.0.tar.gz
source_urls = ['https://github.com/arq5x/bedtools2/releases/download/v%(version)s/']
sources = ['bedtools-%(version)s.tar.gz']
checksums = ['c8c2acbaf3f9cb92dcf8e5cd59af6b31ae9c4598efb786ba6c84f66ca72fafd9']

buildopts = 'CXX="$CXX"'

files_to_copy = ["bin", "docs", "data", "genomes", "scripts", "test"]

sanity_check_paths = {
    'files': ['bin/%s' % x for x in ['bedtools', 'pairToBed', 'mergeBed', 'bedToBam', 'fastaFromBed']],
    'dirs': files_to_copy,
}

moduleclass = 'bio'
