dynverse / dyno

Inferring, interpreting and visualising trajectories using a streamlined set of packages 🦕
https://dynverse.github.io/dyno
Other
163 stars 32 forks source link

Wrap_expression function with non scRNAseq data #98

Closed Bio-data-tricks closed 3 years ago

Bio-data-tricks commented 3 years ago

Hello everyone,
I would like to use dynverse with an other data type than transcriptomic data. I'm not very familiar with transcriptomic data. Someone could tell me how to built in_data with the "wrap expression" function ?

My data works fine on scanpy package (addata file) so I guess it's possible on dynverse as well.

My data have this form (Z-score normalisation):
t1 t2 t3 t4 t5 t6 ... cell 1 1.1 1.3 1.2 4 3 2 .. cell 2 1.2 1.3 1.1 2 1 2 .. cell 3 1.1 1.4 1.2 4 3 2 ..

I've try this code: dataset <- wrap_expression( counts = mydata, expression = mydata )

Error: !any(duplicated(cell_ids)) is not TRUE Traceback:

  1. wrap_expression(counts = data2, expression = data2)
  2. wrap_data(id = id, cell_ids = cell_ids, cell_info = cell_info, . feature_ids = feature_ids, feature_info = feature_info, ...) %>% . add_expression(counts = counts, expression = expression, . expression_future = expression_future)
  3. eval(lhs, parent, parent)
  4. eval(lhs, parent, parent)
  5. wrap_data(id = id, cell_ids = cell_ids, cell_info = cell_info, . feature_ids = feature_ids, feature_info = feature_info, ...)
  6. assert_that(is.character(cell_ids), !any(duplicated(cell_ids)))

Thank you !

Nicolas