Giter Site home page Giter Site logo

Comments (3)

bsungwoo avatar bsungwoo commented on June 30, 2024

When I changed "st_labels" to "st_label" in line 110 of R_utils.R, another error message appeared in the same line.

run real data...
[1] "Generating synthetic test spots..."
|======================================================================| 100%
[1] "Generation of 1000 test spots took 0.21 mins"
[1] "output consists of a list with two dataframes, this first one has the weighted count matrix and the second has the metadata for each spot"
Error in [.data.frame(do.call("rbind", rep(list(st_label[[1]]), round(N2/N1) + :
undefined columns selected
Calls: Convert_Data -> data_process -> [ -> [.data.frame
Execution halted

My guess is that line 110 in R_utils.R may be changed from 1 to 2?
(Changed st_labels[[1]] to st_label[[1]] and [1:N2] to [1:N2,])

  1. label.list2 <- do.call("rbind", rep(list(st_labels[[1]]), round(N2/N1)+1))[1:N2]
  2. label.list2 <- do.call("rbind", rep(list(st_label[[1]]), round(N2/N1)+1))[1:N2,]

Thanks!

from dstg.

bsungwoo avatar bsungwoo commented on June 30, 2024

When I changed the line 110 in R_utils.R as above, I crossed with another error.

[1] "Generation of 1000 test spots took 0.2 mins"
[1] "output consists of a list with two dataframes, this first one has the weighted count matrix and the second has the metadata for each spot"
Error in label.list[[i]] : subscript out of bounds
Calls: Convert_Data ... eval.parent -> eval -> eval -> write.table -> is.data.frame
Execution halted

Is it possibly related to "label.list[[i]]" in line 149 in R_utils.R? I presumed that since "label.list" contains the single-cell annotation data and its length is 1, label.list[[i]] needs to be changed to st.label[[i]] defined in line 126 (From 1 to 2 below).

  1. write.csv(label.list[[i]],file=paste0(inforDir,'/ST_label/ST_label_',i,'.csv'),quote=F)
  2. write.csv(st.label[[i]],file=paste0(inforDir,'/ST_label/ST_label_',i,'.csv'),quote=F)

It seems that all the issues are resolved by changing line 110 and 149 as above.
Could you check on with the issues?

Thank you!

from dstg.

QSong-github avatar QSong-github commented on June 30, 2024

When I changed "st_labels" to "st_label" in line 110 of R_utils.R, another error message appeared in the same line.

run real data...
[1] "Generating synthetic test spots..."
|======================================================================| 100%
[1] "Generation of 1000 test spots took 0.21 mins"
[1] "output consists of a list with two dataframes, this first one has the weighted count matrix and the second has the metadata for each spot"
Error in [.data.frame(do.call("rbind", rep(list(st_label[[1]]), round(N2/N1) + :
undefined columns selected
Calls: Convert_Data -> data_process -> [ -> [.data.frame
Execution halted

My guess is that line 110 in R_utils.R may be changed from 1 to 2?
(Changed st_labels[[1]] to st_label[[1]] and [1:N2] to [1:N2,])

  1. label.list2 <- do.call("rbind", rep(list(st_labels[[1]]), round(N2/N1)+1))[1:N2]
  2. label.list2 <- do.call("rbind", rep(list(st_label[[1]]), round(N2/N1)+1))[1:N2,]

Thanks!

It should be correct if changing "st_labels" to "st_label" in line 110 of R_utils.R. I will verify and modify it. However, I am not sure about the other errors that you mentioned. I will check on my side or can you share me your toy data that I can check?

from dstg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.