You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Curently, joinAssays() combines multiple sets into a new set by matching rownames. However, in some cases, the rownames may not be meaningful for joining and I would prefer to join based on a rowData variable. For instance, DIANN data provides a Precuror.Id column that hold unique precursor identifier within each set. See here for example:
library(QFeatures)
x<- read.delim(MsDataHub::Report.Derks2022.plexDIA.tsv())
x[["File.Name"]] <-x[["Run"]]
qf<- readQFeaturesFromDIANN(x)
## Check if any Precursor.Id is duplicatedanyDups<- sapply(names(qf), function(i) {
any(duplicated(rowData(qf)[[i]]$Precursor.Id))
})
table(anyDups) ## Precursor.Id is unique within each set
This means that the sets in qf could immediately be joined using joinAssays(). However, this is not possible because the rownames do not contain meaningfull information. So currently, the solution is to manually change the rownames:
for (iin names(qf)) {
rownames(qf[[i]]) <- rowData(qf[[i]])$Precursor.Id
}
I though this could be streamlined within joinAssays() through the addition of a by argument. Eg:
Curently,
joinAssays()
combines multiple sets into a new set by matching rownames. However, in some cases, the rownames may not be meaningful for joining and I would prefer to join based on a rowData variable. For instance, DIANN data provides aPrecuror.Id
column that hold unique precursor identifier within each set. See here for example:This means that the sets in
qf
could immediately be joined usingjoinAssays()
. However, this is not possible because the rownames do not contain meaningfull information. So currently, the solution is to manually change the rownames:I though this could be streamlined within
joinAssays()
through the addition of aby
argument. Eg:The text was updated successfully, but these errors were encountered: