VanLoo-lab / ascat

ASCAT R package
https://www.mdanderson.org/research/departments-labs-institutes/labs/van-loo-laboratory/resources.html#ASCAT
162 stars 85 forks source link

Error in !is.null(homsegs) && !is.na(homsegs) #163

Closed wir963 closed 9 months ago

wir963 commented 9 months ago

Hey,

I'm getting "Error in !is.null(homsegs) && !is.na(homsegs)" when I try to run ascat.aspcf using ascat v3.1.1 installed via conda. Reproducible example below.

library(ASCAT)

Germline_LogR_file = system.file("extdata", "normal.logR.txt", package="ASCAT")
Germline_BAF_file = system.file("extdata", "normal.BAF.txt", package="ASCAT")

Tumor_LogR_file = system.file("extdata", "tumour.logR.txt", package="ASCAT")
Tumor_BAF_file = system.file("extdata", "tumour.BAF.txt", package="ASCAT")

ascat.bc = ascat.loadData(Tumor_LogR_file = Tumor_LogR_file, Tumor_BAF_file = Tumor_BAF_file, Germline_LogR_file = Germline_LogR_file, Germline_BAF_file = Germline_BAF_file, gender = rep('XX',2), genomeVersion = "hg19")
# this throws an error
ascat.bc = ascat.aspcf(ascat.bc, penalty=25) # penalty=25 for targeted sequencing data
ascat.output = ascat.runAscat(ascat.bc) # gamma=1 for HTS data
save(ascat.bc,ascat.output,file='ASCAT_objects.Rdata')

However, this does not happen when I run ascat.asmultipcf as below.

library(ASCAT)

Germline_LogR_file = system.file("extdata", "singlenormal.logR.txt", package="ASCAT")
Germline_BAF_file = system.file("extdata", "singlenormal.BAF.txt", package="ASCAT")

Tumor_LogR_file = system.file("extdata", "tumour.logR.txt", package="ASCAT")
Tumor_BAF_file = system.file("extdata", "tumour.BAF.txt", package="ASCAT")

ascat.bc = ascat.loadData(Tumor_LogR_file = Tumor_LogR_file, Tumor_BAF_file = Tumor_BAF_file, Germline_LogR_file = Germline_LogR_file, Germline_BAF_file = Germline_BAF_file, gender = rep('XX',2), genomeVersion = "hg19")
ascat.bc = ascat.asmultipcf(ascat.bc, penalty=5) # penalty=25 for targeted sequencing data
ascat.output = ascat.runAscat(ascat.bc) # gamma=1 for HTS data
save(ascat.bc,ascat.output,file='ASCAT_objects.Rdata')

Any idea what's going on?

Best, Welles

zhangzhhcb commented 9 months ago

Hi, Which version of R were you using? Could you test the code using ASCAT v3.1.2 on R v 3.1.2? The old version ASCAT (v3.1.1) is not up to data, therefore, the new version of ASCAT is preferred. I tested you codes on ASCAT v3.1.2 and didn't have this issue. Thanks.

mital14 commented 8 months ago

I have ASCAT v3.1.2 and have the issue [1] Plotting tumor data [1] Sample S1 (1/100) Error in !is.null(homsegs) && !is.na(homsegs) : 'length = 6' in coercion to 'logical(1)' Calls: ascat.aspcf Execution halted