Skip to content

Commit

Permalink
made module, made class names more consistent snake-to-camel
Browse files Browse the repository at this point in the history
  • Loading branch information
rvosa committed Sep 8, 2024
1 parent 6f6fb8a commit 365ba3e
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 11 deletions.
Empty file added bactria/__init__py.py
Empty file.
19 changes: 19 additions & 0 deletions bactria/tools/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from .blastdb_aliastool import BlastdbAliastool
from .blastdbcmd import Blastdbcmd
from .blastn import Blastn
from .hmmalign import Hmmalign
from .makeblastdb import Makeblastdb
from .megatree_loader import MegatreeLoader
from .megatree_pruner import MegatreePruner
from .raxml_ng import RaxmlNg

__all__ = [
'BlastdbAliastool',
'Blastdbcmd',
'Blastn',
'Hmmalign',
'Makeblastdb',
'MegatreeLoader',
'MegatreePruner',
'RaxmlNg',
]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import Optional, List
from bactria.tool_runner import ToolRunner
from .tool_runner import ToolRunner
from bactria.config import Config


Expand Down
6 changes: 3 additions & 3 deletions bactria/blastdbcmd.py → bactria/tools/blastdbcmd.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
from typing import Optional, List
from bactria.tool_runner import ToolRunner
from .tool_runner import ToolRunner
from bactria.config import Config


class Blastdbcommand(ToolRunner):
class Blastdbcmd(ToolRunner):
"""
A subclass of ToolRunner specifically for running blastdbcmd.
Examples:
>>> config = Config()
>>> config.load_config('path/to/config.yaml')
>>> blastdbcmd_runner = Blastdbcommand(config)
>>> blastdbcmd_runner = Blastdbcmd(config)
>>> blastdbcmd_runner.set_db('nr')
>>> blastdbcmd_runner.set_entry(['NP_000508.1', 'NP_001018081.2'])
>>> blastdbcmd_runner.set_outfmt('%f')
Expand Down
6 changes: 3 additions & 3 deletions bactria/blastn.py → bactria/tools/blastn.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
from typing import List, Union
from bactria.tool_runner import ToolRunner
from .tool_runner import ToolRunner
from bactria.config import Config


class BLASTN(ToolRunner):
class Blastn(ToolRunner):
"""
A subclass of ToolRunner specifically for running BLASTN (Nucleotide-Nucleotide BLAST).
Examples:
>>> config = Config()
>>> config.load_config('path/to/config.yaml')
>>> blastn_runner = BLASTN(config)
>>> blastn_runner = Blastn(config)
>>> blastn_runner.set_query('input.fasta')
>>> blastn_runner.set_db('nr')
>>> blastn_runner.set_out('output.txt')
Expand Down
2 changes: 1 addition & 1 deletion bactria/hmmalign.py → bactria/tools/hmmalign.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import List
from bactria.tool_runner import ToolRunner
from .tool_runner import ToolRunner
from bactria.config import Config


Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions bactria/raxml_ng.py → bactria/tools/raxml_ng.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
from typing import Optional, List, Union
from bactria.tool_runner import ToolRunner
from .tool_runner import ToolRunner
from bactria.config import Config


class RAXMLNG(ToolRunner):
class RaxmlNg(ToolRunner):
"""
A subclass of ToolRunner specifically for running RAxML-NG (Randomized Axelerated Maximum Likelihood - Next Generation).
Examples:
>>> config = Config()
>>> config.load_config('path/to/config.yaml')
>>> raxml_runner = RAXMLNG(config)
>>> raxml_runner = RaxmlNg(config)
>>> raxml_runner.set_msa('alignment.fa')
>>> raxml_runner.set_model('GTR+G')
>>> raxml_runner.set_prefix('test_run')
Expand Down
File renamed without changes.

0 comments on commit 365ba3e

Please sign in to comment.