Skip to content

Commit

Permalink
tutorials
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasrausch committed Jul 18, 2024
1 parent 3048789 commit ff19b6c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/rd.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ chrNamesShort = c("1","2","3","4","5","6","7","8","9","10","11","12","13","14","

# Params
minCN = 0
maxCN = 14
sdUNDO = 1.5

# Parse coverage table
Expand Down Expand Up @@ -42,6 +41,7 @@ if (length(args)>1) {
}

# Whole genome
maxCN = as.integer(max(x[,6])+1)
p = ggplot(data=x, aes(x=start, y=x[,6]))
p = p + geom_point(pch=21, color="black", fill="black", size=0.5)
p = p + xlab("Chromosome")
Expand All @@ -60,13 +60,15 @@ for(chrname in unique(x$chr)) {
print(chrname)
sub = x[x$chr == chrname,]
sl = seg[seg$chr == chrname,]
maxCN = as.integer(max(sub[,6])+1)
p = ggplot(data=sub, aes(x=start, y=sub[,6]))
p = p + geom_point(pch=21, color="black", fill="black", size=0.5)
p = p + ylab("Copy-number") + xlab(chrname)
p = p + scale_x_continuous(labels=comma, breaks = scales::pretty_breaks(n=20))
p = p + scale_y_continuous(labels=comma, breaks = c(minCN:maxCN), limits=c(minCN, maxCN))
if (nrow(sl)) { p = p + geom_segment(data=sl, aes(x=start, y=cn, xend=end, yend=cn), color="#31a354", size=1.2); }
p = p + theme(axis.text.x = element_text(angle=45, hjust=1))
p = p + ggtitle(args[1])
ggsave(p, file=paste0("plot.", chrname, ".png"), width=24, height=6)
print(warnings())
}
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ A small example is included for short-read, long-read and copy-number variant ca

`delly cnv -g example/ref.fa -m example/map.fa.gz -c out.cov.gz -o cnv.bcf example/sr.bam`

More in-depth tutorials for SV calling are available here:

* Short-read SV calling: [https://github.com/tobiasrausch/vc](https://github.com/tobiasrausch/vc)

* Long-read SV calling: [https://github.com/tobiasrausch/sv](https://github.com/tobiasrausch/sv)


Somatic SV calling
------------------
Expand Down

0 comments on commit ff19b6c

Please sign in to comment.