Skip to content

Commit

Permalink
Merge pull request #1 from TsumaR/vclean_for_rev1
Browse files Browse the repository at this point in the history
vClean update to v0.2.1
  • Loading branch information
TsumaR authored Oct 14, 2024
2 parents 65561e4 + f484706 commit 275ba73
Show file tree
Hide file tree
Showing 15 changed files with 7 additions and 27 deletions.
2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

18 changes: 0 additions & 18 deletions environment.yml

This file was deleted.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ Source = "https://github.com/TsumaR/vclean"
[project.scripts]
vclean = "vclean.cli:cli"

[tool.setuptools.package-data]
"vclean" = ["db/*.txt", "models/*.txt"]
[tool.flit.sdist]
include = ["vclean/**", "db/**", "models/**", "LICENSE", "README.md"]
2 changes: 1 addition & 1 deletion vclean/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
vClean: Assessing the contamination of viral genomes
"""

__version__ = "0.1.4"
__version__ = "0.2.1"
Empty file added vclean/db/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions vclean/modules/run_for_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
def process_file(input_fasta, outdir, run_mode, tmpout, cpu, checkv_db_dir, pfam_db,
input_protein, input_gene, trans_table, single_like_pfam):
gene_set_dir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
single_like_pfam = os.path.join(gene_set_dir, 'db', 'single_pfam_099.txt')
single_like_pfam = os.path.join(gene_set_dir, 'vclean','db', 'single_pfam_099.txt')

fasta_file_name = os.path.basename(input_fasta)
basename = os.path.splitext(fasta_file_name)[0]
Expand Down Expand Up @@ -252,7 +252,7 @@ def main(args):
checkv_db_dir, pfam_db = path_to_db(db_dir)

gene_set_dir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
single_like_pfam = os.path.join(gene_set_dir, 'db', 'single_pfam_099.txt')
single_like_pfam = os.path.join(gene_set_dir, 'vclean','db', 'single_pfam_099.txt')

# --------------------------------------------------------------------------
# sp.run(['mkdir', '-p', tmpout])
Expand Down Expand Up @@ -285,12 +285,12 @@ def main(args):

script_dir = os.path.dirname(os.path.abspath(__file__))
model_dir = os.path.dirname(os.path.dirname(script_dir))
model_path = os.path.join(model_dir, 'models', 'best_lgb_model_v1.3.2.pickle')
model_path = os.path.join(model_dir, 'vclean', 'models', 'best_lgb_model_v1.3.2.pickle')

y_pred_proba_list = []
for i in range(5):
model_name = f'best_lgb_model_fold{i}.txt'
model_path = os.path.join(model_dir, 'models', model_name)
model_path = os.path.join(model_dir, 'vclean', 'models', model_name)
loaded_model = lgb.Booster(model_file=model_path)
y_pred_proba = loaded_model.predict(result_for_input)
y_pred_proba_list.append(y_pred_proba)
Expand Down

0 comments on commit 275ba73

Please sign in to comment.