@@ -16,7 +16,7 @@ augment_gc <- function(gc_df, df) {
1616 return (augment_df )
1717}
1818
19- calc_segments_short <- function (gc_df , segment_df , homoloss = 0.01 , chromrange = 1 : 24 ) {
19+ calc_segments_short <- function (gc_df , segment_df , homoloss = 1.0 , chromrange = 1 : 24 ) {
2020 assertthat :: assert_that(is.numeric(gc_df $ chrom ))
2121 assertthat :: assert_that(is.numeric(segment_df $ chrom ))
2222 assertthat :: assert_that(all(colnames(gc_df ) ==
@@ -51,11 +51,9 @@ calc_segments_short <- function(gc_df, segment_df, homoloss=0.01, chromrange=1:2
5151
5252 cells <- rownames(ploidies_df )
5353
54- if (homoloss > 0 ) {
55- good_index <- ploidies_df [," homoloss" ] < = homoloss
56- tshort <- tshort [tshort [," profid" ]%in% dimnames(ploidies_df )[[1 ]][good_index ],]
57- cells <- rownames(ploidies_df [good_index ,])
58- }
54+ good_index <- ploidies_df [," homoloss" ] < = homoloss
55+ tshort <- tshort [tshort [," profid" ]%in% dimnames(ploidies_df )[[1 ]][good_index ],]
56+ cells <- rownames(ploidies_df [good_index ,])
5957
6058 res <- list (tshort , ploidies_df , cells )
6159 names(res ) <- c(" short" , " ploidies" , " cells" )
@@ -276,7 +274,7 @@ calc_ploidies <- function(gc_df, segment_df, chromrange=1:24) {
276274# ' @return a list of pinmat and pins objects.
277275# ' pinmat is the incidence table; pins is the bin location
278276# ' @export
279- calc_pinmat <- function (gc_df , segment_df , homoloss = 0 .0 , dropareas = NULL ,
277+ calc_pinmat <- function (gc_df , segment_df , homoloss = 1 .0 , dropareas = NULL ,
280278 smear = 1 , chromrange = 1 : 24 , keepboundaries = F ) {
281279
282280 augment_df <- augment_gc(gc_df , segment_df )
0 commit comments