mcmero / SVclone

A computational method for inferring the cancer cell fraction of tumour structural variation from whole-genome sequencing data.
BSD 3-Clause "New" or "Revised" License
40 stars 10 forks source link

Error in if (trim > 0 && n) { : missing value where TRUE/FALSE needed #9

Closed alvinwt closed 4 years ago

alvinwt commented 4 years ago

Hi,

I have been testing SVClone and found that the RunCcubePipeline crashes at the at the following line:

debug: mydata <- dplyr::mutate(dplyr::rowwise(mydata), rough_ccf = mean(ccf1, ccf2))

it appears that the error is due to NAs in ccf1 or ccf2. I'm not not entirely sure how to avoid this or if there are certain filters on the input SVs to fix this error. The two lines that are causing SVClone to crash are included in the file attached.

error_lines.txt

mcmero commented 4 years ago

Thanks for reporting this issue.

The error lines in your input both have copy-number states of 0 for both major and minor alleles for end 2. These SVs should've been filtered out in the filtering stage, but weren't due to a big which I've fixed in the latest commit.

If you're confident that the CN state is at least 1 (which should be the case if there is an SV present), you can manually change the gtype2 field for those two SVs. I may add an automated way to "rescue" these SVs in the future, but SVclone's default behaviour will be to filter them out.