-
Notifications
You must be signed in to change notification settings - Fork 59
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 #53 from martinghunt/expose_spades_careful_only_as…
…semble Expose spades careful, only-assembler
- Loading branch information
Showing
16 changed files
with
20,101 additions
and
9 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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,23 @@ | ||
#!/usr/bin/env bash | ||
# This is the script that was used to generate the | ||
# test data, which is used when running 'circlator test' | ||
set -e | ||
set -x | ||
|
||
ref=test_ref.fa | ||
for_reads=test_for_reads.fa | ||
reads=test_reads.fq.gz | ||
contigs=test_contigs.fa | ||
|
||
fastaq make_random_contigs --seed 42 1 300000 $ref | ||
samtools faidx $ref | ||
|
||
echo ">1.twice" > $for_reads.$$ | ||
samtools faidx $ref 1 1 | grep -v ">" >> $for_reads.$$ | ||
fastaq to_fasta $for_reads.$$ $for_reads | ||
rm $for_reads.$$ | ||
fastaq to_perfect_reads --seed 42 $for_reads $reads 16000 1 20 8000 | ||
|
||
|
||
samtools faidx test_ref.fa 1:500-148000 > $contigs | ||
samtools faidx test_ref.fa 1:150000-299500 >> $contigs |
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
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 @@ | ||
1 300000 3 60 61 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import argparse | ||
import os | ||
import shutil | ||
import sys | ||
import subprocess | ||
import circlator | ||
|
||
def run(): | ||
parser = argparse.ArgumentParser( | ||
description = 'Run Circlator on a small test dataset', | ||
usage = 'ariba test [options] <outdir>') | ||
parser.add_argument('--threads', type=int, help='Number of threads [%(default)s]', default=1, metavar='INT') | ||
parser.add_argument('outdir', help='Name of output directory') | ||
options = parser.parse_args() | ||
|
||
print('Running Circlator on test data...') | ||
|
||
try: | ||
os.mkdir(options.outdir) | ||
os.chdir(options.outdir) | ||
except: | ||
print('Error making output directory "', options.outdir, '". Cannot continue.', sep='', file=sys.stderr) | ||
sys.exit(1) | ||
|
||
print('Made output directory. Copying test data files into it:') | ||
|
||
modules_dir = os.path.dirname(os.path.abspath(circlator.__file__)) | ||
test_data_dir = os.path.join(modules_dir, 'data') | ||
|
||
for filename in ['test_contigs.fa', 'test_reads.fq.gz']: | ||
shutil.copy(os.path.join(test_data_dir, filename), filename) | ||
print(' copied', filename) | ||
|
||
|
||
cmd = ' '.join([ | ||
sys.argv[0], | ||
'all', | ||
'--threads', str(options.threads), | ||
'--verbose', | ||
'--assemble_spades_use_first', | ||
'test_contigs.fa', | ||
'test_reads.fq.gz', | ||
'OUT', | ||
]) | ||
|
||
print('\nRunning Circlator with:', cmd, '', sep='\n') | ||
|
||
return_code = subprocess.call(cmd, shell=True) | ||
|
||
if return_code != 0: | ||
print('\nSomething went wrong. See above for error message(s). Return code was', return_code) | ||
sys.exit(1) | ||
|
||
print('-' * 79) | ||
print('Finished run on test data OK') |
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