Replies: 10 comments 3 replies
-
Hello, Were you able to subset the data? I would be interested of this feature too. |
Beta Was this translation helpful? Give feedback.
-
Hi,
yes, I could subset data!
It would be great if Seurat could provide tools to make susets!
Best,
NA
2024年3月11日(月) 9:44 gretajuu ***@***.***>:
… Hello,
Were you able to subset the data? I would be interested of this feature
too.
—
Reply to this email directly, view it on GitHub
<#7947 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BDTAPAYBHXGRORICM5HYSYTYXVVGDAVCNFSM6AAAAAA6UVLX6WVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DONBSGQ4DQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi @NA0004, Could you please let me know how you subset the xenium data? Thanks, |
Beta Was this translation helpful? Give feedback.
-
Hey
I used subset_opt function
https://github.com/alikhuseynov/add-on_R/blob/develop/R/subset_obj_seurat.R
…On Mon, May 20, 2024, 00:00 Kelvin Mo ***@***.***> wrote:
Hi @NA0004 <https://github.com/NA0004>,
Could you please let me know how you subset the xenium data?
Thanks,
Kelvin
—
Reply to this email directly, view it on GitHub
<#7947 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXOTFKLXRPY7M33XSQ5E3ULZDFYM5AVCNFSM6AAAAAA6UVLX6WVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TIOJSGEZDE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Thanks so much for sharing the function with me @ilovegreentea !! crop <- Crop(xenium.obj[["fov"]], x = c(-96.42, 3370.79), y = c(1162.64, 3130.46)) |
Beta Was this translation helpful? Give feedback.
-
Hi Kelvin,
I'm not sure, I understand your question well.
If you added fov to a xenium object before subset,
It also works in cropped images.
2024년 5월 20일 (월) 오전 3:24, Kelvin Mo ***@***.***>님이 작성:
… Thanks so much for sharing the function with me @ilovegreentea
<https://github.com/ilovegreentea> !!
This is my code and does this function work to subset the xenium object
based on coordinates of cropped image?
crop <- Crop(xenium.obj[["fov"]], x = c(-96.42, 3370.79), y = c(1162.64,
3130.46))
xenium.obj[["cropped"]] <- crop
—
Reply to this email directly, view it on GitHub
<#7947 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXOTFKL6GQKW6K5HUVANEADZDGQMJAVCNFSM6AAAAAA6UVLX6WVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TIOJTGIYDA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Sorry for the confusion. So what I did was to crop the image from the xenium data and stored it in xenium.obj[["cropped"]]. However, I was not able to access the metadata of the cropped subset. Can I know how would you use the subset_opt function to subset the xenium.obj based on the cropped image? Thanks, |
Beta Was this translation helpful? Give feedback.
-
Oh I got it.
I'm going to send my code.
I used barcode information in ***@***.******@***.***
xenium_obj<- Crop( xenium_obj [["fov"]], x = c(300, 2500), y = c(000,
2300), coords = "plot")
xenium_obj[[" xenium_obj _1"]] <- xenium_obj _1
***@***.***$sample_name <- ifelse( xenium_obj @meta.data$barcode
%in% xenium_obj ***@***.******@***.***, "annotation" ,
***@***.***$sample_name )
I hope I get it right this time.
Thanks,
KyuTae
2024년 5월 20일 (월) 오후 2:56, Kelvin Mo ***@***.***>님이 작성:
… Hi @ilovegreentea <https://github.com/ilovegreentea>
Sorry for the confusion. So what I did was to crop the image from the
xenium data and stored it in xenium.obj[["cropped"]]. However, I was not
able to access the metadata of the cropped subset. Can I know how would you
use the *subset_opt* function to subset the xenium.obj based on the
cropped image?
Thanks,
Kelvin
—
Reply to this email directly, view it on GitHub
<#7947 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXOTFKOWWNKYXCVM7HVKO73ZDJBNHAVCNFSM6AAAAAA6UVLX6WVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TIOJZHA4DO>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Thank you so much @ilovegreentea ! This is helpful. One side question: After you crop the image and place it in xenium.obj[["xenium_obj_1"]], how do you access the cell identities or barcode information? For me, it's just an image under the "fov" of the xenium object without any info. |
Beta Was this translation helpful? Give feedback.
-
Why is my code obscured??
***@***.******@***.***
2024년 5월 20일 (월) 오후 3:17, Kelvin Mo ***@***.***>님이 작성:
… Thank you so much @ilovegreentea <https://github.com/ilovegreentea> !
This is helpful.
One side question: After you crop the image and place it in
xenium.obj[["xenium_obj_1"]], how do you access the cell identities or
barcode information? For me, it's just an image under the "fov" of the
xenium object without any info.
—
Reply to this email directly, view it on GitHub
<#7947 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXOTFKPGIEIIFZZKVWEBDATZDJD3VAVCNFSM6AAAAAA6UVLX6WVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TKMBQGAZTQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi,
I would like to know how to subset Xenium object.
Following the tutorial "Analysis of Image-based Spatial Data in Seurat", I cropped xenium.obj using the tutorial codes.
cropped.coords <- Crop(xenium.obj[["fov"]], x = c(1200, 2900), y = c(3750, 4550), coords = "plot")
xenium.obj[["zoom"]] <- cropped.coords
Now I would like to make a new Xenium object of this area by using subset function so that I can analyze specific brain area and DEG between two areas using FindMarker function.
I have tried to use subset command mimicking visium tutorial found on the web, but I have been failing.
It would be very helpful if I could get help for subsetting Xenium object.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions