INNER CODE UNIT · Python

check_columns

BortonWrightonLabs/DRAM · bin/distill.py:59

def check_columns(data, logger):
    functions = [i for i in ID_EXPR_DICT if i in data.columns]
    missing = [i for i in ID_EXPR_DICT if i not in data.columns]
    logger.info(
        "Note: the following id fields "
        f"were not in the annotations file and are not being used: {missing},"
        f" but these are {functions}"
    )


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)
        )

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…