Search
Question: Combining two MSnSet
0
gravatar for kamal.fartiyal84
8 months ago by
Cancer Research UK Cambridge Institute
kamal.fartiyal8410 wrote:

Hi,

Is it possible to combine two MSnSet to create a single one by combining based on common protein or otherwise?

Kamal

 

 

ADD COMMENTlink modified 4 months ago • written 8 months ago by kamal.fartiyal8410
0
gravatar for Laurent Gatto
8 months ago by
Laurent Gatto980
United Kingdom
Laurent Gatto980 wrote:

Yes, it is possible using the combine method.

This is described in Combining MSnSet instances section of the MSnbase: MS data processing, visualisation and quantification vignette. You can access it from R by typing vignette("MSnbase-demo", package = "MSnbase").

You can access it online here. Note that the online vignette matches the development version (but that section/functionality hasn't changed), while the one accessed directly from R matches you installed version.

ADD COMMENTlink written 8 months ago by Laurent Gatto980
0
gravatar for kamal.fartiyal84
4 months ago by
Cancer Research UK Cambridge Institute
kamal.fartiyal8410 wrote:

Hi,

The combine function for combining two different MSnSets with completely different sample names is producing erroneous results.

So instead of returning as mentioned in the vignette unique (n1)+unique (n2)+ shared (n1,n2) rows, it is returning an MSnSet with nrow of max(n1,n2). I tried various test cases but couldn't pin-point the exact reason of this error. I have already used updateFvarLabels and updateSampleNames before combining.

However, it gives this warning messages.

> test12 <- combine(test1,test2)

Warning messages:

1: In alleq(levels(x[[nm]]), levels(y[[nm]])) : 11 string mismatches

2: data frame column 'Experiment' levels not all.equal

3: In alleq(levels(x[[nm]]), levels(y[[nm]])) : 3 string mismatches

4: data frame column 'Label' levels not all.equal

I think this warning message is because these MSnSets consists of different samples.

Thanks.

Kamal

ADD COMMENTlink modified 4 months ago • written 4 months ago by kamal.fartiyal8410

It's not clear what you are reporting here, an error or a warning?

The warnings you see there could be related to different levels in the feature variables. Could you try to set the Experiment variable to a character to check. It is difficult to say more with additional details about the MSnSets. Could you share them for testing?

ADD REPLYlink written 4 months ago by Laurent Gatto980
0
gravatar for kamal.fartiyal84
4 months ago by
Cancer Research UK Cambridge Institute
kamal.fartiyal8410 wrote:

Hi Laurent,

I got it now. When combining different samples featureNames has to defined as protein accession (or the combining variable). In my dataset it had no featureNames but just numbers so thats why it was giving wrong results. It does not give any error message but just wrong results.

Thanks.

Kamal

 

 

ADD COMMENTlink modified 4 months ago • written 4 months ago by kamal.fartiyal8410
0
gravatar for kamal.fartiyal84
4 months ago by
Cancer Research UK Cambridge Institute
kamal.fartiyal8410 wrote:

Hi,

One small confusing thing is the following message in the processing information where it should mention the dimensions of the combined MSnSets. Have a look into the text marked in bold. 

> exp12 <- MSnbase::combine(MSnset_P1, MSnset_P2)

> exp12

MSnSet (storageMode: lockedEnvironment)

assayData: 9197 features, 22 samples

  element names: exprs

protocolData: none

phenoData

  sampleNames: CMK.Rep1.MSnset_P1 CMK.Rep2.MSnset_P1 ...

    RefPool.4.MSnset_P2 (22 total)

  varLabels: Experiment Label ... Analyt.Rep (5 total)

  varMetadata: labelDescription

featureData

  featureNames: A0A0B4J2F0 A0AV96 ... Q9Y6V0 (9197 total)

  fvarLabels: Protein.MSnset_P1 Gene.MSnset_P1 ... Count.MSnset_P2 (10

    total)

  fvarMetadata: labelDescription

experimentData: use 'experimentData(object)'

Annotation:

- - - Processing information - - -

Combined [9197,22] and [8303,11] MSnSets Wed Jan 24 08:15:26 2018

> dim(MSnset_P1)

[1] 8607   11

> dim(MSnset_P2)

[1] 8303   11

ADD COMMENTlink written 4 months ago by kamal.fartiyal8410

Thank you for the report - fixed on github and (soon) in devel.

ADD REPLYlink written 4 months ago by Laurent Gatto980
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 103 users visited in the last hour