Skip to content
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

Make it easier to append annotations to an FCS file; align getFcsFile, getFcsFiles and annotateFcsFile #44

Open
zbjornson opened this issue Nov 13, 2020 · 2 comments · Fixed by #47
Milestone

Comments

@zbjornson
Copy link
Member

zbjornson commented Nov 13, 2020

The docs for annotateFcsFile rightly warn that using it will overwrite existing annotations and say to use getFcsFile first. However, getFcsFile[s] returns a list and annotateFcsFile expects a list, so this is tedious to do.

Current method:

fa = data.frame(file$annotations)
annoList = as.list(with(fa, setNames(value, name)))
annoList[["New Anno"]] <- "abcd"
@zbjornson
Copy link
Member Author

zbjornson commented Oct 4, 2021

#47 didn't actually address this, and I'm not sure it should have been merged as it was meant to be a convenience function that papers over the list of lists that our API uses. We still need a doc example that shows taking an FCS file (from getFcsFile and getFcsFiles) and appending new annotations to it.

Current method I'm using:

files = getFcsFiles(...)
file = files[[1,]]
annos = file$annotations[[1]]
annos[nrows(annos+1,] <- list(name="abc", value="def")

@gegnew
Copy link
Contributor

gegnew commented Oct 7, 2021

Is line 2 there supposed to be file = files[1,]? The double-bracket notation throws an error

@zbjornson zbjornson changed the title Provide example showing how or make it easier to append annotations to an FCS file Make it easier to append annotations to an FCS file Mar 18, 2022
@zbjornson zbjornson added this to the v1 milestone Mar 30, 2022
@zbjornson zbjornson changed the title Make it easier to append annotations to an FCS file Make it easier to append annotations to an FCS file; align getFcsFile, getFcsFiles and annotateFcsFile Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants