Skip to content

Commit

Permalink
Merge pull request #110 from PhanstielLab/RELEASE_3_18_patch3
Browse files Browse the repository at this point in the history
plotManhattan GRanges bug fix
  • Loading branch information
nekramer authored Mar 29, 2024
2 parents 7e49f26 + afb196b commit d97c3b3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: plotgardener
Title: Coordinate-Based Genomic Visualization Package for R
Version: 1.8.2
Date: 2023-12-07
Version: 1.8.3
Date: 2024-03-29
Authors@R: c(person("Nicole", "Kramer",
email = "[email protected]",
role = c("aut", "cre"),
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# VERSION 1.8.3
## BUG FIXES

* `plotManhattan` accommodates `GRanges` data input.

# VERSION 1.8.2
## BUG FIXES

Expand Down
5 changes: 2 additions & 3 deletions R/plotManhattan.R
Original file line number Diff line number Diff line change
Expand Up @@ -291,13 +291,12 @@ plotManhattan <- function(data, sigVal = 5e-08, chrom = NULL,
errorcheck_plotManhattan <- function(bedfile, chrom, chromstart,
chromend, object,
leadSNP, fill) {

## check bedfile columns
if (!"chrom" %in% colnames(bedfile)) {
stop("\'chrom\' column not found in data.", call. = FALSE)
} else {
if (!is(bedfile$chrom, "character")) {
stop("\'chrom\' column must be a character.", call. = FALSE)
if (!is(bedfile$chrom, "character") & !is(bedfile$chrom, "factor")) {
stop("\'chrom\' column must be a character or factor.", call. = FALSE)
}
}

Expand Down
6 changes: 6 additions & 0 deletions R/readingFunctions.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ read_rangeData <- function(data, assembly, chrom = NULL,
}


} else if (type == "GWAS") {

## Rename chrom and position columns
colnames(data)[seq(1, 2)] <- c("chrom", "pos")
## column data types will be checked in plotManhattan errorchecks

}

return(data)
Expand Down

0 comments on commit d97c3b3

Please sign in to comment.