[med-svn] [Git][med-team/mosdepth][master] 4 commits: routine-update: New upstream version
Andreas Tille (@tille)
gitlab at salsa.debian.org
Fri Oct 27 06:13:21 BST 2023
Andreas Tille pushed to branch master at Debian Med / mosdepth
Commits:
c365ed60 by Andreas Tille at 2023-10-27T07:10:35+02:00
routine-update: New upstream version
- - - - -
a3eedc35 by Andreas Tille at 2023-10-27T07:10:36+02:00
New upstream version 0.3.5+ds
- - - - -
2f80899f by Andreas Tille at 2023-10-27T07:10:36+02:00
Update upstream source from tag 'upstream/0.3.5+ds'
Update to upstream version '0.3.5+ds'
with Debian dir 34ff851718c59149ad150eca4a5ea708a9a253e1
- - - - -
fed4dc3b by Andreas Tille at 2023-10-27T07:10:36+02:00
routine-update: Standards-Version: 4.6.2
- - - - -
12 changed files:
- + .github/FUNDING.yml
- .github/workflows/build.yml
- .gitignore
- − .travis.yml
- CHANGES.md
- README.md
- debian/changelog
- debian/control
- depthstat.nim
- mosdepth.nim
- mosdepth.nimble
- tests/funcs.nim
Changes:
=====================================
.github/FUNDING.yml
=====================================
@@ -0,0 +1,13 @@
+# These are supported funding model platforms
+
+github: [brentp]
+patreon: # Replace with a single Patreon username
+open_collective: # Replace with a single Open Collective username
+ko_fi: # Replace with a single Ko-fi username
+tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
+community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
+liberapay: # Replace with a single Liberapay username
+issuehunt: # Replace with a single IssueHunt username
+otechie: # Replace with a single Otechie username
+lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
+custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
=====================================
.github/workflows/build.yml
=====================================
@@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-18.04, macos-10.15]
- nimversion:
+ version:
- stable
- devel
@@ -48,7 +48,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get -qy install bwa make build-essential cmake libncurses-dev ncurses-dev libbz2-dev lzma-dev liblzma-dev \
- curl libssl-dev libtool autoconf automake libcurl4-openssl-dev
+ curl libssl-dev libtool autoconf automake libcurl4-openssl-dev zlib1g-dev
# Setup htslib
- name: Install htslib (linux)
@@ -57,28 +57,30 @@ jobs:
cd
git clone --recursive https://github.com/samtools/htslib.git
cd htslib && git checkout 1.11 && autoheader && autoconf && ./configure --enable-libcurl
- cd
- make -j 4 -C htslib install
- echo "::set-env name=LD_LIBRARY_PATH::${LD_LIBRARY_PATH}:${HOME}/htslib"
- ls -lh $HOME/htslib/*.so
-
- - name: Install d4
- export HTSLIB=system
- git clone https://github.com/38/d4-format
- cd d4-format
- cargo build --release
- sudo cp ../d4-format/target/release/libd4binding.* /usr/local/lib
- sudo cp ./d4binding/include/d4.h /usr/local/include/
-
+ sudo make -j 4 install
+ sudo ldconfig
+ #echo "::set-env name=LD_LIBRARY_PATH::${LD_LIBRARY_PATH}:${HOME}/htslib"
+ #ls -lh $HOME/htslib/*.so
- name: Install hstlib (macos)
if: runner.os == 'macOS'
run: |
brew install htslib
- - uses: iffy/install-nim at v1.1
+ - name: Install d4
+ run: |
+ #export HTSLIB=system
+ git clone https://github.com/38/d4-format
+ cd d4-format
+ cargo build --release --all-features --package=d4binding
+ sudo cp target/release/libd4binding.* /usr/local/lib
+ sudo cp d4binding/include/d4.h /usr/local/include/
+ sudo ldconfig || true
+
+
+ - uses: iffy/install-nim at v4.1.1
with:
- nimversion: ${{ matrix.nimversion }}
+ version: ${{ matrix.version }}
- uses: actions-rs/toolchain at v1
with:
=====================================
.gitignore
=====================================
@@ -1,3 +1,5 @@
+tests/all
+tests/funcs
nimcache
*.d4
*.bam
=====================================
.travis.yml deleted
=====================================
@@ -1,20 +0,0 @@
-language: c
-env:
- - BRANCH=devel
-
-before_install:
- - export LD_LIBRARY_PATH=./htslib-1.10.2/:/usr/local/lib
- - export PATH="$TRAVIS_BUILD_DIR/nim-$BRANCH/bin:$PATH"
- - export NIM_LIB_PREFIX=$TRAVIS_BUILD_DIR/nim-$BRANCH/
-
-install:
- - bash ./scripts/install.sh
-script:
- - nimble test
- - bash functional-tests.sh
- - nim c -r depthstat.nim
- - nim c -d:release --cc:$CC mosdepth.nim
- - ./mosdepth -h
-branches:
- except:
- - gh-pages
=====================================
CHANGES.md
=====================================
@@ -1,3 +1,12 @@
+v0.3.5
+======
++ fix bug with summary min for regions (#207 thanks to Xavier for supplying test-case)
+
+v0.3.4
+======
++ bump version for build supporting gs:// urls
++ dont error on regions larger than chromosome.
+
v0.3.3
======
+ allow specifying a custom index by passing '/path/to/bam##idx##/other-path/to/index.bai'
=====================================
README.md
=====================================
@@ -5,7 +5,6 @@ fast BAM/CRAM depth calculation for **WGS**, **exome**, or **targeted sequencing
![logo](https://user-images.githubusercontent.com/1739/29678184-da1f384c-88ba-11e7-9d98-df4fe3a59924.png "logo")
[![Build](https://github.com/brentp/mosdepth/workflows/Build/badge.svg?branch=master)](https://github.com/brentp/mosdepth/actions?query=workflow%3ABuild)
-[![Build Status](https://travis-ci.com/brentp/mosdepth.svg?branch=master)](https://travis-ci.com/brentp/mosdepth)
[![citation](https://img.shields.io/badge/cite-open%20access-orange.svg)](https://academic.oup.com/bioinformatics/article/doi/10.1093/bioinformatics/btx699/4583630?guestAccessKey=35b55064-4566-4ab3-a769-32916fa1c6e6)
@@ -26,7 +25,7 @@ when appropriate, the output files are bgzipped and indexed for ease of use.
## usage
```
-mosdepth 0.3.0
+mosdepth 0.3.4
Usage: mosdepth [options] <prefix> <BAM-or-CRAM>
@@ -157,7 +156,7 @@ Another quick way is to [![install with bioconda](https://img.shields.io/badge/i
It can also be installed with `brew` as `brew install brewsci/bio/mosdepth` or used via docker with quay:
```
-docker pull quay.io/biocontainers/mosdepth:0.2.4--he527e40_0
+docker pull quay.io/biocontainers/mosdepth:0.3.3--h37c5b7d_2
docker run -v /hostpath/:/opt/mount quay.io/biocontainers/mosdepth:0.2.4--he527e40_0 mosdepth -n --fast-mode -t 4 --by 1000 /opt/mount/sample /opt/mount/$bam
```
@@ -171,8 +170,7 @@ contains `libhts.so`. e.g.
If you get the error `could not import: hts_check_EOF` you may need to
install a more recent version of htslib.
-If you do want to install from source, see the [travis.yml](https://github.com/brentp/mosdepth/blob/master/.travis.yml)
-and the [install.sh](https://github.com/brentp/mosdepth/blob/master/scripts/install.sh).
+If you do want to install from source, see the [install.sh](https://github.com/brentp/mosdepth/blob/master/scripts/install.sh).
If you use archlinux, you can [install as a package](https://aur.archlinux.org/packages/mosdepth/)
=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+mosdepth (0.3.5+ds-1) UNRELEASED; urgency=medium
+
+ * Team upload.
+ * New upstream version
+ * Standards-Version: 4.6.2 (routine-update)
+
+ -- Andreas Tille <tille at debian.org> Fri, 27 Oct 2023 07:10:35 +0200
+
mosdepth (0.3.3+ds-2) unstable; urgency=medium
* Team upload.
=====================================
debian/control
=====================================
@@ -11,7 +11,7 @@ Build-Depends: debhelper-compat (= 13),
help2man,
samtools,
libhts-dev
-Standards-Version: 4.6.1
+Standards-Version: 4.6.2
Vcs-Browser: https://salsa.debian.org/med-team/mosdepth
Vcs-Git: https://salsa.debian.org/med-team/mosdepth.git
Homepage: https://github.com/brentp/mosdepth
=====================================
depthstat.nim
=====================================
@@ -18,7 +18,7 @@ proc add*[T](c: var CountStat, value: T) {.inline.} =
if value.int > c.counts.high.int:
c.counts[c.counts.high].inc
elif value < 0:
- raise newException(IndexError, "error setting negative depth value:" & $value)
+ raise newException(IndexDefect, "error setting negative depth value:" & $value)
else:
c.counts[value].inc
=====================================
mosdepth.nim
=====================================
@@ -577,6 +577,12 @@ proc main(bam: hts.Bam, chrom: region_t, mapq: int, eflag: uint16, iflag: uint16
var fd4:D4
var fbase: BGZI
+ # use clear to set min depth to uint32.high
+ chrom_region_stat.clear()
+ chrom_stat.clear()
+ global_region_stat.clear()
+ global_stat.clear()
+
var region_distribution = new_seq[int64](1000)
var global_distribution = new_seq[int64](1000)
@@ -644,7 +650,7 @@ proc main(bam: hts.Bam, chrom: region_t, mapq: int, eflag: uint16, iflag: uint16
for r in region_gen(window, target, bed_regions):
if tid != -2:
me = imean(arr, r.start, r.stop, cs)
- chrom_region_stat = chrom_region_stat + newDepthStat(arr[r.start..<r.stop])
+ chrom_region_stat = chrom_region_stat + newDepthStat(arr[r.start..<min(arr.len.uint32, r.stop)])
var m = su.format_float(me, ffDecimal, precision=precision)
if r.name == "":
@@ -765,7 +771,7 @@ proc threshold_args*(ts: string): seq[int] =
proc check_cram_has_ref(cram_path: string, fasta:string) =
- if fasta != "" and exists_file(fasta):
+ if fasta != "" and fileExists(fasta):
return
if cram_path.ends_with(".cram"):
stderr.write_line("[mosdepth] ERROR: specify a reference file (or set REF_PATH env var) for decoding CRAM")
@@ -775,7 +781,7 @@ when(isMainModule):
when not defined(release) and not defined(lto):
stderr.write_line "[mosdepth] WARNING: built in debug mode; will be slow"
- let version = "mosdepth 0.3.3"
+ let version = "mosdepth 0.3.5"
let env_fasta = getEnv("REF_PATH")
var doc = format("""
$version
=====================================
mosdepth.nimble
=====================================
@@ -1,13 +1,13 @@
# Package
-version = "0.3.3"
+version = "0.3.5"
author = "Brent Pedersen"
description = "fast depth"
license = "MIT"
# Dependencies
-requires "hts >= 0.3.21", "docopt >= 0.6.8", "nim >= 1.0.0", "https://github.com/brentp/d4-nim"
+requires "hts >= 0.3.22", "docopt >= 0.6.8", "nim >= 1.0.0", "https://github.com/brentp/d4-nim >= 0.0.3"
bin = @["mosdepth"]
skipDirs = @["tests"]
=====================================
tests/funcs.nim
=====================================
@@ -1,8 +1,21 @@
import unittest
import mosdepth
+import depthstat
import os
suite "mosdepth-suite":
+
+ test "depthstat min":
+ var d = newSeq[int32]()
+ var t = newDepthStat(d)
+ check t.min_depth > 0
+
+ var dd: depth_stat
+ # "not that this always starts as 0 so we must set clear to increase it"
+ check dd.min_depth == 0
+ dd.clear()
+ check dd.min_depth > 0
+
test "test-quantize-args":
var rs = get_quantize_args(":1")
View it on GitLab: https://salsa.debian.org/med-team/mosdepth/-/compare/2b624dc1a04bf033d2503bb7c3920ad7f37db8b7...fed4dc3b14b1f5add8d5d27f0a719a4ab9ff4189
--
View it on GitLab: https://salsa.debian.org/med-team/mosdepth/-/compare/2b624dc1a04bf033d2503bb7c3920ad7f37db8b7...fed4dc3b14b1f5add8d5d27f0a719a4ab9ff4189
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20231027/456d7947/attachment-0001.htm>
More information about the debian-med-commit
mailing list