Open fw1121 opened 10 months ago
Hi, Thank you for bringing up a valid point. I'm also encountering a similar issue, and unfortunately, the dataSurv result is empty. Could you please provide detailed guidance on how/where can I do this replacement, step by step? Thank you in advance.
hi,
1. When I follow your tutorial Case study n. 1: Pan Cancer downstream analysis BRCA, error raised in:
dataSurv <- TCGAanalyze_SurvivalKM( clinical_patient = dataClin, dataGE = dataFilt, Genelist = rownames(dataDEGs), Survresult = FALSE, ThreshTop = 0.67, ThreshDown = 0.33, p.cut = 0.05, group1 = group1, group2 = group2 )
no applicable method for 'filter' applied to an object of class "c('matrix', 'array', 'double', 'numeric')"
2. I change parameter
dataGE=dataFilt
todataGE = as.data.frame(dataFilt)
, it said failed to filter with same columns.On closer inspection, I find duplicated sample in download BRCA expression data. After deduplicated, all thing go OK with this
dataSurv <- TCGAanalyze_SurvivalKM( clinical_patient = dataClin, dataGE = as.data.frame(dataFilt), Genelist = rownames(dataDEGs), Survresult = FALSE, ThreshTop = 0.67, ThreshDown = 0.33, p.cut = 0.05, group1 = group1, group2 = group2 )
However, dataSurv result is empty.
3. Carefully read the source code, I replace this code
mRNAselected_values <- dataCancer %>% dplyr::filter(rownames(dataCancer) == mRNAselected) %>% as.numeric mRNAselected_values_normal <- dataNormal %>% dplyr::filter(rownames(dataNormal) == mRNAselected) %>% as.numeric
withmRNAselected_values <- as.data.frame(dataCancer) %>% dplyr::filter(rownames(dataCancer) == mRNAselected) %>% unlist() mRNAselected_values_normal <- as.data.frame(dataNormal) %>% dplyr::filter(rownames(dataNormal) == mRNAselected) %>% unlist()
After this, it workd!Thanks a lot for your outstanding work.
Hi, Thank you for bringing up a valid point. I'm also encountering a similar issue, and unfortunately, the dataSurv result is empty. Could you please provide detailed guidance on how/where can I do this replacement, step by step? Thank you in advance.
hi, I just encountered similar problem. I used the commpass data and mRNA-seq for KM analysis.
At first, the code was like:
tabSurvKM <- TCGAanalyze_SurvivalKM(clin.mm, dataMMcomplete, Genelist = G_list2, Survresult = TRUE, p.cut = 0.05, ThreshTop = 0.67, ThreshDown = 0.33, group1=gr1, group2=gr2)
and the error:
Erno applicable method for 'filter' applied to an object of class "c('matrix', 'array', 'double', 'numeric')"
Then I change the dataMMcomplete
to as.data.frame.(dataMMcomplete)
, and the code was like:
tabSurvKM <- TCGAanalyze_SurvivalKM(clin.mm, as.data.frame(dataMMcomplete), Genelist = G_list2, Survresult = TRUE, p.cut = 0.05, ThreshTop = 0.67, ThreshDown = 0.33, group1=gr1, group2=gr2)
but new error arised:
Error in survfit.formula(ttime ~ c(rep("low", nrow(cfu_onlyTOP)), rep("high", : data set has no non-missing observations Error in if (value == n) {
Sadly, I can't figure out how it come, could you please give me some advice?
Also, i'm not sure if the problem comes from the clinical data. Are the survival time(days_to_death
) and survival status ( vital_status
) in clin.mm
valid for function TCGAanalyze_SurvivalKM
?
PS: clin.mm
dataset was like:
Then I changed the vital_status
from (Alive, Dead)
to (0,1)
via
clinical=clin.mm
clinical$vital_status<- as.numeric(clinical$vital_status == "Dead")
Then I run the code
tabSurvKM <- TCGAanalyze_SurvivalKM(clinical, as.data.frame(dataMMcomplete), Genelist = G_list2, Survresult = TRUE, p.cut = 0.05, ThreshTop = 0.67, ThreshDown = 0.33, group1=gr1, group2=gr2)
But the error still remains....
I encountered the same error, due in my case it's due to the fact the the bcr_patient_barcode is a sequence of more than 12 characters but the TCGAanalyze_SurvivalKM tries to merge the clinical barcode with only the first 12 characters of the expression matrix colnames
cfu <- clinical_patient[clinical_patient[, "bcr_patient_barcode"] %in% substr(colnames(dataCancer), 1, 12), ]
thus creating an empty cfu object and failing downstream to filter as it has 0 rows
hi,
1. When I follow your tutorial Case study n. 1: Pan Cancer downstream analysis BRCA, error raised in:
dataSurv <- TCGAanalyze_SurvivalKM( clinical_patient = dataClin, dataGE = dataFilt, Genelist = rownames(dataDEGs), Survresult = FALSE, ThreshTop = 0.67, ThreshDown = 0.33, p.cut = 0.05, group1 = group1, group2 = group2 )
no applicable method for 'filter' applied to an object of class "c('matrix', 'array', 'double', 'numeric')"
2. I change parameter
dataGE=dataFilt
todataGE = as.data.frame(dataFilt)
, it said failed to filter with same columns.On closer inspection, I find duplicated sample in download BRCA expression data. After deduplicated, all thing go OK with this
dataSurv <- TCGAanalyze_SurvivalKM( clinical_patient = dataClin, dataGE = as.data.frame(dataFilt), Genelist = rownames(dataDEGs), Survresult = FALSE, ThreshTop = 0.67, ThreshDown = 0.33, p.cut = 0.05, group1 = group1, group2 = group2 )
However, dataSurv result is empty.
3. Carefully read the source code, I replace this code
mRNAselected_values <- dataCancer %>% dplyr::filter(rownames(dataCancer) == mRNAselected) %>% as.numeric mRNAselected_values_normal <- dataNormal %>% dplyr::filter(rownames(dataNormal) == mRNAselected) %>% as.numeric
withmRNAselected_values <- as.data.frame(dataCancer) %>% dplyr::filter(rownames(dataCancer) == mRNAselected) %>% unlist() mRNAselected_values_normal <- as.data.frame(dataNormal) %>% dplyr::filter(rownames(dataNormal) == mRNAselected) %>% unlist()
After this, it workd!Thanks a lot for your outstanding work.
Hello, I recently tried to use the function TCGAanalyze_SurvivalKM however, i have the same problem that you encountered. First, i tried to convert the dataGE into a dataframe, but i had en error signaling that i had duplicates. I removed the duplicates in the dataCancer (from the code source) and retried with the same modifications that you brought. When running the source code, it didn't work. It said that no Threshtop was defined. Any wonder what i can do to fix this? Thanks in advance for your reply.
hi,
1. When I follow your tutorial Case study n. 1: Pan Cancer downstream analysis BRCA, error raised in:
no applicable method for 'filter' applied to an object of class "c('matrix', 'array', 'double', 'numeric')"
2. I change parameter
dataGE=dataFilt
todataGE = as.data.frame(dataFilt)
, it said failed to filter with same columns.On closer inspection, I find duplicated sample in download BRCA expression data. After deduplicated, all thing go OK with this
However, dataSurv result is empty.
3. Carefully read the source code, I replace this code
mRNAselected_values <- dataCancer %>% dplyr::filter(rownames(dataCancer) == mRNAselected) %>% as.numeric mRNAselected_values_normal <- dataNormal %>% dplyr::filter(rownames(dataNormal) == mRNAselected) %>% as.numeric
withmRNAselected_values <- as.data.frame(dataCancer) %>% dplyr::filter(rownames(dataCancer) == mRNAselected) %>% unlist() mRNAselected_values_normal <- as.data.frame(dataNormal) %>% dplyr::filter(rownames(dataNormal) == mRNAselected) %>% unlist()
After this, it workd!Thanks a lot for your outstanding work.