Skip to content

Commit

Permalink
Change: v1.0.3 to v1.0.4
Browse files Browse the repository at this point in the history
- Change default download dir to common cache dir
  • Loading branch information
moshi4 committed Apr 10, 2022
1 parent f53c74c commit 0a266bb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ functional annotation and classification results are output.
-h, --help show this help message and exit
-i , --infile Input query protein fasta file
-o , --outdir Output directory
-d , --download_dir Download COG & CDD FTP data directory (Default: './cog_download')
-d , --download_dir Download COG & CDD resources directory (Default: '~/.cache/cogclassifier')
-t , --thread_num RPS-BLAST num_thread parameter (Default: MaxThread - 1)
-e , --evalue RPS-BLAST e-value parameter (Default: 0.01)
-v, --version Print version information
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cogclassifier"
version = "1.0.3"
version = "1.0.4"
description = "A tool for classifying prokaryote protein sequences into COG functional category"
authors = ["moshi"]
license = "MIT"
Expand Down
10 changes: 5 additions & 5 deletions src/cogclassifier/cogclassifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import pandas as pd
import requests

__version__ = "1.0.3"
__version__ = "1.0.4"


def main():
Expand All @@ -38,7 +38,7 @@ def main():
def run(
query_fasta_file: Union[str, Path],
outdir: Union[str, Path],
download_dir: Union[str, Path] = Path("./cog_download"),
download_dir: Union[str, Path] = Path.home() / ".cache" / "cogclassifier",
thread_num: int = 1,
evalue: float = 1e-2,
) -> None:
Expand All @@ -56,7 +56,7 @@ def run(
download_dir = Path(download_dir)

outdir.mkdir(exist_ok=True)
download_dir.mkdir(exist_ok=True)
os.makedirs(download_dir, exist_ok=True)

print("# Step1: Download COG & CDD FTP data")
# Setup COG functional category files
Expand Down Expand Up @@ -639,12 +639,12 @@ def get_args() -> argparse.Namespace:
help="Output directory",
metavar="",
)
default_dl_dir = "./cog_download"
default_dl_dir = Path.home() / ".cache" / "cogclassifier"
parser.add_argument(
"-d",
"--download_dir",
type=Path,
help=f"Download COG & CDD FTP data directory (Default: '{default_dl_dir}')",
help=f"Download COG & CDD resources directory (Default: '{default_dl_dir}')",
default=default_dl_dir,
metavar="",
)
Expand Down

0 comments on commit 0a266bb

Please sign in to comment.