Closed WiesVallentgoed closed 1 year ago
@WiesVallentgoed Thanks for your response. Have you loaded the sigminer
package?????
Based on the example data, the data.frame works as expected.
library(sigminer)
?get_Aneuploidy_score
load(system.file("extdata", "toy_copynumber.RData",
package = "sigminer", mustWork = TRUE
))
df2 <- get_Aneuploidy_score(cn@data)
df2
head(cn@data)
Please try and give more info.
Best.
@ShixiangWang Thank you for your quick response! Yes I have loaded the sigminer package.
library(sigminer)
load(system.file("extdata", "toy_copynumber.RData",
package = "sigminer", mustWork = TRUE))
df1<- sigminer::get_Aneuploidy_score(cn)
df2<- sigminer::get_Aneuploidy_score(cn@data)
Creating df1 works fine, with expected output, but creating df2 gives the aforementioned error.
head(cn@data)
chromosome start end segVal sample
1: chr1 3218923 116319008 2 TCGA-05-4417-01A-22D-1854-01
2: chr1 116324707 120523902 1 TCGA-05-4417-01A-22D-1854-01
3: chr1 149879545 247812431 4 TCGA-05-4417-01A-22D-1854-01
4: chr1 3218923 104393357 2 TCGA-06-0644-01A-02D-0310-01
5: chr1 104418619 149879545 1 TCGA-06-0644-01A-02D-0310-01
6: chr1 149885583 247812431 2 TCGA-06-0644-01A-02D-0310-01
head(df1)
sample AScore chr1-p chr1-q chr10-p chr10-q chr11-p chr11-q chr12-p
1: TCGA-05-4417-01A-22D-1854-01 20 -1 0 0 0 0 0 1
2: TCGA-06-0644-01A-02D-0310-01 7 0 0 -1 -1 0 0 0
3: TCGA-19-2621-01B-01D-0911-01 5 0 0 -1 -1 0 0 0
4: TCGA-26-6174-01A-21D-1842-01 7 0 0 0 0 0 0 0
5: TCGA-99-7458-01A-11D-2035-01 14 1 1 0 0 0 0 -1
6: TCGA-A5-A0G2-01A-11D-A042-01 11 1 0 0 0 0 0 1
Thanks
@WiesVallentgoed Hi, I cannot reproduce this. Could you post your version of sigminer or try the latest version?
@ShixiangWang The version of sigminer that I have loaded is 2.1.9 in R version 4.2.2.
However, since you cannot reproduce the issue, I started to think it might have something to do with the dependencies (I've experienced similar issues before). I just switched machines and installed sigminer there (R version 4.1.2), and it seems to work fine!
Sorry to have bothered you with an issue that is most likely on my end. Thanks for your quick responses anyway.
Best, Wies
Hi Wies, I am glad to hear it works :).
Hi!
I am running into some issues when trying to calculate the aneuploidy score for my data, and I can't seem to find a solution or anyone else with a similar problem on the internet, so I'm hoping you could help.
According to the R Documentation for the get_Aneuploidy_score() function, the input may be a CopyNumber object or a data.frame. However, when I try to use a df as input i get the following error message: _Error in get(paste(prefix, genomebuild, sep = "."), envir = tryCatch(as.environment("package:sigminer"), : object 'chromsize.hg19' not found
This error also occurs when I try to run your examples with your example data.frame (get_Aneuploidy_score(cn@data)) but not when I use CopyNumber as input (get_Aneuploidy_score(cn)).
I hope you can help me with this issue! Thanks!