Skip to content

Commit

Permalink
1.3.0-pre
Browse files Browse the repository at this point in the history
  • Loading branch information
telatin committed Oct 25, 2021
2 parents b66fd1a + 347e180 commit bd8ff87
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 25 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: covtobed
'on':
push:
branches:
- master
pull_request:
branches:
- master
jobs:
Build:
runs-on: '${{ matrix.os }}'
strategy:
matrix:
os:
- ubuntu-18.04
steps:
- name: Install dependencies (Ubuntu)
if: runner.os == 'Linux'
run: |-
sudo apt-get update
sudo apt-get install -y clang-3.9 g++-6 libbamtools-dev
- uses: actions/checkout@v2
- run: '[ $CXX = g++ ] && export CXX=g++-6 || true'
- run: '[ $CXX = clang++ ] && export CXX=clang++-3.9 || true'
- run: >-
g++ -std=c++11 *.cpp -I/usr/include/bamtools
/usr/lib/x86_64-linux-gnu/libbamtools.a -o covtobed -lz
- run: ./covtobed -h
- run: ./covtobed test/demo.bam > /dev/null
- run: ./covtobed --physical-coverage test/mp.bam > /dev/null
- run: bash test/test.sh
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[![install with bioconda](https://img.shields.io/conda/vn/bioconda/covtobed?label=install%20from%20bioconda)](http://bioconda.github.io/recipes/covtobed/README.html)
[![Bioconda installs](https://img.shields.io/conda/dn/bioconda/covtobed)](https://anaconda.org/bioconda/covtobed)
[![TravisCI Build Status](https://travis-ci.org/telatin/covtobed.svg?branch=master)](https://travis-ci.org/telatin/covtobed)
[![covtobed](https://github.com/telatin/covtobed/actions/workflows/c-cpp.yml/badge.svg)](https://github.com/telatin/covtobed/actions/workflows/c-cpp.yml)
[![Docker build](https://img.shields.io/docker/pulls/andreatelatin/covtobed)](https://hub.docker.com/r/andreatelatin/covtobed)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/36944efb0d2b44cca850964e96c036a4)](https://www.codacy.com/manual/telatin/covtobed?utm_source=github.com&utm_medium=referral&utm_content=telatin/covtobed&utm_campaign=Badge_Grade)

Expand All @@ -15,7 +15,7 @@
Reads one (or more) [alignment](https://en.wikipedia.org/wiki/Sequence_alignment) files
(sorted [BAM](https://en.wikipedia.org/wiki/SAM_(file_format))) and prints a [BED](https://en.wikipedia.org/wiki/BED_(file_format)) with the [coverage](https://en.wikipedia.org/wiki/Coverage_(genetics)). It will join consecutive bases with the same coverage, and can be used to only print a BED file with the regions having a specific coverage range.

:book: **[Read more in the wiki](https://github.com/telatin/covtobed/wiki)** - this is the **main** documentation source
:book: **[Read more in the wiki](https://github.com/telatin/covtobed/wiki)** - this is the **main** documentation source

Features:
* Can read (sorted) BAMs from stream (like `bwa mem .. | samtools view -b | samtools sort - | covtobed`)
Expand Down Expand Up @@ -51,6 +51,8 @@ Options:
-l MINLEN, --min-len=MINLEN
print BED feature only if its length is bigger (or equal
to) than MINLELN (default: 1)
-z MINCTG, --min-ctg-len=MINCTG
skip reference sequences having size less or equal to MINCTG
-d, --discard-invalid-alignments
skip duplicates, failed QC, and non primary alignment,
minq>0 (or user-defined if higher) (default: 0)
Expand Down Expand Up @@ -136,7 +138,7 @@ This program was finalized with a Flexible Talent Mobility Award funded by BBSRC

## Citation

If you use this tool, why not citing the paper?
If you use this tool, we would really appreciate if you will cite its paper:

> Birolo et al., (2020). covtobed: a simple and fast tool to extract coverage tracks from BAM files. Journal of Open Source Software, 5(47), 2119, https://doi.org/10.21105/joss.02119
Expand Down
1 change: 1 addition & 0 deletions binaries/build_osx.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash
if [ ! -d "$HOME/miniconda3" ]; then
echo "MINICONDA not found in $HOME/miniconda3"
echo "Install miniconda, then get bamtools from bioconda."
exit 1;
fi
if [ ! -e "$HOME/miniconda3/lib/libbamtools.a" ]; then
Expand Down
10 changes: 10 additions & 0 deletions binaries/build_ubuntu.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
#!/bin/bash

if [ ! -e "/usr/lib/x86_64-linux-gnu/libbamtools.a" ]; then
echo "Bamtools not found at: /usr/lib/x86_64-linux-gnu/libbamtools.a"
exit 1
fi

if [ ! -e "/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a" ]; then
echo "Stdlib not found at: /usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a"
exit 1
fi

set -euxo pipefail
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
cd "$SCRIPT_DIR/.."
Expand Down

0 comments on commit bd8ff87

Please sign in to comment.