Skip to content

Commit 0a266bb

Browse files
committed
Change: v1.0.3 to v1.0.4
- Change default download dir to common cache dir
1 parent f53c74c commit 0a266bb

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ functional annotation and classification results are output.
152152
-h, --help show this help message and exit
153153
-i , --infile Input query protein fasta file
154154
-o , --outdir Output directory
155-
-d , --download_dir Download COG & CDD FTP data directory (Default: './cog_download')
155+
-d , --download_dir Download COG & CDD resources directory (Default: '~/.cache/cogclassifier')
156156
-t , --thread_num RPS-BLAST num_thread parameter (Default: MaxThread - 1)
157157
-e , --evalue RPS-BLAST e-value parameter (Default: 0.01)
158158
-v, --version Print version information

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "cogclassifier"
3-
version = "1.0.3"
3+
version = "1.0.4"
44
description = "A tool for classifying prokaryote protein sequences into COG functional category"
55
authors = ["moshi"]
66
license = "MIT"

src/cogclassifier/cogclassifier.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import pandas as pd
2020
import requests
2121

22-
__version__ = "1.0.3"
22+
__version__ = "1.0.4"
2323

2424

2525
def main():
@@ -38,7 +38,7 @@ def main():
3838
def run(
3939
query_fasta_file: Union[str, Path],
4040
outdir: Union[str, Path],
41-
download_dir: Union[str, Path] = Path("./cog_download"),
41+
download_dir: Union[str, Path] = Path.home() / ".cache" / "cogclassifier",
4242
thread_num: int = 1,
4343
evalue: float = 1e-2,
4444
) -> None:
@@ -56,7 +56,7 @@ def run(
5656
download_dir = Path(download_dir)
5757

5858
outdir.mkdir(exist_ok=True)
59-
download_dir.mkdir(exist_ok=True)
59+
os.makedirs(download_dir, exist_ok=True)
6060

6161
print("# Step1: Download COG & CDD FTP data")
6262
# Setup COG functional category files
@@ -639,12 +639,12 @@ def get_args() -> argparse.Namespace:
639639
help="Output directory",
640640
metavar="",
641641
)
642-
default_dl_dir = "./cog_download"
642+
default_dl_dir = Path.home() / ".cache" / "cogclassifier"
643643
parser.add_argument(
644644
"-d",
645645
"--download_dir",
646646
type=Path,
647-
help=f"Download COG & CDD FTP data directory (Default: '{default_dl_dir}')",
647+
help=f"Download COG & CDD resources directory (Default: '{default_dl_dir}')",
648648
default=default_dl_dir,
649649
metavar="",
650650
)

0 commit comments

Comments
 (0)