cancerit / BRASS

Breakpoints via assembly - Identifies breaks and attempts to assemble rearrangements in whole genome sequencing data.
GNU Affero General Public License v3.0
57 stars 20 forks source link

CN filtering locked to hg19 #52

Closed keiranmraine closed 7 years ago

keiranmraine commented 7 years ago

Changes required to correctly set this value when calling this package.

Additionally affects possibilities of moving to new builds, detecte when tested with grch38 and has been reported to corresponding author:

Question: Supporting grch38 and making the species agnostic pcf function in copynumber package

Would you please include grch38 and other genomes into copynumber package or make it species agnostic by supplying user defined chromosome bands.

Currently pcf function only supports following genome builds.

if (!assembly %in% c("hg19", "hg18", "hg17", "hg16", "mm7","mm8", "mm9")) {
  stop("assembly must be one of hg19, hg18, hg17 or hg16",call. = FALSE)
}
sb43 commented 7 years ago

In addition to this CN filtering only works with numeric chromosomes, issue has been reported to authors of the copynumber package. numericChrom function called in pcf.r ( copynumber package ) has human specific hardcoded values for X and Y which means it only worked for human since mouse X -> 20 and Y -> 21

numericChrom < - function (chrom) { if (!is.numeric(chrom)) { if (is.factor(chrom)) { chrom <- as.character(chrom) } chrx <- c(which(chrom == "x"), which(chrom == "X")) chrom[chrx] <- 23 chry <- c(which(chrom == "y"), which(chrom == "Y")) chrom[chry] <- 24 chrom <- as.numeric(chrom) } return(chrom) }

sb43 commented 7 years ago

This is now fixed in v5.4.1