Skip to content

Commit

Permalink
Merge pull request #49 from CenterForMedicalGeneticsGhent/v1.1.4
Browse files Browse the repository at this point in the history
Automated paired-end processing
  • Loading branch information
matthdsm authored Oct 24, 2019
2 parents d2f5a8b + cd26a8a commit a018b18
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 15 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ meant to be applicable not only to NIPT, but also gDNA, PGT, FFPE, LQB, ... etc.
## Mapping

We found superior results through WisecondorX when using [bowtie2](https://github.com/BenLangmead/bowtie2) as a mapper.
I would recommend using the latest version of the human reference genome (GRCh38). Note that it is important that
**no** read quality filtering is executed prior the running WisecondorX: this software requires low-quality reads
to distinguish informative bins from non-informative ones.
Note that it is important that **no** read quality filtering is executed prior to running WisecondorX: this software
requires low-quality reads to distinguish informative bins from non-informative ones.

## WisecondorX

Expand Down Expand Up @@ -67,7 +66,6 @@ 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)
`--paired` | Enables conversion for paired-end reads


&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.3'
version = '1.1.4'
dl_version = 'master' if 'dev' in version else '{}'.format(version)

setup(
Expand Down
11 changes: 4 additions & 7 deletions wisecondorX/convert_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,9 @@ def convert_bam(args):
if chr_name == 'Y':
chr_name = '24'

if args.paired:

for read in bam_chr:
if not (read.is_proper_pair and read.is_read1):
for read in bam_chr:
if read.is_paired:
if not read.is_proper_pair:
reads_pairf += 1
continue
if larp == read.pos and larp2 == read.next_reference_start:
Expand All @@ -66,9 +65,7 @@ def convert_bam(args):
larp2 = read.next_reference_start
reads_seen += 1
larp = read.pos
else:

for read in bam_chr:
else:
if larp == read.pos:
reads_rmdup += 1
else:
Expand Down
3 changes: 0 additions & 3 deletions wisecondorX/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,6 @@ def main():
type=float,
default=5e3,
help='Bin size (bp)')
parser_convert.add_argument('--paired',
action='store_true',
help='Use paired-end reads | default is single-end')
parser_convert.set_defaults(func=tool_convert)

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

0 comments on commit a018b18

Please sign in to comment.