INNER CODE UNIT · Python
find_chain_file
hillerlab/TOGA · CESAR_wrapper.py:367
def find_chain_file(ref_name, chain_arg):
"""Return chain file path."""
if os.path.isfile(chain_arg):
# not an alias -> just return it
return chain_arg
# not a chain path/ Hillerlab-specific place!
chain_path = chain_alias_template.format(ref_name, chain_arg)
die(
f"Error! File {chain_path} not found! Please set the chain path explicitly.", 1
) if not os.path.isfile(chain_path) else None
return chain_path
def get_exons(bed_data, t_db):
"""Extract exons sequences for reference."""
exons_raw = (
bed_data["blocks"][::-1] if not bed_data["strand"] else bed_data["blocks"]
)