INNER CODE UNIT · Python

make_genome_summary

BortonWrightonLabs/DRAM · bin/distill.py:69

def make_genome_summary(
    annotations, genome_summary_frame: pl.LazyFrame, logger, fasta_column=FASTA_COLUMN
):
    if COL_RULE not in genome_summary_frame.collect_schema().names():
        genome_summary_frame = genome_summary_frame.with_columns(
            pl.lit(None).cast(pl.String).alias(COL_RULE)
        )

    genome_summary_frame = genome_summary_frame.with_columns(
        pl.when(pl.col(COL_RULE).is_not_null())
        .then(pl.col(COL_RULE))
        .otherwise(pl.col("gene_id"))
        .alias(COL_RULE)
    )
    df = evaluate_rules_on_anno(
        rules=genome_summary_frame,
        # rules_tsv_path="/home/projects-wrighton-2/Pipeline_Development/DRAM2-Nextflow/DRAM/bin/assets/forms/distill_sheets/distill_metals.tsv",
        annotations=annotations,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…