mskcc / tempo

CCS research pipeline to process WES and WGS TN pairs
12 stars 5 forks source link

ClusterSV and SVSignature need to handle empty input bedpe #977

Closed gongyixiao closed 1 year ago

gongyixiao commented 2 years ago

Filtered passed bedpe can be empty for ClusterSV and SVSignature input. And the original package doesn't handle this correctly, resulting the following error in a recent run.

For ClusterSV: tail /juno/work/tempo/wgs/Francisco_20220915/workspace/work/8c/2ea5cf88081ac9198f8d2914d1d206/.command.err

The following objects are masked from ‘package:base’:

    cat, commandArgs, getOption, inherits, isOpen, nullfile, parse,
    warnings

Warning message:
Input file is empty.

Error in filter_by_chrom(d, chrom = rownames(centromere_telomere_coords)) :
  object 'd' not found

https://github.com/cancerit/ClusterSV/blob/1d7eeea8f22133d811bed6a4cbbaf1ad2122e2c4/R/run_cluster_sv.R#L62-L68

For SVSignature:

## creating output directory if it does not exist ##
## read and pre-process input ##
Error in `$<-.data.frame`(`*tmp*`, sample, value = "OPR057B__OPR057N") :
  replacement has 1 row, data has 0
Calls: $<- -> $<-.data.frame
Execution halted

We might have to handle this in our own workflow, rather than having the developer of the tools to change their code, although clearly the original code should be corrected.