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 -[](https://github.com/telatin/covtobed/blob/master/LICENSE) -[](http://bioconda.github.io/recipes/covtobed/README.html) + +[](http://bioconda.github.io/recipes/covtobed/README.html) [](https://anaconda.org/bioconda/covtobed) [](https://travis-ci.org/telatin/covtobed) -[](https://hub.docker.com/r/andreatelatin/covtobed) +[](https://hub.docker.com/r/andreatelatin/covtobed) [](https://www.codacy.com/manual/telatin/covtobed?utm_source=github.com&utm_medium=referral&utm_content=telatin/covtobed&utm_campaign=Badge_Grade) + [](https://joss.theoj.org/papers/0ed74df9f40a58a852bf3fff512acd2b) +[](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) [](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
