navinlabcode / copykat

Other
203 stars 54 forks source link

Error in match.arg(type) : 'arg' must be of length 1 #78

Open Lukadon77 opened 1 year ago

Lukadon77 commented 1 year ago

When I was running copyKAT from seurat object, the code is:

subset_count <- as.matrix(subset@assays$RNA@counts) cnv <- copykat(rawmat=subset_count, ngene.chr=5, sam.name="copykat", n.cores=1)

Here is the running results: [1] "running copykat v1.1.0" [1] "step1: read and filter data ..." [1] "17981 genes, 1800 cells in raw data" [1] "7303 genes past LOW.DR filtering" [1] "step 2: annotations gene coordinates ..." [1] "start annotation ..." [1] "step 3: smoothing data with dlm ..." [1] "step 4: measuring baselines ..." number of iterations= 665 number of iterations= 186 number of iterations= 3840 number of iterations= 139 number of iterations= 339 number of iterations= 210 [1] "step 5: segmentation..." [1] "step 6: convert to genomic bins..." [1] "step 7: adjust baseline ..." [1] "step 8: final prediction ..." [1] "step 9: saving results..." [1] "step 10: ploting heatmap ..." Error in match.arg(type) : 'arg' must be of length 1

what's the problem?

yi6kim commented 2 days ago

Hi, I had the same error message saying, "Error in match.arg(method) : 'arg' must be of length 1" after "step 4: measuring baselines ...". But when I refreshed the R session and ran it again, the error message was gone, and I was able to run it fine. The first time I ran it, I was connected to a wifi that is known to block SSH (and thus probably some other connections/activities, too), but I'm not sure if this could be the reason. Have you ever solved the error?