Skip to content

Commit

Permalink
Updated DESCRIPTION
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Kuilman committed Apr 24, 2015
1 parent 23777d6 commit 8a10db6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ Imports: matrixStats, gtools, data.table, S4Vectors, chipseq, IRanges, Rsamtools
Depends: R(>= 3.2), BiocParallel
Suggests: BiocStyle, SCLCBam, snow
URL: https://github.com/PeeperLab/CopywriteR
Description: CopywriteR extracts DNA copy number information from targeted sequencing by utiizing off-target sequence reads. It allows for extracting uniformly distributed copy number information, can be used without reference, and can be applied to sequencing data obtained from various techniques including chromatin immunoprecipitation and target enrichment on small gene panels. Thereby, CopywriteR constitutes a widely applicable alternative to available tools.
Description: CopywriteR extracts DNA copy number information from targeted sequencing by utiizing off-target reads. It allows for extracting uniformly distributed copy number information, can be used without reference, and can be applied to sequencing data obtained from various techniques including chromatin immunoprecipitation and target enrichment on small gene panels. Thereby, CopywriteR constitutes a widely applicable alternative to available copy number detection tools.
License: GPL-2
biocViews: TargetedResequencing, ExomeSeq, CopyNumberVariation, Preprocessing, Visualization, Coverage
13 changes: 8 additions & 5 deletions R/CopywriteR.R
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ CopywriteR <- function(sample.control, destination.folder, reference.folder,
tryCatch({
for (samp in sample.paths) {
header <- scanBamHeader(samp)
chr.sort.mode <- c(chr.sort.mode, header[[1]]$text$'@HD'[2])
chr.sort.mode <- c(chr.sort.mode, list(header[[1]]$text$'@HD'))
current.chr.names <- names(header[[1]]$targets)
chr.names <- c(chr.names, current.chr.names)
chr.lengths <- c(chr.lengths, header[[1]]$targets)
Expand All @@ -149,11 +149,14 @@ CopywriteR <- function(sample.control, destination.folder, reference.folder,
"the script..."))
})

if (!all(chr.sort.mode == "SO:coordinate")) {
chr.sort.mode <- unlist(lapply(chr.sort.mode, function(x) {
length(grep("SO:coordinate", x))
}))
if (any(chr.sort.mode == 0)) {
stop(.wrap("The following .bam files are unsorted:"), "\n",
paste(sample.paths[which(!chr.sort.mode == "SO:coordinate")], "\n",
"Please sort these .bam files based on coordinates",
collapse = "\n"))
paste(sample.paths[which(chr.sort.mode == 0)],
collapse = "\n"), "\n",
"Please sort these .bam files based on coordinates")
}
if (!all(prefixes == prefixes[1])) {
stop(.wrap("The bam files have different chromosome name prefixes.",
Expand Down

0 comments on commit 8a10db6

Please sign in to comment.