Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promote error correction scripts from sandbox #1743

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/stamps/do.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ normalize-by-median.py -k 20 -C 10 -x 1e8 ../../data/stamps-reads.fa.gz \
abundance-dist.py stamps-dn.ct stamps-reads.fa.gz.keep stamps-dn.hist
do-partition.py -k 32 -x 1e8 -s 1e4 -T 8 stamps-part \
../../data/stamps-reads.fa.gz
../../sandbox/error-correct-pass2.py --trusted-cov 10 stamps-dn.ct \
error-correct-pass2.py --trusted-cov 10 stamps-dn.ct \
../../data/stamps-reads.fa.gz
load-into-counting.py -x 1e8 -k 20 stamps-corr.ct stamps-reads.fa.gz.corr
abundance-dist.py stamps-corr.ct stamps-reads.fa.gz.corr stamps-corr.hist
Expand Down
File renamed without changes.
File renamed without changes.
15 changes: 7 additions & 8 deletions tests/test_sandbox_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def test_error_correct_pass2():
outfile = utils.get_temp_filename('test-abund-read-3.fa.corr')
args = ['--trusted-cov', '5', '-o', outfile]
args.extend([hashfile, infile])
(status, out, err) = utils.runscript(script, args, sandbox=True)
(status, out, err) = utils.runscript(script, args)
assert 'trusted: 5' in out, out
assert os.path.exists(outfile)
assert os.stat(outfile).st_size > 2000
Expand All @@ -383,7 +383,7 @@ def test_error_correct_pass2_fq():
outfile = 'paired.fq.1.corr' # Warning: output file in cwd
args = ['--trusted-cov', '2']
args.extend([hashfile, infile])
(status, out, err) = utils.runscript(script, args, sandbox=True)
(status, out, err) = utils.runscript(script, args)
assert os.path.exists(outfile)
assert os.stat(outfile).st_size > 700
os.remove(outfile)
Expand All @@ -397,7 +397,7 @@ def test_correct_reads():
outfile = utils.get_temp_filename('simple-genome-reads.fa.corr')
args = ['-o', outfile]
args.extend([infile])
(status, out, err) = utils.runscript(script, args, sandbox=True)
(status, out, err) = utils.runscript(script, args)
assert 'fp rate' in err, err
assert os.path.exists(outfile)
assert os.stat(outfile).st_size > 132000
Expand All @@ -411,7 +411,7 @@ def test_correct_reads_other():
outfile = 'test-abund-read-paired.fa.corr' # Warning output in cwd
args = []
args.extend([infile])
(status, out, err) = utils.runscript(script, args, sandbox=True)
(status, out, err) = utils.runscript(script, args)
assert 'fp rate' in err, err
assert os.path.exists(outfile)
assert os.stat(outfile).st_size > 800
Expand All @@ -426,8 +426,7 @@ def test_correct_reads_duplicate():
outfile = 'test-abund-read-paired.fa.corr' # Warning output in cwd
args = []
args.extend([infile, infile])
(status, out, err) = utils.runscript(script, args, sandbox=True,
fail_ok=True)
(status, out, err) = utils.runscript(script, args, fail_ok=True)
assert 'same filename multiple times' in str(err)
assert status == 1

Expand All @@ -441,14 +440,14 @@ def test_correct_reads_fq():
outfile = utils.get_temp_filename('test-reads.fq.corr')
args = ['-o', outfile, '--savegraph', savegraph, '--variable-coverage']
args.extend([infile])
(status, out, err) = utils.runscript(script, args, sandbox=True)
(status, out, err) = utils.runscript(script, args)
assert 'fp rate' in err, err
assert os.path.exists(outfile)
assert os.stat(outfile).st_size > 1500
os.remove(outfile)
args = ['-o', outfile, '--loadgraph', savegraph]
args.extend([infile])
(status, out, err) = utils.runscript(script, args, sandbox=True)
(status, out, err) = utils.runscript(script, args)
assert 'fp rate' in err, err
assert os.path.exists(outfile)
assert os.stat(outfile).st_size > 1500