INNER CODE UNIT · Python

evaluate

BortonWrightonLabs/DRAM · bin/adjectives.py:107

def evaluate(
    annotations: str,
    output: str,
    rules_tsv: str = get_assets_path("traits_rules.tsv"),
    #  adjectives_list:list=None, plot_adjectives:list=None,
    #  plot_genomes:list=None,plot_path:str=None,
    #  debug_ids_by_fasta_to_tsv:str=None,
    #  strainer_tsv:str=None, strainer_type='pgtb'
):
    """Using a DRAM annotations file make a table of adjectives."""
    rules = pl.read_csv(rules_tsv, separator="\t")

    dfs = {}
    sample_col = "input_fasta"
    group_by_col = "topic_ecosystem"
    if group_by_col not in rules.columns:
        rules = rules.with_columns(pl.lit("traits").alias(group_by_col))
    for name, data in rules.group_by(group_by_col):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…