AllonKleinLab / SPRING_dev

65 stars 33 forks source link

How to visualize distinct 10x datasets in the same SPRING plot #22

Open sejjbia opened 4 years ago

sejjbia commented 4 years ago

Hi I would like to generate a single SPRING plot from two or more 10X datasets and be able to 1) color them independently 2) select and highlight them separately from the side menu

Could you please share an example that I can run on my jupyter console? (Apologies in advance if I have missed this information in the tutorials)

Thank you!

AllonMKlein commented 4 years ago

If you send over the notebook I can show exactly how to modify it...

but basically the idea is that you would load each expression matrix and then concatenate them, and make a list of labels for each cell...

E1 = scipy.io.mmread(dataset path1) E2 = scipy.io.mmread(dataset path2) E = scipy.sparse.vstack((E1,E2)) dataset_label = [name1]E1.shape[0] + [name2]E2.shape[0]

at this point use "E" as you usually would as an expression matrix and then include "dataset_label" in the cell groupings when you make the SPRING plot.

...cell_groupings={'dataset_label': dataset_label}...

On Mon, Apr 13, 2020 at 9:22 AM sejjbia notifications@github.com wrote:

Hi I would like to generate a single SPRING plot from two or more 10X datasets and be able to

  1. color them independently
  2. select and highlight them separately from the side menu

Could you please share and example that I can run on my jupyter console? (Apologies in advance if I have missed this information in the tutorials)

Thank you!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/AllonKleinLab/SPRING_dev/issues/22, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFAF33OWDSPBHREPHKBHBIDRMMGYLANCNFSM4MG6O7RQ .

sejjbia commented 4 years ago

Thank you!! I will try to work on your suggestions I will reach out again and share my notebook if I have problems