diff --git a/.circleci/config.yml b/.circleci/config.yml index 94d74d6a3d..fb87b3fba1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,7 +10,7 @@ jobs: - run: name: Data Download - command: OPENPBTA_URL=https://open-pbta.s3.amazonaws.com/data OPENPBTA_RELEASE=testing ./scripts/run_in_ci.sh bash download-data.sh + command: OPENPBTA_URL=https://s3.amazonaws.com/kf-openaccess-us-east-1-prd-pbta/data OPENPBTA_RELEASE=testing ./scripts/run_in_ci.sh bash download-data.sh - run: name: List Data Directory Contents diff --git a/analyses/chromothripsis/02-run-shatterseek-and-classify-confidence.R b/analyses/chromothripsis/02-run-shatterseek-and-classify-confidence.R index 3a6a92fbbf..4a7c088482 100644 --- a/analyses/chromothripsis/02-run-shatterseek-and-classify-confidence.R +++ b/analyses/chromothripsis/02-run-shatterseek-and-classify-confidence.R @@ -96,15 +96,17 @@ mergeCNsegments <- function(cnv_df) { # does not match the previous row (starting at second row) cnv_df$index <- 0 index_counter <- 1 - for (row_iter in 2:nrow(cnv_df)) { - index_counter <- compare_adjacent_segs(cnv_df[row_iter, ], cnv_df[row_iter-1, ]) - cnv_df[row_iter, "index"] <- index_counter - } + if (nrow(cnv_df) >=2) { + for (row_iter in 2:nrow(cnv_df)) { + index_counter <- compare_adjacent_segs(cnv_df[row_iter, ], cnv_df[row_iter-1, ]) + cnv_df[row_iter, "index"] <- index_counter + } # Separately update index for first row (check whether first row matches second row) cnv_df[1, "index"] <- ifelse(compare_adjacent_segs(cnv_df[1,], cnv_df[2,]), 1, 0) # Set index to 1 if row 1 matches row 2 # Set index to 0 if row 1 doesn't match row 2 + } # Merge rows by selecting minimum loc.start and maximum loc.end for each index value # Reorder rows by chromosome and start position