Closed little-jun closed 4 years ago
Hi, could you please provide your input files? Thanks, Pedro Navarro.
Hi, could you please provide your input files? Thanks, Pedro Navarro.
i have solved the error, but i meet a new error. my input file is in the folder \ext\data\vignette_examples\hye124
my code is `## ----include=FALSE-------------------------------------------------------
sampleComposition = data.frame( species = c("HUMAN","YEAST", "ECOLI"), A = c( 67, 30, 3 ), B = c( 67, 3, 30 ) )
dataSets = data.frame( "HYE110_SynaptG2S" = c( paste(rep("HYE110_A"), 1:3, sep = "."), paste(rep("HYE110_B"), 1:3, sep = ".") ), row.names = c( "A1", "A2", "A3", "B1", "B2", "B3" ) )
speciesTags = list( HUMAN = "_HUMAN", YEAST = "_YEAS", ECOLI = "_ECOLI" )
library(LFQbench)
LFQbench.initConfiguration( SampleComposition = sampleComposition )
FSWE.initConfiguration( injectionNames = dataSets, speciesTags = speciesTags )
srcDir = "D:/LFQbench/LFQbench-master/ext/data/vignette_examples/hye110"
LFQbench.setDataRootFolder( rootFolder = srcDir, createSubfolders = T )
print( paste( FSWE.softwareNames, collapse="," ) )
FSWE.addSoftwareConfiguration(
softwareName = "ISOQuant_pep",
# input_format can be wide or long.
# Wide contains all quantitative values (all samples and replicates)
# for a peptide in a single row,
# whereas long contains a single quantitative value (just one replicate) in a row.
input_format = "wide",
# it is important to know that LFQbench honours the extension:
# csv are COMMA separated values,
# tsv are TAB separated values
input.extension = "*.csv$",
# how NA (not available) values are reported
nastrings = " ",
# in long formats, how the quantitative value column is named
quantitative.var = make.names("intensity in"),
# in wide formats, how quantitative values are tagged
#(they also should include the injection names reported at the datasets object)
quantitative.var.tag = make.names("intensity in"),
# name of the protein name variable.
# Remember: protein names should include species information (speciesTags)
protein.var = "entry",
# variable name of sequence
# (including modifications as defined in FSWE.modificationsToUniMod)
sequence.mod.var = "sequence",
# variable name of the precursar charge state.
charge.var = make.names("signal_charge")
)
FSWE.addModification( modificationRegExps = "\[Oxi\]", UniModStrings = "\(UniMod:35\)" )
print( FSWE.modificationsToUniMod )
inputFiles=list.files( path=LFQbench.Config$DataRootFolder, pattern="\..+" ) nix = sapply( inputFiles, FSWE.generateReports, softwareSource = "guess", keep_original_names = T, singleHits = F, plotHistogram = T, plotHistNAs = T, reportSequences = F )
LFQbench.changeConfiguration( LogIntensityPlotRange = c( 9,21), LogRatioPlotRange = c(-7,7) )
res = LFQbench.batchProcessRootFolder( )
rs = res[[1]] m = LFQbench.getMetrics( resultSet = rs )
acc = m$Local accuracy
$A:B
prec = m$Local precision
$A:B
samplePairRes = rs$result[[1]]
LFQbench.showScatterAndBoxPlot( samplePair = samplePairRes, showLegend = T )
LFQbench.showDistributionDensityPlot( samplePair = samplePairRes , showLegend = F )
sampleComposition = data.frame( species = c("HUMAN","YEAST", "ECOLI"), A = c( 65, 30, 05 ), B = c( 65, 15, 20 ) )
dataSets = data.frame( "HYE124_TTOF6600_64var" = c( " lgillet_I150211_008", "lgillet_I150211_010", "lgillet_I150211_012", ## A " lgillet_I150211_009", "lgillet_I150211_011", "lgillet_I150211_013 " ## B ) , row.names = c ( "A1" , "A2" , "A3" , "B1" , "B2" , "B3" ) )
speciesTags = list( HUMAN = "_HUMAN", YEAST = "_YEAS", ECOLI = "_ECOLI" )
LFQbench.initConfiguration( SampleComposition = sampleComposition )
FSWE.initConfiguration( injectionNames = dataSets, speciesTags = speciesTags )
srcDir = "D:/LFQbench/LFQbench-master/ext/data/vignette_examples/hye124"
LFQbench.setDataRootFolder( rootFolder = srcDir, createSubfolders = T )
inputFiles=list.files( path=LFQbench.Config$DataRootFolder, pattern="\..+" )
nix = sapply( inputFiles, FSWE.generateReports, softwareSource = "guess", keep_original_names = T, singleHits = F, plotHistogram = T, plotHistNAs = T, reportSequences = F )
hye124.res = LFQbench.batchProcessRootFolder( )`
the error is "Can't use numeric NA as column index with [
." when i execute the code in the last.
`nix = sapply(
inputFiles,
FSWE.generateReports,
softwareSource = "guess",
keep_original_names = T,
singleHits = F,
plotHistogram = T,
plotHistNAs = T,
reportSequences = F
)'
the correct error is
"错误: Can't use numeric NA as column index with [
.
Run rlang::last_error()
to see where the error occurred.
rlang::last_error() <error/rlang_error> Can't use numeric NA as column index with
[
. Backtrace:
- base::source(...)
- base::sapply(...) LFQbench-master/vignettes/LFQbench.R:52:0
- base::lapply(X = X, FUN = FUN, ...)
- LFQbench:::FUN(X[[i]], ...)
- tibble:::
[.tbl_df
(peptides_wide, , c(c(1:3), experiment.order))- tibble:::check_names_df(j, x)
- tibble:::check_names_df_numeric(j, x) Run
rlang::last_trace()
to see the full context. rlang::last_trace() <error/rlang_error> Can't use numeric NA as column index with[
. Backtrace: x- +-base::source(...)
- | +-base::withVisible(eval(ei, envir))
- | -base::eval(ei, envir)
- | -base::eval(ei, envir)
- -base::sapply(...) LFQbench-master/vignettes/LFQbench.R:52:0
- -base::lapply(X = X, FUN = FUN, ...)
- -LFQbench:::FUN(X[[i]], ...)
- +-peptides_wide[, c(c(1:3), experiment.order)]
- +-dplyr:::
[.grouped_df
(peptides_wide, , c(c(1:3), experiment.order))- +-base::NextMethod()
- -tibble:::
[.tbl_df
(peptides_wide, , c(c(1:3), experiment.order))- -tibble:::check_names_df(j, x)
- -tibble:::check_names_df_numeric(j, x)"
my input file is in the folder \ext\data\vignette_examples\hye124
In that folder there is not any file related to a Synapt G2S, as your code suggests:
dataSets = data.frame(
"HYE110_SynaptG2S" = c(
paste(rep("HYE110_A"), 1:3, sep = "."),
paste(rep("HYE110_B"), 1:3, sep = ".")
),
Also later in your code you change your source directory:
srcDir = "D:/LFQbench/LFQbench-master/ext/data/vignette_examples/hye110"
And later again you change the datasets:
dataSets = data.frame(
"HYE124_TTOF6600_64var" = c(
" lgillet_I150211_008", "lgillet_I150211_010", "lgillet_I150211_012", ## A
" lgillet_I150211_009", "lgillet_I150211_011", "lgillet_I150211_013 " ## B
) ,
row.names = c ( "A1" , "A2" , "A3" , "B1" , "B2" , "B3" )
)
Could you please clarify your code? It is hard to know what data you are trying to analyse.
Thanks, Pedro Navarro.
when i execute the example 6.12 in page 162 in the Supplementary Text and Figures of your paper "A multicenter study benchmarks software tools for label-free proteome quantification", when i run the code :
nix = sapply( inputFiles, FSWE.generateReports, softwareSource = "guess", keep_original_names = T, singleHits = F, plotHistogram = T, plotHistNAs = T, reportSequences = F )
i meet errors "Error in guessSoftwareSource(experimentFile, FSWE.softwareNames) : Software source can not be guessed by filename! Review file names: they should start by the software source!File: LFQbench.R" Can you explain the reason for me , thank you .