Skip to content

Commit c63d908

Browse files
Adding the copyright and author info
1 parent ef3d128 commit c63d908

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

scripts/cnvAnalysis.R

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
11
#!/usr/bin/env Rscript
22

3-
# cbs_smurf.r: xxxxxx
3+
# cnvAnalysis.R: Adapted from "SRR054616.cbs.r" supplemetary program
4+
# 12 of Baslan, Timour, et al. "Genome-wide copy number analysis of
5+
# single cells." Nature protocols 7.6 (2012): 1024.
46
#
5-
# Copyright (C) 2019 Rish Prabakar and Andrew D Smith
7+
# Functions RemoveSegment and SDUndoAll are adapted from the
8+
# modification to supplemetary program 12 by Jude Kendall.
9+
#
10+
# Copyright (C) 2019 Rish Prabakar, Wenzheng Li and Andrew D Smith
11+
#
12+
# Authors: Rish Prabakar, Wenzheng Li and Andrew D Smith
13+
# Includes code written by Jude Kendall
614
#
715
# This program is free software; you can redistribute it and/or modify
816
# it under the terms of the GNU General Public License as published by
917
# the Free Software Foundation; either version 2 of the License, or
1018
# (at your option) any later version.
1119
#
12-
# This program is distributed in the hope that it will be useful,
13-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15-
# GNU General Public License for more details.
20+
# This program is distributed in the hope that it will be useful, but
21+
# WITHOUT ANY WARRANTY; without even the implied warranty of
22+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23+
# General Public License for more details.
1624

1725
library("DNAcopy")
1826

@@ -219,17 +227,10 @@ PlotSegment <- function(cur.ratio, cur.ratio.good, sample.name) {
219227
xaxt="n", xlab="Genome Position Gb",
220228
yaxt="n", ylab="Ratio", col="#517FFF", cex=0.01)
221229

222-
# axis(1, at=x.at, labels=x.labels)
223230
axis(2, at=y.at, labels=y.labels)
224-
# lines(x=cur.ratio.good$abspos, y=cur.ratio.good$lowratio, col="#CCCCCC")
225-
# points(x=cur.ratio.good$abspos, y=cur.ratio.good$seg.mean.LOWESS,
226-
# col="#0000AA")
227231
lines(x=cur.ratio.good$abspos, y=cur.ratio.good$seg.mean.LOWESS,
228232
col="red", cex=1.0)
229-
## abline(h=hlines)
230-
## abline(v=vlines)
231233
abline(v=vlines, lwd=0.1, col="grey")
232-
## mtext(chr.text, at = chr.at)
233234
dev.off()
234235
}
235236

@@ -361,14 +362,14 @@ main <- function() {
361362
cur.ratio = cbs.seg$ratio
362363
cur.ratio.good = cbs.seg$ratio.bad
363364
segs = cbs.seg$segs
364-
# plot segment
365+
366+
## plot segment
365367
PlotSegment(cur.ratio, cur.ratio.good, sample.name)
366-
# save results
367-
write.table(cur.ratio.good, sep="\t",
368-
file=sprintf("%s.data.txt", sample.name),
368+
369+
## save results
370+
write.table(cur.ratio.good, sep="\t", file=sprintf("%s.data.txt", sample.name),
369371
quote=F, row.names=F)
370-
write.table(segs, sep="\t",
371-
file=sprintf("%s.short.txt", sample.name),
372+
write.table(segs, sep="\t", file=sprintf("%s.short.txt", sample.name),
372373
quote=F, row.names=F)
373374
}
374375

0 commit comments

Comments
 (0)