Skip to content

Commit

Permalink
Merge branch 'release/1.41.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
HenrikBengtsson committed Jul 24, 2024
2 parents a604966 + a0d099e commit a1ef202
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 14 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: QDNAseq
Version: 1.41.2
Version: 1.41.3
Title: Quantitative DNA Sequencing for Chromosomal Aberrations
Depends: R (>= 3.1.0)
Imports:
Expand Down
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# Version 1.41.3 [2024-07-24]

## Miscellaneous

* `exportBins(..., format = "vcf")` did not add meta-data information
for field `END` to the VCF file header.


# Version 1.41.2 [2024-07-23]

## Bug Fixes
Expand Down
1 change: 1 addition & 0 deletions R/exportBins.R
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ exportVCF <- function(obj, fnames) {
'##ALT=<ID=DUP,Description="Duplication">',
'##FILTER=<ID=LOWQ,Description="Filtered due to call in low quality region">',
'##INFO=<ID=SVTYPE,Number=1,Type=String,Description="Type of variant: DEL,DUP,INS">',
'##INFO=<ID=END,Number=1,Type=Integer,Description="End position of variant">',
'##INFO=<ID=SVLEN,Number=1,Type=Integer,Description="Length of variant">',
'##INFO=<ID=BINS,Number=1,Type=Integer,Description="Number of bins in call">',
'##INFO=<ID=SCORE,Number=1,Type=Integer,Description="Score of calling algorithm">',
Expand Down
35 changes: 22 additions & 13 deletions tests/QDNAseq.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,55 @@ library(QDNAseq)
library(Biobase) ## combine(), sampleNames()
library(utils)

do_plot <- TRUE
do_cleanup <- TRUE

# Load data
data(LGG150)
data <- LGG150
print(data)
stopifnot(inherits(data, "QDNAseqReadCounts"))

# Plot isobars of read counts
isobarPlot(data)
if (do_plot) isobarPlot(data)

# Plot copy number profile
plot(data, ylim=c(-100, 200))
highlightFilters(data, residual=TRUE, blacklist=TRUE)
if (do_plot) {
plot(data, ylim=c(-100, 200))
highlightFilters(data, residual=TRUE, blacklist=TRUE)
}

# Filter out "bad" bins
dataF <- applyFilters(data, residual=TRUE, blacklist=TRUE)
print(dataF)
plot(dataF, ylim=c(-100, 200))
if (do_plot) plot(dataF, ylim=c(-100, 200))
stopifnot(inherits(dataF, "QDNAseqReadCounts"))

# Correct read counts as a function of GC content and mappability
dataC <- correctBins(dataF)
print(dataC)
plot(dataC, ylim=c(-100, 200))
if (do_plot) plot(dataC, ylim=c(-100, 200))
stopifnot(inherits(dataC, "QDNAseqCopyNumbers"))

# Normalize binned read counts to have diploid normal copy number
dataN <- normalizeBins(dataC)
print(dataN)
plot(dataN)
if (do_plot) plot(dataN)
stopifnot(inherits(dataN, "QDNAseqCopyNumbers"))

# Plot noise
noisePlot(dataF)
if (do_plot) noisePlot(dataF)

# Segment copy numbers
fit <- segmentBins(dataN)
print(fit)
plot(fit)
if (do_plot) plot(fit)
stopifnot(inherits(fit, "QDNAseqCopyNumbers"))

# Call copy-number segments
fitC <- callBins(fit)
print(fitC)
plot(fitC)
if (do_plot) plot(fitC)


# ---------------------------------------------------------------
Expand Down Expand Up @@ -75,8 +80,10 @@ for (name in names(sets)) {
message(sprintf(" File(s) written: [n=%d] %s",
length(file), paste(sQuote(file), collapse = ", ")))
stopifnot(all(file_test("-f", file)))
file.remove(file)
stopifnot(!any(file_test("-f", file)))
if (do_cleanup) {f
file.remove(file)
stopifnot(!any(file_test("-f", file)))
}
}
}
}
Expand Down Expand Up @@ -115,8 +122,10 @@ for (name in names(sets)) {
message(sprintf(" File(s) written: [n=%d] %s",
length(file), paste(sQuote(file), collapse = ", ")))
stopifnot(all(file_test("-f", file)))
file.remove(file)
stopifnot(!any(file_test("-f", file)))
if (do_cleanup) {
file.remove(file)
stopifnot(!any(file_test("-f", file)))
}
}
}
}
Expand Down

0 comments on commit a1ef202

Please sign in to comment.