Skip to contents

Processes a GATK Panel of Normals (PoN) HDF5 file to extract final intervals (whitelist) and excluded regions (blacklist), and outputs them as BED files. Also creates a cytoband-detectable edge file by overlapping whitelist intervals with cytoband annotations to define p and q arm coverage.

Usage

PonProcess(
  pon_file,
  blacklist_bed,
  whitelist_bed,
  cytoband,
  detectable_edge,
  gender
)

Arguments

pon_file

Character. Path to the GATK PoN HDF5 file.

blacklist_bed

Character. Output file path for the blacklist BED file (intervals excluded from the panel).

whitelist_bed

Character. Output file path for the whitelist BED file (final intervals retained in the panel).

cytoband

Character. Path to the cytoband annotation file with columns: chrom, chromStart, chromEnd, name, gieStain.

detectable_edge

Character. Output file path for the cytoband-detectable edge file, used in downstream annotation.

gender

Character. female or male. Gender of the GATK PON file. Mixed gender are not supported.

Value

Invisibly returns a list containing data frames: blacklist, whitelist, and cytoband_edge.

Details

This function calls FindCytoband, which must be available in the package namespace.

This function performs the following:

  • Reads original and final intervals from the PoN file and maps contig indices to chromosome names.

  • Writes a whitelist BED file with intervals retained for CNV calling.

  • Writes a blacklist BED file with intervals filtered out by GATK PoN processing.

  • Generates a cytoband-detectable edge file by intersecting whitelist intervals with cytoband annotations, summarizing detectable p and q arm boundaries per chromosome.

See also

Examples

PonProcess("gatk.pon.hdf5", "pon_blacklist.bed", "pon_whitelist.bed", "detectable_edge.bed", "cytoband.txt")
#> Error in H5File.open(filename, mode, file_create_pl, file_access_pl): HDF5-API Errors:
#>     error #000: ../../src/hdf5-1.12.2/src/H5F.c in H5Fopen(): line 620: unable to open file
#>         class: HDF5
#>         major: File accessibility
#>         minor: Unable to open file
#> 
#>     error #001: ../../src/hdf5-1.12.2/src/H5VLcallback.c in H5VL_file_open(): line 3502: failed to iterate over available VOL connector plugins
#>         class: HDF5
#>         major: Virtual Object Layer
#>         minor: Iteration failed
#> 
#>     error #002: ../../src/hdf5-1.12.2/src/H5PLpath.c in H5PL__path_table_iterate(): line 579: can't iterate over plugins in plugin path '(null)'
#>         class: HDF5
#>         major: Plugin for dynamically loaded library
#>         minor: Iteration failed
#> 
#>     error #003: ../../src/hdf5-1.12.2/src/H5PLpath.c in H5PL__path_table_iterate_process_path(): line 620: can't open directory: /usr/local/hdf5/lib/plugin
#>         class: HDF5
#>         major: Plugin for dynamically loaded library
#>         minor: Can't open directory or file
#> 
#>     error #004: ../../src/hdf5-1.12.2/src/