-
Notifications
You must be signed in to change notification settings - Fork 44
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 #18 from dpryan79/fix17
Fix #17
- Loading branch information
Showing
53 changed files
with
113 additions
and
40 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ language: c | |
os: | ||
- linux | ||
- osx | ||
script: make | ||
script: make test | ||
compiler: | ||
- clang | ||
- gcc |
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
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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 |
---|---|---|
@@ -1,33 +1,48 @@ | ||
from subprocess import check_call | ||
import os | ||
import os.path as op | ||
|
||
wd = op.dirname(op.realpath(__file__)) | ||
os.chdir(wd) | ||
|
||
def rm(f): | ||
try: | ||
os.unlink(f) | ||
except OSError: | ||
pass | ||
|
||
rm('po') | ||
check_call('cd .. && make', shell=True) | ||
assert op.exists('../PileOMeth') | ||
|
||
rm('ct_aln_CpG.bedGraph') | ||
check_call('../PileOMeth extract ct100.fa ct_aln.bam -q 2', shell=True) | ||
assert op.exists('ct_aln_CpG.bedGraph') | ||
lines = sum(1 for _ in open('ct_aln_CpG.bedGraph')) | ||
assert lines == 1 | ||
|
||
rm('ct_aln_CpG.bedGraph') | ||
|
||
rm('cg_aln_CpG.bedGraph') | ||
check_call('../PileOMeth extract cg100.fa cg_aln.bam -q 2', shell=True) | ||
assert op.exists('cg_aln_CpG.bedGraph') | ||
lines = sum(1 for _ in open('cg_aln_CpG.bedGraph')) | ||
assert lines > 1 | ||
rm('cg_aln_CpG.bedGraph') | ||
|
||
# should be none with q > 10 | ||
check_call('../PileOMeth extract cg100.fa cg_aln.bam -q 10', shell=True) | ||
assert op.exists('cg_aln_CpG.bedGraph') | ||
lines = sum(1 for _ in open('cg_aln_CpG.bedGraph')) | ||
assert lines == 1 | ||
rm('cg_aln_CpG.bedGraph') | ||
|
||
# Test the new methylKit option | ||
check_call('../PileOMeth extract --methylKit --CHH --CHG cg100.fa cg_aln.bam -q 2', shell=True) | ||
assert op.exists('cg_aln_CpG.methylKit') | ||
lines = sum(1 for _ in open('cg_aln_CpG.methylKit')) | ||
assert lines > 1 | ||
rm('cg_aln_CpG.methylKit') | ||
lines = sum(1 for _ in open('cg_aln_CHG.methylKit')) | ||
assert lines == 1 | ||
rm('cg_aln_CHG.methylKit') | ||
assert op.exists('cg_aln_CHH.methylKit') | ||
lines = sum(1 for _ in open('cg_aln_CHH.methylKit')) | ||
assert lines == 1 | ||
rm('cg_aln_CHH.methylKit') |