Open
Conversation
Member
|
Could you add headers for the different steps ? ################################
####### Package Loading ########
################################
library(QFeatures)
#####################################
##### Step 1: Feature Filtering #####
#####################################
qf <- qf |> filterFeatures(~.qfeaturesgui_rowname != c('2'))
|
Member
|
Also there is an issue when the user filter the features/samples by the rownames of the rowData/colData. |
Member
# Reproducible R script
# Generated on: 2026-04-08 15:15:21.352928
library(QFeatures)
qf <- qf[, colData(qf)$SampleType != c("Unused", "Blank")] ## here it should use ! ... %in% c(...,)
qf <- qf |>
filterFeatures(~ Potential.contaminant != c("+")) |>
filterFeatures(~ Reverse != c("+")) |>
filterFeatures(~ .qfeaturesgui_rowname != c("4"))
## normalize() can be use with a "i" parameter
qf <- lapply(names(qf), function(name) { ## This will apply the normalisation to all sets
normalize(
object = qf[[name]],
method = "center.median"
)
})
## aggregateFeatures can be use with a "i" parameter
qf <- lapply(seq_along(qf), function(i) {
name <- names(qf)[i]
aggregateFeatures(
object = qf[[name]],
method = colMedians,
runCol = "Modified.sequence",
na.rm = TRUE
)
})
qf <- joinAssays(
x = qf,
i = names(qf)
# it is missing the name specification
)
qf <- lapply(seq_along(qf), function(i) {
name <- names(qf)[i]
aggregateFeatures(
object = qf[[name]],
method = colMeans,
runCol = "Leading.razor.protein",
na.rm = TRUE
)
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add code generator for each step of the workflow.
For the moment this pull request doesn't erase the code when the user goes rerun some previous step.