Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions ksrates_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,9 @@ def paralogs_analyses(config_file, expert, paranome_table, anchors_table, recipr
@click.option('-e', '--expert', type=click.Path(exists=True), help="User-defined path to the expert configuration file")
@click.option("--n-threads", type=int, default=1, help="Number of threads (default: 1)")
@click.option("--custom-recret-gfs", type=click.Path(exists=True), help="User-defined path to MCL-like file containing reciprocally retained GFs (default: paralog_distribution/wgd_species/species_rec_ret_top_2000.mcl.tsv)")
@click.option("--parsed-homology-table", type=click.Path(exists=True), help="User-defined path to parsed homology table ('BPO file') generated by a previous OrthoMCL run")
@click.option("--test", is_flag=True, default=False, help="Flag for test dataset (Default: False)")
def paralogs_ks_multi(config_sources, expert, n_threads, custom_recret_gfs, test):
def paralogs_ks_multi(config_sources, expert, n_threads, custom_recret_gfs, parsed_homology_table, test):
"""
Performs paralog Ks estimation through wgd for all species present in the Newick tree in the configuration file(s) provided as argument.

Expand All @@ -337,6 +338,10 @@ def paralogs_ks_multi(config_sources, expert, n_threads, custom_recret_gfs, test
expert = ""
if custom_recret_gfs:
click.format_filename(custom_recret_gfs)
if parsed_homology_table: # If not provided, it's "None"
click.format_filename(parsed_homology_table)
else:
parsed_homology_table = ""

# Process any provided source of configuration files (either files or directories containing files)
for source in config_sources:
Expand All @@ -345,15 +350,15 @@ def paralogs_ks_multi(config_sources, expert, n_threads, custom_recret_gfs, test
# If configuration source is a file, use it directly to launch the command
if os.path.isfile(source):
click.format_filename(source)
wgd_paralogs(source, expert, n_threads, custom_recret_gfs, test)
wgd_paralogs(source, expert, n_threads, custom_recret_gfs, parsed_homology_table, test)
print("")

# Else if configuration source is a directory, loop through the files thereby contained and use them
elif os.path.isdir(source):
for config_file in os.listdir(source):
config_file = os.path.join(source, config_file)
click.format_filename(config_file)
wgd_paralogs(config_file, expert, n_threads, custom_recret_gfs, test)
wgd_paralogs(config_file, expert, n_threads, custom_recret_gfs, parsed_homology_table, test)
print("")


Expand Down