Nilesh Patra pushed to branch upstream at Debian Med / covtobed


Commits:
e378a0cd by Nilesh Patra at 2020-10-26T02:14:17+05:30
New upstream version 1.2.0+dfsg
- - - - -


2 changed files:

- README.md
- base.cpp


Changes:

=====================================
README.md
=====================================
@@ -1,12 +1,14 @@
 # covtobed
 
-[![License](https://img.shields.io/github/license/telatin/covtobed?color=blue)](https://github.com/telatin/covtobed/blob/master/LICENSE)
-[![install with 
bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat)](http://bioconda.github.io/recipes/covtobed/README.html)
+
+[![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)
-[![Docker 
build](https://img.shields.io/docker/cloud/build/andreatelatin/covtobed)](https://hub.docker.com/r/andreatelatin/covtobed)
+[![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)
+
 
[![status](https://joss.theoj.org/papers/0ed74df9f40a58a852bf3fff512acd2b/status.svg)](https://joss.theoj.org/papers/0ed74df9f40a58a852bf3fff512acd2b)
+[![License](https://img.shields.io/github/license/telatin/covtobed?color=blue)](https://github.com/telatin/covtobed/blob/master/LICENSE)
 
 ### a tool to generate BED coverage tracks from BAM files
 
@@ -15,6 +17,10 @@ Reads one (or more) 
[alignment](https://en.wikipedia.org/wiki/Sequence_alignment
 
 :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`)
+* Can print _strand specific_ coverage to check for strand imbalance
+* Can print the _physical coverage_ (with paired-end or mate-paired libraries)
 
 [![covtobed 
example](img/covtobed-vignette.png)](https://github.com/telatin/covtobed/wiki)
 
@@ -45,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)


=====================================
base.cpp
=====================================
@@ -16,7 +16,7 @@ using namespace std;
 typedef uint32_t DepthType; // type for depth of coverage, kept it small
 const char ref_char = '>';  // reference prefix for "counts" output
 
-const string VERSION = "%prog 1.1.4"
+const string VERSION = "%prog 1.2.0"
        "\nCopyright (C) 2014-2019 Giovanni Birolo and Andrea Telatin\n"
        "https://github.com/telatin/covtobed - License MIT"
        ".\n"
@@ -192,6 +192,7 @@ int main(int argc, char *argv[]) {
        parser.add_option("-m", 
"--min-cov").metavar("MINCOV").type("int").set_default("0").help("print BED 
feature only if the coverage is bigger than (or equal to) MINCOV (default: 
%default)");
        parser.add_option("-x", 
"--max-cov").metavar("MAXCOV").type("int").set_default("100000").help("print 
BED feature only if the coverage is lower than MAXCOV (default: %default)");
        parser.add_option("-l", 
"--min-len").metavar("MINLEN").type("int").set_default("1").help("print BED 
feature only if its length is bigger (or equal to) than MINLELN (default: 
%default)");
+       parser.add_option("-z", 
"--min-ctg-len").metavar("MINCTGLEN").type("int").help("Skip reference 
sequences (contigs) shorter than this value");
        parser.add_option("-d", 
"--discard-invalid-alignments").action("store_true").set_default("0").help("skip
 duplicates, failed QC, and non primary alignment, minq>0 (or user-defined if 
higher) (default: %default)");
 
 
@@ -208,6 +209,7 @@ int main(int argc, char *argv[]) {
        const int  minimum_coverage  = options.get("min_cov");
        const int  maximum_coverage  = options.get("max_cov");
        const int  minimum_length    = options.get("min_len");
+       const int  minimum_contig_len= options.get("min_ctg_len");
        int min_mapq                 = options.get("min_mapq");
 
        if (only_valid and !min_mapq) {
@@ -232,6 +234,9 @@ int main(int argc, char *argv[]) {
                for (const auto &ref : input.get_ref_data()) { // loop on 
reference
                        // init new reference data
                        const int ref_id = input.get_ref_id(ref.RefName);
+                       if (ref.RefLength <= minimum_contig_len) {
+                               continue;
+                       }
                        debug cerr << "[R] Reference: " << ref_id << endl;
                        PositionType last_pos = 0;
                        priority_queue<CovEnd> coverage_ends;



View it on GitLab: 
https://salsa.debian.org/med-team/covtobed/-/commit/e378a0cd66fceb3de0332c307fabf12d22d2ab6e

-- 
View it on GitLab: 
https://salsa.debian.org/med-team/covtobed/-/commit/e378a0cd66fceb3de0332c307fabf12d22d2ab6e
You're receiving this email because of your account on salsa.debian.org.


_______________________________________________
debian-med-commit mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-commit

Reply via email to