Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
sinamajidian committed Nov 28, 2022
1 parent 3ff38fd commit 2e6ef51
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
22 changes: 11 additions & 11 deletions gethog3/_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@
oma_database_address = "/work/FAC/FBM/DBC/cdessim2/default/smajidi1/omafast/archive/OmaServer.h5"

# bird
working_folder_root = "/work/FAC/FBM/DBC/cdessim2/default/smajidi1/fastget/bird_hog/" # bird_hog
species_tree_address = working_folder_root + "birds370_iqtree_treefile_95bootstrap_internal_name_6let_16Nov_.nwk"
working_id = "hog3_nov25/"
protein_format_qfo_dataset = False
# working_folder_root = "/work/FAC/FBM/DBC/cdessim2/default/smajidi1/fastget/bird_hog/" # bird_hog
# species_tree_address = working_folder_root + "birds370_iqtree_treefile_95bootstrap_internal_name_6let_16Nov_.nwk"
# working_id = "hog3_nov25f/"
# protein_format_qfo_dataset = False

# qfo
# working_folder_root = "/work/FAC/FBM/DBC/cdessim2/default/smajidi1/fastget/qfo3/" # bird_hog
# species_tree_address = working_folder_root + "lineage_tree_qfo_.nwk" #phyloxml"
# working_id = "hog3_nov25/"
# protein_format_qfo_dataset = True
working_folder_root = "/work/FAC/FBM/DBC/cdessim2/default/smajidi1/fastget/qfo3/" # bird_hog
species_tree_address = working_folder_root + "lineage_tree_qfo_.nwk" #phyloxml"
working_id = "hog3_nov25_prof/"
protein_format_qfo_dataset = True



working_folder = working_folder_root + working_id

## output writing files
gene_trees_write = True # this also goes for writing msas
keep_subhog_each_pickle = True #False
gene_trees_write = False # this also goes for writing msas
keep_subhog_each_pickle = False #False


# filtering omamer
Expand All @@ -35,7 +35,7 @@
dask_n_core = 1
dask_machine = "slurm" # "local" "slurm"
dask_memory_slurm = "40GB"
dask_time_slurm = "11:00:00"
dask_time_slurm = "00:10:00"
dask_n_jobs = 2

## hogclass configs
Expand Down
2 changes: 2 additions & 0 deletions gethog3/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ def prepare_species_tree(rhog_i, species_tree, rhogid_num):
output: species_tree (pruned), species_names_rhog, prot_names_rhog
"""
assert len(rhog_i) > 0, 'input hog_i is empty, probably previous step find_rhog has issue, rhogs/HOG_B0'+str(rhogid_num)+'is empty?'
species_names_rhog = []
prot_names_rhog = []
for rec in rhog_i:
Expand All @@ -119,6 +120,7 @@ def prepare_species_tree(rhog_i, species_tree, rhogid_num):
# gene_id = prot_id[2]
species_names_rhog.append(species_name)
prot_names_rhog.append(prot_name)
assert len(species_names_rhog) > 0, "species names list is empty in rhog, probably issue in formating with || in previous step find rhog"

species_names_uniqe = set(species_names_rhog)
first_common_ancestor_name = species_tree.get_common_ancestor(species_names_uniqe).name
Expand Down
3 changes: 2 additions & 1 deletion gethog3/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@

logger_hog.info("number of remained is " + str(len(rhogid_num_list)))

# rhogid_num_list = rhogid_num_list[:2]
rhogid_num_list = rhogid_num_list[:2]
# print(rhogid_num_list[:4])
logger_hog.info("working on a list with number of " + str(len(rhogid_num_list)))
if not rhogid_num_list:
Expand Down Expand Up @@ -167,6 +167,7 @@
hogs_rhogs_xml_all.extend(hogs_rhog_xml_batch)

logger_hog.info("Dask out gathered")
client_dask.p(filename=_config.working_folder+"dask-profile.html")rofile
client_dask.close()
client_dask.shutdown()
logger_hog.info("Client dask closed and shut down.")
Expand Down

0 comments on commit 2e6ef51

Please sign in to comment.