Create a tabix file using methylation calls
Usage
create_tabix_file(
input_files,
output_file,
samples = extract_file_names(input_files),
mod_code = NULL,
verbose = TRUE
)Arguments
- input_files
the files to convert
- output_file
the output file to write results to (must end in .bgz)
- samples
the names of samples corresponding to each file
- mod_code
modkit input only: the modification code to extract, e.g. "h" for 5hmC. NULL uses "m" (5mC). Supplying it when no input is from modkit is an error.
- verbose
TRUE if progress messages are to be printed
Examples
methy_calls <- system.file(package = "NanoMethViz",
c("sample1_nanopolish.tsv.gz", "sample2_nanopolish.tsv.gz"), mustWork = FALSE)
temp_file <- paste0(tempfile(), ".tsv.bgz")
create_tabix_file(methy_calls, temp_file)
#> [2026-10-07 23:16:45] creating methylation table
#> processing /home/runner/work/_temp/Library/NanoMethViz/sample1_nanopolish.tsv.gz...
#> guessing file is produced by nanopolish...
#> processing /home/runner/work/_temp/Library/NanoMethViz/sample2_nanopolish.tsv.gz...
#> guessing file is produced by nanopolish...
#> [2026-10-07 23:16:46] sorting methylation table
#> [2026-10-07 23:16:46] compressing methylation table to tabix with index