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
I'm sharing here a simple example that allows to exploit the data structure and functionalities of QFeatures starting from any pre-defined set of features/peptides/proteins. This is useful when one wants to import into R the summarised and aggregated output from any software, e.g. MaxQuant, PD etc... I wanted to test this as opposed to start from a PSMS table and then generating subsequent aggregations like explained in the QFeatures documentation.
Below I create the sample peptide and protein tables (I'll leave out the psms for simplicity). For both peptides and proteins I generate a matrix of "intensities" and the corresponding row data information with the respective peptides/proteins IDs. I generate a matrix of 10 peptides mapped to 3 proteins.
We can now create separate SummarizedExperiment objects for the peptides and proteins. This is the minimal information to create a QFeatures object that contains 2 unlinked assays. They are unlinked, meaning that I cannot, for example, directly subset both assays by requesting all features coming from a particular protein id.
An instance of class QFeatures containing 2 assays:
[1] peptides: SummarizedExperiment with 10 rows and 3 columns
[2] proteins: SummarizedExperiment with 3 rows and 3 columns
However, we can easily create a link between the assays using the protein ids by exploiting the QFeatures::addAssayLink which is applied under the hood automatically when creating aggregations with QFeatures::aggregateFeatures.
hl_linked <- addAssayLink(hl,
from = "peptides",
to = "proteins",
varFrom = "Protein.id",
varTo = "ProteinID")
Now the two assays are linked by the protein id and I can, for example, subset both assays simply by querying for one protein id and I can now use all the other functionalities of QFeatures
An instance of class QFeatures containing 2 assays:
[1] peptides: SummarizedExperiment with 2 rows and 3 columns
[2] proteins: SummarizedExperiment with 1 rows and 3 columns
Thanks a lot to @lgatto for providing the support and initial simple example to get me started with and to all the developer of the package!
Anna
The text was updated successfully, but these errors were encountered:
Hi,
I'm sharing here a simple example that allows to exploit the data structure and functionalities of
QFeatures
starting from any pre-defined set of features/peptides/proteins. This is useful when one wants to import into R the summarised and aggregated output from any software, e.g. MaxQuant, PD etc... I wanted to test this as opposed to start from a PSMS table and then generating subsequent aggregations like explained in theQFeatures
documentation.Below I create the sample peptide and protein tables (I'll leave out the psms for simplicity). For both peptides and proteins I generate a matrix of "intensities" and the corresponding row data information with the respective peptides/proteins IDs. I generate a matrix of 10 peptides mapped to 3 proteins.
We can now create separate
SummarizedExperiment
objects for the peptides and proteins. This is the minimal information to create aQFeatures
object that contains 2 unlinked assays. They are unlinked, meaning that I cannot, for example, directly subset both assays by requesting all features coming from a particular protein id.However, we can easily create a link between the assays using the protein ids by exploiting the
QFeatures::addAssayLink
which is applied under the hood automatically when creating aggregations withQFeatures::aggregateFeatures
.Now the two assays are linked by the protein id and I can, for example, subset both assays simply by querying for one protein id and I can now use all the other functionalities of
QFeatures
Thanks a lot to @lgatto for providing the support and initial simple example to get me started with and to all the developer of the package!
Anna
The text was updated successfully, but these errors were encountered: