[med-svn] [Git][med-team/mosdepth][upstream] New upstream version 0.3.2+ds

Andreas Tille (@tille) gitlab at salsa.debian.org
Wed Oct 6 15:53:13 BST 2021



Andreas Tille pushed to branch upstream at Debian Med / mosdepth


Commits:
7fc352ea by Andreas Tille at 2021-10-06T16:47:56+02:00
New upstream version 0.3.2+ds
- - - - -


5 changed files:

- .github/workflows/build.yml
- README.md
- mosdepth.nim
- mosdepth.nimble
- scripts/install.sh


Changes:

=====================================
.github/workflows/build.yml
=====================================
@@ -50,26 +50,27 @@ jobs:
         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
 
-
-    - name: Install d4 
-        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/
-
     # Setup htslib
     - name: Install htslib (linux)
       if: runner.os == 'Linux'
       run: |
         cd
         git clone --recursive https://github.com/samtools/htslib.git
-        cd htslib && git checkout 1.10 && autoheader && autoconf && ./configure --enable-libcurl
+        cd htslib && git checkout 1.11 && autoheader && autoconf && ./configure --enable-libcurl
         cd
-        make -j 4 -C htslib
+        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/
+
+
     - name: Install hstlib (macos)
       if: runner.os == 'macOS'
       run: |


=====================================
README.md
=====================================
@@ -63,6 +63,7 @@ Other options:
   -T --thresholds <thresholds>  for each interval in --by, write number of bases covered by at
                                 least threshold bases. Specify multiple integer values separated
                                 by ','.
+  -m --use-median               output median of each region (in --by) instead of mean.
   -R --read-groups <string>     only calculate depth for these comma-separated read groups IDs.
   -h --help                     show help
 
@@ -207,7 +208,7 @@ close to 30X coverage for almost 40% of the genome.
 
 ![Y Example](https://user-images.githubusercontent.com/1739/29646191-2a246564-883f-11e7-951a-aa68d7a1a6ed.png "Y Example")
 
-See [this blog post](http://www.gettinggeneticsdone.com/2014/03/visualize-coverage-exome-targeted-ngs-bedtools.html) for
+See [this blog post](https://web.archive.org/web/20181018084459/http://www.gettinggeneticsdone.com/2014/03/visualize-coverage-exome-targeted-ngs-bedtools.html) for
 more details.
 
 ## thresholds


=====================================
mosdepth.nim
=====================================
@@ -229,7 +229,7 @@ proc init(arr: var coverage_t, tlen:int) =
       arr.set_len(int(tlen))
   zeroMem(arr[0].addr, len(arr) * sizeof(arr[0]))
 
-proc coverage(bam: hts.Bam, arr: var coverage_t, region: var region_t, mapq:int= -1, eflag: uint16=1796, iflag:uint16=0, read_groups:seq[cstring]=(@[]), fast_mode:bool=false): int =
+proc coverage(bam: hts.Bam, arr: var coverage_t, region: var region_t, mapq:int= -1, eflag: uint16=1796, iflag:uint16=0, read_groups:seq[string]=(@[]), fast_mode:bool=false): int =
   # depth updates arr in-place and yields the tid for each chrom.
   # returns -1 if the chrom is not found in the bam header
   # returns -2 if the chrom was found in the header, but there was no data for it
@@ -258,7 +258,7 @@ proc coverage(bam: hts.Bam, arr: var coverage_t, region: var region_t, mapq:int=
     if iflag != 0 and ((rec.flag and iflag) == 0):
       continue
     if has_read_groups:
-      var t = tag[cstring](rec, "RG")
+      var t = tag[string](rec, "RG")
       if t.isNone or not read_groups.contains(t.get):
         continue
     if tgt.tid != rec.b.core.tid:
@@ -551,7 +551,7 @@ proc main(bam: hts.Bam, chrom: region_t, mapq: int, eflag: uint16, iflag: uint16
   var
     targets = bam.hdr.targets
     sub_targets = get_targets(targets, chrom)
-    read_groups: seq[cstring]
+    read_groups: seq[string]
     rchrom : region_t
     arr: coverage_t
     prefix: string = $(args["<prefix>"])
@@ -582,7 +582,7 @@ proc main(bam: hts.Bam, chrom: region_t, mapq: int, eflag: uint16, iflag: uint16
 
   if $args["--read-groups"] != "nil":
     for r in ($args["--read-groups"]).split(','):
-      read_groups.add(r.cstring)
+      read_groups.add($r)
   var levels = get_min_levels(targets)
 
   var chrom_region_distribution, chrom_global_distribution: seq[int64]
@@ -775,7 +775,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.1"
+  let version = "mosdepth 0.3.2"
   let env_fasta = getEnv("REF_PATH")
   var doc = format("""
   $version
@@ -845,7 +845,7 @@ Other options:
     region = $args["--by"]
   else:
     if thresholds.len != 0:
-      stderr.write_line("[mosdepth] error --thresholds can noly be used when --by is specified.")
+      stderr.write_line("[mosdepth] error --thresholds can only be used when --by is specified.")
       quit(2)
   GC_disableMarkAndSweep()
   var fasta: cstring = nil


=====================================
mosdepth.nimble
=====================================
@@ -1,6 +1,6 @@
 # Package
 
-version       = "0.3.1"
+version       = "0.3.2"
 author        = "Brent Pedersen"
 description   = "fast depth"
 license       = "MIT"


=====================================
scripts/install.sh
=====================================
@@ -23,16 +23,17 @@ $base/nim-$BRANCH/bin/nimble install -y
 
 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -qy
 
-export HTSLIB=dynamic
+export HTSLIB=system
 sudo apt-get update
 sudo apt-get install git llvm curl wget libcurl4-openssl-dev
-wget https://github.com/samtools/htslib/archive/1.10.2.tar.gz
-tar xzf 1.10.2.tar.gz
-cd htslib-1.10.2/
-autoheader && autoconf && ./configure --enable-libcurl
+wget https://github.com/samtools/htslib/archive/1.11.tar.gz
+tar xzf 1.11.tar.gz
+cd htslib-1.11/
+autoheader && autoconf && ./configure --disable-libcurl
 sudo make -j4 install
 git clone https://github.com/38/d4-format
 cd d4-format
+
 ~/.cargo/bin/cargo build --release
 sudo cp ../d4-format/target/release/libd4binding.* /usr/local/lib
 sudo cp ./d4binding/include/d4.h /usr/local/include/



View it on GitLab: https://salsa.debian.org/med-team/mosdepth/-/commit/7fc352ea0169927715382ecc0833f75d4ec81653

-- 
View it on GitLab: https://salsa.debian.org/med-team/mosdepth/-/commit/7fc352ea0169927715382ecc0833f75d4ec81653
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/20211006/e7d3459f/attachment-0001.htm>


More information about the debian-med-commit mailing list