diff --git a/bactria/blastdb_aliastool_runner.py b/bactria/blastdb_aliastool_runner.py index 96c6e25..9c64b19 100644 --- a/bactria/blastdb_aliastool_runner.py +++ b/bactria/blastdb_aliastool_runner.py @@ -3,9 +3,18 @@ from bactria.config import Config -class BlastdbAliastoolRunner(ToolRunner): +class BlastdbAliastool(ToolRunner): """ A subclass of ToolRunner specifically for running blastdb_aliastool. + + Examples: + >>> config = Config() + >>> config.load_config('path/to/config.yaml') + >>> aliastool_runner = BlastdbAliastoolRunner(config) + >>> aliastool_runner.set_db('my_blast_db') + >>> aliastool_runner.set_out('my_alias_db') + >>> aliastool_runner.set_gilist('my_gi_list.txt') + >>> return_code = aliastool_runner.run() """ def __init__(self, config: Config): @@ -193,12 +202,3 @@ def run(self) -> int: """ self.validate_parameters() return super().run() - -# Example usage: -# config = Config() -# config.load_config('path/to/config.yaml') -# aliastool_runner = BlastdbAliastoolRunner(config) -# aliastool_runner.set_db('my_blast_db') -# aliastool_runner.set_out('my_alias_db') -# aliastool_runner.set_gilist('my_gi_list.txt') -# return_code = aliastool_runner.run() \ No newline at end of file diff --git a/bactria/blastdbcmd_runner.py b/bactria/blastdbcmd_runner.py index 4ab74c1..2ba39af 100644 --- a/bactria/blastdbcmd_runner.py +++ b/bactria/blastdbcmd_runner.py @@ -3,9 +3,18 @@ from bactria.config import Config -class BlastdbcommandRunner(ToolRunner): +class Blastdbcommand(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.set_db('nr') + >>> blastdbcmd_runner.set_entry(['NP_000508.1', 'NP_001018081.2']) + >>> blastdbcmd_runner.set_outfmt('%f') + >>> return_code = blastdbcmd_runner.run() """ def __init__(self, config: Config): @@ -281,12 +290,3 @@ def run(self) -> int: """ self.validate_parameters() return super().run() - -# Example usage: -# config = Config() -# config.load_config('path/to/config.yaml') -# blastdbcmd_runner = BlastdbcommandRunner(config) -# blastdbcmd_runner.set_db('nr') -# blastdbcmd_runner.set_entry(['NP_000508.1', 'NP_001018081.2']) -# blastdbcmd_runner.set_outfmt('%f') -# return_code = blastdbcmd_runner.run() \ No newline at end of file diff --git a/bactria/blastn_runner.py b/bactria/blastn_runner.py index b62fdd9..b9165bd 100644 --- a/bactria/blastn_runner.py +++ b/bactria/blastn_runner.py @@ -3,9 +3,22 @@ from bactria.config import Config -class BLASTNRunner(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.set_query('input.fasta') + >>> blastn_runner.set_db('nr') + >>> blastn_runner.set_out('output.txt') + >>> blastn_runner.set_evalue(1e-5) + >>> blastn_runner.set_outfmt(6) + >>> blastn_runner.set_num_threads(4) + >>> blastn_runner.set_remote(True) + >>> return_code = blastn_runner.run() """ def __init__(self, config: Config): @@ -216,16 +229,3 @@ def build_command(self) -> List[str]: command.append(f'-{param}') return command - -# Example usage: -# config = Config() -# config.load_config('path/to/config.yaml') -# blastn_runner = BLASTNRunner(config) -# blastn_runner.set_query('input.fasta') -# blastn_runner.set_db('nr') -# blastn_runner.set_out('output.txt') -# blastn_runner.set_evalue(1e-5) -# blastn_runner.set_outfmt(6) -# blastn_runner.set_num_threads(4) -# blastn_runner.set_remote(True) -# return_code = blastn_runner.run() \ No newline at end of file diff --git a/bactria/hmmalign_runner.py b/bactria/hmmalign_runner.py index 3626f4f..01e2ad9 100644 --- a/bactria/hmmalign_runner.py +++ b/bactria/hmmalign_runner.py @@ -3,9 +3,19 @@ from bactria.config import Config -class HmmalignRunner(ToolRunner): +class Hmmalign(ToolRunner): """ A subclass of ToolRunner specifically for running hmmalign. + + Examples: + >>> config = Config() + >>> config.load_config('path/to/config.yaml') + >>> hmmalign_runner = Hmmalign(config) + >>> hmmalign_runner.set_hmmfile('model.hmm') + >>> hmmalign_runner.set_seqfile('sequences.fasta') + >>> hmmalign_runner.set_output('alignment.sto') + >>> hmmalign_runner.set_outformat('Stockholm') + >>> return_code = hmmalign_runner.run() """ def __init__(self, config: Config): @@ -140,13 +150,3 @@ def run(self) -> int: """ self.validate_parameters() return super().run() - -# Example usage: -# config = Config() -# config.load_config('path/to/config.yaml') -# hmmalign_runner = HmmalignRunner(config) -# hmmalign_runner.set_hmmfile('model.hmm') -# hmmalign_runner.set_seqfile('sequences.fasta') -# hmmalign_runner.set_output('alignment.sto') -# hmmalign_runner.set_outformat('Stockholm') -# return_code = hmmalign_runner.run() \ No newline at end of file diff --git a/bactria/makeblastdb_runner.py b/bactria/makeblastdb_runner.py index a0e43cf..48171e2 100644 --- a/bactria/makeblastdb_runner.py +++ b/bactria/makeblastdb_runner.py @@ -2,9 +2,19 @@ from bactria.tool_runner import ToolRunner from bactria.config import Config -class MakeblastdbRunner(ToolRunner): +class Makeblastdb(ToolRunner): """ A subclass of ToolRunner specifically for running makeblastdb. + + Examples: + >>> config = Config() + >>> config.load_config('path/to/config.yaml') + >>> makeblastdb_runner = Makeblastdb(config) + >>> makeblastdb_runner.set_in('input_sequences.fasta') + >>> makeblastdb_runner.set_dbtype('prot') + >>> makeblastdb_runner.set_out('my_blast_db') + >>> makeblastdb_runner.set_parse_seqids() + >>> return_code = makeblastdb_runner.run() """ def __init__(self, config: Config): @@ -213,13 +223,3 @@ def run(self) -> int: """ self.validate_parameters() return super().run() - -# Example usage: -# config = Config() -# config.load_config('path/to/config.yaml') -# makeblastdb_runner = MakeblastdbRunner(config) -# makeblastdb_runner.set_in('input_sequences.fasta') -# makeblastdb_runner.set_dbtype('prot') -# makeblastdb_runner.set_out('my_blast_db') -# makeblastdb_runner.set_parse_seqids() -# return_code = makeblastdb_runner.run() \ No newline at end of file diff --git a/bactria/megatree_loader_runner.py b/bactria/megatree_loader_runner.py index ca7762a..ce47bd3 100644 --- a/bactria/megatree_loader_runner.py +++ b/bactria/megatree_loader_runner.py @@ -4,9 +4,17 @@ import logging -class MegatreeLoaderRunner(ToolRunner): +class MegatreeLoader(ToolRunner): """ A subclass of ToolRunner specifically for running megatree-loader. + + Examples: + >>> config = Config() + >>> config.load_config('path/to/config.yaml') + >>> megatree_runner = MegatreeLoaderRunner(config) + >>> megatree_runner.set_infile('input_tree.newick') + >>> megatree_runner.set_dbfile('output_db.sqlite') + >>> return_code = megatree_runner.run() """ def __init__(self, config: Config): @@ -80,11 +88,3 @@ def run(self) -> int: """ self.validate_parameters() return super().run() - -# Example usage: -# config = Config() -# config.load_config('path/to/config.yaml') -# megatree_runner = MegatreeLoaderRunner(config) -# megatree_runner.set_infile('input_tree.newick') -# megatree_runner.set_dbfile('output_db.sqlite') -# return_code = megatree_runner.run() \ No newline at end of file diff --git a/bactria/megatree_pruner_runner.py b/bactria/megatree_pruner_runner.py index 3c02c3f..ca1a956 100644 --- a/bactria/megatree_pruner_runner.py +++ b/bactria/megatree_pruner_runner.py @@ -4,9 +4,19 @@ import logging -class MegatreePrunerRunner(ToolRunner): +class MegatreePruner(ToolRunner): """ A subclass of ToolRunner specifically for running megatree-pruner. + + Examples: + >>> config = Config() + >>> config.load_config('path/to/config.yaml') + >>> megatree_pruner = MegatreePruner(config) + >>> megatree_pruner.set_dbfile('tree_database.sqlite') + >>> megatree_pruner.set_infile('taxa_list.txt') + >>> megatree_pruner.set_tabular(True) + >>> megatree_pruner.set_relabel(True) + >>> return_code = megatree_pruner.run() """ def __init__(self, config: Config): @@ -115,13 +125,3 @@ def run(self) -> int: """ self.validate_parameters() return super().run() - -# Example usage: -# config = Config() -# config.load_config('path/to/config.yaml') -# megatree_pruner = MegatreePrunerRunner(config) -# megatree_pruner.set_dbfile('tree_database.sqlite') -# megatree_pruner.set_infile('taxa_list.txt') -# megatree_pruner.set_tabular(True) -# megatree_pruner.set_relabel(True) -# return_code = megatree_pruner.run() \ No newline at end of file diff --git a/bactria/raxml_ng_runner.py b/bactria/raxml_ng_runner.py index 662a7aa..8a45444 100644 --- a/bactria/raxml_ng_runner.py +++ b/bactria/raxml_ng_runner.py @@ -3,9 +3,20 @@ from bactria.config import Config -class RAXMLNGRunner(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.set_msa('alignment.fa') + >>> raxml_runner.set_model('GTR+G') + >>> raxml_runner.set_prefix('test_run') + >>> raxml_runner.set_threads(4) + >>> raxml_runner.set_all() + >>> return_code = raxml_runner.run() """ def __init__(self, config: Config): @@ -176,14 +187,3 @@ def build_command(self) -> List[str]: command.append(f'--{param}') return command - -# Example usage: -# config = Config() -# config.load_config('path/to/config.yaml') -# raxml_runner = RAXMLNGRunner(config) -# raxml_runner.set_msa('alignment.fa') -# raxml_runner.set_model('GTR+G') -# raxml_runner.set_prefix('test_run') -# raxml_runner.set_threads(4) -# raxml_runner.set_all() -# return_code = raxml_runner.run() \ No newline at end of file