validatePSIMI25: Validating PSI-MI 2.5 file with MIF25 XML schema

Description Usage Arguments Details Value Note Author(s) References Examples

View source: R/validatePSIMI25.R

Description

The function validates given PSI-MI 2.5 file with MIF25 XML schema provided by the Molecular Interactions Workgroup of HUPO Proteomics Standards Initiative

Usage

1
2
3
validatePSIMI25(file,
schema = system.file("extdata/schemas/MIF25.xsd", package = "RpsiXML"),
ignore.stderr = TRUE)

Arguments

file

The name or the URL of the file to be validated

schema

The schema file of PSI-MI 2.5 file format by default

ignore.stderr

Whether to print out errors in the console

Details

We advice to set "ignore.stderr=FALSE" for the first time of validating. The error number of the file will be printed in the console. When the number is not 0, one can set "ignore.stderr=TRUE" and see the errors produced during the validation.

Value

The number of errors in validating the file

Note

This function sofar depends on the tool "xmllint" bundled with libxml2 library. We plan to compile it later to run independent of the tool.

Author(s)

Jitao David Zhang <jitao_david.zhang@roche.com>, Tony Chiang <tchiang@ebi.ac.uk>

References

libxml2 library http://xmlsoft.org/ PSI-MI 2.5 XML schema http://psidev.sourceforge.net/mi/rel25/src/MIF25.xsd

Examples

1
2
3
okFile <- system.file("extdata/psi25files/intact_2008_test.xml",
                      package="RpsiXML")
validatePSIMI25(okFile)

Example output

Loading required package: annotate
Loading required package: AnnotationDbi
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colMeans, colSums, colnames, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int,
    pmin, pmin.int, rank, rbind, rowMeans, rowSums, rownames, sapply,
    setdiff, sort, table, tapply, union, unique, unsplit, which,
    which.max, which.min

Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: IRanges
Loading required package: S4Vectors

Attaching package: 'S4Vectors'

The following object is masked from 'package:base':

    expand.grid

Loading required package: XML
Loading required package: graph

Attaching package: 'graph'

The following object is masked from 'package:XML':

    addNode

Loading required package: RBGL
Loading required package: hypergraph
No methods found in package 'Biobase' for request: 'listlen' when loading 'RpsiXML'
No methods found in package 'annotate' for requests: 'pubmed', 'buildPubMedAbst' when loading 'RpsiXML'

Attaching package: 'RpsiXML'

The following object is masked from 'package:IRanges':

    members

sh: 1: cannot create /dev/null: Permission denied
sh: 1: xmllint: not found
/usr/local/lib/R/site-library/RpsiXML/extdata/psi25files/intact_2008_test.xml invalid! Error code: 127 
Set ignore.stderr=FALSE to see the errors

RpsiXML documentation built on Nov. 8, 2020, 6:02 p.m.