Skip to content

Commit 9f06aec

Browse files
committed
merging updates
1 parent 07b90b6 commit 9f06aec

File tree

8 files changed

+26
-34
lines changed

8 files changed

+26
-34
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
Package: copyCat
22
Title: Find regions of genomic copy number loss and gain from short reads
3-
Version: 1.6.10
3+
Version: 1.6.11
44
Author: Chris Miller
55
Description: Uses the depth of short reads in windows across the genome to
66
identify regions of genomic copy-number gain and loss
77
Maintainer: Chris Miller <[email protected]>
88
LazyLoad: yes
99
License: Apache License 2.0 | file LICENSE
1010
Depends: methods, foreach, doMC, IRanges, DNAcopy, stringr
11-
Packaged: 2016-09-30 09:34:14 AM; cmiller
11+
Packaged: 2016-11-30 12:45:10 PM; cmiller

R/cnSegments.R

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ trimSegmentEnds <- function(segs,rdo){
237237
##-----------------------------------------------
238238
## remove segments that overlap at least n% with a reference assembly gap
239239
##
240-
removeGapSpanningSegments <- function(segs,rdo,maxOverlap=0.75,gapExpansion=1){
240+
removeGapSpanningSegments <- function(segs,rdo,maxOverlap=0.75){
241241
count = length(segs[,1]);
242242

243243
if(!(file.exists(paste(rdo@params$annotationDirectory,"/gaps.bed",sep="")))){
@@ -246,19 +246,8 @@ removeGapSpanningSegments <- function(segs,rdo,maxOverlap=0.75,gapExpansion=1){
246246
return(segs)
247247
}
248248

249-
gaps = read.table(paste(rdo@params$annotationDirectory,"/gaps.bed",sep=""),stringsAsFactors=F)
250-
251-
#expand the gaps to catch adjacent reads - especially useful for filtering near centromeres in single-sample mode
252-
for(i in 1:length(gaps[,1])){
253-
span = gaps[i,3]-gaps[i,2]
254-
pad = ((span*gapExpansion)-span)/2
255-
gaps[i,2]=gaps[i,2]-pad
256-
gaps[i,3]=gaps[i,3]+pad
257-
if(gaps[i,2]<1){
258-
gaps[i,2]=1
259-
}
260-
}
261-
249+
gaps = read.table(paste(rdo@params$annotationDirectory,"/gaps.bed",sep=""))
250+
262251
#intersect each chromosome separately
263252
newsegs = foreach(chr=names(rdo@chrs), .combine="rbind") %do%{
264253

@@ -321,6 +310,8 @@ removeCoverageArtifacts <- function(segs,rdo){
321310

322311
##get a dataframe with all the counts
323312
df = makeDf(rdo@chrs,rdo@binParams)
313+
df$chr=as.character(df$chr)
314+
324315
for(i in 1:length(segs[,1])){
325316
med = getMedianDepth(df, segs[i,1], segs[i,2], segs[i,3])
326317
if((med < rdo@binParams$med/5) ||

R/getReadDepth.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ getWindowBins <- function(rdo){
3030
}
3131

3232
##remove any columns with no data - all zeros
33-
for(i in names(winds)){
34-
if(sum(as.numeric(winds[[i]]))==0){
35-
winds[[i]] <- NULL
36-
}
37-
}
33+
## for(i in names(winds)){
34+
## if(sum(as.numeric(winds[[i]]))==0){
35+
## winds[[i]] <- NULL
36+
## }
37+
## }
3838

3939
##sanity check
4040
if(length(winds) < 3){

R/meta.R

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,12 @@ runPairedSampleAnalysis <- function(annotationDirectory, outputDirectory, normal
151151
writeSegs(segs,rdo,"segs.paired.dat")
152152
writeSegs(alts,rdo,"alts.paired.dat")
153153

154+
#save image
155+
if(!is.null(rDataFile)){
156+
save.image(paste(outputDirectory,rDataFile,sep="/"))
157+
}
154158

159+
155160
if(outputSingleSample){
156161
##segment the non-paired data using CBS
157162
segs = cnSegments(rdo2)
@@ -185,9 +190,5 @@ runPairedSampleAnalysis <- function(annotationDirectory, outputDirectory, normal
185190

186191
dumpParams(rdo)
187192
dumpParams(rdo2)
188-
189-
if(!is.null(rDataFile)){
190-
save.image(paste(outputDirectory,rDataFile,sep=""))
191-
}
192193

193194
}

R/zzz.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@
1919
sillyname(methods)
2020

2121
initRdClass()
22-
packageStartupMessage("Using copyCat version 1.6.10")
22+
packageStartupMessage("Using copyCat version 1.6.11")
2323
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
The copyCat package for R can detect somatic copy number aberrations by measuring the depth of coverage obtained by massively parallel sequencing of the genome. It achieves higher accuracy than many other packages, and runs faster by utilizing multi-core architectures to parallelize the processing of these large data sets.
1+
The copyCat package for R can detect somatic copy number aberrations by measuring the depth of coverage obtained by massively parallel sequencing of the genome. It achiev0;95;ces higher accuracy than many other packages, and runs faster by utilizing multi-core architectures to parallelize the processing of these large data sets.
22

33
copyCat takes in paired samples (tumor and normal) and can utilize mutation frequency information from samtools to help correct for purity and ploidy. This package also includes a method for effectively increasing the resolution obtained from low-coverage experiments by utilizing breakpoint information from paired end sequencing to do positional refinement. It's primary input comes from running bam-window (https://github.com/genome-vendor/bam-window) on the tumor and normal bam files.
44

debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
r-cran-copycat (1.6-11) lucid; urgency=low
2+
3+
* factor mismatch issue resolved
4+
5+
-- Chris Miller <[email protected]> Mon, 30 Nov 2016 09:37:00 -0500
6+
17
r-cran-copycat (1.6-9) lucid; urgency=low
28

39
* per-readlength=false handled correctly, pass verbose arg to samtools functions

man/removeGapSpanningSegments.Rd

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
false-positive calls.
1111
}
1212
\usage{
13-
removeGapSpanningSegments(segs,rdo,maxOverlap=0.75,gapExpansion=1)
13+
removeGapSpanningSegments(segs,rdo,maxOverlap=0.75)
1414
}
1515

1616
\arguments{
@@ -26,12 +26,6 @@
2626
\item{maxOverlap}{
2727
if a segment overlaps at least this much with a gap, it will be removed.
2828
}
29-
\item{gapExpansion}{
30-
fractional value that controls how far to expand gaps beyond the
31-
input gap locations. Example: a value of 1.2 would make the gap 20%
32-
larger. This is useful in single-sample analysis when
33-
centromere-adjacent regions tend to inappropriately pile up reads
34-
}
3529
}
3630
\value{
3731
returns a dataframe with 5 columns:

0 commit comments

Comments
 (0)