lgatto / synapter

Label-free data analysis pipeline for optimal identification and quantitation
https://lgatto.github.io/synapter/
4 stars 2 forks source link

MSnBase complains #98

Closed pavel-shliaha closed 9 years ago

pavel-shliaha commented 9 years ago

I am trying to load several synapter analysis but the algorithm fails. Any ideas?

synAnalcomb <- combine (as (readRDS ("BC_F24_CW_HDMSE_01_IA_final_peptide.RDS"), "MSnSet"),

  • as (readRDS ("BH_F01_HDMSE_01_IA_final_peptide.RDS"), "MSnSet")) Error in combine(x[[nm]], y[[nm]]) : matrix shared row and column elements differ: 'is.NA' value mismatch: 12872 in current 12882 in target

the data is in:

data:\RAW\pvs22_QTOF_DATA_data3\data_for_synapter_2.0\bug\2015_07_31_MSnBase

sgibb commented 9 years ago

You have to update the sampleNames and the colnames of the featureData of each MSnSet before you combine them. (Otherwise combine fails because of identical sampleNames, namely Synapter1 produced by as and identical featureData column names.):

a <- readRDS("BC_F24_CW_HDMSE_01_IA_final_peptide.RDS")
b <- readRDS("BH_F01_HDMSE_01_IA_final_peptide.RDS")

msna <- as(a, "MSnSet")
msnb <- as(b, "MSnSet")

sampleNames(msna) <- "BC_F24_CW"
msna <- updateFvarLabels(msna, "BC_F24_CW")
sampleNames(msnb) <- "BH_F01"
msnb <- updateFvarLabels(msnb, "BH_F01")

msn <- combine(msna, msnb)

msn <- synapterPlgsAgreement(msn)
fd <- fData(msn)

head(fd[, grepl("Identified|Agree|Disagree", colnames(fd))])
#                             synapterPlgsAgreement.BC_F24_CW synapterPlgsAgreement.BH_F01
# IGENEPSEHSIHENAYGLAR                                  agree                        agree
# ALSDHHVLLEGTLLKPNMVTPGSDSPK                           agree                        agree
# LASINVENVETNRR                                        agree                        agree
# ANSEATLGTYK                                           agree                        agree
# AAQEALYVR                                             agree                        agree
# GTVELAGTDGETTTQGLDGLGDR                   no_id_or_transfer            no_id_or_transfer
#                             nIdentified nAgree nDisagree synapterPlgsAgreementRatio
# IGENEPSEHSIHENAYGLAR                  2      2         0                          1
# ALSDHHVLLEGTLLKPNMVTPGSDSPK           2      2         0                          1
# LASINVENVETNRR                        2      2         0                          1
# ANSEATLGTYK                           2      2         0                          1
# AAQEALYVR                             2      2         0                          1
# GTVELAGTDGETTTQGLDGLGDR               0      0         0                        NaN
pavel-shliaha commented 9 years ago

Thanks!

pavel-shliaha commented 9 years ago

cannot find synapterPlgsAgreement() which package does it live in?

sgibb commented 9 years ago

Sorry, I forgot to export this function. It is not documented yet. Please use the ::: operator for a moment (I don't have time to fix it until tomorrow evening (I am on duty today.)): msn <- synapter:::synapterPlgsAgreement(msn)

pavel-shliaha commented 9 years ago

Thanks!