Skip to content

Conversation

@drighelli
Copy link

@drighelli drighelli commented Jul 22, 2025

"X" is not the only possible value for "cell" in metadata file for merfish data (if we want to make it adaptable also to it).

I also suggest to use the fread function to load metadata files (you already have an import on data.table).

Finally, you want to be sure that metadata$cell is a character, because you are going to assign it as rownames.

I'm trying to encapsulate your functions into SpaceTrooper functions and this fails when loading merfish data.

Would you consider to include this change into your function?

Thanks,
Dario

"X" is not the only possible value for "cell" in metadata file for merfish data (if we want to make it adaptable also to it)
consider using fread to load metadata files.
@estellad
Copy link
Owner

Hi Dario,

Thank you for the PR! I agree with the fread and as.character() modification.

About this line - names(metadata)[names(metadata) %in% c("EntityID", "V1", "X")] <- "cell", have you tested if it will cause conflict when merging?

Would it be possible that a metadata file contains all three columns named "EntityID", "V1", "X", and all of them will be renamed to "cell"? If we are certain that each metadata file can only contain one of the three, then I am fine with merge your PR.

Sincerely,
Estella

@drighelli
Copy link
Author

Hi @estellad,

you are totally right, I cannot be absolutely sure about this, I can implement something different with a new commit.

the idea is to check if there is only one among all the possibilities, in case there are none or more than one, it acts as in your default case.
@drighelli
Copy link
Author

see the commit message for this new commit.

Let me know if this can work, otherwise I can think about something different.

Copy link
Owner

@estellad estellad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Dario,

I would update the else statement to names(metadata)[idxcell[1]] <- "cell", so we take the first one of many idxcell. As long as we have a cell column, the merging will be fine.

Congrats on the package being accepted to BioC!

Thanks,
Estella

@drighelli
Copy link
Author

Hi @estellad,
thanks for the review and the update.

Works for me.

If you prefer, I'm going to test the new code into SpaceTrooper before merging it.

Thanks for the congrats, we are really happy the package has been accepted :)

Dario

@estellad
Copy link
Owner

Sounds good! Please let me know when you have finished the testing with a new commit, and then I will merge your PR?

Looking forward to see SpaceTrooper in OSTA 😃

Estella

@drighelli
Copy link
Author

drighelli commented Jul 29, 2025

I'm doing some tests, and still is not working on my tiny data.

I'll keep you posted once I'll be able to fix everithing.

Otherwise we can keep the merfish and merscope separated.

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

Successfully merging this pull request may close these issues.

2 participants