Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in La.svd(x, nu = 0) : infinite or missing values in 'x' #10

Open
yueli8 opened this issue Oct 27, 2022 · 1 comment
Open

Error in La.svd(x, nu = 0) : infinite or missing values in 'x' #10

yueli8 opened this issue Oct 27, 2022 · 1 comment

Comments

@yueli8
Copy link

yueli8 commented Oct 27, 2022

Hello Yuting,

Thank you for developing so nice software.

Thank you in advance for your great help!

Best,

Yue

> suppressMessages({
+     library(ggplot2)
+     library(CytoTree)
+     library(flowCore)
+     library(stringr)
+ })
> # Read fcs files
> fcs.files <- list.files("~/CyTOF_Data/20220830 PBMC Test2",pattern = '.FCS$', full = TRUE)
> fcs.data <- runExprsMerge(fcs.files, comp = FALSE, transformMethod = "none")
> recol <- c(`Sm147Di<147Sm_CD20>` = "CD20", `Sm154Di<154Sm_CD45>` = "CD45", 
+            `Gd160Di<160Gd_CD14>` = "CD14", `Ho165Di<165Ho_CD16>` = "CD16", 
+            `Er168Di<168Er_CD8>` = "CD8", `Er170Di<170Er_CD3>` = "CD3",
+            `Yb174Di<174Yb_CD4>` = "CD4")
> colnames(fcs.data)[match(names(recol), colnames(fcs.data))] = recol
> fcs.data <- fcs.data[, recol]
> day.list <- c("PBMC_Processed", "PBMC")
> meta.data <- data.frame(cell = rownames(fcs.data),
+                         stage = str_replace(rownames(fcs.data), regex(".FCS.+"), "") )
> meta.data$stage <- factor(as.character(meta.data$stage), levels = day.list)
> markers <- c("CD20","CD45","CD14","CD16","CD8","CD3","CD4")
> 
> # Build the CYT object
> cyt<- createCYT(raw.data = fcs.data, markers = markers,
+                 meta.data = meta.data,
+                 normalization.method = "log",
+                 verbose = TRUE)
2022-10-27 10:18:54 Number of cells in processing: 4000
2022-10-27 10:18:54 rownames of meta.data and raw.data will be named using column cell
2022-10-27 10:18:54 Index of markers in processing
2022-10-27 10:18:54 Creating CYT object.
2022-10-27 10:18:54 Determining normalization factors
2022-10-27 10:18:54 Normalization and log-transformation.
2022-10-27 10:18:54 Build CYT object succeed 
> cyt
CYT Information:
 Input cell number: 4000  cells 
 Enroll marker number: 7  markers 
 Cells after downsampling: 4000  cells 
> 
> set.seed(1)
> cyt <- runCluster(cyt, cluster.method = "som")
Mapping data to SOM

> 
> ## Mapping data to SOM
> # Do not perform downsampling
> set.seed(1)
> cyt <- processingCluster(cyt)
> # run Principal Component Analysis (PCA)
> cyt <- runFastPCA(cyt)
Error in La.svd(x, nu = 0) : infinite or missing values in 'x'

PBMC_Processed.zip
PBMC.zip

@ytdai
Copy link
Member

ytdai commented Dec 12, 2022

How about other dimensionality reduction methods? Another way to check the data is to use head([email protected]) to verify there are any NA values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants