Skip to content

Commit

Permalink
Merge pull request #49 from eppinglen/master
Browse files Browse the repository at this point in the history
Bug fix due to ariba --max_noncoding_length parameter
  • Loading branch information
eppinglen authored Mar 2, 2020
2 parents b3bd54b + cf83c1d commit 42cc15b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ addons:
- libgfortran3
- libncurses5-dev
python:
- "3.4"
- "3.7"
sudo: false
install:
- "source ./install_dependencies.sh"
Expand All @@ -17,4 +17,4 @@ before_script:
script:
- "coverage run setup.py test"
after_success:
- codecov
- codecov
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Clone the git repository:
git clone https://github.com/sanger-pathogens/seroba.git
```

Copy the databse to a directory:
Copy the database to a directory:
```
cp -r seroba/database my_directory
```
Expand Down
4 changes: 2 additions & 2 deletions seroba/ref_db_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def _check_meta_data(meta_tsv,gene_fasta):
@staticmethod
def _create_ariba_db(fasta_file,cluster_meta_data,cdhit_clusters,serogroup,out_dir,subdir):
ariba_dir = os.path.join(out_dir,'ariba_db',serogroup,subdir)
command = ['ariba prepareref','-f',fasta_file,'-m',cluster_meta_data,'--cdhit_clusters',cdhit_clusters, ariba_dir]
command = ['ariba prepareref','-f',fasta_file,'-m',cluster_meta_data,'--max_noncoding_length 50000 --cdhit_clusters',cdhit_clusters, ariba_dir]
print(' '.join(command))
os.system(' '.join(command))

Expand All @@ -155,7 +155,7 @@ def _create_complete_cdhit_cluster(meta_data_tsv,out_dir):
def _create_complete_ariba_db(self,complete_cdhit_cluster):
temp_dir = tempfile.mkdtemp(prefix = 'temp_ariba', dir=os.getcwd())
temp_dir = os.path.join(temp_dir,'ariba')
command = ['ariba prepareref','-f',self.ref_fasta,'--all_coding no --cdhit_clusters',complete_cdhit_cluster, temp_dir]
command = ['ariba prepareref','-f',self.ref_fasta,'--all_coding no --max_noncoding_length 50000 --cdhit_clusters',complete_cdhit_cluster, temp_dir]
os.system(' '.join(command))
shutil.copyfile(os.path.join(temp_dir,'02.cdhit.clusters.tsv'),os.path.join(self.out_dir,'cd_cluster.tsv'))
shutil.rmtree(temp_dir)
Expand Down
4 changes: 2 additions & 2 deletions seroba/tests/ref_db_creator_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ def test__create_ariba_db(self):

for i in range(len(db_files)):
with self.subTest (i= i):
exp = os.path.join(data_dir,'ariba_db',db_files[i])

exp = os.path.join(out_dir,'ariba_db','06A','ref',db_files[i])
print(exp)
self.assertTrue(os.path.isfile(exp) , 'files does not exists')
shutil.rmtree(out_dir)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

setup(
name='seroba',
version='1.0.1',
version='1.0.2',
description='SEROBA: Serotyping for illumina reads',
packages = find_packages(),
author='Lennard Epping',
Expand Down

0 comments on commit 42cc15b

Please sign in to comment.