Learn R Programming

inDAGO (version 1.0.0)

checkMetadata: checkMetadata

Description

Validate and extract non-empty annotation fields from a GTF file.

Usage

checkMetadata(gtfPath, typeFilter)

Value

Character vector of column names in the GTF annotation that are not entirely NA or empty.

Arguments

gtfPath

Character. Path to the directory or file location of the GTF file.

typeFilter

Character. The feature type to filter on (e.g., "gene", "exon").

Details

This function imports a GTF file, filters entries by a specified feature type, and identifies metadata columns that contain at least one non-missing value.

  1. Imports the GTF into a data frame via "rtracklayer::import()".

  2. Filters rows by "type" == typeFilter.

  3. Tests each column for all-NA or empty-string entries.

  4. Returns names of columns with at least one non-missing, non-empty value.