mskilab-org / JaBbA

MIP based joint inference of copy number and rearrangement state in cancer whole genome sequence data.
MIT License
56 stars 26 forks source link

Error in Aggregate.Formula #100

Open hraeder41 opened 8 months ago

hraeder41 commented 8 months ago

Hello,

When I attempt to run JaBbA after the gGraph has already been created:

`JaBbA 2024-03-04 14:59:47: Number of gaps with nonzero width: 5558 JaBbA 2024-03-04 14:59:47: Number of segments before gap filtering: 8337 JaBbA 2024-03-04 14:59:48: 2779 segments produced after gap filtering JaBbA 2024-03-04 14:59:48: creating karyograph JaBbA 2024-03-04 15:00:14: Definining coverage good quality nodes as >=50% bases covered by non-NA and non-Inf values in +/-100KB region JaBbA 2024-03-04 15:00:14: Hard setting 0 Mb of the genome to NA that didn't pass our quality threshold JaBbA 2024-03-04 15:00:14: Using loess to fit mean to variance relationship in segments with greater than 1 bins JaBbA 2024-03-04 15:00:14: Using ppgrid to estimate purity ploidy JaBbA 2024-03-04 15:00:14: setting up ppgrid matrices ..

..................................................................................................... ..................................................................................................... JaBbA 2024-03-04 15:00:16: Built gGraph with 5826 nodes, 412 edges, purity 0.78, and ploidy 1.23 Error in aggregate.formula(...) : 'formula' missing or incorrect Calls: suppressPackageStartupMessages ... vaggregate -> aggregate -> aggregate -> aggregate.formula`

Everything appears to run correctly before this, and there do not appear to be any issues when loading my junction or coverage files. Do you have any insight into what may be causing this error?

jrafailov commented 8 months ago

Hi Henry,

It's likely an R versioning issue as the base aggregate function changed in R 4.2+. Can you please try with R 4.1.3 or R 4.0.2?

hraeder41 commented 8 months ago

Thank you for the quick response! I was actually able to avoid this by providing a purity and ploidy estimate. If that seems incorrect, please let me know. Thank you again!

hraeder41 commented 8 months ago

Actually, as an update here, I have found that the key is that JaBbA always succeeds the second time I attempt to run it on a sample (i.e. I get the aggregate error the first time, and when I rerun it I do not). Do you have any ideas on why this may occur? Thank you!

jrafailov commented 8 months ago

Hi, it's likely you are using an outdated gTrack package when running JaBbA. You are getting the aggregate error the first time because the karyograph is generated in that run and your error likely occurs in plotting the karyograph gTrack. In the second run, since your karyograph was already generated, JaBbA is passing over that code.

Please see commit 4aa01d0 of gTrack, which addresses this error.