kfuku52 / amalgkit

RNA-seq data amalgamation for a large-scale evolutionary transcriptomics
BSD 3-Clause "New" or "Revised" License
7 stars 1 forks source link

amalgkit config writing files out of place #116

Closed kfuku52 closed 1 year ago

kfuku52 commented 1 year ago

@Hego-CCTB AMALGKIT shouldn't write files outside --out_dir but it tries to do so with the latest amalgkit config. I will fix it.

AMALGKIT version: 0.6.8.11
AMALGKIT command: /opt/conda/envs/biotools/bin/amalgkit config --out_dir ./ --config base --overwrite yes
AMALGKIT bug report: https://github.com/kfuku52/amalgkit/issues
amalgkit config: start
Checking config directory ...
Writing /opt/conda/envs/biotools/lib/python3.9/site-packages/amalgkit/config_dir/base/control_term.config for the dataset base
Writing /opt/conda/envs/biotools/lib/python3.9/site-packages/amalgkit/config_dir/base/exclude_id.config for the dataset base
Writing /opt/conda/envs/biotools/lib/python3.9/site-packages/amalgkit/config_dir/base/exclude_keyword.config for the dataset base
Writing /opt/conda/envs/biotools/lib/python3.9/site-packages/amalgkit/config_dir/base/give_value.config for the dataset base
Writing /opt/conda/envs/biotools/lib/python3.9/site-packages/amalgkit/config_dir/base/group_attribute.config for the dataset base
Writing /opt/conda/envs/biotools/lib/python3.9/site-packages/amalgkit/config_dir/base/group_tissue.config for the dataset base
Writing /opt/conda/envs/biotools/lib/python3.9/site-packages/amalgkit/config_dir/base/orthographical_variant.config for the dataset base
Writing /opt/conda/envs/biotools/lib/python3.9/site-packages/amalgkit/config_dir/base/replace_value.config for the dataset base
Writing /opt/conda/envs/biotools/lib/python3.9/site-packages/amalgkit/config_dir/base/rescue_id.config for the dataset base
Writing /opt/conda/envs/biotools/lib/python3.9/site-packages/amalgkit/config_dir/base/search_term_exclusion.config for the dataset base
Writing /opt/conda/envs/biotools/lib/python3.9/site-packages/amalgkit/config_dir/base/search_term_keyword.config for the dataset base
Writing /opt/conda/envs/biotools/lib/python3.9/site-packages/amalgkit/config_dir/base/search_term_other.config for the dataset base
Writing /opt/conda/envs/biotools/lib/python3.9/site-packages/amalgkit/config_dir/base/search_term_species.config for the dataset base
Time elapsed: 0 sec
amalgkit config: end
kfuku52 commented 1 year ago

@Hego-CCTB Is it not writing to /opt/conda/envs/biotools/lib/python3.9/site-packages/amalgkit/config_dir/base/ but from the directory? If so, this is not a bug, but the message is confusing. Could you change it to better texts? Also, please remove try/except in config.py. They invite future bugs. For example, here, a file check should be done with e.g., os.path.exists() but not with try. https://github.com/kfuku52/amalgkit/blob/057a4fcc8d55d1b16d381e95eff20ab65bee1533/amalgkit/config.py#L72-L80

Hego-CCTB commented 1 year ago

Yeah, the message is not correct. There's a "from" missing at the very least. It copies from the amalgkit installation directory to the destination. I'll clear up the message and change try/except statements!

kfuku52 commented 1 year ago

I will take care of it if you don't have time.

Hego-CCTB commented 1 year ago

The message now says "Copying from ... to ...". Also removed the try/except statement, as it didn't seem to actually catch any exceptions in my testing. https://github.com/kfuku52/amalgkit/commit/fbd4722bce7c6358c5699d9a520b8fdf90eb65f5

kfuku52 commented 1 year ago

Thanks!