Skip to content

Commit

Permalink
Added --normdup flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Lennart authored and Lennart committed Oct 31, 2019
1 parent cbe6173 commit 303660b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ downloaded, however, it does not install R [dependencies](#dependencies).
pip install -U git+https://github.com/CenterForMedicalGeneticsGhent/WisecondorX
```

Alternatively, [Conda](https://conda.io/docs/) additionally installs all necessary [depedencies](#dependencies), however, the latest version might not be downloaded.
Alternatively, [Conda](https://conda.io/docs/) additionally installs all necessary [depedencies](#dependencies),
however, the latest version might not be downloaded.
```bash

conda install -f -c conda-forge -c bioconda wisecondorx
Expand Down Expand Up @@ -65,6 +66,7 @@ WisecondorX convert input.bam output.npz [--optional arguments]
<br>Optional argument <br><br> | Function
:--- | :---
`--binsize x` | Size per bin in bp; the reference bin size should be a multiple of this value. Note that this parameter does not impact the resolution, yet it can be used to optimize processing speed (default: x=5e3)
`--normdup` | Use this flag to avoid duplicate removal


&rarr; Bash recipe at `./pipeline/convert.sh`
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /usr/bin/env python
from setuptools import setup, find_packages

version = '1.1.4'
version = '1.1.5'
dl_version = 'master' if 'dev' in version else '{}'.format(version)

setup(
Expand Down
4 changes: 2 additions & 2 deletions wisecondorX/convert_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def convert_bam(args):
if not read.is_proper_pair:
reads_pairf += 1
continue
if larp == read.pos and larp2 == read.next_reference_start:
if not args.normdup and larp == read.pos and larp2 == read.next_reference_start:
reads_rmdup += 1
else:
if read.mapping_quality >= 1:
Expand All @@ -66,7 +66,7 @@ def convert_bam(args):
reads_seen += 1
larp = read.pos
else:
if larp == read.pos:
if not args.normdup and larp == read.pos:
reads_rmdup += 1
else:
if read.mapping_quality >= 1:
Expand Down
3 changes: 3 additions & 0 deletions wisecondorX/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,9 @@ def main():
type=float,
default=5e3,
help='Bin size (bp)')
parser_convert.add_argument('--normdup',
action='store_true',
help='Do not remove duplicates')
parser_convert.set_defaults(func=tool_convert)

parser_newref = subparsers.add_parser('newref',
Expand Down

0 comments on commit 303660b

Please sign in to comment.