-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #81 from epifluidlab/coverage-fix
Update utils.py
- Loading branch information
Showing
5 changed files
with
75 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
cell-free DNA from paired-end sequencing data. | ||
""" | ||
|
||
__version__ = "0.6.1" | ||
__version__ = "0.6.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
""" | ||
Tests for finaletoolkit.frag.coverage module and associated | ||
subcommands, which calculate fragment coverage. | ||
""" | ||
|
||
import os | ||
import filecmp | ||
import difflib | ||
|
||
import pytest | ||
|
||
from finaletoolkit.frag.coverage import * | ||
|
||
class TestSingleCoverage: | ||
def test_coverage(self, request): | ||
bam = request.path.parent / 'data' / '12.3444.b37.bam' | ||
chrom, start, stop, name, cov = single_coverage(bam, '12', 0, None, quality_threshold=0) | ||
|
||
assert chrom == '12' | ||
assert start == 0 | ||
assert cov == pytest.approx(17) | ||
|
||
def test_coverage_interval(self, request): | ||
bam = request.path.parent / 'data' / '12.3444.b37.bam' | ||
chrom, start, stop, name, cov = single_coverage( | ||
bam, '12', 34443000, 34447000, quality_threshold=0) | ||
|
||
assert chrom == '12' | ||
assert start == 34443000 | ||
assert stop == 34447000 | ||
assert cov == pytest.approx(17) | ||
|
||
def test_coverage_interval_midpoints(self, request): | ||
bam = request.path.parent / 'data' / '12.3444.b37.bam' | ||
chrom, start, stop, name, cov = single_coverage( | ||
bam, '12', 34443400, 34443600, quality_threshold=0) | ||
|
||
assert chrom == '12' | ||
assert start == 34443400 | ||
assert stop == 34443600 | ||
assert cov == pytest.approx(2) | ||
|
||
class TestCoverage: | ||
def coverage(self, request): | ||
pass |