diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index a484448..0f65417 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -18,7 +18,7 @@ jobs: fail-fast: false matrix: config: - - {os: macos-latest, r: 'release'} + # - {os: macos-latest, r: 'release'} - {os: windows-latest, r: 'release'} - {os: ubuntu-latest, r: 'release'} diff --git a/DESCRIPTION b/DESCRIPTION index 261f1cf..212073f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: rPHG2 Title: R interface to PHGv2 -Version: 0.3.1 +Version: 0.4 Authors@R: person( given = "Brandon", @@ -32,12 +32,16 @@ Imports: cli, curl, GenomicRanges, + ggplot2, httr, IRanges, jsonlite, methods, rJava, - tibble + rlang, + tibble, + tools, + utils VignetteBuilder: knitr Suggests: knitr, diff --git a/NAMESPACE b/NAMESPACE index 176a997..1df2d25 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,7 +1,12 @@ # Generated by roxygen2: do not edit by hand +S3method(.DollarNames,PHGMetrics) +export("%T%") +export("metricsIds<-") +export("metricsTable<-") export(PHGDataSet) export(PHGLocalCon) +export(PHGMetrics) export(PHGServerCon) export(brapiURL) export(brapiVersion) @@ -14,10 +19,14 @@ export(httProtocol) export(initPhg) export(javaMemoryAddress) export(javaRefObj) +export(metricsIds) +export(metricsMetaData) +export(metricsTable) export(numberOfChromosomes) export(numberOfRefRanges) export(numberOfTaxa) export(phgType) +export(plotDot) export(port) export(readHapIdMetaData) export(readHapIdPosMetaData) @@ -30,7 +39,11 @@ exportClasses(HaplotypeGraph) exportClasses(PHGCon) exportClasses(PHGDataSet) exportClasses(PHGLocalCon) +exportClasses(PHGMetrics) exportClasses(PHGServerCon) +exportMethods("$") +exportMethods("metricsIds<-") +exportMethods("metricsTable<-") exportMethods(brapiURL) exportMethods(brapiVersion) exportMethods(filterRefRanges) @@ -40,10 +53,14 @@ exportMethods(host) exportMethods(httProtocol) exportMethods(javaMemoryAddress) exportMethods(javaRefObj) +exportMethods(metricsIds) +exportMethods(metricsMetaData) +exportMethods(metricsTable) exportMethods(numberOfChromosomes) exportMethods(numberOfRefRanges) exportMethods(numberOfTaxa) exportMethods(phgType) +exportMethods(plotDot) exportMethods(port) exportMethods(readHapIdMetaData) exportMethods(readHapIdPosMetaData) @@ -54,3 +71,4 @@ exportMethods(readSamples) exportMethods(serverInfo) importFrom(curl,has_internet) importFrom(methods,is) +importFrom(utils,.DollarNames) diff --git a/NEWS.md b/NEWS.md index 2dae214..fb7efd4 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,6 +3,15 @@ + `vignette("rPHG2")` * Created build system for website generation + [rphg2.maizegenetics.net](https://rphg2.maizegenetics.net) +* Added new class `PHGMetrics` + + Primary container for PHGv2 metrics data +* Added accessor methods for `PHGMetrics` objects: + + `metricsIds()` + + `metricsTable()` + + `metricsMetaData()` +* Prior methods are also updatable +* Added visualization methods: + + `plotDot()` - collinearity plotter for alignment data ## rPHG2 0.3 diff --git a/R/class_all_generics.R b/R/class_all_generics.R index fd9f24e..7ad37b9 100644 --- a/R/class_all_generics.R +++ b/R/class_all_generics.R @@ -4,7 +4,7 @@ #' @description #' Returns the Uniform Resource Locator (URL) of a \code{BrapiCon} object. #' -#' @param object an \code{rPHG} local or server connection object. +#' @param object an \code{rPHG2} local or server connection object. #' @param ... Additional arguments, for use in specific methods #' #' @rdname brapiURL @@ -18,7 +18,7 @@ setGeneric("brapiURL", function(object, ...) standardGeneric("brapiURL")) #' @description #' Returns the version ID for a BrAPI-compliant PHG server #' -#' @param object an \code{rPHG} local or server connection object +#' @param object an \code{rPHG2} local or server connection object #' @param ... Additional arguments, for use in specific methods #' #' @rdname brapiVersion @@ -30,9 +30,9 @@ setGeneric("brapiVersion", function(object, ...) standardGeneric("brapiVersion") #' @title Filter data by reference range #' #' @description -#' Filters \code{rPHG}-related datasets by reference range coordinates or ID. +#' Filters \code{rPHG2}-related datasets by reference range coordinates or ID. #' -#' @param object an \code{rPHG} dataset +#' @param object an \code{rPHG2} dataset #' @param ... Additional arguments, for use in specific methods #' #' @rdname filterRefRanges @@ -44,9 +44,9 @@ setGeneric("filterRefRanges", function(object, ...) standardGeneric("filterRefRa #' @title Filter data by sample IDs #' #' @description -#' Filters \code{rPHG}-related datasets by sample ID. +#' Filters \code{rPHG2}-related datasets by sample ID. #' -#' @param object an \code{rPHG} dataset +#' @param object an \code{rPHG2} dataset #' @param ... Additional arguments, for use in specific methods #' #' @rdname filterSamples @@ -60,7 +60,7 @@ setGeneric("filterSamples", function(object, ...) standardGeneric("filterSamples #' @description #' Returns the host information for a given object #' -#' @param object an \code{rPHG} local or server connection object +#' @param object an \code{rPHG2} local or server connection object #' @param ... Additional arguments, for use in specific methods #' #' @rdname host @@ -74,7 +74,7 @@ setGeneric("host", function(object, ...) standardGeneric("host")) #' @description #' Returns the protocol information for a given object #' -#' @param object an \code{rPHG} local or server connection object +#' @param object an \code{rPHG2} local or server connection object #' @param ... Additional arguments, for use in specific methods #' #' @rdname httProtocol @@ -88,7 +88,7 @@ setGeneric("httProtocol", function(object, ...) standardGeneric("httProtocol")) #' @description #' Returns a list of hVCF files. #' -#' @param object an \code{rPHG} local connection object +#' @param object an \code{rPHG2} local connection object #' @param ... Additional arguments, for use in specific methods #' #' @rdname hVcfFiles @@ -100,9 +100,9 @@ setGeneric("hVcfFiles", function(object, ...) standardGeneric("hVcfFiles")) #' @title Return \code{rJava} reference object #' #' @description -#' Returns the \code{rJava} memory reference for a given \code{rPHG} object +#' Returns the \code{rJava} memory reference for a given \code{rPHG2} object #' -#' @param object an \code{rPHG} local or server connection object +#' @param object an \code{rPHG2} local or server connection object #' @param ... Additional arguments, for use in specific methods #' #' @rdname javaMemoryAddress @@ -114,9 +114,9 @@ setGeneric("javaMemoryAddress", function(object, ...) standardGeneric("javaMemor #' @title Return \code{rJava} reference object #' #' @description -#' Returns the \code{rJava} memory reference for a given \code{rPHG} object +#' Returns the \code{rJava} memory reference for a given \code{rPHG2} object #' -#' @param object an \code{rPHG} local or server connection object +#' @param object an \code{rPHG2} local or server connection object #' @param ... Additional arguments, for use in specific methods #' #' @rdname javaRefObj @@ -124,13 +124,63 @@ setGeneric("javaMemoryAddress", function(object, ...) standardGeneric("javaMemor setGeneric("javaRefObj", function(object, ...) standardGeneric("javaRefObj")) +## ---- +#' @title Return metrics table IDs +#' +#' @description +#' Returns a PHG metrics table by given ID +#' +#' @param object an \code{rPHG2} metrics object +#' @param ... Additional arguments, for use in specific methods +#' +#' @rdname metricsIds +#' @export +setGeneric("metricsIds", function(object, ...) standardGeneric("metricsIds")) + +#' @rdname metricsIds +#' @export +setGeneric("metricsIds<-", function(object, ..., value) standardGeneric("metricsIds<-")) + + +## ---- +#' @title Return metric metadata +#' +#' @description +#' Returns metadata information from \code{rPHG2} metrics objects +#' +#' @param object an \code{rPHG2} metrics object +#' @param ... Additional arguments, for use in specific methods +#' +#' @rdname metricsMetaData +#' @export +setGeneric("metricsMetaData", function(object, ...) standardGeneric("metricsMetaData")) + + +## ---- +#' @title Return a metrics table +#' +#' @description +#' Returns a PHG metrics table by given ID +#' +#' @param object an \code{rPHG2} metrics object +#' @param ... Additional arguments, for use in specific methods +#' +#' @rdname metricsTable +#' @export +setGeneric("metricsTable", function(object, ...) standardGeneric("metricsTable")) + +#' @rdname metricsTable +#' @export +setGeneric("metricsTable<-", function(object, ..., value) standardGeneric("metricsTable<-")) + + ## ---- #' @title Return number of chromosomes #' #' @description #' Returns the number of chromosomes for a given object #' -#' @param object an \code{rPHG} local or server connection object +#' @param object an \code{rPHG2} local or server connection object #' @param ... Additional arguments, for use in specific methods #' #' @rdname numberOfChromosomes @@ -144,7 +194,7 @@ setGeneric("numberOfChromosomes", function(object, ...) standardGeneric("numberO #' @description #' Returns the number of reference ranges for a given object #' -#' @param object an \code{rPHG} local or server connection object +#' @param object an \code{rPHG2} local or server connection object #' @param ... Additional arguments, for use in specific methods #' #' @rdname numberOfRefRanges @@ -158,7 +208,7 @@ setGeneric("numberOfRefRanges", function(object, ...) standardGeneric("numberOfR #' @description #' Returns the number of taxa for a given object #' -#' @param object an \code{rPHG} local or server connection object +#' @param object an \code{rPHG2} local or server connection object #' @param ... Additional arguments, for use in specific methods #' #' @rdname numberOfTaxa @@ -170,9 +220,9 @@ setGeneric("numberOfTaxa", function(object, ...) standardGeneric("numberOfTaxa") #' @title Return type of PHG connection #' #' @description -#' Returns the PHG type for a given \code{rPHG} local or server connection object +#' Returns the PHG type for a given \code{rPHG2} local or server connection object #' -#' @param object an \code{rPHG} connection object +#' @param object an \code{rPHG2} connection object #' @param ... Additional arguments, for use in specific methods #' #' @rdname phgType @@ -180,13 +230,27 @@ setGeneric("numberOfTaxa", function(object, ...) standardGeneric("numberOfTaxa") setGeneric("phgType", function(object, ...) standardGeneric("phgType")) +## ---- +#' @title Generate dot plots +#' +#' @description +#' Generates collinearity (dot) plots between 2 samples +#' +#' @param object an \code{rPHG2} metrics object +#' @param ... Additional arguments, for use in specific methods +#' +#' @rdname plotDot +#' @export +setGeneric("plotDot", function(object, ...) standardGeneric("plotDot")) + + ## ---- #' @title Return port value #' #' @description #' Returns the port information for a given object #' -#' @param object an \code{rPHG} local or server connection object +#' @param object an \code{rPHG2} local or server connection object #' @param ... Additional arguments, for use in specific methods #' #' @rdname port @@ -201,7 +265,7 @@ setGeneric("port", function(object, ...) standardGeneric("port")) #' Gets haplotype ID for given samples and reference ranges from a #' \code{HaplotypeGraph} #' -#' @param object an \code{rPHG} local or server connection object +#' @param object an \code{rPHG2} local or server connection object # @param nThreads Number of threads to use when evaluating haplotype IDs #' @param ... Additional arguments, for use in specific methods #' @@ -217,7 +281,7 @@ setGeneric("readHapIds", function(object, ...) standardGeneric("readHapIds")) #' Gets haplotype ID metadata for given samples and reference ranges from a #' \code{HaplotypeGraph} #' -#' @param object an \code{rPHG} local or server connection object +#' @param object an \code{rPHG2} local or server connection object #' @param ... Additional arguments, for use in specific methods #' #' @rdname readHapIdMetaData @@ -232,7 +296,7 @@ setGeneric("readHapIdMetaData", function(object, ...) standardGeneric("readHapId #' Gets haplotype ID positional metadata for given samples and reference ranges #' from a \code{HaplotypeGraph} #' -#' @param object an \code{rPHG} local or server connection object +#' @param object an \code{rPHG2} local or server connection object #' @param ... Additional arguments, for use in specific methods #' #' @rdname readHapIdPosMetaData @@ -247,7 +311,7 @@ setGeneric("readHapIdPosMetaData", function(object, ...) standardGeneric("readHa #' Returns all haplotype, sample, and reference range IDs and relative metadata #' from a \code{\linkS4class{HaplotypeGraph}} object. #' -#' @param object an \code{rPHG} local or server connection object +#' @param object an \code{rPHG2} local or server connection object #' @param ... Additional arguments, for use in specific methods #' #' @rdname readPhgDataSet @@ -261,7 +325,7 @@ setGeneric("readPhgDataSet", function(object, ...) standardGeneric("readPhgDataS #' @description #' Get reference range data from a \code{HaplotypeGraph} #' -#' @param object an \code{rPHG} local or server connection object +#' @param object an \code{rPHG2} local or server connection object #' @param ... Additional arguments, for use in specific methods #' #' @rdname readRefRanges @@ -275,7 +339,7 @@ setGeneric("readRefRanges", function(object, ...) standardGeneric("readRefRanges #' @description #' Gets sample ID data from a \code{HaplotypeGraph} #' -#' @param object an \code{rPHG} local or server connection object +#' @param object an \code{rPHG2} local or server connection object #' @param ... Additional arguments, for use in specific methods #' #' @rdname readSamples @@ -289,7 +353,7 @@ setGeneric("readSamples", function(object, ...) standardGeneric("readSamples")) #' @description #' Get available BrAPI calls from BrAPI compliant PHG server #' -#' @param object an \code{rPHG} local or server connection object +#' @param object an \code{rPHG2} local or server connection object #' @param ... Additional arguments, for use in specific methods #' #' @rdname serverInfo diff --git a/R/class_phg_metrics.R b/R/class_phg_metrics.R new file mode 100644 index 0000000..cc1834b --- /dev/null +++ b/R/class_phg_metrics.R @@ -0,0 +1,558 @@ +## ---- +#' @title A PHGMetrics Class +#' +#' @description +#' A \code{PHGMetrics} class is a general class for storing metrics data +#' generated from PHGv2 operations. +#' +#' @slot metricAlign +#' AnchorWave alignment metrics (\code{.anchorspro}) +#' @slot metricGvcf +#' gVCF metrics +#' @slot metadata +#' A \code{data.frame} object of key-value data for files +#' +#' @name PHGMetrics-class +#' @rdname PHGMetrics-class +#' @exportClass PHGMetrics +setClass( + Class = "PHGMetrics", + representation = representation( + metricAlign = "list", + metricGvcf = "list", + metadata = "tbl_df" + ), + prototype = list( + metricAlign = list(), + metricGvcf = list(), + metadata = tibble::tibble() + ) +) + + +## ---- +#' @title PHGMetrics object constructor +#' +#' @description +#' \code{PHGMetrics} is the primary container for housing PHGv2 metrics data +#' +#' @param paths +#' A \code{character} vector of file and/or directory paths +#' @param metadata +#' key-value metadata for files +#' +#' @return A \code{PHGMetrics} object. +#' +#' @export +PHGMetrics <- function(paths = NULL, metadata = NULL) { + if (!is.character(paths)) { + rlang::abort("No valid file paths or directories given for 'paths' parameter") + } + + # V01 - check if directories or files exist + dirFilt <- paths[dir.exists(paths)] + filFilt <- paths[file.exists(paths)] + + # V02 - if no files or directories exist: exception + if (length(dirFilt) == 0 && length(filFilt) == 0) { + stop("No valid paths given") + } + + # V03 - recursively pull metric files from directories (if found) + # NOTE - probably don't need a pattern but good for only keeping + # possibly valid files in memory footprint in case it's a + # massive directory + if (length(dirFilt) != 0) { + metFilesFromDir <- list.files( + path = dirFilt, + pattern = "\\.tsv$|\\.anchorspro$", + full.names = TRUE, + recursive = TRUE + ) + metFilesFromDir <- normalizePath(metFilesFromDir) + } else { + metFilesFromDir <- NULL + } + + # V04 - combine all files as one collection + posFiles <- c(metFilesFromDir, filFilt) + + # V05 - split out files based on type + gvcfMet <- posFiles[endsWith(posFiles, "tsv")] + algnMet <- posFiles[endsWith(posFiles, "anchorspro")] + + # V06 - if .tsv or .anchorspro files are identified: check contents for + # further validity + if (length(gvcfMet) != 0) { + gvcfMet <- gvcfMet[isValidGvcf(gvcfMet)] + } + + if (length(algnMet) != 0) { + algnMet <- algnMet[isValidAnchor(algnMet)] + } + + # V07 - if no .tsv or .anchorspro files are identified: exception + if (length(gvcfMet) == 0 && length(algnMet) == 0) { + stop("No valid gVCF or AnchorWave files detected from paths") + } + + # If files are fully vetted: read into memory and add to list + if (length(gvcfMet) != 0) { + gvcfDfs <- readMetricFiles(gvcfMet) + } else { + gvcfDfs <- list() + } + + if (length(algnMet) != 0) { + algnDfs <- readMetricFiles(algnMet) + } else { + algnDfs <- list() + } + + if (is.null(metadata)) { + metadata <- tibble::tibble( + file = basename(c(gvcfMet, algnMet)), + type = c(rep("gvcf", length(gvcfMet)), rep("align", length(algnMet))), + id = tools::file_path_sans_ext(basename(c(gvcfMet, algnMet))) + ) + } + + return( + methods::new( + Class = "PHGMetrics", + metricAlign = algnDfs, + metricGvcf = gvcfDfs, + metadata = metadata + ) + ) +} + + + +# /// Methods (show) //////////////////////////////////////////////// + +## ---- +#' @title Show methods for PHGMetrics objects +#' +#' @description +#' Prints out information regarding properties from the \code{PHGMetrics} +#' class to the console +#' +#' @param object A \code{\linkS4class{PHGMetrics}} object +#' +#' @docType methods +#' @rdname PHGMetrics-class +#' @aliases show,PHGMetrics-method +setMethod( + f = "show", + signature = "PHGMetrics", + definition = function(object) { + maxPrint <- 2 + + # Output header + cat( + paste0( + "A ", cli::style_bold("PHGMetrics"), " object containing ", + cli::style_bold(length(metricsTable(object))), " tables:\n" + ) + ) + + # Display metrics for all table groups + if (length(object@metricAlign) != 0) { + displayMetrics(object@metricAlign, "AnchorWave data", maxPrint) + } + + if (length(object@metricGvcf) != 0) { + displayMetrics(object@metricGvcf, "gVCF data", maxPrint) + } + } +) + + + +# /// Methods (override) //////////////////////////////////////////// + +## ---- +#' @title +#' Retrieve Names Matching a Pattern from PHGMetrics Objects +#' +#' @description +#' This function extracts all the names from the `id` field in the `metadata` +#' slot of a `PHGMetrics` object that match a specified pattern. +#' +#' @param x +#' A `PHGMetrics` object. +#' @param pattern +#' A regular expression pattern to match against the `id` values. +#' +#' @return +#' A character vector of names matching the pattern. +#' +#' @importFrom utils .DollarNames +#' +#' @export +.DollarNames.PHGMetrics <- function(x, pattern = "") { + grep(pattern, x@metadata$id, value = TRUE) +} + + +## ---- +#' @title +#' Access Elements of PHGMetrics Objects by Name +#' +#' @description +#' This method allows for accessing elements of the `metadata` slot in +#' `PHGMetrics` objects using the `$` operator, specifically filtering by the +#' `id`. +#' +#' @param x +#' A `PHGMetrics` object. +#' @param name +#' The name of the element to access within the `metadata$id` field. +#' +#' @return +#' The value associated with the specified `name` in the `metadata$id` of the +#' `PHGMetrics` object, if it exists. +#' +#' @export +setMethod("$", "PHGMetrics", function(x, name) { + methods::slot(x, "metadata")[["id"]][x@metadata[["id"]] == name] +}) + + + +# /// Methods (general) ///////////////////////////////////////////// + +## ---- +#' @param type +#' What collection of IDs do you want to return? Defaults to \code{NULL}. +#' +#' @rdname metricsIds +#' @export +setMethod( + f = "metricsIds", + signature = signature(object = "PHGMetrics"), + definition = function(object, type = NULL) { + + if (!is.null(type)) { + rlang::arg_match0(type, values = PHG_METRICS$VALID_METRICS_IDS) + } + + if (is.null(type)) { + ids <- c( + names(object@metricAlign), + names(object@metricGvcf) + ) + } else if (type == "align") { + ids <- c(names(object@metricAlign)) + } else if (type == "gvcf") { + ids <- c(names(object@metricGvcf)) + } + + return(ids) + } +) + + +## ---- +#' @param value +#' A named vector where name(s) are the old IDs and elements are the new IDs +#' +#' @rdname metricsIds +#' @export +setMethod( + f = "metricsIds<-", + signature = signature(object = "PHGMetrics"), + definition = function(object, value) { + if (is.null(names(value))) { + rlang::abort("Provided 'value' is not a named 'vector'") + } + + if (!is.character(value)) { + rlang::abort("Elements in vector for 'value' must be of type 'character'") + } + + if (any(duplicated(names(value)))) { + rlang::abort("Duplicated object IDs found in 'value' (all IDs must be unique)") + } + + if (any(duplicated(value))) { + rlang::abort("Duplicated new IDs found in 'value' (all IDs must be unique)") + } + + if (all(value %in% metricsIds(object))) { + rlang::abort("No IDs changed (all new values already found in object)") + } + + if (all(!names(value) %in% metricsIds(object))) { + rlang::abort("No provided IDs found in object") + } + + if (any(value %in% metricsIds(object))) { + offenders <- value[value %in% metricsIds(object)] + for (off in offenders) { + cat(metMessenger(off, "warn_02")) + } + value <- value[value != offenders] + } + + if (any(!names(value) %in% metricsIds(object))) { + offenders <- value[!names(value) %in% metricsIds(object)] + for (off in offenders) { + cat(metMessenger(off, "warn_03")) + } + value <- value[value != offenders] + } + + newNames <- value + oldNames <- names(newNames) + + md <- metricsMetaData(object) + oldGvcfIds <- md$id[md$type == "gvcf"] + oldAlgnIds <- md$id[md$type == "align"] + + newGvcfIds <- newNames[oldGvcfIds] + newAlgnIds <- newNames[oldAlgnIds] + newGvcfIds[is.na(newGvcfIds)] <- oldGvcfIds[is.na(newGvcfIds)] + newAlgnIds[is.na(newAlgnIds)] <- oldAlgnIds[is.na(newAlgnIds)] + + mdNew <- md + mdNew[mdNew$id %in% oldNames, "id"] <- newNames + + methods::slot(object, "metadata") <- mdNew + names(object@metricGvcf) <- newGvcfIds + names(object@metricAlign) <- newAlgnIds + + return(object) + } +) + + +## ---- +#' @rdname metricsMetaData +#' @export +setMethod( + f = "metricsMetaData", + signature = signature(object = "PHGMetrics"), + definition = function(object) { + return(object@metadata) + } +) + + +## ---- +#' @param name +#' A metric table name +#' @param type +#' What collection of IDs do you want to return? Defaults to \code{NULL}. +#' @rdname metricsTable +#' @export +setMethod( + f = "metricsTable", + signature = signature(object = "PHGMetrics"), + definition = function(object, name = NULL, type = NULL) { + + if (is.null(name) && is.null(type)) { + return( + c( + object@metricAlign, + object@metricGvcf + ) + ) + } + + if (!is.null(name) && !is.null(type)) { + type <- NULL + } + + if (!name %in% metricsIds(object) && !is.null(name)) { + stop("Provided 'name' not found in object") + } + + if (!is.null(name) && is.null(type)) { + return( + c( + object@metricAlign, + object@metricGvcf + )[names(c( + object@metricAlign, + object@metricGvcf + )) == name][[1]] + ) + } + + if (!is.null(type) && is.null(name)) { + if (!type %in% PHG_METRICS$VALID_METRICS_IDS) { + stop("Provided 'type' not a valid metrics ID") + } + + metrics <- switch (type, + "align" = object@metricAlign, + "gvcf" = object@metricGvcf, + ) + + if (length(metrics) == 1) { + return(metrics[[1]]) + } else { + return(metrics) + } + } + } +) + + +## ---- +#' @param value +#' A named list where names are the metric table IDs and values are valid +#' metrics tables. Currently, gVCF and AnchorWave alignment files are allowed. +#' +#' @rdname metricsTable +#' @export +setMethod( + f = "metricsTable<-", + signature = signature(object = "PHGMetrics"), + definition = function(object, value) { + if (!is.list(value)) { + rlang::abort("Provided 'value' not of type 'list'") + } + + if (is.data.frame(value)) { + rlang::abort("Provided 'value' must be in a named 'list'") + } + + if (is.null(names(value))) { + rlang::abort("Provided 'list' object does not have names") + } + + if (any(duplicated(names(value)))) { + rlang::abort("Provided 'list' object has duplicated IDs (all IDs must be unique)") + } + + validAlgnDfs <- list() + validGvcfDfs <- list() + + validFileAlgnIds <- character() + validFileGvcfIds <- character() + + for (metricName in names(value)) { + metricValue <- value[[metricName]] + + if (metricName %in% metricsIds(object)) { + cat(metMessenger(metricName, "warn_02")) + } else if (is(metricValue, "character") && file.exists(metricValue)) { + if (isValidAnchor(metricValue)) { + validAlgnDfs[[metricName]] <- readMetricFiles(metricValue)[[1]] + validFileAlgnIds <- c(validFileAlgnIds, basename(metricValue)) + } else if (isValidGvcf(metricValue)) { + validGvcfDfs[[metricName]] <- readMetricFiles(metricValue)[[1]] + validFileGvcfIds <- c(validFileGvcfIds, basename(metricValue)) + } else { + cat(metMessenger(metricName, "warn_01")) + } + } else if (is(metricValue, "data.frame")) { + if (all(camelToSnake(colnames(metricValue)) %in% camelToSnake(PHG_METRICS$VALID_ANCHOR_HEADERS))) { + cat(metMessenger(metricName, "success_02")) + validAlgnDfs[[metricName]] <- tibble::as_tibble(metricValue) + colnames(validAlgnDfs[[metricName]]) <- camelToSnake(colnames(metricValue)) + validFileAlgnIds <- c(validFileAlgnIds, metricName) + } else if (all(camelToSnake(colnames(metricValue)) %in% camelToSnake(PHG_METRICS$VALID_GVCF_HEADERS))) { + cat(metMessenger(metricName, "success_02")) + validGvcfDfs[[metricName]] <- tibble::as_tibble(metricValue) + colnames(validGvcfDfs[[metricName]]) <- camelToSnake(colnames(metricValue)) + validFileGvcfIds <- c(validFileGvcfIds, metricName) + } else { + cat(metMessenger(metricName, "warn_01")) + } + } else { + cat(metMessenger(metricName, "warn_01")) + } + } + + if (length(validAlgnDfs) == 0 && length(validGvcfDfs) == 0) { + rlang::abort("No valid metrics tables could be identified") + } + + md <- metricsMetaData(object) + if (length(validAlgnDfs) != 0) { + mdAdd <- tibble::tibble( + file = validFileAlgnIds, + type = "align", + id = names(validAlgnDfs) + ) + object@metricAlign <- c(object@metricAlign, validAlgnDfs) + } + if (length(validGvcfDfs) != 0) { + mdAdd <- tibble::tibble( + file = validFileGvcfIds, + type = "gvcf", + id = names(validGvcfDfs) + ) + object@metricGvcf <- c(object@metricGvcf, validGvcfDfs) + } + + # Combine the original and additional metadata + mdNew <- rbind(md, mdAdd) + methods::slot(object, "metadata") <- mdNew + + return(object) + } +) + + +## ---- +#' @param metricId +#' A valid metric ID \code{character} name. +#' @param querySeqId +#' Vector of sequence IDs (query). +#' @param refSeqId +#' Vector of sequence IDs (reference). +#' @param queryLab +#' Optional label for query axis. +#' @param refLab +#' Optional label for reference axis. +#' @param colorId +#' How to color plots (\code{strand} or \code{score}) +#' +#' @rdname plotDot +#' @export +setMethod( + f = "plotDot", + signature = signature(object = "PHGMetrics"), + definition = function( + object, + metricId, + querySeqId = NULL, + refSeqId = NULL, + queryLab = NULL, + refLab = NULL, + colorId = c("strand", "score") + ) { + colorId <- rlang::arg_match(colorId) + + if (length(metricId) > 1) { + rlang::abort("This method currently does not support multiple ID plotting") + } + + if (length(metricId) == 0) { + rlang::abort("ID is not a valid AnchorWave table") + } + + if (!metricId %in% metricsIds(object, type = "align")) { + rlang::abort("ID is not a valid AnchorWave table") + } + + p <- plotDotFromMetrics( + df = metricsTable(object, metricId), + metricId = metricId, + querySeqId = querySeqId, + refSeqId = refSeqId, + queryLab = queryLab, + refLab = refLab, + colorId = colorId + ) + + return(p) + } +) + + diff --git a/R/constants.R b/R/constants.R index dd56f87..cbe56eb 100644 --- a/R/constants.R +++ b/R/constants.R @@ -41,3 +41,45 @@ PHG_JVM <- list( ) +## ---- +PHG_METRICS <- list( + "VALID_ANCHOR_HEADERS" = c( + "refChr", + "referenceStart", + "referenceEnd", + "queryChr", + "queryStart", + "queryEnd", + "strand", + "gene", + "blockIndex", + "score" + ), + "VALID_GVCF_HEADERS" = c( + "taxa", + "chrom", + "refLength", + "numSNPs", + "numIns", + "numDel", + "numNs", + "numBasesInserted", + "numBasesDeleted", + "percentIdentityWithRef", + "percentMappedToRef", + "meanInsertionSize", + "medianInsertionSize", + "largestInsertion", + "meanDeletionSize", + "medianDeletionSize", + "largestDeletion", + "refRangesWithHaplotype", + "haplotypesIdenticalToRef" + ), + "VALID_METRICS_IDS" = c( + "gvcf", + "align" + ) +) + + diff --git a/R/utils_general.R b/R/utils_general.R new file mode 100644 index 0000000..6d78483 --- /dev/null +++ b/R/utils_general.R @@ -0,0 +1,59 @@ +## ---- +# Convert camelCase to snake_case +# +# @param x A character vector of strings +camelToSnake <- function(x) { + sc <- gsub("([a-z])([A-Z])", "\\1_\\2", x) + sc <- tolower(sc) + return(sc) +} + + +## ---- +#' @title +#' User-defined function for pre-evaluated names in vectors +#' +#' @description +#' Generates a named element. Can be used in conjunction with \code{c()} to +#' create a collection of named elements +#' +#' +#' @param lhs +#' Name for element in vector. Can be either static string or object that will +#' need to be evaluated. +#' @param rhs +#' Element in vector +#' +#' @return +#' A named vector +#' +#' @examples +#' # Creating a named vector with a static name +#' vectorElement <- "value" %T% 5 +#' print(vectorElement) +#' +#' # Creating a combined named vector with both static and dynamic names +#' nameForElement <- "dynamicName" +#' combinedVector <- c("staticName" %T% 123, nameForElement %T% 456) +#' print(combinedVector) +#' +#' # Note: `%T%` can be especially useful in data manipulation where dynamic +#' # naming of elements is required. Here's a more complex example: +#' keyMap <- data.frame(key = "key_01") +#' dynamicVector <- keyMap$key %T% 10 +#' print(dynamicVector) +#' +#' @export +`%T%` <- function(lhs, rhs) { + nRhs <- eval(rhs) + nLhs <- eval(lhs) + + if (length(nLhs) == 0) { + rlang::abort("Failed evaluation of 'lhs' (empty character)") + } else { + names(nRhs) <- nLhs + return(nRhs) + } +} + + diff --git a/R/utils_metrics.R b/R/utils_metrics.R new file mode 100644 index 0000000..d064e27 --- /dev/null +++ b/R/utils_metrics.R @@ -0,0 +1,246 @@ +# /// Internal helpers ////////////////////////////////////////////// + +## ---- +# Find text lines for validation sans "comments" +# +# @filePath plain text file to check +findFirstNonCommentLine <- function(filePath) { + connection <- file(filePath, open = "r") + firstLine <- NULL + try({ + while (length(line <- readLines(connection, n = 1, warn = FALSE)) > 0) { + if (!startsWith(line, "#")) { + firstLine <- line + break + } + } + }) + close(connection) + return(firstLine) +} + + +## ---- +# Generate a Colored and Formatted Message Based on Success or Failure +# +# This function creates a custom message incorporating user-defined +# actions, notes, and a success indicator. It uses color coding to +# distinguish between successful and warning messages. If the operation +# is not successful, it defaults the action to "skipping value". Notes +# are formatted in bold when provided. +# +# @param mn +# A metric ID +# @param action +# A string specifying the action being reported on. +# If `success` is FALSE, this is automatically set to "skipping value". +# Default is NULL. +# @param note +# An optional string providing additional details about +# the action. This note is displayed in bold within the message if +# provided. Default is an empty string. +# @param success +# A logical indicating whether the action was +# successful (`TRUE`) or not (`FALSE`). This affects the message's +# color and symbol. Default is `TRUE`. +# +# @return +# A string containing the formatted message with a newline +# character appended. The message includes a symbol, the action, +# possible note, and is colored based on the success parameter. +msgTemp <- function(mn, action = NULL, note = "", success = TRUE) { + # Pre define 'cli' symbols + msgInfo <- cli::symbol$tick + msgWarn <- cli::symbol$warning + + # Choose the color function based on success + colorFunc <- if (success) cli::col_green else cli::col_yellow + + # Choose the symbol based on success + symbol <- if (success) msgInfo else msgWarn + + # Default action if not successful + if (!success) { + action <- "skipping value" + } + + # Construct the base message + message <- paste0(" ", symbol, " ", action, ": ", basename(mn)) + message <- colorFunc(message) # Apply the color function + + # Append note if provided + if (note != "") { + noteFormatted <- cli::style_bold(paste0(" (", note, ")")) + message <- paste0(message, colorFunc(noteFormatted)) + } + + # Append newline character + paste0(message, "\n") +} + + +## ---- +# Validate spliced text lines with proper header IDs +# +# @param line A line of text containing headers and delimiters +# @param validHeaders A character vector containing vetted IDs +# @param delimiter What delimiter "character" should be used? +validateHeaders <- function(line, validHeaders, delimiter = "\t") { + if (!is.null(line)) { + splitLine <- unlist(strsplit(line, delimiter)) + return(all(splitLine %in% validHeaders)) + } else { + return(FALSE) + } +} + + + +# /// Primary functions ///////////////////////////////////////////// + +colCustGrey <- function(text, shade = 50) { + greyColor <- paste0("grey", shade) + style <- cli::make_ansi_style(greyColor) + style(text) +} + +## ---- +# Helper function to display dimensions of metrics +# +# @param metrics A list of 'data.frame' objects +# @param label Header for display +# @param maxPrint Max number of table to display +displayMetrics <- function(metrics, label, maxPrint) { + pointerSymbol <- cli::col_green(cli::symbol$pointer) + infoSymbol <- cli::symbol$info + + if (length(metrics) > maxPrint) { + shownMetrics <- metrics[seq_len(maxPrint)] + extraCount <- length(metrics) - maxPrint + } else { + shownMetrics <- metrics + extraCount <- 0 + } + + cat(paste0("-- ", label, ":\n")) + lapply(seq_along(shownMetrics), function(x) { + obj <- dim(shownMetrics[[x]]) + nObj <- names(shownMetrics[x]) + msg <- paste0( + " ", pointerSymbol, " ", nObj, + " (", colCustGrey(paste(obj, collapse = " ")), ")", "\n" + ) + cat(msg) + }) + + if (extraCount > 0) { + cat( + colCustGrey( + paste0( + " # ", infoSymbol, " ", + extraCount, " more table(s)", "\n" + ) + ) + ) + } +} + + +## ---- +# Check if Anchor file is "valid" (vectorized) +# +# @param anchorPaths .anchorspro file paths +isValidAnchor <- function(anchorPaths) { + validities <- vapply(anchorPaths, function(aPath) { + con <- file(aPath, open = "r") + lineCheck <- readLines(con, n = 1, warn = FALSE) + close(con) + + if (grepl("#anchorwave", lineCheck)) { + return(TRUE) + } else { + return(FALSE) + } + }, logical(1)) + + return(validities) +} + + +## ---- +# Check if input gVCF file is "valid" (vectorized) +# +# @param gVcfPaths A gVCF file path +isValidGvcf <- function(gVcfPaths) { + validHeaders <- PHG_METRICS$VALID_GVCF_HEADERS + + validities <- vapply(gVcfPaths, function(gPath) { + firstLine <- findFirstNonCommentLine(gPath) + validateHeaders(firstLine, validHeaders) + }, logical(1)) + + return(validities) +} + + +## ---- +# Deploy messages across functions +# +# @param mn A metric identifier (character) +# @param type Boiler plate message template +metMessenger <- function( + mn, + type = c( + "success_01", + "success_02", + "warn_01", + "warn_02", + "warn_03", + "warn_04" + ) +) { + type <- match.arg(type) + + # Response generation using the template function + resp <- switch( + EXPR = type, + "success_01" = msgTemp(mn, success = TRUE, action = "reading data for"), + "success_02" = msgTemp(mn, success = TRUE, action = "importing data for"), + "warn_01" = msgTemp(mn, success = FALSE, note = "not valid metric data"), + "warn_02" = msgTemp(mn, success = FALSE, note = "ID already found in object"), + "warn_03" = msgTemp(mn, success = FALSE, note = "ID not found in object"), + "warn_04" = msgTemp(mn, success = FALSE, note = "ID duplicated") + ) + + return(resp) +} + + +## ---- +# Read metric files (assumes tab-delimited structure) +# +# @param metricFiles A list of files +readMetricFiles <- function(metricFiles) { + inMemDfs <- lapply( + X = metricFiles, + FUN = function(x) { + cat(metMessenger(basename(x), "success_01")) + tmp <- tibble::as_tibble( + utils::read.table( + file = x, + header = TRUE, + sep = "\t", + comment.char = "#" + ) + ) + colnames(tmp) <- camelToSnake(colnames(tmp)) + return(tmp) + } + ) + + names(inMemDfs) <- tools::file_path_sans_ext(basename(metricFiles)) + + return(inMemDfs) +} + + diff --git a/R/vis_plot_dot.R b/R/vis_plot_dot.R new file mode 100644 index 0000000..17617b1 --- /dev/null +++ b/R/vis_plot_dot.R @@ -0,0 +1,80 @@ +# Plot a Dot Plot from AnchorWave metrics +# +# @param df +# A data frame containing genomic data with columns for +# query and reference start positions, and optionally scores and +# strand directions. +# @param metricId +# Identifier for the metric to be plotted. +# @param anchorPath +# Path for additional data anchoring (not used in +# the current implementation). +# @param querySeqId +# Optional vector of query sequence identifiers +# for filtering. Default is NULL. +# @param refSeqId +# Optional vector of reference sequence identifiers for filtering. +# Default is NULL. +# @param queryLab +# Optional label for the query axis. Default is "Query". +# @param refLab +# Optional label for the reference axis. Default is "Reference". +# @param colorId +# Identifier for coloring method. Accepts "score" for color scale based on +# scores, "strand" for manual color mapping of strand directions, or other +# identifiers for no coloring. +# +# @return A ggplot object representing the dot plot. +plotDotFromMetrics <- function( + df, + metricId, + anchorPath, + querySeqId = NULL, + refSeqId = NULL, + queryLab = NULL, + refLab = NULL, + colorId +) { + + if (is.null(queryLab)) queryLab <- "Query" + if (is.null(refLab)) refLab <- "Reference" + + scaleUnit <- switch( + EXPR = colorId, + "score" = ggplot2::scale_color_viridis_c(), + "strand" = ggplot2::scale_color_manual(values = c("+" = "#DA897C", "-" = "#0D6A82")), + ) + + if (!is.null(refSeqId)) df <- df[which(df$ref_chr %in% refSeqId), ] + if (!is.null(querySeqId)) df <- df[which(df$query_chr %in% querySeqId), ] + + if (nrow(df) == 0) { + rlang::abort("No data remains with provided ref/query chromosome selections") + } + + toMb <- function(x) x / 1e6 + + p <- ggplot2::ggplot(data = df) + + ggplot2::aes( + x = !!rlang::sym("query_start"), + y = !!rlang::sym("reference_start"), + color = !!rlang::sym(colorId) + ) + + ggplot2::geom_point(size = 0.3) + + ggplot2::scale_y_continuous(labels = toMb) + + ggplot2::scale_x_continuous(labels = toMb) + + ggplot2::ggtitle(metricId) + + ggplot2::facet_grid( + rows = ggplot2::vars(!!rlang::sym("ref_chr")), + col = ggplot2::vars(!!rlang::sym("query_chr")), + scales = "free", + space = "free" + ) + + scaleUnit + + ggplot2::xlab(paste(queryLab, "(Mbp)")) + + ggplot2::ylab(paste(refLab, "(Mbp)")) + + return(p) +} + + diff --git a/README.md b/README.md index f866a70..d770994 100644 --- a/README.md +++ b/README.md @@ -24,29 +24,25 @@ pak::pak("maize-genetics/rPHG2") ## Usage -### Initialize with PHGv2 JARs ``` r +# Initialize with PHGv2 JARs initPhg("my/phg/jar/path") -``` -### Create a connection -``` r + +# Create a connection locCon <- list.files("my/hvcf/dir") |> PHGLocalCon() -``` -### Build a graph -``` r + +# Build a graph graph <- locCon |> buildHaplotypeGraph() -``` -### Read data into R -``` r + +# Read data into R phgDs <- graph |> readPhgDataSet() -``` -### Identify areas of interest -``` r + +# Identify areas of interest gr <- GRanges( seqnames = c("1", "2"), ranges = IRanges( diff --git a/inst/extdata/toy_anchors_s01.anchorspro b/inst/extdata/toy_anchors_s01.anchorspro new file mode 100644 index 0000000..b110c50 --- /dev/null +++ b/inst/extdata/toy_anchors_s01.anchorspro @@ -0,0 +1,977 @@ +#anchorwave command header +refChr referenceStart referenceEnd queryChr queryStart queryEnd strand gene blockIndex score +#block begin +1 52892 53561 1 22637 23277 + OQU90574 40 0.83871 +1 275401 278445 1 196230 199275 + interanchor 40 NA +1 665653 669559 1 456629 460535 + KXG37092 40 1 +1 723978 724529 1 514619 515170 + KXG37098 40 1 +1 1031998 1033805 1 788012 789822 + EER93094 40 1 +1 1497930 1503054 1 1250572 1255668 + KXG37167 40 1 +1 1517777 1519239 1 1270343 1271805 + interanchor 40 NA +1 2466395 2468560 1 2047907 2050072 + KXG37241 11 1 +1 2533102 2536854 1 2093924 2097674 + interanchor 11 NA +1 2638837 2639286 1 2188800 2189249 + EER93193 11 1 +1 2639287 2642665 1 2189250 2192836 + interanchor 11 NA +1 2657772 2659340 1 2207950 2209518 + interanchor 11 NA +1 2807262 2814730 1 2357997 2365465 + interanchor 11 NA +1 3150830 3155098 1 2829527 2833691 + interanchor 11 NA +1 3268755 3271569 1 2943703 2946517 + OQU90774 11 0.953808 +1 3294492 3295259 1 2969441 2970208 + EER93233 11 1 +1 3300198 3301570 1 2975148 2976520 + interanchor 11 NA +1 3305287 3309272 1 2980237 2984222 + interanchor 11 NA +1 3605767 3609439 1 3263122 3266794 + interanchor 11 NA +1 3625117 3631052 1 3282472 3288407 + EER93257 11 1 +1 3911585 3913620 1 3559648 3561448 + EER90723 11 0.990654 +1 4075775 4080282 1 3656061 3660568 + EER93281 11 1 +1 4537001 4538504 1 4100876 4102379 + interanchor 11 NA +1 4552174 4552784 1 4116048 4116658 + interanchor 11 NA +1 4572739 4576669 1 4136613 4140543 + KXG37386 11 1 +1 4639038 4677028 1 4199227 4225020 + interanchor 11 NA +1 4790034 4792517 1 4306463 4308930 + interanchor 11 NA +1 5092668 5094118 1 4558813 4572889 + interanchor 11 NA +1 5094119 5096824 1 4572890 4575596 + OQU90883 11 1 +1 5275217 5277358 1 4745052 4747193 + OQU90893 11 1 +1 5322848 5334834 1 4785620 4797595 + interanchor 11 NA +1 5379263 5384524 1 4856898 4862159 + OQU90898 11 1 +1 5482841 5483301 1 4959836 4960296 + interanchor 11 NA +1 5539312 5539931 1 5016324 5016943 + interanchor 11 NA +1 5734293 5735864 1 5222218 5223789 + interanchor 11 NA +1 5737128 5743461 1 5225053 5231386 + interanchor 11 NA +1 5979905 5991984 1 5479052 5491109 + interanchor 11 NA +1 6015316 6016913 1 5514997 5516593 + interanchor 11 NA +1 6292909 6304146 1 5860056 5871675 + interanchor 11 NA +1 6707567 6708613 1 6215147 6216196 + interanchor 11 NA +1 6862285 6864842 1 6330095 6332648 + interanchor 11 NA +1 6865416 6866942 1 6333222 6334750 + interanchor 11 NA +1 6884121 6885003 1 6351493 6352363 + interanchor 11 NA +1 7002225 7004541 1 6469913 6472226 + interanchor 11 NA +1 7088963 7092698 1 6545007 6548770 + interanchor 11 NA +1 7129808 7131323 1 6587479 6588994 + OQU91005 11 1 +1 7182555 7185102 1 6639719 6642292 + interanchor 11 NA +1 7367057 7372111 1 6802346 6807358 + interanchor 11 NA +1 7592255 7598881 1 6987858 6995269 + interanchor 11 NA +1 7605851 7608278 1 7001910 7004337 + KXG37624 11 1 +1 7645080 7649506 1 7039200 7047021 + interanchor 11 NA +1 7665143 7665337 1 7062662 7062856 + KXG37627 11 1 +1 7982452 7995826 1 7310024 7323534 + interanchor 11 NA +1 8052519 8060008 1 7385457 7392956 + KXG37652 11 1 +1 8683564 8730178 1 7513937 7620334 + interanchor 34 NA +1 8773501 8778922 1 7666507 7671910 + interanchor 34 NA +1 8838447 8839403 1 7719599 7720555 + OQU91096 34 1 +1 8949347 8950449 1 7828279 7829383 + interanchor 34 NA +1 9121347 9122182 1 7999376 8000211 + interanchor 34 NA +1 9122183 9123798 1 8000212 8001827 + KXG37734 34 1 +1 9328371 9329234 1 8201753 8202631 + EER91015 34 1 +1 9457193 9457512 1 8330200 8330519 + OQU91124 34 1 +1 9460587 9467733 1 8333594 8340740 + interanchor 34 NA +1 9621506 9626242 1 8473824 8478560 + OQU91131 34 1 +1 9727677 9728990 1 8553296 8554609 + EER93602 34 1 +1 9733719 9739178 1 8559338 8564797 + EER93603 34 1 +1 9759938 9761341 1 8585545 8586948 + KXG37769 34 1 +1 9807753 9810277 1 8633374 8635899 + EER91031 34 1 +1 9842014 9852239 1 8660827 8671052 + KXG37780 34 1 +1 9876249 9880835 1 8676887 8681473 + OQU91151 34 1 +1 10166828 10169946 1 8967312 8970430 + interanchor 34 NA +1 10403799 10408061 1 9320400 9324662 + EER91059 34 1 +1 10589743 10599551 1 9436328 9446127 + OQU91185 34 0.999815 +1 10639820 10643800 1 9489207 9493192 + interanchor 34 NA +1 10650005 10654394 1 9499381 9502744 + interanchor 34 NA +1 10672006 10676123 1 9520257 9524376 + EER91071 34 1 +1 10850561 10869801 1 9666937 9685800 + interanchor 34 NA +1 10882892 10892507 1 9698916 9708536 + interanchor 34 NA +1 11019676 11020086 1 9821192 9821602 + EER91085 34 1 +1 11117135 11126010 1 10120605 10128371 + interanchor 25 NA +1 11192250 11195408 1 10193049 10196207 + interanchor 25 NA +1 11402650 11403594 1 10409377 10410321 + EER93687 25 1 +1 11666860 11667534 1 10642299 10642973 + EER93707 25 1 +1 11967345 11968640 1 10870167 10871461 + interanchor 25 NA +1 12111490 12128777 1 10988737 10992826 + interanchor 25 NA +1 12267470 12268156 1 11114906 11115592 + KXG37931 25 1 +1 12448630 12456309 1 11303238 11310917 + KXG37943 25 1 +1 12671544 12675360 1 11398740 11402561 + interanchor 25 NA +1 13533890 13535758 1 12186019 12187887 + EER93792 25 1 +1 13539338 13540486 1 12191457 12192605 + KXG37991 25 1 +1 13844519 13849270 1 12461755 12466518 + KXG38015 25 1 +1 14025355 14027691 1 12613319 12615655 + KXG38035 25 1 +1 14343727 14343969 1 12927418 12927660 + KXG38052 25 1 +1 14523737 14541859 1 13069743 13087869 + localAlignment_1_14523737_14541859 25 NA +1 14656021 14667529 1 13191868 13203239 + interanchor 25 NA +1 14672348 14672614 1 13208077 13208343 + KXG38068 25 1 +1 14696850 14698868 1 13229176 13231275 + interanchor 25 NA +1 15023399 15029779 1 13378078 13385516 + EER91275 25 1 +1 15035134 15035793 1 13392131 13392790 + KXG38088 25 1 +1 15357152 15360489 1 13645077 13648414 + EER91293 25 1 +1 15361208 15362633 1 13649133 13650558 + interanchor 25 NA +1 15705032 15721336 1 13960528 13976802 + interanchor 25 NA +1 16991469 16992513 1 14230596 14231628 + interanchor 20 NA +1 17028966 17029625 1 14281774 14282433 + EER93927 20 1 +1 17120576 17127698 1 14404379 14411420 + interanchor 20 NA +1 17200891 17202257 1 14490912 14492287 + interanchor 20 NA +1 17207674 17220679 1 14497704 14509049 + interanchor 20 NA +1 17451701 17452048 1 14749048 14749395 + KXG38187 20 1 +1 17492534 17570453 1 14785397 14798783 + interanchor 20 NA +1 17633968 17636299 1 14862290 14864620 + EER91380 20 1 +1 18050143 18055220 1 15284565 15289650 + EER93966 20 1 +1 18172986 18191330 1 15402073 15420406 + interanchor 20 NA +1 18198930 18203413 1 15427999 15432482 + KXG38217 20 1 +1 18363567 18387958 1 15581580 15605933 + interanchor 20 NA +1 18446896 18447599 1 15664323 15665026 + interanchor 20 NA +1 18790397 18796155 1 15990268 16002645 + interanchor 20 NA +1 18798204 18799230 1 16004691 16005804 + interanchor 20 NA +1 18913107 18913382 1 16122484 16122759 + OQU91570 20 1 +1 19136156 19136988 1 16337571 16338403 + EER94024 20 1 +1 19188861 19190827 1 16390138 16392104 + OQU91585 20 1 +1 19303891 19334055 1 16478707 16508854 + localAlignment_1_19303891_19334055 20 NA +1 19644715 19646606 1 16873549 16875440 + OQU91606 20 1 +1 19877126 19907408 1 17096858 17127151 + interanchor 20 NA +1 20033985 20038780 1 17244872 17249606 + EER94063 20 1 +1 20679970 20683372 1 18017627 18021029 + KXG38331 20 1 +1 21004864 21010299 1 18268759 18274216 + OQU91651 20 1 +1 21125541 21125846 1 18408777 18409082 + OQU91655 20 1 +1 21505413 21520526 1 18791026 18806140 + interanchor 20 NA +1 21605026 21605278 1 18890150 18890402 + KXG38383 20 1 +1 21797629 21801078 1 19059221 19062670 + EER91514 20 1 +1 22237374 22241612 1 19461238 19465476 + interanchor 20 NA +1 22526809 22527399 1 19733124 19733714 + EER91538 20 1 +1 22751168 22769321 1 19934535 19952679 + localAlignment_1_22751168_22769321 20 NA +1 22799497 22800905 1 19987664 19989074 + KXG38432 20 1 +1 24539651 24540468 1 21888332 21889149 + interanchor 1 NA +1 25087707 25088596 1 22409069 22410016 + interanchor 1 NA +1 25094777 25095925 1 22419921 22421072 + EER91588 1 1 +1 25117135 25122076 1 22442270 22447220 + interanchor 1 NA +1 25856631 25865197 1 22927511 22936051 + interanchor 1 NA +1 26127215 26127446 1 23169447 23169678 + OQU91777 1 1 +1 26901729 26905446 1 23983085 23992132 + EER91626 1 1 +1 27176392 27178269 1 24299290 24300552 + interanchor 1 NA +1 27272461 27287231 1 24431004 24453172 + interanchor 1 NA +1 28072796 28073020 1 25098849 25099073 + KXG38578 1 1 +1 28073021 28077148 1 25099074 25103216 + interanchor 1 NA +1 28197176 28200455 1 25229928 25233214 + EER94273 1 1 +1 28596479 28611300 1 25575824 25590626 + localAlignment_1_28596479_28611300 1 NA +1 28611301 28633556 1 25590627 25607150 + interanchor 1 NA +1 29440793 29462157 1 26374227 26398769 + interanchor 1 NA +1 30447410 30447409 1 27091022 27091021 + interanchor 1 NA +1 30835903 30871774 1 27404766 27431359 + interanchor 1 NA +1 31517653 31542436 1 28016963 28041748 + localAlignment_1_31517653_31542436 1 NA +1 33209680 33209679 1 29700697 29700696 + interanchor 1 NA +1 33807905 33812552 1 30261505 30274614 + interanchor 1 NA +1 34604199 34604198 1 31001460 31001459 + interanchor 1 NA +1 35238172 35238174 1 31646849 31646848 + interanchor 1 NA +1 36827067 36908013 1 33233990 33314931 + localAlignment_1_36827067_36908013 1 NA +1 38137294 38158668 1 34595004 34608603 + interanchor 1 NA +1 39107645 39107644 1 35582818 35582817 + interanchor 1 NA +1 39603908 39604117 1 36074414 36074623 + OQU91934 1 1 +1 40621513 40713492 1 37128989 37220969 + localAlignment_1_40621513_40713492 1 NA +1 46583117 46605697 1 38316304 38338883 + localAlignment_1_46583117_46605697 1 NA +1 47984675 48047694 1 39657185 39720200 + localAlignment_1_47984675_48047694 1 NA +1 48859944 48897792 1 40500009 40537857 + localAlignment_1_48859944_48897792 1 NA +1 48897793 48934709 1 40537858 40561496 + interanchor 1 NA +1 49354254 49381919 1 41045117 41073059 + interanchor 1 NA +1 49518501 49537730 1 41219516 41238741 + localAlignment_1_49518501_49537730 1 NA +1 49908011 49923877 1 41594855 41619735 + interanchor 1 NA +1 50405974 50418464 1 42121082 42133573 + localAlignment_1_50405974_50418464 1 NA +1 50852244 50852758 1 42510472 42510995 + OQU91964 1 1 +1 51006301 51012891 1 42627512 42634089 + interanchor 1 NA +1 52351992 52377927 1 43730414 43756351 + interanchor 1 NA +1 52755991 52764755 1 44115783 44122621 + interanchor 1 NA +1 53191755 53201329 1 44568230 44577793 + localAlignment_1_53191755_53201329 1 NA +1 53233217 53253699 1 44598318 44618801 + localAlignment_1_53233217_53253699 1 NA +1 53688507 53783033 1 44797233 44807593 + interanchor 1 NA +1 53863628 53878924 1 44873330 44888631 + localAlignment_1_53863628_53878924 1 NA +1 53960459 53970979 1 44981122 44991632 + localAlignment_1_53960459_53970979 1 NA +1 54118574 54120304 1 45086123 45089506 + interanchor 1 NA +1 54938988 54941445 1 45849543 45852000 + EER94408 1 1 +1 55680686 55680895 1 46512281 46512490 + KXG38824 1 1 +1 55772509 55773769 1 46546314 46547574 + KXG38825 1 1 +1 55885548 55885763 1 46647662 46647877 + KXG38829 1 1 +1 56069916 56075335 1 46806347 46811766 + interanchor 1 NA +1 56320844 56350890 1 47056193 47086277 + interanchor 1 NA +1 56408442 56414207 1 47143481 47149246 + KXG38850 1 1 +1 56681162 56685897 1 47273799 47278534 + EER91893 1 1 +1 56701528 56710125 1 47294186 47302778 + KXG39219 1 1 +1 56786706 56805994 1 47373431 47391646 + interanchor 1 NA +1 56993603 57001295 1 47588407 47595714 + interanchor 1 NA +1 57111258 57127515 1 47707678 47730374 + interanchor 1 NA +1 57209271 57210074 1 47808710 47809512 + interanchor 1 NA +1 57247128 57271336 1 47853858 47880214 + interanchor 1 NA +1 57387890 57388975 1 48002400 48003485 + interanchor 1 NA +1 57490633 57496656 1 48372530 48378532 + interanchor 1 NA +1 57912897 57918479 1 48826616 48831979 + interanchor 1 NA +1 58031144 58035076 1 48944891 48948410 + interanchor 1 NA +1 58193809 58200953 1 49091064 49098318 + interanchor 1 NA +1 58537339 58549720 1 49447331 49459447 + interanchor 1 NA +1 58901288 58905216 1 49739989 49746456 + interanchor 1 NA +1 58905217 58906428 1 49746457 49747668 + EER94531 1 1 +1 59280356 59280362 1 50002219 50002269 + interanchor 1 NA +1 59280363 59280842 1 50002270 50002750 + OQU92194 1 1 +1 59437305 59444200 1 50162674 50169227 + interanchor 1 NA +1 59451009 59451766 1 50181150 50181907 + interanchor 1 NA +1 59693332 59700381 1 50383876 50390849 + interanchor 1 NA +1 59722416 59724449 1 50412943 50414976 + EER94566 1 1 +1 60532160 60532927 1 51229372 51230114 + interanchor 1 NA +1 60532928 60541025 1 51230115 51238209 + localAlignment_1_60532928_60541025 1 NA +1 60918379 60918759 1 51502856 51503236 + OQU92278 1 1 +1 60971305 60972705 1 51555297 51556697 + KXG39048 1 1 +1 61010358 61013552 1 51594137 51597624 + EER92050 1 1 +1 61335732 61336584 1 51909241 51910093 + OQU92308 1 1 +1 61356511 61357710 1 51930272 51931471 + OQU92312 1 1 +1 61359128 61374688 1 51932889 51949744 + interanchor 1 NA +1 61500019 61507916 1 52050471 52058387 + localAlignment_1_61500019_61507916 1 NA +1 61692338 61719947 1 52291124 52298927 + interanchor 1 NA +1 62017516 62021601 1 52603647 52607734 + EER92100 1 1 +1 62156202 62159258 1 52715990 52719046 + OQU92373 1 1 +1 62222156 62222695 1 52766632 52767186 + EER92110 1 1 +1 62225233 62231471 1 52769724 52775915 + EER94678 1 1 +1 62231472 62235578 1 52775916 52780034 + interanchor 1 NA +1 62412628 62428247 1 52941675 52958242 + interanchor 1 NA +1 62453811 62455849 1 52983154 52985186 + KXG39652 1 0.995516 +1 62594698 62598597 1 53138363 53142263 + EER92132 1 1 +1 62738481 62739456 1 53474453 53475428 + interanchor 1 NA +1 62818656 62819474 1 53560299 53561117 + interanchor 1 NA +1 62950515 62952797 1 53705387 53707667 + interanchor 1 NA +1 63694873 63697332 1 54171337 54173796 + EER92167 1 1 +1 64032244 64036639 1 54455964 54460359 + interanchor 1 NA +1 64263775 64268053 1 54668336 54672618 + KXG39246 1 1 +1 64480148 64481007 1 54883377 54884236 + interanchor 1 NA +1 64620881 64621255 1 55025553 55025927 + EER92201 1 1 +1 64725023 64729975 1 55099426 55103524 + interanchor 1 NA +1 64943028 64943430 1 55314158 55314560 + OQU92539 1 1 +1 64944686 64945267 1 55315816 55316397 + EER94799 1 1 +1 65102849 65105467 1 55452233 55454851 + EER94809 1 1 +1 65125132 65126140 1 55474516 55475524 + interanchor 1 NA +1 65358792 65362837 1 55691768 55695813 + EER92235 1 1 +1 65516446 65516722 1 55919482 55919758 + OQU92568 1 1 +1 65828007 65829984 1 56160055 56161789 + interanchor 1 NA +1 66073284 66086777 1 56394639 56408186 + interanchor 1 NA +1 66158674 66170068 1 56489545 56500924 + localAlignment_1_66158674_66170068 1 NA +1 66402536 66404273 1 56725075 56726812 + interanchor 1 NA +1 66675964 66676488 1 56905387 56905917 + EER94886 1 1 +1 66882711 66884387 1 57081375 57083051 + EER94902 1 1 +1 66884388 66886757 1 57083052 57085420 + interanchor 1 NA +1 66898992 66905524 1 57097717 57104246 + EER94904 1 1 +1 66931947 66951821 1 57130702 57147718 + interanchor 1 NA +1 67145446 67148147 1 57327260 57330087 + EER94920 1 1 +1 67216990 67219771 1 57401187 57403968 + EER94923 1 1 +1 67519798 67521612 1 57712803 57714614 + interanchor 1 NA +1 67553989 67554411 1 57756975 57757397 + interanchor 1 NA +1 67645361 67662723 1 57849091 57866355 + interanchor 1 NA +1 67745051 67746223 1 57965051 57966223 + OQU92695 1 0.997449 +1 67981591 67982124 1 58191965 58192498 + OQU92706 1 1 +1 68143738 68146007 1 58345219 58347488 + OQU92716 1 1 +1 68158742 68161329 1 58361189 58363774 + interanchor 1 NA +1 68717959 68727494 1 58744988 58754523 + interanchor 1 NA +1 68872581 68875721 1 58891725 58894872 + EER92406 1 1 +1 68875722 68878028 1 58894873 58897221 + interanchor 1 NA +1 68980597 68981379 1 59000939 59001683 + OQU92764 1 0.936143 +1 69056826 69064525 1 59076421 59084145 + interanchor 1 NA +1 69279346 69290343 1 59398812 59409809 + interanchor 1 NA +1 69325356 69327469 1 59433714 59435826 + EER95048 1 1 +1 69338529 69340291 1 59446967 59448729 + interanchor 1 NA +1 69406733 69408043 1 59515213 59516523 + EER95053 1 1 +1 69542074 69543022 1 59650747 59651691 + interanchor 1 NA +1 69610441 69610737 1 59719858 59720154 + KXG39649 1 1 +1 69854058 69861695 1 59940123 59947783 + OQU92810 1 1 +1 70064197 70085412 1 60144345 60165559 + interanchor 1 NA +1 70111253 70130466 1 60191396 60198998 + interanchor 1 NA +1 70367278 70370439 1 60445479 60448640 + EER92486 1 1 +1 70427207 70431456 1 60505406 60509655 + interanchor 1 NA +1 70618979 70621364 1 60695592 60697977 + EER95129 1 1 +1 70634446 70635339 1 60711058 60711951 + EER95130 1 1 +1 70839619 70843853 1 60922343 60926577 + EER92515 1 1 +1 70963593 71000219 1 61046264 61069462 + interanchor 1 NA +1 71120354 71122827 1 61188679 61191148 + interanchor 1 NA +1 71208117 71211050 1 61276302 61279235 + interanchor 1 NA +1 71304121 71305425 1 61369469 61370773 + EER92543 1 1 +1 71424248 71426422 1 61500706 61502880 + EER95169 1 1 +1 71441850 71443634 1 61517607 61519391 + EER95172 1 1 +1 71888428 71889164 1 61924356 61925092 + interanchor 1 NA +1 71937565 71951049 1 61973488 62006546 + interanchor 1 NA +1 72025072 72029326 1 62074479 62078733 + OQU92942 1 1 +1 72126476 72130400 1 62175685 62179609 + KXG39817 1 1 +1 72324311 72327780 1 62366273 62369986 + KXG39823 1 1 +1 72418139 72420936 1 62479949 62482746 + EER92605 1 1 +1 72577878 72580490 1 62629676 62632980 + interanchor 1 NA +1 72892735 72895447 1 63056974 63059686 + EER95252 1 1 +1 72904114 72909929 1 63068353 63074168 + interanchor 1 NA +1 73435527 73438523 1 63632769 63635769 + interanchor 1 NA +1 73514515 73514990 1 63705842 63706317 + interanchor 1 NA +1 73559815 73563582 1 63746289 63750051 + EER95294 1 1 +1 73600681 73608718 1 63787103 63795140 + EER92656 1 1 +1 73681662 73683221 1 63870668 63872227 + OQU93031 1 1 +1 73936808 73937818 1 64161734 64162744 + interanchor 1 NA +1 74187282 74206203 1 64428038 64446123 + interanchor 1 NA +1 74507933 74508235 1 64734902 64735205 + OQU93082 1 1 +1 74613638 74617772 1 64853566 64857855 + interanchor 1 NA +1 74984373 74986355 1 65163470 65165452 + EER92735 1 1 +1 75073093 75074205 1 65262930 65264029 + interanchor 1 NA +1 75105489 75112065 1 65299254 65305830 + EER95373 1 1 +1 75192251 75223269 1 65418472 65448993 + interanchor 1 NA +1 75243385 75249109 1 65469401 65475125 + OQU93120 1 1 +1 75662097 75663914 1 65865804 65867629 + OQU93140 1 1 +1 75769998 75792227 1 65963634 65974320 + interanchor 1 NA +1 75805353 75808459 1 65987433 65990786 + KXG40078 1 1 +1 75953085 75970460 1 66124804 66142124 + interanchor 1 NA +1 75991155 75992546 1 66162819 66164210 + interanchor 1 NA +1 76055723 76056553 1 66357576 66358406 + EER92791 1 1 +1 76325386 76326635 1 66588364 66589617 + OQU93172 1 0.992662 +1 76489934 76491338 1 66764633 66766037 + interanchor 1 NA +1 76648043 76653685 1 66930432 66936072 + KXG40133 1 1 +1 76663257 76678355 1 66945639 66960700 + interanchor 1 NA +1 76757058 76760519 1 67031331 67034765 + interanchor 1 NA +1 76814355 76817593 1 67094459 67097711 + interanchor 1 NA +1 76911070 76912607 1 67198524 67200061 + EER92835 1 1 +1 77043288 77044234 1 67324704 67325678 + interanchor 1 NA +1 77146899 77160605 1 67432970 67446969 + interanchor 1 NA +1 77217121 77218111 1 67502893 67509810 + OQU93234 1 0.975758 +1 77332448 77338400 1 67621628 67627600 + EER95509 1 1 +1 77447536 77451433 1 67737033 67747814 + EER92858 1 1 +1 77540132 77540434 1 67829546 67829848 + KXG40204 1 1 +1 77729712 77748351 1 68023448 68042087 + interanchor 1 NA +1 77826328 77827048 1 68120581 68121300 + interanchor 1 NA +1 78001640 78003727 1 68303996 68306083 + OQU93276 1 1 +1 78005695 78006513 1 68308051 68308869 + interanchor 1 NA +1 78077929 78079584 1 68420829 68422486 + interanchor 1 NA +1 78271347 78272359 1 68607582 68608593 + EER95563 1 1 +1 78272360 78276838 1 68608594 68613167 + interanchor 1 NA +1 78328704 78333987 1 68668822 68674105 + EER95569 1 1 +1 78345558 78347392 1 68684933 68686754 + interanchor 1 NA +1 78372195 78373379 1 68699877 68701061 + interanchor 1 NA +1 78919889 78920605 1 69146763 69147484 + OQU93346 1 1 +1 79010667 79011437 1 69224420 69225185 + OQU93350 1 0.991708 +1 79390517 79390921 1 69593194 69593598 + OQU93374 1 1 +1 79432159 79434614 1 69632918 69635390 + EER95629 1 1 +1 79648160 79649602 1 69842735 69844184 + interanchor 1 NA +1 79667498 79673622 1 69861747 69865942 + interanchor 1 NA +1 80087384 80087866 1 70268056 70268538 + OQU93430 1 1 +1 80092747 80109644 1 70273347 70276591 + interanchor 1 NA +1 80129881 80131438 1 70294467 70296024 + interanchor 1 NA +1 80143378 80143740 1 70320004 70320366 + OQU93434 1 1 +1 80369509 80375735 1 70537655 70543438 + interanchor 1 NA +1 80594219 80603464 1 70748974 70763270 + interanchor 1 NA +1 80662914 80664744 1 70822846 70824669 + interanchor 1 NA +1 80675232 80676132 1 70833187 70834082 + interanchor 1 NA +1 80706678 80721248 1 70877436 70895969 + interanchor 1 NA +1 80721249 80723019 1 70895970 70897740 + EER93042 1 1 +1 80740191 80747682 1 70914860 70922352 + KXG40431 1 1 +#block end +#block begin +2 630255 631246 2 467432 468612 + interanchor 17 NA +2 763883 765571 2 594122 595812 + EER97845 17 1 +2 796579 797820 2 626868 628109 + OQU88312 17 1 +2 827088 830929 2 656810 660647 + interanchor 17 NA +2 1294301 1295881 2 1162056 1163637 + EER95781 17 1 +2 1338959 1340041 2 1217434 1218532 + OQU88338 17 1 +2 1424483 1426620 2 1285727 1287864 + KXG34298 17 1 +2 1497544 1499162 2 1359160 1360801 + EER97888 17 0.997743 +2 1523114 1530284 2 1386153 1392989 + EER97891 17 1 +2 1795632 1799560 2 1675081 1679009 + interanchor 17 NA +2 2583955 2592700 2 2448947 2457698 + interanchor 17 NA +2 2780831 2781097 2 2644748 2645015 + OQU88416 17 1 +2 2787887 2788959 2 2651961 2653033 + EER97959 17 1 +2 2806783 2807307 2 2670473 2671006 + OQU88418 17 1 +2 2843536 2848176 2 2705003 2709643 + KXG34380 17 1 +2 2980653 2981789 2 2838919 2840055 + EER97968 17 1 +2 3722560 3726154 2 3574656 3578244 + interanchor 17 NA +2 3726155 3728100 2 3578245 3580191 + OQU88454 17 1 +2 3756143 3756757 2 3608266 3608898 + OQU88455 17 1 +2 4085070 4085907 2 3974861 3975698 + EER95899 17 1 +2 4349344 4349566 2 4140595 4140817 + interanchor 17 NA +2 4376904 4378815 2 4168981 4170897 + EER95913 17 1 +2 4594131 4594710 2 4366491 4367067 + OQU88515 17 0.989011 +2 4636528 4646430 2 4408589 4415429 + interanchor 17 NA +2 4692084 4704008 2 4460629 4472575 + interanchor 17 NA +2 4848448 4848780 2 4630080 4630412 + EER98053 17 1 +2 5468161 5477738 2 5184771 5194341 + localAlignment_2_5468161_5477738 17 NA +2 5477739 5488137 2 5194342 5203583 + interanchor 17 NA +2 5490040 5497613 2 5205477 5213590 + interanchor 17 NA +2 5543187 5560812 2 5240329 5257929 + interanchor 17 NA +2 5767809 5768750 2 5494608 5495549 + OQU88596 17 1 +2 5770017 5771213 2 5496816 5498012 + KXG34575 17 1 +2 6027221 6027725 2 5627480 5635429 + OQU88610 17 0.942688 +2 6223187 6225505 2 5852805 5855102 + OQU88626 17 1 +2 6235924 6236985 2 5865382 5866445 + interanchor 17 NA +2 6554498 6571867 2 6011135 6023526 + interanchor 17 NA +2 7063725 7066540 2 6438709 6441629 + EER96032 17 0.966825 +2 7120887 7124311 2 6512754 6515880 + interanchor 17 NA +2 7740007 7751869 2 7249441 7261278 + localAlignment_2_7740007_7751869 43 NA +2 7883505 7884617 2 7344328 7345440 + interanchor 43 NA +2 7967039 7973390 2 7409717 7416065 + EER96065 43 1 +2 7978256 7984714 2 7420909 7427358 + OQU88699 43 0.994845 +2 8015073 8022133 2 7457821 7464868 + KXG34688 43 1 +2 8887855 8905220 2 8069394 8086752 + interanchor 43 NA +2 9032927 9034390 2 8219771 8221233 + interanchor 43 NA +2 9249951 9251822 2 8451542 8453425 + EER96114 43 1 +2 9579684 9589823 2 8772220 8780348 + interanchor 43 NA +2 9664524 9676932 2 8860329 8876096 + interanchor 43 NA +2 9701793 9725969 2 8900961 8924284 + interanchor 43 NA +2 9783137 9793244 2 8981379 8986216 + KXG34804 43 0.986517 +2 10074113 10118542 2 9209983 9254416 + localAlignment_2_10074113_10118542 43 NA +2 10289635 10291392 2 9428565 9430233 + EER96172 43 0.992313 +2 10291393 10330840 2 9430234 9449142 + interanchor 43 NA +2 11738717 11762442 2 11119745 11134314 + interanchor 42 NA +2 12004757 12005208 2 11281409 11281859 + KXG34880 42 0.997268 +2 12348560 12357376 2 11467460 11476276 + interanchor 42 NA +2 12721542 12733933 2 11643702 11656098 + localAlignment_2_12721542_12733933 42 NA +2 13075982 13077625 2 11960088 11961731 + OQU88866 42 1 +2 13545535 13547136 2 12408998 12410599 + EER98385 42 1 +2 14775470 14775695 2 13518413 13518638 + interanchor 42 NA +2 14779179 14781093 2 13522130 13524045 + KXG34985 42 1 +2 14790051 14805031 2 13535070 13549998 + interanchor 42 NA +2 15055951 15073174 2 13799178 13816402 + localAlignment_2_15055951_15073174 42 NA +2 15073175 15073174 2 13816403 13816402 + interanchor 42 NA +2 15468346 15488406 2 14163968 14171629 + interanchor 42 NA +2 16259857 16269207 2 14874022 15015170 + interanchor 42 NA +2 16274818 16276019 2 15021028 15022229 + EER96307 42 1 +2 16412999 16420258 2 15158638 15160765 + interanchor 42 NA +2 16478032 16481046 2 15217025 15220035 + interanchor 42 NA +2 17687706 17690350 2 16085562 16088323 + EER98469 42 1 +2 17697635 17709103 2 16128338 16139931 + interanchor 42 NA +2 17761022 17762003 2 16199906 16200872 + OQU88982 42 1 +2 17816986 17830156 2 16243232 16295654 + interanchor 42 NA +2 17830157 17837571 2 16295655 16303063 + localAlignment_2_17830157_17837571 42 NA +2 18287831 18288538 2 16767844 16768551 + KXG35079 42 1 +2 18777400 18779793 2 10041323 10043818 + interanchor 75 NA +2 18844282 18846736 2 10116240 10118694 + OQU89004 75 1 +2 19822519 19830614 2 17603928 17611551 + EER96353 35 1 +2 19965814 19986192 2 17781986 17792732 + interanchor 35 NA +2 20452941 20460652 2 18207968 18215681 + localAlignment_2_20452941_20460652 35 NA +2 20655079 20694141 2 18412739 18445225 + interanchor 35 NA +2 20753713 20753748 2 18596930 18596932 + interanchor 35 NA +2 21099237 21099236 2 18850866 18862424 + interanchor 35 NA +2 21306948 21324459 2 19078162 19089981 + interanchor 35 NA +2 22402593 22403250 2 19620167 19620228 + interanchor 35 NA +2 22461393 22462140 2 19674266 19675013 + interanchor 35 NA +2 23104501 23156055 2 20252585 20299433 + KXG35167 35 1 +2 27276828 27455402 2 24462473 24641030 + localAlignment_2_27276828_27455402 35 NA +2 27878740 27896586 2 25011468 25029297 + localAlignment_2_27878740_27896586 35 NA +2 28670765 28683135 2 25842189 25854562 + KXG35203 35 0.998688 +2 28761720 28842762 2 25934008 26015021 + localAlignment_2_28761720_28842762 35 NA +2 29195783 29195800 2 26338117 26338116 + interanchor 35 NA +2 30079384 30081702 2 27217899 27218343 + interanchor 35 NA +2 31215996 31267014 2 28321938 28372953 + localAlignment_2_31215996_31267014 35 NA +2 32619803 32632699 2 29508008 29520905 + localAlignment_2_32619803_32632699 35 NA +2 32653394 32705929 2 29544954 29597496 + localAlignment_2_32653394_32705929 35 NA +2 32761614 32770605 2 29628133 29637103 + localAlignment_2_32761614_32770605 35 NA +2 33280886 33280908 2 30134400 30134403 + interanchor 35 NA +2 33299008 33303643 2 30152497 30155988 + interanchor 35 NA +2 34387904 34397435 2 30674148 30683679 + localAlignment_2_34387904_34397435 35 NA +2 34397436 34397435 2 30683680 30686030 + interanchor 35 NA +2 34935234 34989946 2 30928554 30983249 + localAlignment_2_34935234_34989946 35 NA +2 36726598 36800863 2 31684847 31759106 + localAlignment_2_36726598_36800863 35 NA +2 37822220 37822314 2 32806595 32806689 + OQU89111 35 1 +2 39320320 39352077 2 34213919 34245679 + interanchor 35 NA +2 40620666 40691166 2 35518696 35589195 + localAlignment_2_40620666_40691166 35 NA +2 41890042 41892874 2 37776050 37778883 + OQU89126 35 1 +2 42075095 42137469 2 37925025 37987402 + localAlignment_2_42075095_42137469 35 NA +2 42279095 42325780 2 38132489 38179168 + localAlignment_2_42279095_42325780 35 NA +2 45132435 45162425 2 40183451 40213264 + interanchor 35 NA +2 45317309 45333957 2 40368227 40373411 + interanchor 35 NA +2 46673765 46673764 2 41695164 41695163 + interanchor 35 NA +2 47163137 47197627 2 42072339 42106830 + interanchor 35 NA +2 48444284 48445061 2 43380235 43381012 + EER96500 35 1 +2 48600928 48663932 2 43589494 43652483 + localAlignment_2_48600928_48663932 35 NA +2 49317461 49318160 2 44318566 44319214 + interanchor 35 NA +2 49726126 49751667 2 44663789 44673478 + interanchor 35 NA +2 49757958 49775999 2 44677359 44695469 + interanchor 35 NA +2 50357984 50358628 2 45290365 45291009 + OQU89236 35 1 +2 50916392 50932593 2 45473861 45490057 + localAlignment_2_50916392_50932593 35 NA +2 51370718 51397827 2 45924211 45944179 + interanchor 35 NA +2 51465571 51465840 2 45987020 45987286 + OQU89250 35 0.988889 +2 51934763 51969834 2 46406083 46441223 + interanchor 35 NA +2 52037199 52051343 2 46515185 46529356 + interanchor 35 NA +2 52146971 52150516 2 46634148 46637697 + localAlignment_2_52146971_52150516 35 NA +2 54032116 54079443 2 48105611 48152936 + localAlignment_2_54032116_54079443 23 NA +2 54581034 54581647 2 48701890 48702503 + interanchor 23 NA +2 54652783 54654051 2 49073823 49075096 + localAlignment_2_54652783_54654051 23 NA +2 54665749 54668104 2 49230360 49232715 + OQU89334 23 1 +2 55008580 55008579 2 49525788 49525787 + interanchor 23 NA +2 55231089 55255232 2 49720073 49744229 + localAlignment_2_55231089_55255232 23 NA +2 55301646 55339164 2 49776400 49777221 + interanchor 23 NA +2 55381152 55384509 2 49821138 49824513 + localAlignment_2_55381152_55384509 23 NA +2 55384510 55385751 2 49824514 49825755 + OQU89342 23 1 +2 55453074 55453073 2 49895818 49895838 + interanchor 23 NA +2 55544072 55544071 2 49990443 49990442 + interanchor 23 NA +2 55714437 55715818 2 50158122 50159500 + interanchor 23 NA +2 55804378 55809572 2 50261672 50266863 + KXG35466 23 0.997423 +2 55809573 55841906 2 50266864 50291172 + interanchor 23 NA +2 55893313 55907903 2 50340808 50342796 + interanchor 23 NA +2 56076887 56078289 2 50501805 50503198 + EER98791 23 0.992877 +2 56114156 56115291 2 50550917 50552051 + localAlignment_2_56114156_56115291 23 NA +2 56476076 56476891 2 50827809 50828624 + OQU89394 23 1 +2 56561942 56585960 2 50909184 50940368 + interanchor 23 NA +2 56585961 56586581 2 50940369 50940980 + EER96651 23 0.987654 +2 56961781 56963361 2 51278684 51280268 + EER98814 23 1 +2 57495458 57497017 2 51774972 51776522 + KXG35542 23 0.994231 +2 57611035 57635532 2 51872914 51897411 + interanchor 23 NA +2 57652905 57703058 2 51914782 51964916 + localAlignment_2_57652905_57703058 23 NA +2 57737093 57738410 2 51998849 52000137 + EER98844 23 1 +2 58181092 58198789 2 52376518 52394180 + localAlignment_2_58181092_58198789 23 NA +2 58240516 58240818 2 52434928 52435230 + OQU89461 23 1 +2 58957756 58989616 2 53139944 53171283 + interanchor 23 NA +2 59164113 59164519 2 53339943 53340349 + interanchor 23 NA +2 59191293 59193571 2 53367209 53369495 + interanchor 23 NA +2 59275994 59277296 2 53450314 53451440 + KXG35639 23 0.986486 +2 59454380 59467179 2 53579050 53616589 + interanchor 23 NA +2 59648317 59650019 2 53802328 53804004 + EER98918 23 1 +2 59741736 59746261 2 53869609 53874134 + interanchor 23 NA +2 59759276 59766752 2 53903030 53910506 + EER98922 23 1 +2 59875026 59875626 2 54012863 54013466 + KXG35659 23 1 +2 59878106 59878838 2 54015947 54016679 + KXG35660 23 0.997279 +2 59913779 59914512 2 54030818 54031548 + interanchor 23 NA +2 60117311 60118743 2 54234225 54235657 + EER98942 23 1 +2 60530919 60533691 2 54422773 54424708 + interanchor 23 NA +2 61113897 61115033 2 54557810 54559088 + OQU89590 37 0.998095 +2 61130491 61137724 2 54574901 54582093 + interanchor 37 NA +2 61362533 61388118 2 54810662 54823046 + interanchor 37 NA +2 61539770 61559155 2 54964212 54983646 + interanchor 37 NA +2 61913571 61926750 2 55084134 55092378 + interanchor 37 NA +2 62034922 62038238 2 55209928 55213245 + KXG35793 37 1 +2 62186125 62195818 2 55378386 55387703 + OQU89634 37 1 +2 62301040 62303002 2 55488516 55490479 + interanchor 37 NA +2 62572279 62572600 2 55738881 55739202 + interanchor 37 NA +2 62662580 62668747 2 55812370 55818508 + interanchor 37 NA +2 62730002 62737283 2 55865159 55872442 + interanchor 37 NA +2 62781117 62782768 2 55911553 55913204 + OQU89658 37 1 +2 62804695 62805422 2 55935308 55936035 + interanchor 37 NA +2 62914139 62917108 2 56023509 56026153 + interanchor 37 NA +2 63196948 63217180 2 56300283 56305608 + interanchor 37 NA +2 63588581 63592243 2 56691970 56752422 + interanchor 37 NA +2 63592244 63592825 2 56752423 56753004 + OQU89694 37 1 +2 65234791 65236124 2 57014668 57016004 + OQU89791 24 0.997004 +2 65566645 65572370 2 57321962 57327686 + EER97077 24 1 +2 65804935 65805369 2 57565223 57588265 + interanchor 24 NA +2 65851695 65852521 2 57635097 57635827 + interanchor 24 NA +2 65916958 65920779 2 57688012 57691833 + EER99250 24 1 +2 65970243 65971254 2 57933325 57934318 + interanchor 24 NA +2 66019263 66023987 2 57978992 57984286 + interanchor 24 NA +2 66352430 66362645 2 58269069 58279280 + interanchor 24 NA +2 66496872 66506623 2 58420854 58430598 + EER99285 24 1 +2 66658560 66660218 2 58588917 58590575 + EER99306 24 1 +2 66701996 66706725 2 58631859 58635767 + interanchor 24 NA +2 66864545 66869499 2 58708429 58713376 + interanchor 24 NA +2 66893100 66895299 2 58731890 58733966 + KXG36152 24 0.938253 +2 67008698 67009336 2 58873133 58873777 + EER99323 24 1 +2 67057694 67089523 2 58922754 58954568 + localAlignment_2_67057694_67089523 24 NA +2 67165890 67167626 2 59030897 59032633 + EER99339 24 1 +2 67257152 67262200 2 59122681 59127729 + EER99347 24 1 +2 67265964 67267616 2 59131151 59132803 + KXG36175 24 1 +2 67280896 67284964 2 59147148 59150523 + interanchor 24 NA +2 67346152 67348541 2 59211268 59213660 + EER97186 24 0.996942 +2 67351084 67352069 2 59216115 59217108 + interanchor 24 NA +2 67396953 67403077 2 59263060 59269253 + interanchor 24 NA +2 67430849 67433846 2 59296639 59299641 + interanchor 24 NA +2 67463529 67468622 2 59329653 59334429 + EER97196 24 1 +2 67675185 67676090 2 59550533 59551438 + EER99374 24 1 +2 67939544 67940097 2 59807880 59808433 + EER97221 24 1 +2 68128952 68132591 2 59981844 59985537 + KXG36253 24 1 +2 68366348 68371297 2 60215127 60220076 + interanchor 24 NA +2 68371298 68380981 2 60220077 60229760 + EER97252 24 1 +2 68414867 68416344 2 60263648 60265125 + interanchor 24 NA +2 68513667 68514254 2 60361876 60362463 + interanchor 24 NA +2 68574779 68578142 2 60413964 60417328 + interanchor 24 NA +2 68639361 68641454 2 60470347 60472449 + interanchor 24 NA +2 68708398 68710299 2 60551990 60553917 + interanchor 24 NA +2 69276490 69278173 2 60739621 60741302 + interanchor 51 NA +2 69354302 69354619 2 60810186 60810503 + OQU90030 51 1 +2 69373545 69374631 2 60825793 60826879 + OQU90031 51 1 +2 69468365 69472646 2 60905794 60910077 + interanchor 51 NA +2 69594121 69596023 2 61043583 61045488 + interanchor 51 NA +2 69714850 69717483 2 61243588 61246224 + KXG36402 51 1 +2 70033082 70034033 2 61526475 61527426 + KXG36438 6 1 +2 70412821 70415633 2 61868062 61870867 + OQU90081 6 1 +2 70636230 70637435 2 62082101 62083295 + interanchor 6 NA +2 71122687 71124229 2 62570227 62571768 + interanchor 6 NA +2 71184940 71185185 2 62641654 62641899 + KXG36519 6 1 +2 71221180 71221419 2 62671783 62672022 + OQU90129 6 1 +2 71380687 71382232 2 62827230 62828432 + interanchor 6 NA +2 71472462 71477044 2 62918434 62923016 + interanchor 6 NA +2 71506033 71509602 2 62952005 62955574 + EER99597 6 1 +2 71582865 71585422 2 63017072 63019629 + interanchor 6 NA +2 71625091 71629281 2 63058760 63062950 + EER97439 6 1 +2 71650698 71653866 2 63084368 63087536 + EER99606 6 1 +2 72162060 72166738 2 63618426 63624930 + interanchor 6 NA +2 72462216 72462579 2 63883692 63884055 + OQU90199 6 1 +2 72462580 72464206 2 63884056 63885682 + interanchor 6 NA +2 72663337 72684659 2 64080218 64084779 + interanchor 6 NA +2 72942595 72944925 2 64358484 64360814 + interanchor 6 NA +2 72988531 72991251 2 64404765 64407497 + interanchor 6 NA +2 73012511 73015176 2 64429162 64431838 + interanchor 6 NA +2 73038342 73041731 2 64454902 64458292 + interanchor 6 NA +2 73074232 73076336 2 64490921 64493027 + interanchor 6 NA +2 73087854 73103041 2 64504549 64519816 + interanchor 6 NA +2 73233668 73237300 2 64766899 64770531 + interanchor 6 NA +2 73275729 73278706 2 64808974 64812100 + interanchor 6 NA +2 73435519 73435986 2 64948414 64948881 + OQU90273 6 1 +2 73483409 73483522 2 64999006 64999119 + OQU90276 6 1 +2 73510248 73515433 2 65024990 65034810 + interanchor 6 NA +2 73602324 73603735 2 65121315 65122730 + interanchor 6 NA +2 73618982 73622554 2 65137790 65141354 + interanchor 6 NA +2 74009695 74016144 2 65482918 65489354 + interanchor 6 NA +2 74033679 74034594 2 65506889 65507804 + EER97591 6 1 +2 74172469 74173290 2 65645669 65646490 + interanchor 6 NA +2 74287909 74291404 2 65760489 65763984 + interanchor 6 NA +2 74425947 74431029 2 65899995 65904089 + interanchor 6 NA +2 74542471 74551550 2 66007395 66018235 + interanchor 6 NA +2 74592418 74594261 2 66059094 66060937 + EER99787 6 1 +2 74608949 74611475 2 66075783 66078309 + interanchor 6 NA +2 74641851 74644020 2 66108194 66110353 + interanchor 6 NA +2 74692559 74694486 2 66161596 66163523 + interanchor 6 NA +2 74734486 74735894 2 66205099 66206506 + interanchor 6 NA +2 74771917 74773878 2 66242295 66244256 + EER99799 6 1 +2 74917604 74926343 2 66376787 66385520 + OQU90372 6 1 +2 75044531 75048123 2 66480228 66483818 + EER99816 6 1 +2 75199851 75222122 2 66647291 66672519 + interanchor 6 NA +2 75246898 75247728 2 66696848 66697678 + interanchor 6 NA +2 75258855 75262496 2 66703641 66706164 + interanchor 6 NA +2 75262497 75263080 2 66706165 66706751 + EER97671 6 0.995984 +2 75288997 75290949 2 66724379 66726331 + EER97672 6 0.338779 +2 75358226 75367148 2 66802668 66811587 + interanchor 6 NA +2 75427523 75430144 2 66871971 66874592 + interanchor 6 NA +2 75436168 75439939 2 66880592 66884363 + interanchor 6 NA +2 75439940 75440500 2 66884364 66884924 + OQU90414 6 1 +2 75491583 75496392 2 66936006 66940815 + EER99854 6 1 +2 75528280 75550552 2 66972671 66994950 + localAlignment_2_75528280_75550552 6 NA +2 75904239 75907077 2 67332807 67336838 + interanchor 6 NA +2 76131752 76132033 2 67560964 67561245 + KXG36923 6 1 +2 76349388 76351179 2 67738786 67740577 + KXG36939 6 1 +2 76667292 76669374 2 68049995 68052077 + interanchor 6 NA +2 76711257 76711856 2 68093897 68094496 + EER97743 6 1 +2 76711857 76714597 2 68094497 68097237 + interanchor 6 NA +2 76832255 76834643 2 68221582 68223970 + KXG36963 6 1 +2 77078090 77083266 2 68462747 68467920 + EER97762 6 1 +2 77091372 77092222 2 68476499 68477349 + OQU90508 6 1 +2 77122650 77123861 2 68836690 68837901 + OQU90516 49 1 +2 77185504 77187535 2 68899552 68901583 + interanchor 49 NA +2 77323692 77327917 2 69037674 69041901 + interanchor 49 NA +2 77388760 77390745 2 69102650 69104635 + OQU90545 49 1 +2 77453292 77456223 2 69167054 69169985 + interanchor 49 NA +2 77559721 77563510 2 69275241 69279030 + EER99964 49 1 +2 77574546 77583053 2 69290093 69298600 + KXG37037 49 1 +2 77613996 77637998 2 69328949 69352952 + interanchor 49 NA +2 77675499 77679055 2 69390409 69393964 + interanchor 49 NA +2 77734563 77737092 2 69449524 69452053 + EER99975 49 1 +#block end +#block begin +3 336181 347588 3 191681 202627 + OQU86052 44 1 +3 394627 394892 3 249197 249594 + KXG31457 44 0.886667 +3 616045 619404 3 494337 497696 + KXG31485 44 1 +3 632921 634530 3 511344 512952 + OQU86061 44 1 +3 671287 679553 3 550244 558521 + KXG31493 44 1 +3 1099212 1100841 3 988916 990545 + EES00028 44 1 +3 1137187 1139968 3 1028352 1031138 + localAlignment_3_1137187_1139968 44 NA +3 1491934 1512574 3 1353871 1374452 + interanchor 44 NA +3 1515684 1518348 3 1377562 1380226 + interanchor 44 NA +3 1730818 1731186 3 1640623 1640991 - OQU86112 59 1 +3 1791133 1791600 3 1581401 1581868 - KXG31576 59 1 +3 1860644 1869799 3 1817303 1826458 + interanchor 3 NA +3 2488796 2494828 3 2471867 2477899 + EES00114 3 1 +3 2602510 2607843 3 2562213 2567546 + KXG31609 3 1 +3 2607844 2612395 3 2567547 2572115 + interanchor 3 NA +3 2693916 2695820 3 2655195 2657151 + EES00124 3 1 +3 2705738 2708616 3 2666979 2669848 + interanchor 3 NA +3 2771677 2773138 3 2739493 2740078 + KXG31615 3 0.947489 +3 2865818 2868078 3 2819856 2822121 + EES00127 3 1 +3 3050513 3054676 3 2985783 2989946 + EES00136 3 1 +3 3367163 3368043 3 3311247 3312127 + OQU86168 3 1 +3 3551987 3554696 3 3497888 3500610 + interanchor 3 NA +3 3574986 3580652 3 3538009 3545479 + EES00160 3 1 +3 4055375 4060198 3 4043597 4048508 + interanchor 3 NA +3 4163309 4168805 3 4151219 4156436 + KXG31711 3 1 +3 4212417 4213944 3 4200667 4202197 + EES00202 3 1 +3 4213945 4217279 3 4202198 4205530 + interanchor 3 NA +3 4238595 4247895 3 4227211 4236513 + KXG31722 3 1 +3 4451647 4459468 3 4423395 4431222 + interanchor 3 NA +3 4513021 4517473 3 4484611 4489063 + interanchor 3 NA +3 4518333 4519659 3 4489926 4491250 + interanchor 3 NA +3 5071902 5072185 3 5038991 5039286 + OQU86249 3 1 +3 5148637 5151917 3 5091967 5094747 + interanchor 3 NA +3 5173276 5173655 3 5113380 5113759 + interanchor 3 NA +3 5195014 5202837 3 5135687 5143288 + interanchor 3 NA +3 5313475 5331733 3 5309109 5327377 + localAlignment_3_5313475_5331733 3 NA +3 5404160 5404390 3 5432825 5433055 + OQU86269 3 1 +3 5425785 5434680 3 5457181 5465703 + interanchor 3 NA +3 5587835 5592823 3 5600865 5605853 + interanchor 3 NA +3 6055137 6059224 3 6086912 6090997 + interanchor 3 NA +3 6329934 6330573 3 6317552 6318191 + interanchor 3 NA +3 6379628 6381689 3 6368238 6370299 + EES00334 3 1 +3 6536203 6539124 3 6498095 6501013 + interanchor 3 NA +3 6555419 6560034 3 6516566 6521155 + interanchor 3 NA +3 6678468 6679634 3 6636377 6637543 + EES02511 3 1 +3 6818621 6829582 3 6776478 6778029 + interanchor 3 NA +3 7041586 7046486 3 6972192 6977081 + localAlignment_3_7041586_7046486 3 NA +3 7188359 7192461 3 7162486 7165283 + interanchor 3 NA +3 7340718 7343355 3 7305232 7307869 + EES00368 3 1 +3 7496153 7499164 3 7453373 7456370 + KXG31977 3 0.991441 +3 7626374 7628746 3 7578008 7580389 + interanchor 3 NA +3 7628747 7628882 3 7580390 7580525 + KXG31988 3 1 +3 7880297 7881203 3 7795189 7796095 + OQU86430 3 1 +3 8015292 8016392 3 7933913 7935014 + interanchor 3 NA +3 8243927 8248325 3 8170462 8173917 + interanchor 3 NA +3 8248326 8251474 3 8173918 8177016 + EES00407 3 1 +3 8252230 8252490 3 8177772 8178032 + OQU86470 3 1 +3 8554344 8554926 3 8422227 8422809 + KXG32072 3 1 +3 8582629 8585553 3 8450470 8453347 + interanchor 3 NA +3 8680182 8680685 3 8570130 8570627 + EES02611 3 0.988095 +3 8777200 8781861 3 8630651 8635180 + interanchor 3 NA +3 8924868 8925330 3 8764830 8765293 + interanchor 3 NA +3 9041022 9046031 3 8890658 8895605 + OQU86509 3 1 +3 9095277 9107185 3 8934334 8946242 + OQU86514 3 1 +3 9175813 9178928 3 9004790 9007905 + EES00452 3 1 +3 9591126 9603724 3 9366198 9378791 + interanchor 3 NA +3 9614884 9619310 3 9389949 9394375 + KXG32139 3 1 +3 9712891 9713668 3 9471610 9472387 + interanchor 3 NA +3 9726515 9733862 3 9485124 9492469 + interanchor 3 NA +3 9779774 9779986 3 9547212 9547424 + EES00472 3 1 +3 9787809 9788024 3 9555245 9555460 + EES00474 3 1 +3 9873594 9874835 3 9640944 9642185 + EES00478 3 1 +3 10436713 10444156 3 10178066 10185509 + interanchor 3 NA +3 11130347 11134556 3 10786182 10790391 + interanchor 3 NA +3 11554876 11559828 3 11070615 11075591 + KXG32241 3 1 +3 11654029 11683286 3 11169183 11198430 + localAlignment_3_11654029_11683286 3 NA +3 11841214 11841708 3 11324223 11324717 + OQU86689 3 0.993976 +3 12146581 12157500 3 11588855 11602192 + interanchor 3 NA +3 12164776 12170588 3 11609744 11615553 + KXG32258 3 1 +3 12176845 12183694 3 11621833 11628663 + interanchor 3 NA +3 12184477 12222388 3 11629438 11639991 + interanchor 3 NA +3 12230060 12236881 3 11647665 11654490 + interanchor 3 NA +3 12238211 12239290 3 11655822 11656901 + EES00577 3 1 +3 12314446 12316519 3 11731450 11734030 + EES00580 3 1 +3 12533207 12534365 3 11911785 11913301 + interanchor 3 NA +3 12628817 12630786 3 12036313 12038224 + OQU86721 3 0.959722 +3 12670578 12693542 3 12070400 12093369 + interanchor 3 NA +3 12716440 12744442 3 12108654 12133407 + interanchor 3 NA +3 13031288 13031295 3 12379288 12379295 + interanchor 3 NA +3 13051032 13065609 3 12397917 12412498 + localAlignment_3_13051032_13065609 3 NA +3 13089876 13093685 3 12437357 12441177 + EES00603 3 1 +3 13726273 13728309 3 12953135 12955184 + EES02832 3 1 +3 14218354 14220067 3 13381341 13384753 + KXG32361 3 0.998485 +3 14220068 14247121 3 13384754 13413256 + interanchor 3 NA +3 14442842 14447052 3 13590347 13594557 + EES00630 3 1 +3 14450082 14454487 3 13597552 13601957 + EES02848 3 1 +3 15076755 15104260 3 14179846 14207335 + localAlignment_3_15076755_15104260 3 NA +3 15355652 15356352 3 14350381 14351081 + OQU86795 3 1 +3 16219413 16220100 3 15062123 15062810 + localAlignment_3_16219413_16220100 3 NA +3 16980507 16980854 3 15661279 15661626 + OQU86816 3 1 +3 17099534 17102594 3 15777011 15780071 + KXG32444 3 1 +3 17262894 17285367 3 15932354 15953516 + interanchor 3 NA +3 17309705 17309704 3 15977960 15977959 + interanchor 3 NA +3 18026566 18102771 3 16695330 16771559 + localAlignment_3_18026566_18102771 3 NA +3 19457873 19474609 3 19389324 19405987 + interanchor 3 NA +3 20016913 20032174 3 19939919 19955143 + interanchor 3 NA +3 20159610 20166041 3 20084603 20091034 + localAlignment_3_20159610_20166041 3 NA +3 20518028 20522810 3 20496569 20502277 + interanchor 3 NA +3 20549890 20558953 3 20558690 20562087 + interanchor 3 NA +3 20612506 20756047 3 20655127 20655165 + interanchor 3 NA +3 21034671 21075490 3 20898797 20922787 + interanchor 3 NA +3 21576827 21602350 3 21452730 21478269 + localAlignment_3_21576827_21602350 3 NA +3 22298274 22330532 3 21668173 21700439 + localAlignment_3_22298274_22330532 3 NA +3 22386257 22414628 3 21734239 21762607 + localAlignment_3_22386257_22414628 3 NA +3 22556159 22557860 3 21959716 21961418 + OQU86858 3 1 +3 22859540 22891515 3 22186945 22218918 + localAlignment_3_22859540_22891515 3 NA +3 22951969 22969593 3 22277491 22280178 + interanchor 3 NA +3 25783267 25801319 3 23506980 23525036 + localAlignment_3_25783267_25801319 3 NA +3 27225563 27242746 3 24048304 24065462 + localAlignment_3_27225563_27242746 3 NA +3 27270322 27270321 3 24093065 24093064 + interanchor 3 NA +3 28733396 28757022 3 25526384 25550022 + localAlignment_3_28733396_28757022 3 NA +3 29412246 29436034 3 26158069 26181854 + localAlignment_3_29412246_29436034 3 NA +3 29495451 29513173 3 26229812 26240893 + interanchor 3 NA +3 29697857 29703865 3 26404834 26411197 + interanchor 3 NA +3 29854704 29872311 3 26541781 26559394 + localAlignment_3_29854704_29872311 3 NA +3 30282602 30284693 3 26837901 26839990 + KXG32567 3 1 +3 31213518 31221354 3 27749648 27757485 + interanchor 3 NA +3 31472485 31492450 3 28045525 28065536 + interanchor 3 NA +3 32133727 32179014 3 29155474 29200761 + localAlignment_3_32133727_32179014 3 NA +3 32211016 32231110 3 29241361 29261451 + localAlignment_3_32211016_32231110 3 NA +3 32231111 32250604 3 29261482 29280967 + localAlignment_3_32231111_32250604 3 NA +3 32751885 32751898 3 29746916 29758763 + interanchor 3 NA +3 32832652 32842800 3 29852943 29852942 + interanchor 3 NA +3 32842801 32856950 3 29852943 29867096 + localAlignment_3_32842801_32856950 3 NA +3 32895691 32914690 3 29891797 29910339 + interanchor 3 NA +3 35700834 35710845 3 31461315 31471329 + localAlignment_3_35700834_35710845 3 NA +3 35710846 35735526 3 31471330 31480146 + interanchor 3 NA +3 35922978 35943138 3 31667844 31688010 + localAlignment_3_35922978_35943138 3 NA +3 36070996 36082531 3 31755199 31758142 + interanchor 3 NA +3 36833934 36853601 3 32332866 32345463 + interanchor 3 NA +3 36901278 36901297 3 32391102 32391101 + interanchor 3 NA +3 36956789 36964545 3 32425605 32433358 + localAlignment_3_36956789_36964545 3 NA +3 37538826 37547328 3 32947277 32955779 + localAlignment_3_37538826_37547328 3 NA +3 38056163 38056164 3 33342475 33342474 + interanchor 3 NA +3 39186324 39187600 3 34450365 34457488 + interanchor 3 NA +3 39452192 39476992 3 34696653 34721443 + localAlignment_3_39452192_39476992 3 NA +3 40263418 40307123 3 35136202 35146614 + interanchor 3 NA +3 41338845 41341311 3 36296769 36299133 + interanchor 3 NA +3 41401552 41432215 3 36700520 36731194 + localAlignment_3_41401552_41432215 3 NA +3 41546926 41568730 3 36853516 36853515 + interanchor 3 NA +3 41861396 41874267 3 36989017 37001857 + localAlignment_3_41861396_41874267 3 NA +3 41878136 41899163 3 37005725 37026765 + localAlignment_3_41878136_41899163 3 NA +3 42286394 42291245 3 37333202 37335391 + interanchor 3 NA +3 42818344 42856400 3 37820675 37854677 + interanchor 3 NA +3 42858606 42868092 3 37856883 37866371 + interanchor 3 NA +3 42904151 42912231 3 37902721 37910800 + localAlignment_3_42904151_42912231 3 NA +3 43769724 43785913 3 38509401 38525583 + localAlignment_3_43769724_43785913 3 NA +3 43878225 43899943 3 38627261 38639850 + interanchor 3 NA +3 45005091 45024213 3 39730477 39749597 + localAlignment_3_45005091_45024213 3 NA +3 45991293 46008227 3 40824924 40841859 + localAlignment_3_45991293_46008227 3 NA +3 46193985 46222996 3 41013933 41045630 + interanchor 3 NA +3 46356237 46367108 3 41187734 41198557 + interanchor 3 NA +3 46494957 46525523 3 41322021 41352907 + interanchor 3 NA +3 46681435 46727279 3 41514647 41560494 + localAlignment_3_46681435_46727279 3 NA +3 47278550 47281613 3 42014342 42017383 + interanchor 3 NA +3 47431939 47444507 3 42183675 42196446 + interanchor 3 NA +3 47448790 47455472 3 42200553 42207243 + localAlignment_3_47448790_47455472 3 NA +3 47968514 48010648 3 42678495 42710222 + interanchor 3 NA +3 48384948 48408272 3 43029568 43052196 + interanchor 3 NA +3 48808944 48809775 3 43389328 43390159 + OQU86975 3 1 +3 48940865 48995168 3 43521019 43575326 + localAlignment_3_48940865_48995168 3 NA +3 49024067 49027624 3 43606437 43609973 + interanchor 3 NA +3 49097669 49106751 3 43682381 43699518 + interanchor 3 NA +3 49257408 49283242 3 43850410 43887908 + interanchor 3 NA +3 50283396 50284756 3 44874518 44875878 + interanchor 3 NA +3 50371619 50374617 3 44962304 44965302 + OQU87009 3 1 +3 50458892 50484466 3 45030078 45049965 + interanchor 3 NA +3 50992392 51026689 3 45416564 45431121 + interanchor 13 NA +3 51197417 51200761 3 45562171 45565515 + EES00925 13 1 +3 51258274 51260164 3 45625642 45627532 + EES03135 13 1 +3 51986176 51986421 3 46200955 46201202 + KXG32764 13 1 +3 52416768 52418254 3 46650846 46655404 + interanchor 13 NA +3 52464440 52475309 3 46702030 46712897 + EES03165 13 1 +3 52600701 52616145 3 46867111 46882566 + localAlignment_3_52600701_52616145 13 NA +3 52629879 52647629 3 46896334 46914121 + EES00968 13 1 +3 52662050 52662613 3 46928436 46928999 + OQU87066 13 1 +3 52771975 52773709 3 47034153 47035907 + OQU87073 13 1 +3 53026161 53032564 3 47208912 47220038 + interanchor 13 NA +3 53228621 53231980 3 47345990 47349341 + interanchor 13 NA +3 53425986 53431328 3 47498142 47503492 + interanchor 13 NA +3 53756846 53787430 3 47824369 47854966 + interanchor 13 NA +3 53952414 53953650 3 48057231 48058467 + KXG32825 13 0.990991 +3 54789945 54790313 3 48994258 48994626 + interanchor 13 NA +3 55067670 55068312 3 49320819 49460310 + interanchor 13 NA +3 55606674 55610533 3 50075625 50079666 + interanchor 13 NA +3 55762097 55795512 3 50231162 50264544 + interanchor 13 NA +3 55802918 55805028 3 50271950 50274060 + OQU87178 13 1 +3 56164363 56176998 3 50719484 50732117 + localAlignment_3_56164363_56176998 13 NA +3 56392963 56397456 3 50873413 50877836 + EES03312 13 1 +3 56580709 56590226 3 51032292 51041810 + localAlignment_3_56580709_56590226 13 NA +3 56590227 56638988 3 51041811 51066587 + interanchor 13 NA +3 56691207 56711926 3 51118834 51143724 + interanchor 13 NA +3 56869363 56905074 3 51270592 51306823 + interanchor 13 NA +3 56946156 56952499 3 51369567 51376386 + EES01127 13 1 +3 56980596 56983752 3 51405203 51408509 + interanchor 13 NA +3 57092918 57109460 3 51510140 51524378 + interanchor 13 NA +3 57243438 57250279 3 51576322 51583139 + interanchor 13 NA +3 57293467 57297226 3 51638823 51642647 + OQU87215 13 0.989899 +3 58192233 58199345 3 52112378 52119323 + interanchor 13 NA +3 58330868 58336399 3 52251455 52257022 + KXG33037 13 1 +3 58373165 58374019 3 52293678 52294532 + EES01201 13 1 +3 58475233 58479427 3 52377137 52381531 + interanchor 13 NA +3 58527413 58530665 3 52429647 52432909 + interanchor 13 NA +3 58828767 58831528 3 52752618 52755379 + EES01229 13 1 +3 59023209 59032977 3 52944979 52954683 + localAlignment_3_59023209_59032977 13 NA +3 59172683 59174117 3 53059332 53060765 + interanchor 13 NA +3 59244911 59245452 3 53133531 53134072 + EES01241 13 1 +3 59316453 59317228 3 53209186 53209961 + OQU87320 13 1 +3 59500053 59501405 3 53362869 53364950 + interanchor 13 NA +3 60160619 60165528 3 53850785 53855096 + EES01305 13 0.811019 +3 60241990 60246140 3 53906845 53910896 + OQU87374 13 1 +3 60247258 60250455 3 53912008 53915204 + EES03474 13 1 +3 60590197 60591614 3 54223212 54224128 + EES01328 13 1 +3 60719028 60723946 3 54364427 54369343 + interanchor 13 NA +3 61560148 61562960 3 54949707 54952519 + OQU87441 48 1 +3 61568029 61569612 3 54959112 54960695 + KXG33274 48 1 +3 61940523 61957754 3 55463343 55480548 + interanchor 22 NA +3 61984716 61990410 3 55498052 55503582 + interanchor 22 NA +3 62096390 62099654 3 55597643 55600915 + interanchor 22 NA +3 62129190 62148107 3 55630387 55641914 + interanchor 22 NA +3 62400394 62402048 3 55839237 55840891 + OQU87505 22 1 +3 62691539 62691862 3 56109204 56109527 + OQU87535 22 1 +3 62703203 62703418 3 56123797 56124012 + KXG33364 22 1 +3 62911469 62913889 3 56325396 56327816 + interanchor 22 NA +3 62914226 62918703 3 56328153 56332630 + interanchor 22 NA +3 63388814 63397468 3 56793148 56802890 + OQU87590 22 1 +3 63529660 63531049 3 56933548 56934937 + EES03659 22 0.999134 +3 63568494 63572298 3 56969388 56973431 + OQU87604 22 1 +3 63667992 63669385 3 57078644 57080038 + EES03676 22 1 +3 63669386 63670387 3 57080039 57081040 + interanchor 22 NA +3 63829052 63831894 3 57241057 57243899 + OQU87620 22 1 +3 63834271 63834801 3 57245991 57246521 + KXG33461 22 1 +3 63880725 63883517 3 57280886 57283679 + EES03691 22 1 +3 64113923 64123240 3 57505002 57514319 + interanchor 22 NA +3 64127488 64129127 3 57518570 57520209 + EES01548 22 1 +3 64290941 64296269 3 57678981 57684309 + OQU87654 22 1 +3 64452118 64460106 3 57835823 57843173 + OQU87669 22 0.942485 +3 64873596 64875720 3 58183331 58185442 + EES01585 22 0.998192 +3 64877239 64879962 3 58186935 58189658 + EES03739 22 1 +3 64895738 64900397 3 58205449 58210090 + EES01587 22 1 +3 64906296 64907816 3 58216001 58217522 + EES03741 22 1 +3 65406324 65408590 3 58596507 58598773 + KXG33575 5 1 +3 65423159 65430242 3 58613034 58619153 + interanchor 5 NA +3 65577004 65581693 3 58781212 58785901 + EES03781 5 1 +3 65654876 65655907 3 58859314 58860345 + KXG33587 5 1 +3 65791292 65792535 3 58988977 58990220 + EES03797 5 1 +3 65934780 65960852 3 59112875 59128978 + interanchor 5 NA +3 65979990 65980724 3 59148144 59148878 + OQU87760 5 1 +3 66020147 66024014 3 59181973 59185840 + interanchor 5 NA +3 66238430 66268412 3 59392868 59422850 + interanchor 5 NA +3 66280713 66282634 3 59435143 59437064 + OQU87767 5 1 +3 66384844 66393126 3 59534456 59542719 + interanchor 5 NA +3 66435745 66440295 3 59583509 59588066 + interanchor 5 NA +3 66538947 66540994 3 59686592 59688639 + interanchor 5 NA +3 66547934 66566186 3 59695579 59713691 + interanchor 5 NA +3 66616446 66621171 3 59751754 59756480 + interanchor 5 NA +3 66676410 66677848 3 59806345 59807783 + interanchor 5 NA +3 66860591 66862828 3 59987370 59989616 + EES01718 5 1 +3 67024684 67026232 3 60126171 60127721 + interanchor 5 NA +3 67134663 67137295 3 60236120 60238752 + interanchor 5 NA +3 67231930 67243816 3 60333305 60345190 + interanchor 5 NA +3 67470900 67488127 3 60572435 60589668 + interanchor 5 NA +3 67532806 67533084 3 60635052 60635326 + KXG33699 5 0.985663 +3 67697036 67708249 3 60794390 60805515 + interanchor 5 NA +3 68042577 68050407 3 61342732 61350549 + localAlignment_3_68042577_68050407 5 NA +3 68168744 68171796 3 61455926 61459195 + interanchor 5 NA +3 68195832 68196445 3 61483471 61484330 + interanchor 5 NA +3 68553327 68558449 3 61818104 61823226 + KXG33766 5 1 +3 68758468 68763150 3 62010778 62015460 + interanchor 5 NA +3 68939424 68941482 3 62199444 62201502 + EES01846 5 1 +3 69030004 69043435 3 62304281 62317706 + interanchor 5 NA +3 69171151 69171974 3 62455846 62456669 + KXG33816 5 1 +3 69414223 69417619 3 62692563 62695959 + KXG33835 5 1 +3 69542078 69545275 3 63737051 63740248 + interanchor 5 NA +3 69791449 69797152 3 63951313 63953970 + interanchor 5 NA +3 69882501 69885905 3 64047160 64050518 + interanchor 5 NA +3 69961489 69963791 3 64129893 64132188 + OQU88033 5 1 +3 70145682 70149640 3 64314693 64318624 + interanchor 5 NA +3 70232412 70238737 3 64406039 64412045 + interanchor 5 NA +3 70291381 70293968 3 64457602 64460104 + interanchor 5 NA +3 70426787 70428444 3 64547206 64548864 + interanchor 5 NA +3 70479706 70482006 3 64593909 64596204 + KXG33948 5 1 +3 70502048 70510181 3 64616720 64624848 + KXG33950 5 1 +3 70546062 70547675 3 64660810 64662671 + interanchor 5 NA +3 70597329 70599506 3 64712260 64715320 + EES04070 5 1 +3 70706301 70710885 3 64816135 64820828 + interanchor 5 NA +3 70764420 70766190 3 64849165 64850722 + EES04085 5 0.739791 +3 70943927 70946105 3 65033435 65035613 + EES04100 5 1 +3 70964944 70969497 3 65054528 65059200 + EES04103 5 1 +3 71199644 71201584 3 65272160 65274100 + KXG34000 5 1 +3 71370219 71371448 3 65439308 65440582 + EES04120 5 1 +3 71653063 71661538 3 65669997 65677655 + interanchor 5 NA +3 71699213 71703642 3 65722562 65726934 + interanchor 5 NA +3 71798278 71807676 3 65807647 65816963 + interanchor 5 NA +3 72095299 72096870 3 66070535 66072106 + EES02015 5 1 +3 72124454 72125418 3 66099349 66100324 + interanchor 5 NA +3 72380432 72382861 3 66370006 66372417 + interanchor 5 NA +3 72519466 72526000 3 66471883 66478398 + interanchor 5 NA +3 72541367 72551425 3 66493730 66518720 + interanchor 5 NA +3 72855007 72856595 3 66760564 66762151 + interanchor 5 NA +3 73184793 73192012 3 67073602 67080824 + KXG34129 5 1 +3 73334733 73350068 3 67245842 67261181 + interanchor 5 NA +3 73538198 73540230 3 67448140 67450172 + KXG34158 5 1 +3 73649872 73650156 3 67499944 67500228 + EES02093 47 1 +3 73737879 73738537 3 67587824 67588482 + interanchor 47 NA +3 73791844 73793049 3 67641688 67642893 + EES02106 47 1 +3 73844264 73844488 3 67694302 67694526 + EES02112 47 1 +3 73886604 73903679 3 67736633 67753708 + interanchor 47 NA +3 73906915 73907824 3 67756944 67757853 + interanchor 47 NA +3 73942926 73944637 3 67785712 67787423 + EES04283 47 1 +3 74053336 74054426 3 67892447 67893537 + EES02132 47 1 +3 74279335 74280194 3 68130482 68131341 + OQU88274 47 0.744792 +#block end diff --git a/inst/extdata/toy_gvcf_metrics.tsv b/inst/extdata/toy_gvcf_metrics.tsv new file mode 100644 index 0000000..f02b8b0 --- /dev/null +++ b/inst/extdata/toy_gvcf_metrics.tsv @@ -0,0 +1,42 @@ +taxa chrom refLength numSNPs numIns numDel numNs numBasesInserted numBasesDeleted percentIdentityWithRef percentMappedToRef meanInsertionSize medianInsertionSize largestInsertion meanDeletionSize medianDeletionSize largestDeletion refRangesWithHaplotype haplotypesIdenticalToRef +Xb01 ALL 473519425 2706357 336754 301867 2101168 41462213 105742381 0.7495073449204328 0.9839845619849703 123.12314924247373 2.0 1195421 350.29460325242576 2.0 2738004 49331 0 +Xb01 Vu01 42129361 154059 26280 20211 181091 2600647 8194960 0.7920009278089929 0.9963682810190262 98.9591704718417 1.0 335842 405.47028845678096 2.0 2533720 4513 0 +Xb01 Vu02 33908088 178101 21457 18981 152494 2293028 6789957 0.7811010458625682 0.990421370854057 106.86619751130168 2.0 493112 357.72388177651334 2.0 933850 3546 0 +Xb01 Vu03 65292630 273800 43347 38073 284407 2694624 9320775 0.8472493449873286 0.9972341595062107 62.164025192054815 2.0 130658 244.81325348672289 2.0 2168136 7949 0 +Xb01 Vu04 42731077 424488 34561 31514 177567 3908337 13543792 0.5829645482607424 0.914637115277951 113.0851827204074 2.0 331966 429.77064161959765 2.0 1324417 3173 0 +Xb01 Vu05 48746289 183067 28355 24918 224956 4352143 8824419 0.7683998878355642 0.9612024004534991 153.48767413154647 2.0 679257 354.1383337346497 2.0 720684 5135 0 +Xb01 Vu06 34463471 149413 22663 20431 152644 2262451 6738139 0.7938599684286008 0.9972464758410434 99.83016370295195 2.0 717383 329.7997650628946 2.0 460474 4068 0 +Xb01 Vu07 40876636 164945 26583 23708 178058 1966857 5725400 0.8472651956976107 0.9982404618618812 73.98927886243088 2.0 166939 241.4965412518981 2.0 575778 5150 0 +Xb01 Vu08 38363498 191440 26010 24047 171568 2214889 7047621 0.7979412617691953 0.9954423342730634 85.1552864282968 2.0 122026 293.07693267351436 2.0 1054118 3914 0 +Xb01 Vu09 43933251 191892 27914 23807 187467 3967889 10106945 0.7565831401823644 0.997017612013279 142.14691552625922 2.0 469469 424.53669088923425 2.0 2738004 4785 0 +Xb01 Vu10 41327797 432691 44833 42970 192813 7582256 14946556 0.602531777824983 0.9809815171130463 169.1222090870564 2.0 264897 347.8370025599255 2.0 487171 3332 0 +Xb01 Vu11 41684185 362460 34751 33207 198103 7619092 14503817 0.6385231473279375 0.998295132794368 219.24813674426636 2.0 1195421 436.76986779895805 2.0 1305474 3762 0 +Xb01 contig_206 63142 1 0 0 0 0 0 0.10362357860061448 0.10363941591967311 0.0 0.0 0 0.0 0.0 0 4 0 +Xb02 ALL 473589694 2449797 336272 291574 2208547 29566919 72605394 0.8236625816439325 0.9880368722719713 87.92560486748822 2.0 320580 249.01189406462854 2.0 1426878 50748 0 +Xb02 Vu01 42129361 160631 26666 20215 186995 2046746 5899458 0.8453003595283584 0.9963682810190262 76.75489387234681 1.0 99996 291.83566658421967 2.0 505990 4582 0 +Xb02 Vu02 33908088 121304 19205 16558 160482 1188807 4342514 0.858848809169069 0.99606220793104 61.90091122103619 2.0 83864 262.26078028747435 2.0 328988 3617 0 +Xb02 Vu03 65292630 237396 38724 33028 262316 2034936 7226756 0.8763236371394444 0.9968857434598668 52.54973659745894 2.0 241584 218.80695167736465 2.0 1426878 8010 0 +Xb02 Vu04 42731077 277392 39688 34341 235594 3237487 9243738 0.7269181864992544 0.9549981855126188 81.57344789356985 2.0 112771 269.174980344195 2.0 642009 3482 0 +Xb02 Vu05 48746289 146427 25804 21365 229626 1687807 4890410 0.8705261850804684 0.9808408594959915 65.40873507983258 2.0 88980 228.89819798736252 2.0 246519 5335 0 +Xb02 Vu06 34463471 194667 25642 22914 168776 2074525 4674870 0.8511296787256281 0.9972464758410434 80.90340067077452 2.0 117811 204.01806755695208 2.0 266349 4190 0 +Xb02 Vu07 40876636 137093 22033 18379 174316 1847989 4351023 0.8838470465133188 0.9983083979806949 83.87368946580129 2.0 100000 236.73883236302302 2.0 591288 5226 0 +Xb02 Vu08 38363498 173624 24145 21081 172868 2151948 5541340 0.8407158544301669 0.9950686457215138 89.1260302340029 2.0 179186 262.85944689530857 2.0 582875 3950 0 +Xb02 Vu09 43933251 182546 29700 23016 207497 2345474 5698940 0.8556539100646114 0.9965646066119714 78.97218855218856 1.0 320580 247.60775112964893 2.0 868112 4934 0 +Xb02 Vu10 41327797 449555 45489 43891 195093 6229064 11234877 0.6805245631650775 0.9681539037757082 136.9356108070083 2.0 222528 255.97222665238888 2.0 339680 3489 0 +Xb02 Vu11 41684185 368973 39174 36777 214984 4722134 9500788 0.7482750592340957 0.9910279881926443 120.5425537346199 2.0 209451 258.3350463604971 2.0 321725 3926 0 +Xb02 contig_178 70269 123 1 7 0 1 451 0.08238341231553031 0.09055202151731204 1.0 1.0 1 64.42857142857143 1.0 431 4 0 +Xb02 contig_206 63142 66 1 2 0 1 229 0.034683728738399165 0.03935573786069494 1.0 1.0 1 114.5 114.5 227 3 0 +Xb03 ALL 473589694 2593842 337290 298287 2354849 31961722 84679453 0.7888372418847442 0.9799153146267578 94.76036052062024 2.0 612634 283.8858314308032 2.0 2777411 50088 0 +Xb03 Vu01 42129361 207430 30629 24870 195090 1966642 7413573 0.7990916596147756 0.985428760716309 64.20849521695125 2.0 81347 298.0930036188179 2.0 2675954 4533 0 +Xb03 Vu02 33908088 121424 19354 16896 166960 1360617 5420565 0.8221644936158005 0.994355653435841 70.3015914022941 2.0 118596 320.81942471590907 2.0 1755384 3592 0 +Xb03 Vu03 65292630 202420 36687 30915 297858 1579391 8331788 0.8622115084045473 0.9972341595062107 43.050426581622915 2.0 99998 269.50632379103996 2.0 2777411 7957 0 +Xb03 Vu04 42731077 444439 37629 34655 206571 4656000 12127115 0.605428737497068 0.9071059219967706 123.7343538228494 2.0 199951 349.938392728322 2.0 859855 3251 0 +Xb03 Vu05 48746289 165510 27250 23118 256949 2122234 6109631 0.8469255577588686 0.9808408594959915 77.88014678899083 2.0 145645 264.28025780776886 2.0 793541 5296 0 +Xb03 Vu06 34463471 161055 23681 21346 178010 1782112 4524301 0.8346905046215455 0.9757664571859288 75.25493011274861 2.0 99995 211.9507636091071 2.0 374241 4175 0 +Xb03 Vu07 40876636 135434 22785 19340 192135 1516686 3597781 0.8661917531569868 0.9639026313222057 66.5651086240948 2.0 381044 186.02797311271976 2.0 307128 5169 0 +Xb03 Vu08 38363498 166896 23625 20801 188963 1697572 5615796 0.839689462102752 0.9954423342730634 71.85489947089947 2.0 22761 269.97721263400797 2.0 304837 3969 0 +Xb03 Vu09 43933251 192121 30379 24742 210879 2405286 7742554 0.8114732278747139 0.997017612013279 79.1759439086211 1.0 461350 312.93161425915446 2.0 2706189 4863 0 +Xb03 Vu10 41327797 442794 45201 43637 225302 7804636 13259715 0.6363966605817387 0.9806642730073417 172.6651180283622 2.0 184538 303.8640373994546 2.0 483344 3393 0 +Xb03 Vu11 41684185 353997 40064 37954 236132 5070536 10536608 0.725445057879865 0.997917675492516 126.56090255591054 2.0 612634 277.6152184223007 2.0 1483164 3880 0 +Xb03 contig_178 70269 305 5 12 0 9 24 0.14858614751882054 0.15326815523203688 1.8 1.0 5 2.0 1.0 6 7 0 +Xb03 contig_206 63142 17 1 1 0 1 2 0.03905482879858098 0.03935573786069494 1.0 1.0 1 2.0 2.0 2 3 0 diff --git a/man/PHGMetrics-class.Rd b/man/PHGMetrics-class.Rd new file mode 100644 index 0000000..12ab073 --- /dev/null +++ b/man/PHGMetrics-class.Rd @@ -0,0 +1,30 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/class_phg_metrics.R +\docType{class} +\name{PHGMetrics-class} +\alias{PHGMetrics-class} +\alias{show,PHGMetrics-method} +\title{A PHGMetrics Class} +\usage{ +\S4method{show}{PHGMetrics}(object) +} +\arguments{ +\item{object}{A \code{\linkS4class{PHGMetrics}} object} +} +\description{ +A \code{PHGMetrics} class is a general class for storing metrics data +generated from PHGv2 operations. + +Prints out information regarding properties from the \code{PHGMetrics} +class to the console +} +\section{Slots}{ + +\describe{ +\item{\code{metricAlign}}{AnchorWave alignment metrics (\code{.anchorspro})} + +\item{\code{metricGvcf}}{gVCF metrics} + +\item{\code{metadata}}{A \code{data.frame} object of key-value data for files} +}} + diff --git a/man/PHGMetrics.Rd b/man/PHGMetrics.Rd new file mode 100644 index 0000000..3387f75 --- /dev/null +++ b/man/PHGMetrics.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/class_phg_metrics.R +\name{PHGMetrics} +\alias{PHGMetrics} +\title{PHGMetrics object constructor} +\usage{ +PHGMetrics(paths = NULL, metadata = NULL) +} +\arguments{ +\item{paths}{A \code{character} vector of file and/or directory paths} + +\item{metadata}{key-value metadata for files} +} +\value{ +A \code{PHGMetrics} object. +} +\description{ +\code{PHGMetrics} is the primary container for housing PHGv2 metrics data +} diff --git a/man/brapiURL.Rd b/man/brapiURL.Rd index 9b9811e..d6ad1de 100644 --- a/man/brapiURL.Rd +++ b/man/brapiURL.Rd @@ -10,7 +10,7 @@ brapiURL(object, ...) \S4method{brapiURL}{PHGServerCon}(object) } \arguments{ -\item{object}{an \code{rPHG} local or server connection object.} +\item{object}{an \code{rPHG2} local or server connection object.} \item{...}{Additional arguments, for use in specific methods} } diff --git a/man/brapiVersion.Rd b/man/brapiVersion.Rd index dc60414..bae31a4 100644 --- a/man/brapiVersion.Rd +++ b/man/brapiVersion.Rd @@ -10,7 +10,7 @@ brapiVersion(object, ...) \S4method{brapiVersion}{PHGServerCon}(object) } \arguments{ -\item{object}{an \code{rPHG} local or server connection object} +\item{object}{an \code{rPHG2} local or server connection object} \item{...}{Additional arguments, for use in specific methods} } diff --git a/man/cash-PHGMetrics-method.Rd b/man/cash-PHGMetrics-method.Rd new file mode 100644 index 0000000..657651b --- /dev/null +++ b/man/cash-PHGMetrics-method.Rd @@ -0,0 +1,22 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/class_phg_metrics.R +\name{$,PHGMetrics-method} +\alias{$,PHGMetrics-method} +\title{Access Elements of PHGMetrics Objects by Name} +\usage{ +\S4method{$}{PHGMetrics}(x, name) +} +\arguments{ +\item{x}{A \code{PHGMetrics} object.} + +\item{name}{The name of the element to access within the \code{metadata$id} field.} +} +\value{ +The value associated with the specified \code{name} in the \code{metadata$id} of the +\code{PHGMetrics} object, if it exists. +} +\description{ +This method allows for accessing elements of the \code{metadata} slot in +\code{PHGMetrics} objects using the \code{$} operator, specifically filtering by the +\code{id}. +} diff --git a/man/dot-DollarNames.PHGMetrics.Rd b/man/dot-DollarNames.PHGMetrics.Rd new file mode 100644 index 0000000..50f4bbd --- /dev/null +++ b/man/dot-DollarNames.PHGMetrics.Rd @@ -0,0 +1,20 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/class_phg_metrics.R +\name{.DollarNames.PHGMetrics} +\alias{.DollarNames.PHGMetrics} +\title{Retrieve Names Matching a Pattern from PHGMetrics Objects} +\usage{ +\method{.DollarNames}{PHGMetrics}(x, pattern = "") +} +\arguments{ +\item{x}{A \code{PHGMetrics} object.} + +\item{pattern}{A regular expression pattern to match against the \code{id} values.} +} +\value{ +A character vector of names matching the pattern. +} +\description{ +This function extracts all the names from the \code{id} field in the \code{metadata} +slot of a \code{PHGMetrics} object that match a specified pattern. +} diff --git a/man/filterRefRanges.Rd b/man/filterRefRanges.Rd index 3af2afd..f167e20 100644 --- a/man/filterRefRanges.Rd +++ b/man/filterRefRanges.Rd @@ -10,12 +10,12 @@ filterRefRanges(object, ...) \S4method{filterRefRanges}{PHGDataSet}(object, gRanges) } \arguments{ -\item{object}{an \code{rPHG} dataset} +\item{object}{an \code{rPHG2} dataset} \item{...}{Additional arguments, for use in specific methods} \item{gRanges}{A \code{GRanges} coordinate object} } \description{ -Filters \code{rPHG}-related datasets by reference range coordinates or ID. +Filters \code{rPHG2}-related datasets by reference range coordinates or ID. } diff --git a/man/filterSamples.Rd b/man/filterSamples.Rd index ed31a49..65806fb 100644 --- a/man/filterSamples.Rd +++ b/man/filterSamples.Rd @@ -10,12 +10,12 @@ filterSamples(object, ...) \S4method{filterSamples}{PHGDataSet}(object, sampleIds) } \arguments{ -\item{object}{an \code{rPHG} dataset} +\item{object}{an \code{rPHG2} dataset} \item{...}{Additional arguments, for use in specific methods} \item{sampleIds}{A \code{character} vector of sample IDs} } \description{ -Filters \code{rPHG}-related datasets by sample ID. +Filters \code{rPHG2}-related datasets by sample ID. } diff --git a/man/grapes-T-grapes.Rd b/man/grapes-T-grapes.Rd new file mode 100644 index 0000000..0e6113b --- /dev/null +++ b/man/grapes-T-grapes.Rd @@ -0,0 +1,38 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/utils_general.R +\name{\%T\%} +\alias{\%T\%} +\title{User-defined function for pre-evaluated names in vectors} +\usage{ +lhs \%T\% rhs +} +\arguments{ +\item{lhs}{Name for element in vector. Can be either static string or object that will +need to be evaluated.} + +\item{rhs}{Element in vector} +} +\value{ +A named vector +} +\description{ +Generates a named element. Can be used in conjunction with \code{c()} to +create a collection of named elements +} +\examples{ +# Creating a named vector with a static name +vectorElement <- "value" \%T\% 5 +print(vectorElement) + +# Creating a combined named vector with both static and dynamic names +nameForElement <- "dynamicName" +combinedVector <- c("staticName" \%T\% 123, nameForElement \%T\% 456) +print(combinedVector) + +# Note: `\%T\%` can be especially useful in data manipulation where dynamic +# naming of elements is required. Here's a more complex example: +keyMap <- data.frame(key = "key_01") +dynamicVector <- keyMap$key \%T\% 10 +print(dynamicVector) + +} diff --git a/man/hVcfFiles.Rd b/man/hVcfFiles.Rd index c4da008..77900f7 100644 --- a/man/hVcfFiles.Rd +++ b/man/hVcfFiles.Rd @@ -10,7 +10,7 @@ hVcfFiles(object, ...) \S4method{hVcfFiles}{PHGLocalCon}(object) } \arguments{ -\item{object}{an \code{rPHG} local connection object} +\item{object}{an \code{rPHG2} local connection object} \item{...}{Additional arguments, for use in specific methods} } diff --git a/man/host.Rd b/man/host.Rd index 2856bb7..99cd0aa 100644 --- a/man/host.Rd +++ b/man/host.Rd @@ -10,7 +10,7 @@ host(object, ...) \S4method{host}{PHGCon}(object) } \arguments{ -\item{object}{an \code{rPHG} local or server connection object} +\item{object}{an \code{rPHG2} local or server connection object} \item{...}{Additional arguments, for use in specific methods} } diff --git a/man/httProtocol.Rd b/man/httProtocol.Rd index cb7794b..5102100 100644 --- a/man/httProtocol.Rd +++ b/man/httProtocol.Rd @@ -10,7 +10,7 @@ httProtocol(object, ...) \S4method{httProtocol}{PHGServerCon}(object) } \arguments{ -\item{object}{an \code{rPHG} local or server connection object} +\item{object}{an \code{rPHG2} local or server connection object} \item{...}{Additional arguments, for use in specific methods} } diff --git a/man/javaMemoryAddress.Rd b/man/javaMemoryAddress.Rd index 655b983..b1c5b93 100644 --- a/man/javaMemoryAddress.Rd +++ b/man/javaMemoryAddress.Rd @@ -10,10 +10,10 @@ javaMemoryAddress(object, ...) \S4method{javaMemoryAddress}{HaplotypeGraph}(object) } \arguments{ -\item{object}{an \code{rPHG} local or server connection object} +\item{object}{an \code{rPHG2} local or server connection object} \item{...}{Additional arguments, for use in specific methods} } \description{ -Returns the \code{rJava} memory reference for a given \code{rPHG} object +Returns the \code{rJava} memory reference for a given \code{rPHG2} object } diff --git a/man/javaRefObj.Rd b/man/javaRefObj.Rd index 1cd3584..3d809f4 100644 --- a/man/javaRefObj.Rd +++ b/man/javaRefObj.Rd @@ -10,10 +10,10 @@ javaRefObj(object, ...) \S4method{javaRefObj}{HaplotypeGraph}(object) } \arguments{ -\item{object}{an \code{rPHG} local or server connection object} +\item{object}{an \code{rPHG2} local or server connection object} \item{...}{Additional arguments, for use in specific methods} } \description{ -Returns the \code{rJava} memory reference for a given \code{rPHG} object +Returns the \code{rJava} memory reference for a given \code{rPHG2} object } diff --git a/man/metricsIds.Rd b/man/metricsIds.Rd new file mode 100644 index 0000000..d911500 --- /dev/null +++ b/man/metricsIds.Rd @@ -0,0 +1,29 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/class_all_generics.R, R/class_phg_metrics.R +\name{metricsIds} +\alias{metricsIds} +\alias{metricsIds<-} +\alias{metricsIds,PHGMetrics-method} +\alias{metricsIds<-,PHGMetrics-method} +\title{Return metrics table IDs} +\usage{ +metricsIds(object, ...) + +metricsIds(object, ...) <- value + +\S4method{metricsIds}{PHGMetrics}(object, type = NULL) + +\S4method{metricsIds}{PHGMetrics}(object) <- value +} +\arguments{ +\item{object}{an \code{rPHG2} metrics object} + +\item{...}{Additional arguments, for use in specific methods} + +\item{value}{A named vector where name(s) are the old IDs and elements are the new IDs} + +\item{type}{What collection of IDs do you want to return? Defaults to \code{NULL}.} +} +\description{ +Returns a PHG metrics table by given ID +} diff --git a/man/metricsMetaData.Rd b/man/metricsMetaData.Rd new file mode 100644 index 0000000..75cedaa --- /dev/null +++ b/man/metricsMetaData.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/class_all_generics.R, R/class_phg_metrics.R +\name{metricsMetaData} +\alias{metricsMetaData} +\alias{metricsMetaData,PHGMetrics-method} +\title{Return metric metadata} +\usage{ +metricsMetaData(object, ...) + +\S4method{metricsMetaData}{PHGMetrics}(object) +} +\arguments{ +\item{object}{an \code{rPHG2} metrics object} + +\item{...}{Additional arguments, for use in specific methods} +} +\description{ +Returns metadata information from \code{rPHG2} metrics objects +} diff --git a/man/metricsTable.Rd b/man/metricsTable.Rd new file mode 100644 index 0000000..6799b98 --- /dev/null +++ b/man/metricsTable.Rd @@ -0,0 +1,32 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/class_all_generics.R, R/class_phg_metrics.R +\name{metricsTable} +\alias{metricsTable} +\alias{metricsTable<-} +\alias{metricsTable,PHGMetrics-method} +\alias{metricsTable<-,PHGMetrics-method} +\title{Return a metrics table} +\usage{ +metricsTable(object, ...) + +metricsTable(object, ...) <- value + +\S4method{metricsTable}{PHGMetrics}(object, name = NULL, type = NULL) + +\S4method{metricsTable}{PHGMetrics}(object) <- value +} +\arguments{ +\item{object}{an \code{rPHG2} metrics object} + +\item{...}{Additional arguments, for use in specific methods} + +\item{value}{A named list where names are the metric table IDs and values are valid +metrics tables. Currently, gVCF and AnchorWave alignment files are allowed.} + +\item{name}{A metric table name} + +\item{type}{What collection of IDs do you want to return? Defaults to \code{NULL}.} +} +\description{ +Returns a PHG metrics table by given ID +} diff --git a/man/numberOfChromosomes.Rd b/man/numberOfChromosomes.Rd index 189d293..528f5c9 100644 --- a/man/numberOfChromosomes.Rd +++ b/man/numberOfChromosomes.Rd @@ -10,7 +10,7 @@ numberOfChromosomes(object, ...) \S4method{numberOfChromosomes}{HaplotypeGraph}(object) } \arguments{ -\item{object}{an \code{rPHG} local or server connection object} +\item{object}{an \code{rPHG2} local or server connection object} \item{...}{Additional arguments, for use in specific methods} } diff --git a/man/numberOfRefRanges.Rd b/man/numberOfRefRanges.Rd index a5e8f5b..cb11bd7 100644 --- a/man/numberOfRefRanges.Rd +++ b/man/numberOfRefRanges.Rd @@ -10,7 +10,7 @@ numberOfRefRanges(object, ...) \S4method{numberOfRefRanges}{HaplotypeGraph}(object) } \arguments{ -\item{object}{an \code{rPHG} local or server connection object} +\item{object}{an \code{rPHG2} local or server connection object} \item{...}{Additional arguments, for use in specific methods} } diff --git a/man/numberOfTaxa.Rd b/man/numberOfTaxa.Rd index f0fff4b..55f7e63 100644 --- a/man/numberOfTaxa.Rd +++ b/man/numberOfTaxa.Rd @@ -10,7 +10,7 @@ numberOfTaxa(object, ...) \S4method{numberOfTaxa}{HaplotypeGraph}(object) } \arguments{ -\item{object}{an \code{rPHG} local or server connection object} +\item{object}{an \code{rPHG2} local or server connection object} \item{...}{Additional arguments, for use in specific methods} } diff --git a/man/phgType.Rd b/man/phgType.Rd index bce022b..d42677d 100644 --- a/man/phgType.Rd +++ b/man/phgType.Rd @@ -10,10 +10,10 @@ phgType(object, ...) \S4method{phgType}{PHGCon}(object) } \arguments{ -\item{object}{an \code{rPHG} connection object} +\item{object}{an \code{rPHG2} connection object} \item{...}{Additional arguments, for use in specific methods} } \description{ -Returns the PHG type for a given \code{rPHG} local or server connection object +Returns the PHG type for a given \code{rPHG2} local or server connection object } diff --git a/man/plotDot.Rd b/man/plotDot.Rd new file mode 100644 index 0000000..fa5b09f --- /dev/null +++ b/man/plotDot.Rd @@ -0,0 +1,39 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/class_all_generics.R, R/class_phg_metrics.R +\name{plotDot} +\alias{plotDot} +\alias{plotDot,PHGMetrics-method} +\title{Generate dot plots} +\usage{ +plotDot(object, ...) + +\S4method{plotDot}{PHGMetrics}( + object, + metricId, + querySeqId = NULL, + refSeqId = NULL, + queryLab = NULL, + refLab = NULL, + colorId = c("strand", "score") +) +} +\arguments{ +\item{object}{an \code{rPHG2} metrics object} + +\item{...}{Additional arguments, for use in specific methods} + +\item{metricId}{A valid metric ID \code{character} name.} + +\item{querySeqId}{Vector of sequence IDs (query).} + +\item{refSeqId}{Vector of sequence IDs (reference).} + +\item{queryLab}{Optional label for query axis.} + +\item{refLab}{Optional label for reference axis.} + +\item{colorId}{How to color plots (\code{strand} or \code{score})} +} +\description{ +Generates collinearity (dot) plots between 2 samples +} diff --git a/man/port.Rd b/man/port.Rd index 453532c..0cc3d20 100644 --- a/man/port.Rd +++ b/man/port.Rd @@ -10,7 +10,7 @@ port(object, ...) \S4method{port}{PHGServerCon}(object) } \arguments{ -\item{object}{an \code{rPHG} local or server connection object} +\item{object}{an \code{rPHG2} local or server connection object} \item{...}{Additional arguments, for use in specific methods} } diff --git a/man/readHapIdMetaData.Rd b/man/readHapIdMetaData.Rd index f69c3dd..4c4444e 100644 --- a/man/readHapIdMetaData.Rd +++ b/man/readHapIdMetaData.Rd @@ -14,7 +14,7 @@ readHapIdMetaData(object, ...) \S4method{readHapIdMetaData}{PHGDataSet}(object) } \arguments{ -\item{object}{an \code{rPHG} local or server connection object} +\item{object}{an \code{rPHG2} local or server connection object} \item{...}{Additional arguments, for use in specific methods} } diff --git a/man/readHapIdPosMetaData.Rd b/man/readHapIdPosMetaData.Rd index 476e6b0..7828ca9 100644 --- a/man/readHapIdPosMetaData.Rd +++ b/man/readHapIdPosMetaData.Rd @@ -14,7 +14,7 @@ readHapIdPosMetaData(object, ...) \S4method{readHapIdPosMetaData}{PHGDataSet}(object) } \arguments{ -\item{object}{an \code{rPHG} local or server connection object} +\item{object}{an \code{rPHG2} local or server connection object} \item{...}{Additional arguments, for use in specific methods} } diff --git a/man/readHapIds.Rd b/man/readHapIds.Rd index 11899cb..aefb77d 100644 --- a/man/readHapIds.Rd +++ b/man/readHapIds.Rd @@ -14,7 +14,7 @@ readHapIds(object, ...) \S4method{readHapIds}{PHGDataSet}(object) } \arguments{ -\item{object}{an \code{rPHG} local or server connection object} +\item{object}{an \code{rPHG2} local or server connection object} \item{...}{Additional arguments, for use in specific methods} diff --git a/man/readPhgDataSet.Rd b/man/readPhgDataSet.Rd index 724b473..1006323 100644 --- a/man/readPhgDataSet.Rd +++ b/man/readPhgDataSet.Rd @@ -10,7 +10,7 @@ readPhgDataSet(object, ...) \S4method{readPhgDataSet}{HaplotypeGraph}(object, nThreads = 2) } \arguments{ -\item{object}{an \code{rPHG} local or server connection object} +\item{object}{an \code{rPHG2} local or server connection object} \item{...}{Additional arguments, for use in specific methods} diff --git a/man/readRefRanges.Rd b/man/readRefRanges.Rd index c80dcb0..a1518bd 100644 --- a/man/readRefRanges.Rd +++ b/man/readRefRanges.Rd @@ -14,7 +14,7 @@ readRefRanges(object, ...) \S4method{readRefRanges}{PHGDataSet}(object) } \arguments{ -\item{object}{an \code{rPHG} local or server connection object} +\item{object}{an \code{rPHG2} local or server connection object} \item{...}{Additional arguments, for use in specific methods} } diff --git a/man/readSamples.Rd b/man/readSamples.Rd index 53dc099..166623f 100644 --- a/man/readSamples.Rd +++ b/man/readSamples.Rd @@ -17,7 +17,7 @@ readSamples(object, ...) \S4method{readSamples}{PHGDataSet}(object) } \arguments{ -\item{object}{an \code{rPHG} local or server connection object} +\item{object}{an \code{rPHG2} local or server connection object} \item{...}{Additional arguments, for use in specific methods} } diff --git a/man/serverInfo.Rd b/man/serverInfo.Rd index 697bb75..7883fcf 100644 --- a/man/serverInfo.Rd +++ b/man/serverInfo.Rd @@ -10,7 +10,7 @@ serverInfo(object, ...) \S4method{serverInfo}{PHGServerCon}(object) } \arguments{ -\item{object}{an \code{rPHG} local or server connection object} +\item{object}{an \code{rPHG2} local or server connection object} \item{...}{Additional arguments, for use in specific methods} } diff --git a/pkgdown/_pkgdown.yml b/pkgdown/_pkgdown.yml index 53eb2a4..748e6f5 100644 --- a/pkgdown/_pkgdown.yml +++ b/pkgdown/_pkgdown.yml @@ -1,7 +1,6 @@ url: https://rphg2.maizegenetics.net template: - theme: breeze-light bootstrap: 5 bslib: base_font: {google: "Barlow"} diff --git a/rphg2.Rproj b/rphg2.Rproj index 2ce7861..fa0d77b 100644 --- a/rphg2.Rproj +++ b/rphg2.Rproj @@ -19,4 +19,4 @@ LineEndingConversion: Posix BuildType: Package PackageUseDevtools: Yes PackageInstallArgs: --no-multiarch --with-keep.source -PackageRoxygenize: rd,collate,namespace,vignette +PackageRoxygenize: rd,collate,namespace diff --git a/tests/testthat/test_class_haplotype_graph.R b/tests/testthat/test_class_haplotype_graph.R index d8ca28c..e787d12 100644 --- a/tests/testthat/test_class_haplotype_graph.R +++ b/tests/testthat/test_class_haplotype_graph.R @@ -20,7 +20,6 @@ test_that("HaplotypeGraph class construction tests", { expect_error(buildHaplotypeGraph(locConBad)) - graph <- buildHaplotypeGraph(locCon) locConOutput <- utils::capture.output(graph) diff --git a/tests/testthat/test_class_phg_metrics.R b/tests/testthat/test_class_phg_metrics.R new file mode 100644 index 0000000..d66221e --- /dev/null +++ b/tests/testthat/test_class_phg_metrics.R @@ -0,0 +1,311 @@ +test_that("PHGMetrics class construction tests", { + metricDir <- system.file("extdata", package = "rPHG2") + algnPath <- system.file("extdata", "toy_anchors_s01.anchorspro", package = "rPHG2") + gvcfPath <- system.file("extdata", "toy_gvcf_metrics.tsv", package = "rPHG2") + hvcfPath <- system.file("extdata", "LineA.h.vcf", package = "rPHG2") + algnDf <- read.table(algnPath, header = TRUE, sep = "\t") + + met <- PHGMetrics(c(algnPath, gvcfPath)) + + expect_error(PHGMetrics(mtcars), regexp = "No valid file paths or directories") + expect_error(PHGMetrics(c("error1", "error2")), regexp = "No valid paths given") + expect_error(PHGMetrics(hvcfPath), regexp = "No valid gVCF or AnchorWave") + expect_true(is(met, "PHGMetrics")) + expect_true(is(PHGMetrics(metricDir), "PHGMetrics")) + expect_true(is(PHGMetrics(algnPath), "PHGMetrics")) + expect_true(is(PHGMetrics(gvcfPath), "PHGMetrics")) +}) + + +test_that("PHGMetrics console display tests", { + metricDir <- system.file("extdata", package = "rPHG2") + algnPath <- system.file("extdata", "toy_anchors_s01.anchorspro", package = "rPHG2") + gvcfPath <- system.file("extdata", "toy_gvcf_metrics.tsv", package = "rPHG2") + hvcfPath <- system.file("extdata", "LineA.h.vcf", package = "rPHG2") + algnDf <- read.table(algnPath, header = TRUE, sep = "\t") + + metOut01 <- utils::capture.output(PHGMetrics(algnPath)) + metOut02 <- utils::capture.output(PHGMetrics(gvcfPath)) + metOut03 <- utils::capture.output(PHGMetrics(c(algnPath, gvcfPath))) + + expect_equal(length(metOut01), 4) + expect_equal(length(metOut02), 4) + expect_equal(length(metOut03), 7) +}) + + +test_that("PHGMetrics override tests", { + metricDir <- system.file("extdata", package = "rPHG2") + algnPath <- system.file("extdata", "toy_anchors_s01.anchorspro", package = "rPHG2") + gvcfPath <- system.file("extdata", "toy_gvcf_metrics.tsv", package = "rPHG2") + + met <- PHGMetrics(c(algnPath, gvcfPath)) + + expect_equal(met$toy_gvcf_metrics, "toy_gvcf_metrics") + expect_equal(met$toy_anchors_s01, "toy_anchors_s01") + expect_equal(.DollarNames(met, "toy_anchors_s01"), "toy_anchors_s01") + expect_equal(length(.DollarNames(met, "not_in_object")), 0) +}) + + +test_that("PHGMetrics general metric ID return and update tests", { + metricDir <- system.file("extdata", package = "rPHG2") + algnPath <- system.file("extdata", "toy_anchors_s01.anchorspro", package = "rPHG2") + gvcfPath <- system.file("extdata", "toy_gvcf_metrics.tsv", package = "rPHG2") + hvcfPath <- system.file("extdata", "LineA.h.vcf", package = "rPHG2") + algnDf <- read.table(algnPath, header = TRUE, sep = "\t") + + metBase <- PHGMetrics(c(algnPath, gvcfPath)) + + # metricsIds() + expect_true(is(metricsIds(metBase), "character")) + expect_equal(metricsIds(metBase), c("toy_anchors_s01", "toy_gvcf_metrics")) + expect_equal(metricsIds(metBase, type = "align"), "toy_anchors_s01") + expect_equal(metricsIds(metBase, type = "gvcf"), "toy_gvcf_metrics") + expect_error(metricsIds(metBase, "invalid"), regexp = "must be one of") + + # metricsIds<- + metTest <- metBase + metricsIds(metTest) <- c(metTest$toy_anchors_s01 %T% "new_anchor_id") + expect_equal(metricsIds(metTest, type = "align"), "new_anchor_id") + expect_error(metricsIds(metTest) <- "invalid", regexp = "is not a named") + expect_error(metricsIds(metTest) <- mtcars, regexp = "Elements in vector") + expect_error( + object = metricsIds(metTest) <- c( + metTest$new_anchorr %T% "newer_anchor_id" + ), + regexp = "Failed evaluation of" + ) + expect_error( + object = metricsIds(metTest) <- c( + metTest$new_anchor_id %T% "new_id_1", + metTest$new_anchor_id %T% "new_id_2" + ), + regexp = "Duplicated object IDs found" + ) + expect_error( + object = metricsIds(metTest) <- c( + metTest$new_anchor_id %T% "new_id_1", + metTest$toy_gvcf_metrics %T% "new_id_1" + ), + regexp = "Duplicated new IDs found" + ) + metTest <- metBase + expect_error( + object = metricsIds(metTest) <- c("new_anchorrr" = "newer_id"), + regexp = "No provided IDs found in object" + ) + expect_error( + object = metricsIds(metTest) <- c("toy_anchors_s01" = "toy_anchors_s01"), + regexp = "No IDs changed" + ) + metTest <- metBase + metricsIds(metTest) <- c( + metTest$toy_anchors_s01 %T% "toy_anchors_s01", + metTest$toy_gvcf_metrics %T% "new_gvcf_id" + ) + expect_equal( + object = metricsIds(metTest), + expected = c("toy_anchors_s01", "new_gvcf_id") + ) + metTest <- metBase + metricsIds(metTest) <- c( + "id_not_in_object" %T% "new_anchor_id", + metTest$toy_gvcf_metrics %T% "new_gvcf_id" + ) + expect_equal( + object = metricsIds(metTest), + expected = c("toy_anchors_s01", "new_gvcf_id") + ) +}) + + +test_that("PHGMetrics general metric table return and update tests", { + metricDir <- system.file("extdata", package = "rPHG2") + algnPath <- system.file("extdata", "toy_anchors_s01.anchorspro", package = "rPHG2") + gvcfPath <- system.file("extdata", "toy_gvcf_metrics.tsv", package = "rPHG2") + hvcfPath <- system.file("extdata", "LineA.h.vcf", package = "rPHG2") + algnDf <- read.table(algnPath, header = TRUE, sep = "\t") + gvcfDf <- read.table(gvcfPath, header = TRUE, sep = "\t") + + metBase <- PHGMetrics(c(algnPath, gvcfPath)) + + # metricsTable() + metTest <- metBase + metTables <- metricsTable(metTest) + expect_true(is(metTables, "list")) + expect_equal(length(metTables), 2) + lapply(metTables, function(x) { + expect_true(is(x, "tbl_df")) + expect_true(is(x, "data.frame")) + }) + expect_error( + object = metricsTable(metTest, name = "non_existant"), + regexp = "Provided \'name\' not found in object" + ) + expect_true( + is( + metricsTable(metTest, metTest$toy_anchors_s01, type = "gvcf"), + "tbl_df" + ) + ) + resGvcf <- metricsTable(metTest, type = "gvcf") + resAlgn <- metricsTable(metTest, type = "align") + expect_true(is(resGvcf, "tbl_df")) + expect_true(is(resAlgn, "tbl_df")) + expect_equal(ncol(resGvcf), 19) + expect_equal(ncol(resAlgn), 10) + expect_equal(colnames(resAlgn), camelToSnake(PHG_METRICS$VALID_ANCHOR_HEADERS)) + expect_equal(colnames(resGvcf), camelToSnake(PHG_METRICS$VALID_GVCF_HEADERS)) + expect_error(metricsTable(metTest, type = "invalid")) + + # metricsTable<- + metTest <- metBase + expect_error( + object = metricsTable(metTest) <- "invalid", + regexp = "Provided \'value\' not of type \'list\'" + ) + expect_error( + object = metricsTable(metTest) <- mtcars, + regexp = "Provided \'value\' must be in a named \'list\'" + ) + expect_error( + object = metricsTable(metTest) <- list(mtcars), + regexp = "Provided \'list\' object does not have names" + ) + expect_error( + object = metricsTable(metTest) <- list("invalid" = mtcars, "invalid" = iris), + regexp = "Provided \'list\' object has duplicated IDs" + ) + expect_error( + object = metricsTable(metTest) <- list("invalid" = mtcars), + regexp = "No valid metrics tables could be identified" + ) + + metTest <- metBase + metricsTable(metTest) <- list( + "valid_gvcf_from_path" = gvcfPath, + "valid_gvcf_from_df" = gvcfDf + ) + expect_true(is(metricsTable(metTest), "list")) + expect_equal( + object = metricsIds(metTest), + expected = c( + "toy_anchors_s01", + "toy_gvcf_metrics", + "valid_gvcf_from_path", + "valid_gvcf_from_df" + ) + ) + + metTest <- metBase + metricsTable(metTest) <- list( + "valid_algn_from_path" = algnPath, + "valid_algn_from_df" = algnDf + ) + expect_true(is(metricsTable(metTest), "list")) + expect_equal( + object = metricsIds(metTest), + expected = c( + "toy_anchors_s01", + "valid_algn_from_path", + "valid_algn_from_df", + "toy_gvcf_metrics" + ) + ) + + metTest <- metBase + metricsTable(metTest) <- list( + "valid_gvcf_from_path" = gvcfPath, + "valid_gvcf_from_df" = gvcfDf, + "valid_algn_from_path" = algnPath, + "valid_algn_from_df" = algnDf + ) + expect_true(is(metricsTable(metTest), "list")) + expect_equal( + object = metricsIds(metTest), + expected = c( + "toy_anchors_s01", + "valid_algn_from_path", + "valid_algn_from_df", + "toy_gvcf_metrics", + "valid_gvcf_from_path", + "valid_gvcf_from_df" + ) + ) + + metTest <- metBase + metricsTable(metTest) <- list( + "valid_gvcf_from_path" = gvcfPath, + "valid_gvcf_from_df" = gvcfDf, + "invalid_gvcf_from_path" = "invalid_path", + "invalid_gvcf_from_path2" = hvcfPath, + "invalid_gvcf_from_df" = mtcars, + "valid_algn_from_path" = algnPath, + "valid_algn_from_df" = algnDf, + "invalid_algn_from_path" = "invalid_path", + "invalid_algn_from_path2" = hvcfPath, + "invalid_algn_from_df" = mtcars + ) + expect_true(is(metricsTable(metTest), "list")) + expect_true(is(metricsTable(metTest, type = "gvcf"), "list")) + expect_true(is(metricsTable(metTest, type = "align"), "list")) + expect_equal( + object = metricsIds(metTest), + expected = c( + "toy_anchors_s01", + "valid_algn_from_path", + "valid_algn_from_df", + "toy_gvcf_metrics", + "valid_gvcf_from_path", + "valid_gvcf_from_df" + ) + ) + metOut01 <- utils::capture.output(metTest) + expect_equal(length(metOut01), 9) + + metTest <- metBase + metricsTable(metTest) <- list( + "toy_anchors_s01" = algnDf, + "valid_algn_from_path" = algnPath + ) + expect_equal( + object = metricsIds(metTest), + expected = c( + "toy_anchors_s01", + "valid_algn_from_path", + "toy_gvcf_metrics" + ) + ) + +}) + + +test_that("PHGMetrics general dot plot tests", { + metricDir <- system.file("extdata", package = "rPHG2") + + metBase <- PHGMetrics(metricDir) + + expect_true(is(plotDot(metBase, metBase$toy_anchors_s01), "ggplot")) + expect_true(is(plotDot(metBase, metBase$toy_anchors_s01, colorId = "score"), "ggplot")) + expect_true(is(plotDot(metBase, metBase$toy_anchors_s01, refSeqId = c("1", "2")), "ggplot")) + expect_true(is(plotDot(metBase, metBase$toy_anchors_s01, querySeqId = c("1", "2")), "ggplot")) + expect_error(plotDot(metBase, metBase$toy_anchors_s01, colordId = "not_a_column")) + expect_error(plotDot(metBase, metBase$toy_anchors_s01, refSeqId = "1", querySeqId = "2")) + expect_error(plotDot(metBase, metBase$toy_gvcf_metrics)) + expect_error(plotDot(metBase, metBase$invalid_selection), regexp = "ID is not a valid AnchorWave") + expect_error( + plotDot( + object = metBase, + metricId = c( + metBase$toy_anchors_s01, + metBase$toy_anchors_s01 + ), + refSeqId = "1", + querySeqId = "2" + ) + ) + +}) + + diff --git a/tests/testthat/test_utils_api_brapi.R b/tests/testthat/test_utils_api_brapi.R index cd2f792..a24385f 100644 --- a/tests/testthat/test_utils_api_brapi.R +++ b/tests/testthat/test_utils_api_brapi.R @@ -22,11 +22,11 @@ test_that("BrAPI utitlity tests", { ) ) - # httResp - expect_true(is(httpResp(file.path(posControl4, 200)), "list")) - for (i in seq(200, 500, 100)) { - expect_equal(httpResp(file.path(posControl4, i))$status, i) - } + # # httResp + # expect_true(is(httpResp(file.path(posControl4, 200)), "list")) + # for (i in seq(200, 500, 100)) { + # expect_equal(httpResp(file.path(posControl4, i))$status, i) + # } # jsonToTibble expect_true( diff --git a/tests/testthat/test_utils_metrics.R b/tests/testthat/test_utils_metrics.R new file mode 100644 index 0000000..6593ec9 --- /dev/null +++ b/tests/testthat/test_utils_metrics.R @@ -0,0 +1,12 @@ +test_that("General metrics utility tests", { + # validateHeaders() + x <- "some\tline\tto\ttest" + expect_true( + rPHG2:::validateHeaders(x, c("some", "line", "to", "test")) + ) + expect_false( + rPHG2:::validateHeaders(NULL, c("some", "line", "to", "test")) + ) +}) + + diff --git a/vignettes/metrics.Rmd b/vignettes/metrics.Rmd new file mode 100644 index 0000000..2bd4f85 --- /dev/null +++ b/vignettes/metrics.Rmd @@ -0,0 +1,226 @@ +--- +title: "Load and visualize PHG metrics" +output: rmarkdown::html_vignette +description: > + Learn how to load and visulaize PHG metrics +vignette: > + %\VignetteIndexEntry{Load and visualize PHG metrics} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +editor_options: + markdown: + wrap: 70 +--- + +```{r setup, include=FALSE} +knitr::opts_chunk$set( + fig.align = "center", + external = TRUE, + echo = TRUE, + warning = FALSE +) + +library(rPHG2) +``` + +## Creating `PHGMetrics` objects +In addition to loading and inspecting hVCF data, `rPHG2` provides classes for +quick loading and granular visualization of "PHG metrics" data. Currently, +there are two primary types of PHG metrics: + +* Alignment files from AnchorWave + + used for collinearity plotting of samples against the reference genome +* gVCF data metrics + + general statistics of gVCFs generated for each sample $\times$ chromosome + pair + +To provide "easy to use" downstream plotting methods, we will need to construct +a new `rPHG2` `PHGMetrics` object by providing either file paths, directory +paths, or a combination of the two as a `character` vector. In the following +example, I will provide a path to a directory containing both alignment and +gVCF data that is found within the library: + +```{r, eval=TRUE, echo=TRUE} +metricDir <- system.file("extdata", package = "rPHG2") + +metricDir +``` + +From this variable, we can simply pass this to the `PHGMetrics` constructor, +`PHGMetrics()`: + +```{r, eval=TRUE, echo=TRUE} +metData <- PHGMetrics(metricDir) + +metData +``` + +## Accessing metrics data tables + +### General use +From the previously created `metData` object, we can directly access various +types of data through a series of accessor methods. + +If we want to extract all metrics tables as `data.frame`-like objects, we can +use the `metricsTable()` function, which will return a `list` object of +`data.frame` tables: + +```{r, eval=TRUE, echo=TRUE} +metData |> metricsTable() +``` + +### Individual table selection +If we want to extract just one table, we can provide the **name** of the table +into the `metricsTable()` function by specifying a valid name with the `name` +parameter. By default, the `PHGMetrics()` constructor will specify the names +of each table by extracting the base name of each file passed to the +constructor. For example, if we have the following file path: + +`/path/to/my/alignment_file.anchorspro` + +...the default name for this table will be `alignment_file`. Depending on the +complexity of the file ID, `rPHG2` provides a `$` operator override which +allows users to cycle through valid metrics table names: + +```{r, eval=TRUE, echo=TRUE} +metData |> metricsTable(name = metData$toy_anchors_s01) +``` + +### Table selection by metric type +We can also extract tables by type using the `type` parameter in the +`metricsTable()` function. Currently, the two metric types that PHGv2 provides +are as follows: + +* `align` - For AnchorWave alignment files +* `gvcf` - For gVCF metrics files + +```{r, eval=TRUE, echo=TRUE} +metData |> metricsTable(type = "gvcf") +``` + + +## Other accessor functions +In addition to extracting tables, we can also access other types of data +found in `PHGMetrics` objects. + +### Identifiers +If we want to return all IDs of every table we can use the `metricsIds()` +function: + +```{r, eval=TRUE, echo=TRUE} +metData |> metricsIds() +``` + +Similar to the previous section, we can also return IDs by metric type using +the `type` parameter: + +```{r, eval=TRUE, echo=TRUE} +metData |> metricsIds(type = "align") +``` + +### Metadata +We can also extract metadata which will provide a simple `data.frame` table +containing three columns: + +* `file` - file ID of loaded data +* `type` - metrics data type +* `id` - the "name" of the metrics table + + +```{r, eval=TRUE, echo=TRUE} +metData |> metricsMetaData() +``` + + +## Updating `PHGMetrics` objects +To update existing `PHGMetrics` we can use `f()<-` complements to the +accessor methods from the prior sections. Currently, we can update or add the +following information: + +* metrics table names/IDs (_update_) +* metrics tables (_add_) + + +### Update IDs +To update pre-existing names of tables in the object, we can use the +`metricsIds()` function in conjunction with the assignment (`<-`) operator +by passing a named `character` vector, where the name of the vector is the +name of the old table ID and the element is the new name: + +```{r, echo=TRUE, eval=FALSE} +nameMap <- c( + "old_id1" = "new_id1", + "old_id2" = "new_id2" +) +``` + +If we do not wish to remember all old IDs of our tables, we can use the prior +`$` operator in conjunction with `rPHG2`'s defined "to" operator, `%T%` in +a vector: + +```{r, echo=TRUE, eval=TRUE} +nameMap <- c( + metData$toy_gvcf_metrics %T% "new_gvcf_id", + metData$toy_anchors_s01 %T% "new_anchor_id" +) +``` + +The prior code will internally evaluate to named `character` vector: + +```{r, echo=TRUE, eval=TRUE} +nameMap +``` + +This can be passed to the `metricsIds()` function: + +```{r, echo=TRUE, eval=TRUE} +metricsIds(metData) <- nameMap + +metData |> metricsIds() +``` + +### Update tables +We can also add new tables to our existing `PHGMetrics` objects using the +`metricsTable()` function by passing a named `list` object containing a +combination of the valid types: + +* file paths +* directory paths +* in-memory R `data.frame` objects containing valid PHGv2 metric structures + +For this example, I will add another table via a `data.frame` using some +internal toy data found in the `rPHG2` package: + +```{r, eval=TRUE, echo=TRUE} +algnPath <- system.file("extdata/toy_anchors_s01.anchorspro", package = "rPHG2") +algnDf <- read.table(algnPath, header = TRUE, sep = "\t") + +head(algnDf) +``` + +```{r, eval=TRUE, echo=TRUE} +metricsTable(metData) <- list("new_algn_table" = algnDf) + +metData |> metricsMetaData() +``` + + + +## Visualize metrics data +If you are satisfied with how the metrics data is loaded into R, we can +directly visualize granular diagnostic plots using the `plot*` family of +functions. + +For example, if I want to generate dot plots from alignment data, I can simply +pass the `PHGMetrics` object to the function, `plotDot()`. Currently this +can only plot one table at a time, so we must specify the alignment table +that we want to visualize: + +```{r, eval=TRUE, echo=TRUE} +metData |> plotDot(metData$new_anchor_id) +``` + +**Note**: This plot can only work on alignment (`type = "align"`) data and will +throw an error if any gVCF-based metrics Ids are used. + +