Skip to content

Commit

Permalink
Fix for chrBorders (function: split_genome) so it would work for both…
Browse files Browse the repository at this point in the history
… non-numeric (e.g. "X") and numeric (e.g. 23) chromosome names
tlesluyes committed Nov 17, 2021
1 parent a484b64 commit ae2425f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/clonal_ascat.R
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
split_genome = function(SNPpos) {
# look for gaps of more than 1Mb and chromosome borders
holesOver1Mb = which(diff(SNPpos[,2])>=1000000)+1
chrBorders = which(diff(as.numeric(SNPpos[,1]))!=0)+1
chrBorders = which(diff(as.numeric(factor(SNPpos[,1],levels=unique(SNPpos[,1]))))!=0)+1
holes = unique(sort(c(holesOver1Mb,chrBorders)))

# find which segments are too small

0 comments on commit ae2425f

Please sign in to comment.