From b9fc3d7b8e955c0530e6dcf6f163c99ebf9a3d24 Mon Sep 17 00:00:00 2001 From: sina Date: Mon, 27 Mar 2023 11:03:09 +0200 Subject: [PATCH] update --- FastOMA/__init__.py | 3 +++ {fastoma => FastOMA}/_config.py | 0 {fastoma => FastOMA}/_hog_class.py | 0 {fastoma => FastOMA}/_infer_subhog.py | 0 {fastoma => FastOMA}/_utils_roothog.py | 0 {fastoma => FastOMA}/_utils_subhog.py | 0 {fastoma => FastOMA}/_wrappers.py | 5 +++-- {fastoma => FastOMA}/batch_roothogs.py | 1 + {fastoma => FastOMA}/collect_subhogs.py | 2 +- {fastoma => FastOMA}/infer_roothogs.py | 0 {fastoma => FastOMA}/infer_subhogs.py | 1 + {fastoma => FastOMA}/requirements | 0 {fastoma => FastOMA}/zoo/README.md | 0 {fastoma => FastOMA}/zoo/__init__.py | 0 {fastoma => FastOMA}/zoo/file_utils/__init__.py | 0 .../zoo/file_utils/context_managers.py | 0 {fastoma => FastOMA}/zoo/file_utils/extractors.py | 0 {fastoma => FastOMA}/zoo/hog/__init__.py | 0 {fastoma => FastOMA}/zoo/hog/convert.py | 0 {fastoma => FastOMA}/zoo/hog/extract_groups.py | 0 {fastoma => FastOMA}/zoo/hog/extract_hog_info.py | 0 {fastoma => FastOMA}/zoo/hog/filter_orthoxml.py | 0 {fastoma => FastOMA}/zoo/hog/orthoxml_merge.py | 0 {fastoma => FastOMA}/zoo/seq_utils/__init__.py | 0 {fastoma => FastOMA}/zoo/seq_utils/utils.py | 0 {fastoma => FastOMA}/zoo/wrappers/__init__.py | 0 {fastoma => FastOMA}/zoo/wrappers/abstract_cli.py | 0 {fastoma => FastOMA}/zoo/wrappers/aligners/__init__.py | 0 .../zoo/wrappers/aligners/base_aligner.py | 0 {fastoma => FastOMA}/zoo/wrappers/aligners/mafft.py | 0 {fastoma => FastOMA}/zoo/wrappers/aligners/muscle.py | 0 {fastoma => FastOMA}/zoo/wrappers/aligners/probcons.py | 0 .../zoo/wrappers/aligners/prographmsa.py | 0 .../zoo/wrappers/modeltesters/__init__.py | 0 .../zoo/wrappers/modeltesters/base_modeltester.py | 0 .../zoo/wrappers/modeltesters/parsers.py | 0 .../zoo/wrappers/modeltesters/prottest.py | 0 {fastoma => FastOMA}/zoo/wrappers/options.py | 0 .../zoo/wrappers/treebuilders/__init__.py | 0 .../zoo/wrappers/treebuilders/base_treebuilder.py | 4 ++-- .../zoo/wrappers/treebuilders/fasttree.py | 0 .../zoo/wrappers/treebuilders/guenomu.py | 2 +- .../zoo/wrappers/treebuilders/iqtree.py | 0 .../zoo/wrappers/treebuilders/parsers.py | 0 .../zoo/wrappers/treebuilders/phyml.py | 0 .../zoo/wrappers/treebuilders/raxml.py | 0 {fastoma => FastOMA}/zoo/wrappers/trimmers/__init__.py | 0 .../zoo/wrappers/trimmers/base_trimmer.py | 0 {fastoma => FastOMA}/zoo/wrappers/trimmers/trimal.py | 0 archive/analysis/fastoma_mid_diff.py | 5 +++-- archive/analysis/fastoma_mid_newrhg.py | 3 ++- archive/analysis/filter_rhog.py | 2 +- archive/analysis/graveyard.py | 8 ++++---- archive/analysis/main_bird.py | 6 +++--- archive/analysis/test_curnagle.py | 4 ++-- archive/gethog3_from_rhog.py | 4 ++-- archive/test_curn.py | 2 +- archive/test_infer_subhogs.py | 2 +- fastoma/__init__.py | 3 --- setup.py | 10 +++++----- utils/orthoxml2family.py | 2 +- utils/orthoxml2newick.py | 2 +- 62 files changed, 38 insertions(+), 33 deletions(-) create mode 100644 FastOMA/__init__.py rename {fastoma => FastOMA}/_config.py (100%) rename {fastoma => FastOMA}/_hog_class.py (100%) rename {fastoma => FastOMA}/_infer_subhog.py (100%) rename {fastoma => FastOMA}/_utils_roothog.py (100%) rename {fastoma => FastOMA}/_utils_subhog.py (100%) rename {fastoma => FastOMA}/_wrappers.py (97%) rename {fastoma => FastOMA}/batch_roothogs.py (99%) rename {fastoma => FastOMA}/collect_subhogs.py (98%) rename {fastoma => FastOMA}/infer_roothogs.py (100%) rename {fastoma => FastOMA}/infer_subhogs.py (99%) rename {fastoma => FastOMA}/requirements (100%) rename {fastoma => FastOMA}/zoo/README.md (100%) rename {fastoma => FastOMA}/zoo/__init__.py (100%) rename {fastoma => FastOMA}/zoo/file_utils/__init__.py (100%) rename {fastoma => FastOMA}/zoo/file_utils/context_managers.py (100%) rename {fastoma => FastOMA}/zoo/file_utils/extractors.py (100%) rename {fastoma => FastOMA}/zoo/hog/__init__.py (100%) rename {fastoma => FastOMA}/zoo/hog/convert.py (100%) rename {fastoma => FastOMA}/zoo/hog/extract_groups.py (100%) rename {fastoma => FastOMA}/zoo/hog/extract_hog_info.py (100%) rename {fastoma => FastOMA}/zoo/hog/filter_orthoxml.py (100%) rename {fastoma => FastOMA}/zoo/hog/orthoxml_merge.py (100%) rename {fastoma => FastOMA}/zoo/seq_utils/__init__.py (100%) rename {fastoma => FastOMA}/zoo/seq_utils/utils.py (100%) rename {fastoma => FastOMA}/zoo/wrappers/__init__.py (100%) rename {fastoma => FastOMA}/zoo/wrappers/abstract_cli.py (100%) rename {fastoma => FastOMA}/zoo/wrappers/aligners/__init__.py (100%) rename {fastoma => FastOMA}/zoo/wrappers/aligners/base_aligner.py (100%) rename {fastoma => FastOMA}/zoo/wrappers/aligners/mafft.py (100%) rename {fastoma => FastOMA}/zoo/wrappers/aligners/muscle.py (100%) rename {fastoma => FastOMA}/zoo/wrappers/aligners/probcons.py (100%) rename {fastoma => FastOMA}/zoo/wrappers/aligners/prographmsa.py (100%) rename {fastoma => FastOMA}/zoo/wrappers/modeltesters/__init__.py (100%) rename {fastoma => FastOMA}/zoo/wrappers/modeltesters/base_modeltester.py (100%) rename {fastoma => FastOMA}/zoo/wrappers/modeltesters/parsers.py (100%) rename {fastoma => FastOMA}/zoo/wrappers/modeltesters/prottest.py (100%) rename {fastoma => FastOMA}/zoo/wrappers/options.py (100%) rename {fastoma => FastOMA}/zoo/wrappers/treebuilders/__init__.py (100%) rename {fastoma => FastOMA}/zoo/wrappers/treebuilders/base_treebuilder.py (97%) rename {fastoma => FastOMA}/zoo/wrappers/treebuilders/fasttree.py (100%) rename {fastoma => FastOMA}/zoo/wrappers/treebuilders/guenomu.py (99%) rename {fastoma => FastOMA}/zoo/wrappers/treebuilders/iqtree.py (100%) rename {fastoma => FastOMA}/zoo/wrappers/treebuilders/parsers.py (100%) rename {fastoma => FastOMA}/zoo/wrappers/treebuilders/phyml.py (100%) rename {fastoma => FastOMA}/zoo/wrappers/treebuilders/raxml.py (100%) rename {fastoma => FastOMA}/zoo/wrappers/trimmers/__init__.py (100%) rename {fastoma => FastOMA}/zoo/wrappers/trimmers/base_trimmer.py (100%) rename {fastoma => FastOMA}/zoo/wrappers/trimmers/trimal.py (100%) delete mode 100644 fastoma/__init__.py diff --git a/FastOMA/__init__.py b/FastOMA/__init__.py new file mode 100644 index 0000000..bd9324b --- /dev/null +++ b/FastOMA/__init__.py @@ -0,0 +1,3 @@ + +__packagename__ = "FastOMA" +__version__ = "0.0.5" diff --git a/fastoma/_config.py b/FastOMA/_config.py similarity index 100% rename from fastoma/_config.py rename to FastOMA/_config.py diff --git a/fastoma/_hog_class.py b/FastOMA/_hog_class.py similarity index 100% rename from fastoma/_hog_class.py rename to FastOMA/_hog_class.py diff --git a/fastoma/_infer_subhog.py b/FastOMA/_infer_subhog.py similarity index 100% rename from fastoma/_infer_subhog.py rename to FastOMA/_infer_subhog.py diff --git a/fastoma/_utils_roothog.py b/FastOMA/_utils_roothog.py similarity index 100% rename from fastoma/_utils_roothog.py rename to FastOMA/_utils_roothog.py diff --git a/fastoma/_utils_subhog.py b/FastOMA/_utils_subhog.py similarity index 100% rename from fastoma/_utils_subhog.py rename to FastOMA/_utils_subhog.py diff --git a/fastoma/_wrappers.py b/FastOMA/_wrappers.py similarity index 97% rename from fastoma/_wrappers.py rename to FastOMA/_wrappers.py index 74e3875..e3212d6 100644 --- a/fastoma/_wrappers.py +++ b/FastOMA/_wrappers.py @@ -1,12 +1,13 @@ from Bio import SeqIO -from fastoma.zoo.wrappers.aligners import mafft +from FastOMA.zoo.wrappers.aligners import mafft # iqtree -from fastoma.zoo.wrappers.treebuilders import fasttree +from FastOMA.zoo.wrappers.treebuilders import fasttree # from trimmers.trimal import TrimAl from ete3 import Tree + from ._utils_subhog import logger_hog from . import _config diff --git a/fastoma/batch_roothogs.py b/FastOMA/batch_roothogs.py similarity index 99% rename from fastoma/batch_roothogs.py rename to FastOMA/batch_roothogs.py index ce3e444..9458528 100644 --- a/fastoma/batch_roothogs.py +++ b/FastOMA/batch_roothogs.py @@ -7,6 +7,7 @@ from os import listdir from . import _config + def list_rhog_fastas(address_rhogs_folder): """ create orthoxml_to_newick.py list of rootHOG IDs stored in the folder of rHOG . diff --git a/fastoma/collect_subhogs.py b/FastOMA/collect_subhogs.py similarity index 98% rename from fastoma/collect_subhogs.py rename to FastOMA/collect_subhogs.py index 9bfb9ea..6e32228 100644 --- a/fastoma/collect_subhogs.py +++ b/FastOMA/collect_subhogs.py @@ -22,7 +22,7 @@ def collect_subhogs(): # in_folder = _config.in_folder - # python ${fastoma} / collect_subhogs.py ${pickle_rhogs} ${gene_id_dic_xml} + # python ${FastOMA} / collect_subhogs.py ${pickle_rhogs} ${gene_id_dic_xml} if qfo_bird == "bird_hog": diff --git a/fastoma/infer_roothogs.py b/FastOMA/infer_roothogs.py similarity index 100% rename from fastoma/infer_roothogs.py rename to FastOMA/infer_roothogs.py diff --git a/fastoma/infer_subhogs.py b/FastOMA/infer_subhogs.py similarity index 99% rename from fastoma/infer_subhogs.py rename to FastOMA/infer_subhogs.py index 0819c09..845c88d 100644 --- a/fastoma/infer_subhogs.py +++ b/FastOMA/infer_subhogs.py @@ -11,6 +11,7 @@ # import _config + # from ._utils import logger_hog # import ._utils_rhog diff --git a/fastoma/requirements b/FastOMA/requirements similarity index 100% rename from fastoma/requirements rename to FastOMA/requirements diff --git a/fastoma/zoo/README.md b/FastOMA/zoo/README.md similarity index 100% rename from fastoma/zoo/README.md rename to FastOMA/zoo/README.md diff --git a/fastoma/zoo/__init__.py b/FastOMA/zoo/__init__.py similarity index 100% rename from fastoma/zoo/__init__.py rename to FastOMA/zoo/__init__.py diff --git a/fastoma/zoo/file_utils/__init__.py b/FastOMA/zoo/file_utils/__init__.py similarity index 100% rename from fastoma/zoo/file_utils/__init__.py rename to FastOMA/zoo/file_utils/__init__.py diff --git a/fastoma/zoo/file_utils/context_managers.py b/FastOMA/zoo/file_utils/context_managers.py similarity index 100% rename from fastoma/zoo/file_utils/context_managers.py rename to FastOMA/zoo/file_utils/context_managers.py diff --git a/fastoma/zoo/file_utils/extractors.py b/FastOMA/zoo/file_utils/extractors.py similarity index 100% rename from fastoma/zoo/file_utils/extractors.py rename to FastOMA/zoo/file_utils/extractors.py diff --git a/fastoma/zoo/hog/__init__.py b/FastOMA/zoo/hog/__init__.py similarity index 100% rename from fastoma/zoo/hog/__init__.py rename to FastOMA/zoo/hog/__init__.py diff --git a/fastoma/zoo/hog/convert.py b/FastOMA/zoo/hog/convert.py similarity index 100% rename from fastoma/zoo/hog/convert.py rename to FastOMA/zoo/hog/convert.py diff --git a/fastoma/zoo/hog/extract_groups.py b/FastOMA/zoo/hog/extract_groups.py similarity index 100% rename from fastoma/zoo/hog/extract_groups.py rename to FastOMA/zoo/hog/extract_groups.py diff --git a/fastoma/zoo/hog/extract_hog_info.py b/FastOMA/zoo/hog/extract_hog_info.py similarity index 100% rename from fastoma/zoo/hog/extract_hog_info.py rename to FastOMA/zoo/hog/extract_hog_info.py diff --git a/fastoma/zoo/hog/filter_orthoxml.py b/FastOMA/zoo/hog/filter_orthoxml.py similarity index 100% rename from fastoma/zoo/hog/filter_orthoxml.py rename to FastOMA/zoo/hog/filter_orthoxml.py diff --git a/fastoma/zoo/hog/orthoxml_merge.py b/FastOMA/zoo/hog/orthoxml_merge.py similarity index 100% rename from fastoma/zoo/hog/orthoxml_merge.py rename to FastOMA/zoo/hog/orthoxml_merge.py diff --git a/fastoma/zoo/seq_utils/__init__.py b/FastOMA/zoo/seq_utils/__init__.py similarity index 100% rename from fastoma/zoo/seq_utils/__init__.py rename to FastOMA/zoo/seq_utils/__init__.py diff --git a/fastoma/zoo/seq_utils/utils.py b/FastOMA/zoo/seq_utils/utils.py similarity index 100% rename from fastoma/zoo/seq_utils/utils.py rename to FastOMA/zoo/seq_utils/utils.py diff --git a/fastoma/zoo/wrappers/__init__.py b/FastOMA/zoo/wrappers/__init__.py similarity index 100% rename from fastoma/zoo/wrappers/__init__.py rename to FastOMA/zoo/wrappers/__init__.py diff --git a/fastoma/zoo/wrappers/abstract_cli.py b/FastOMA/zoo/wrappers/abstract_cli.py similarity index 100% rename from fastoma/zoo/wrappers/abstract_cli.py rename to FastOMA/zoo/wrappers/abstract_cli.py diff --git a/fastoma/zoo/wrappers/aligners/__init__.py b/FastOMA/zoo/wrappers/aligners/__init__.py similarity index 100% rename from fastoma/zoo/wrappers/aligners/__init__.py rename to FastOMA/zoo/wrappers/aligners/__init__.py diff --git a/fastoma/zoo/wrappers/aligners/base_aligner.py b/FastOMA/zoo/wrappers/aligners/base_aligner.py similarity index 100% rename from fastoma/zoo/wrappers/aligners/base_aligner.py rename to FastOMA/zoo/wrappers/aligners/base_aligner.py diff --git a/fastoma/zoo/wrappers/aligners/mafft.py b/FastOMA/zoo/wrappers/aligners/mafft.py similarity index 100% rename from fastoma/zoo/wrappers/aligners/mafft.py rename to FastOMA/zoo/wrappers/aligners/mafft.py diff --git a/fastoma/zoo/wrappers/aligners/muscle.py b/FastOMA/zoo/wrappers/aligners/muscle.py similarity index 100% rename from fastoma/zoo/wrappers/aligners/muscle.py rename to FastOMA/zoo/wrappers/aligners/muscle.py diff --git a/fastoma/zoo/wrappers/aligners/probcons.py b/FastOMA/zoo/wrappers/aligners/probcons.py similarity index 100% rename from fastoma/zoo/wrappers/aligners/probcons.py rename to FastOMA/zoo/wrappers/aligners/probcons.py diff --git a/fastoma/zoo/wrappers/aligners/prographmsa.py b/FastOMA/zoo/wrappers/aligners/prographmsa.py similarity index 100% rename from fastoma/zoo/wrappers/aligners/prographmsa.py rename to FastOMA/zoo/wrappers/aligners/prographmsa.py diff --git a/fastoma/zoo/wrappers/modeltesters/__init__.py b/FastOMA/zoo/wrappers/modeltesters/__init__.py similarity index 100% rename from fastoma/zoo/wrappers/modeltesters/__init__.py rename to FastOMA/zoo/wrappers/modeltesters/__init__.py diff --git a/fastoma/zoo/wrappers/modeltesters/base_modeltester.py b/FastOMA/zoo/wrappers/modeltesters/base_modeltester.py similarity index 100% rename from fastoma/zoo/wrappers/modeltesters/base_modeltester.py rename to FastOMA/zoo/wrappers/modeltesters/base_modeltester.py diff --git a/fastoma/zoo/wrappers/modeltesters/parsers.py b/FastOMA/zoo/wrappers/modeltesters/parsers.py similarity index 100% rename from fastoma/zoo/wrappers/modeltesters/parsers.py rename to FastOMA/zoo/wrappers/modeltesters/parsers.py diff --git a/fastoma/zoo/wrappers/modeltesters/prottest.py b/FastOMA/zoo/wrappers/modeltesters/prottest.py similarity index 100% rename from fastoma/zoo/wrappers/modeltesters/prottest.py rename to FastOMA/zoo/wrappers/modeltesters/prottest.py diff --git a/fastoma/zoo/wrappers/options.py b/FastOMA/zoo/wrappers/options.py similarity index 100% rename from fastoma/zoo/wrappers/options.py rename to FastOMA/zoo/wrappers/options.py diff --git a/fastoma/zoo/wrappers/treebuilders/__init__.py b/FastOMA/zoo/wrappers/treebuilders/__init__.py similarity index 100% rename from fastoma/zoo/wrappers/treebuilders/__init__.py rename to FastOMA/zoo/wrappers/treebuilders/__init__.py diff --git a/fastoma/zoo/wrappers/treebuilders/base_treebuilder.py b/FastOMA/zoo/wrappers/treebuilders/base_treebuilder.py similarity index 97% rename from fastoma/zoo/wrappers/treebuilders/base_treebuilder.py rename to FastOMA/zoo/wrappers/treebuilders/base_treebuilder.py index 7f88adc..0c76e3b 100644 --- a/fastoma/zoo/wrappers/treebuilders/base_treebuilder.py +++ b/FastOMA/zoo/wrappers/treebuilders/base_treebuilder.py @@ -7,8 +7,8 @@ -from fastoma.zoo.wrappers import WrapperError -from fastoma.zoo.wrappers.aligners.base_aligner import identify_input +from FastOMA.zoo.wrappers import WrapperError +from FastOMA.zoo.wrappers.aligners.base_aligner import identify_input import logging logger = logging.getLogger(__name__) diff --git a/fastoma/zoo/wrappers/treebuilders/fasttree.py b/FastOMA/zoo/wrappers/treebuilders/fasttree.py similarity index 100% rename from fastoma/zoo/wrappers/treebuilders/fasttree.py rename to FastOMA/zoo/wrappers/treebuilders/fasttree.py diff --git a/fastoma/zoo/wrappers/treebuilders/guenomu.py b/FastOMA/zoo/wrappers/treebuilders/guenomu.py similarity index 99% rename from fastoma/zoo/wrappers/treebuilders/guenomu.py rename to FastOMA/zoo/wrappers/treebuilders/guenomu.py index f4f5bce..1175577 100644 --- a/fastoma/zoo/wrappers/treebuilders/guenomu.py +++ b/FastOMA/zoo/wrappers/treebuilders/guenomu.py @@ -5,7 +5,7 @@ import shutil from Bio import AlignIO, SeqIO import dendropy -from fastoma.zoo.wrappers import WrapperError +from FastOMA.zoo.wrappers import WrapperError import logging diff --git a/fastoma/zoo/wrappers/treebuilders/iqtree.py b/FastOMA/zoo/wrappers/treebuilders/iqtree.py similarity index 100% rename from fastoma/zoo/wrappers/treebuilders/iqtree.py rename to FastOMA/zoo/wrappers/treebuilders/iqtree.py diff --git a/fastoma/zoo/wrappers/treebuilders/parsers.py b/FastOMA/zoo/wrappers/treebuilders/parsers.py similarity index 100% rename from fastoma/zoo/wrappers/treebuilders/parsers.py rename to FastOMA/zoo/wrappers/treebuilders/parsers.py diff --git a/fastoma/zoo/wrappers/treebuilders/phyml.py b/FastOMA/zoo/wrappers/treebuilders/phyml.py similarity index 100% rename from fastoma/zoo/wrappers/treebuilders/phyml.py rename to FastOMA/zoo/wrappers/treebuilders/phyml.py diff --git a/fastoma/zoo/wrappers/treebuilders/raxml.py b/FastOMA/zoo/wrappers/treebuilders/raxml.py similarity index 100% rename from fastoma/zoo/wrappers/treebuilders/raxml.py rename to FastOMA/zoo/wrappers/treebuilders/raxml.py diff --git a/fastoma/zoo/wrappers/trimmers/__init__.py b/FastOMA/zoo/wrappers/trimmers/__init__.py similarity index 100% rename from fastoma/zoo/wrappers/trimmers/__init__.py rename to FastOMA/zoo/wrappers/trimmers/__init__.py diff --git a/fastoma/zoo/wrappers/trimmers/base_trimmer.py b/FastOMA/zoo/wrappers/trimmers/base_trimmer.py similarity index 100% rename from fastoma/zoo/wrappers/trimmers/base_trimmer.py rename to FastOMA/zoo/wrappers/trimmers/base_trimmer.py diff --git a/fastoma/zoo/wrappers/trimmers/trimal.py b/FastOMA/zoo/wrappers/trimmers/trimal.py similarity index 100% rename from fastoma/zoo/wrappers/trimmers/trimal.py rename to FastOMA/zoo/wrappers/trimmers/trimal.py diff --git a/archive/analysis/fastoma_mid_diff.py b/archive/analysis/fastoma_mid_diff.py index 5ecf120..25bf2ed 100644 --- a/archive/analysis/fastoma_mid_diff.py +++ b/archive/analysis/fastoma_mid_diff.py @@ -1,5 +1,5 @@ - +import pickle def prepare_species_tree(rhog_i, species_tree): for rec in rhog_i: @@ -250,7 +250,7 @@ def distribute_rhogs(rhogs: List[Tuple[str, int]], start_index: int, n_workers: logger_hog = logging.getLogger("hog") logger_hog.setLevel(logging.INFO) # WARN # make sure addresses end with "/" - address_working_folder = "/work/FAC/FBM/DBC/cdessim2/default/ayazdiza/fastoma-dask/" + address_working_folder = "/work/FAC/FBM/DBC/cdessim2/default/ayazdiza/FastOMA-dask/" address_rhogs_folder = "/work/FAC/FBM/DBC/cdessim2/default/ayazdiza/family-score-adjusted/AdjustedFamilyScore_All_rHOGs/" address_pickles_folder = "/work/FAC/FBM/DBC/cdessim2/default/ayazdiza/fastoma_repo/temp_results/pickles/mid_adjustedfamily_40_1/" species_tree_address = address_working_folder + "lineage_tree_qfo.phyloxml" @@ -267,6 +267,7 @@ def distribute_rhogs(rhogs: List[Tuple[str, int]], start_index: int, n_workers: rhog_files = listdir(address_rhogs_folder)[:] print("#", rhog_files, len(rhog_files)) + file_sizes = [os.path.getsize(f'{address_rhogs_folder}{i}') for i in rhog_files] file_name_size_dict = dict(zip(rhog_files, file_sizes)) file_name_size_list_sorted = sorted(file_name_size_dict.items(), key=lambda x: x[1]) diff --git a/archive/analysis/fastoma_mid_newrhg.py b/archive/analysis/fastoma_mid_newrhg.py index 7809f18..f629403 100644 --- a/archive/analysis/fastoma_mid_newrhg.py +++ b/archive/analysis/fastoma_mid_newrhg.py @@ -1,5 +1,5 @@ -import dill as pickle +# import dill as pickle import logging from datetime import datetime from os import listdir @@ -8,6 +8,7 @@ from typing import Tuple, List from random import sample + from ete3 import Phyloxml from ete3 import PhyloTree diff --git a/archive/analysis/filter_rhog.py b/archive/analysis/filter_rhog.py index c818b6c..1bdc57f 100644 --- a/archive/analysis/filter_rhog.py +++ b/archive/analysis/filter_rhog.py @@ -21,7 +21,7 @@ file_folders = (address_rhogs_folder, gene_trees_folder, pickle_folder, species_tree_address) - oma_database_address = "/work/FAC/FBM/DBC/cdessim2/default/smajidi1/fastoma/archive/OmaServer.h5" + oma_database_address = "/work/FAC/FBM/DBC/cdessim2/default/smajidi1/FastOMA/archive/OmaServer.h5" # in_folder+"omamer_database/oma_path/OmaServer.h5" print("rHOG inferece has started. The oma database address is in ", oma_database_address) (oma_db, list_oma_species) = _utils_rhog.parse_oma_db(oma_database_address) diff --git a/archive/analysis/graveyard.py b/archive/analysis/graveyard.py index c6f2313..54927b9 100644 --- a/archive/analysis/graveyard.py +++ b/archive/analysis/graveyard.py @@ -551,7 +551,7 @@ def gene_num_convertor_old(rhogid_num_list_input, address_rhogs_folder, format_p # import _inferhog # # # from _utils import logger_hog -# import fastoma._utils_rhog as _utils_rhog +# import FastOMA._utils_rhog as _utils_rhog # # # from distributed import get_client # # from dask.distributed import rejoin, secede @@ -565,7 +565,7 @@ def gene_num_convertor_old(rhogid_num_list_input, address_rhogs_folder, format_p # file_folders = (address_rhogs_folder, gene_trees_folder, pickle_folder, species_tree_address) # # -# oma_database_address = "/work/FAC/FBM/DBC/cdessim2/default/smajidi1/fastoma/archive/OmaServer.h5" +# oma_database_address = "/work/FAC/FBM/DBC/cdessim2/default/smajidi1/FastOMA/archive/OmaServer.h5" # # in_folder+"omamer_database/oma_path/OmaServer.h5" # print("rHOG inferece has started. The oma database address is in ", oma_database_address) # (oma_db, list_oma_species) = _utils_rhog.parse_oma_db(oma_database_address) @@ -1162,7 +1162,7 @@ def gene_num_convertor_old(rhogid_num_list_input, address_rhogs_folder, format_p # import _inferhog # # # from _utils import logger_hog -# import fastoma._utils_rhog as _utils_rhog +# import FastOMA._utils_rhog as _utils_rhog # # # from distributed import get_client # # from dask.distributed import rejoin, secede @@ -1176,7 +1176,7 @@ def gene_num_convertor_old(rhogid_num_list_input, address_rhogs_folder, format_p # file_folders = (address_rhogs_folder, gene_trees_folder, pickle_folder, species_tree_address) # # -# oma_database_address = "/work/FAC/FBM/DBC/cdessim2/default/smajidi1/fastoma/archive/OmaServer.h5" +# oma_database_address = "/work/FAC/FBM/DBC/cdessim2/default/smajidi1/FastOMA/archive/OmaServer.h5" # # in_folder+"omamer_database/oma_path/OmaServer.h5" # print("rHOG inferece has started. The oma database address is in ", oma_database_address) # (oma_db, list_oma_species) = _utils_rhog.parse_oma_db(oma_database_address) diff --git a/archive/analysis/main_bird.py b/archive/analysis/main_bird.py index cf94ab2..fdb86f2 100644 --- a/archive/analysis/main_bird.py +++ b/archive/analysis/main_bird.py @@ -2,8 +2,8 @@ from dask.distributed import Client from dask_jobqueue import SLURMCluster -from fastoma import _utils_subhog, _infer_subhog, _utils_roothog -from fastoma._utils_subhog import logger_hog +from FastOMA import _utils_subhog, _infer_subhog, _utils_roothog +from FastOMA._utils_subhog import logger_hog if __name__ == '__main__': @@ -26,7 +26,7 @@ rHOG=rootHOG. A subHOG itself is orthoxml_to_newick.py HOG. """ - oma_database_address = "/work/FAC/FBM/DBC/cdessim2/default/smajidi1/fastoma/archive/OmaServer.h5" + oma_database_address = "/work/FAC/FBM/DBC/cdessim2/default/smajidi1/FastOMA/archive/OmaServer.h5" # in_folder+"omamer_database/oma_path/OmaServer.h5" print("rHOG inferece has started. The oma database address is in ", oma_database_address) (oma_db, list_oma_species) = _utils_rhog.parse_oma_db(oma_database_address) diff --git a/archive/analysis/test_curnagle.py b/archive/analysis/test_curnagle.py index 93b3f21..567a26e 100644 --- a/archive/analysis/test_curnagle.py +++ b/archive/analysis/test_curnagle.py @@ -144,7 +144,7 @@ def infer_hogs_for_rhog_levels_recursively(sub_species_tree): # # import _inferhog # # # # # from _utils import logger_hog -# # import fastoma._utils_rhog as _utils_rhog +# # import FastOMA._utils_rhog as _utils_rhog # # # # # from distributed import get_client # # # from dask.distributed import rejoin, secede @@ -158,7 +158,7 @@ def infer_hogs_for_rhog_levels_recursively(sub_species_tree): # # file_folders = (address_rhogs_folder, gene_trees_folder, pickle_folder, species_tree_address) # # # # -# # oma_database_address = "/work/FAC/FBM/DBC/cdessim2/default/smajidi1/fastoma/archive/OmaServer.h5" +# # oma_database_address = "/work/FAC/FBM/DBC/cdessim2/default/smajidi1/FastOMA/archive/OmaServer.h5" # # # in_folder+"omamer_database/oma_path/OmaServer.h5" # # print("rHOG inferece has started. The oma database address is in ", oma_database_address) # # (oma_db, list_oma_species) = _utils_rhog.parse_oma_db(oma_database_address) diff --git a/archive/gethog3_from_rhog.py b/archive/gethog3_from_rhog.py index 30ff915..b5e445f 100644 --- a/archive/gethog3_from_rhog.py +++ b/archive/gethog3_from_rhog.py @@ -5,7 +5,7 @@ import os -# use this python code to convert gethog2 rhogs to fastoma +# use this python code to convert gethog2 rhogs to FastOMA # check the following folder address # put the followings in in in_folder # 1- gene_id_dic_xml.pickle @@ -14,7 +14,7 @@ # then run nextfolow pypilei -# nextflow /work/FAC/FBM/DBC/cdessim2/default/smajidi1/pycharm_projects/fastoma/archive/gethog3_rhog.nf --input_folder in_folder --output_folder out_folder -c /work/FAC/FBM/DBC/cdessim2/default/smajidi1/pycharm_projects/fastoma/nextflow_slurm.config +# nextflow /work/FAC/FBM/DBC/cdessim2/default/smajidi1/pycharm_projects/FastOMA/archive/gethog3_rhog.nf --input_folder in_folder --output_folder out_folder -c /work/FAC/FBM/DBC/cdessim2/default/smajidi1/pycharm_projects/FastOMA/nextflow_slurm.config diff --git a/archive/test_curn.py b/archive/test_curn.py index 9a69ba8..081fd1f 100644 --- a/archive/test_curn.py +++ b/archive/test_curn.py @@ -347,7 +347,7 @@ # # # file_folders = (address_rhogs_folder, gene_trees_folder, pickle_folder, species_tree_address) # # # # # # -# # # oma_database_address = "/work/FAC/FBM/DBC/cdessim2/default/smajidi1/fastoma/archive/OmaServer.h5" +# # # oma_database_address = "/work/FAC/FBM/DBC/cdessim2/default/smajidi1/FastOMA/archive/OmaServer.h5" # # # # in_folder+"omamer_database/oma_path/OmaServer.h5" # # # print("rHOG inferece has started. The oma database address is in ", oma_database_address) # # # (oma_db, list_oma_species) = _utils_rhog.parse_oma_db(oma_database_address) diff --git a/archive/test_infer_subhogs.py b/archive/test_infer_subhogs.py index 3e71adb..683e54b 100644 --- a/archive/test_infer_subhogs.py +++ b/archive/test_infer_subhogs.py @@ -1,6 +1,6 @@ -from fastoma.infer_subhogs import infer_subhogs +from FastOMA.infer_subhogs import infer_subhogs # --input-rhog-folder ./bb/ --parrallel True --species-tree species_tree.nwk diff --git a/fastoma/__init__.py b/fastoma/__init__.py deleted file mode 100644 index 691f893..0000000 --- a/fastoma/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ - -__packagename__ = "fastoma" -__version__ = "0.0.5" diff --git a/setup.py b/setup.py index 475d372..6af8c77 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages -name = 'fastoma' +name = 'FastOMA' __version__ = None with open('{:s}/__init__.py'.format(name), 'rt') as fp: for line in fp: @@ -27,10 +27,10 @@ license='MIT', entry_points={ 'console_scripts': [ - "infer-roothogs=fastoma.infer_roothogs:infer_roothogs", - "batch-roothogs=fastoma.batch_roothogs:batch_roothogs", - "infer-subhogs=fastoma.infer_subhogs:infer_subhogs", - "collect-subhogs=fastoma.collect_subhogs:collect_subhogs", + "infer-roothogs=FastOMA.infer_roothogs:infer_roothogs", + "batch-roothogs=FastOMA.batch_roothogs:batch_roothogs", + "infer-subhogs=FastOMA.infer_subhogs:infer_subhogs", + "collect-subhogs=FastOMA.collect_subhogs:collect_subhogs", ] }, ) diff --git a/utils/orthoxml2family.py b/utils/orthoxml2family.py index ad347be..7bac5ea 100644 --- a/utils/orthoxml2family.py +++ b/utils/orthoxml2family.py @@ -4,7 +4,7 @@ # from Bio import SeqIO -from fastoma.zoo.hog.convert import extract_flat_groups_at_level +from FastOMA.zoo.hog.convert import extract_flat_groups_at_level diff --git a/utils/orthoxml2newick.py b/utils/orthoxml2newick.py index 3610ed0..3c43f0e 100644 --- a/utils/orthoxml2newick.py +++ b/utils/orthoxml2newick.py @@ -2,7 +2,7 @@ -from fastoma.zoo.hog.convert import orthoxml_to_newick +from FastOMA.zoo.hog.convert import orthoxml_to_newick input_orthoxml = "folder/my_hogs.orthoxml" output_folder = "output_folder"