8000 Improve import: ensure that rownames of metadata are identical to colnames of TreeSE by artur-sannikov · Pull Request #691 · microbiome/OMA · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Improve import: ensure that rownames of metadata are identical to colnames of TreeSE #691

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

artur-sannikov
Copy link
Contributor

No description provided.

Copy link
Contributor
@TuomasBorman TuomasBorman left a comment

Choose a reason for hiding this comment

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

Thanks!

This checks different thing than we talked

See this:

library(TreeSummarizedExperiment)

tse <- makeTSE()
mat <- assay(tse)
cd <- colData(tse)
# Mess up sample names
rownames(cd) <- paste0("sample_name_", seq_len(nrow(cd)))

# Fails
tse_taxa <- TreeSummarizedExperiment(
    assays =  SimpleList(counts = mat),
    colData = cd
)

# If colData is replaced, names are overwritten
colnames(tse)
colData(tse) <- cd
colnames(tse)

Constructor checks every time that the sample names match. Your mistake happened when you overwrote the existing colData() with new one (SE does not check that sample names match in that case).

Can you update this accordingly?

@TuomasBorman
Copy link
Contributor

Any updates on this? @artur-sannikov

@TuomasBorman
Copy link
Contributor

Discussed with @artur-sannikov and we decided to implement the example differently: #703

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
0