Code Monkey home page Code Monkey logo

msnid's People

Contributors

colinbrislawn avatar dtenenba avatar hpages avatar jmoon1 avatar laurentgatto avatar nturaga avatar vladpetyuk avatar vobencha avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

msnid's Issues

More robust way of evaluating filter expression in `apply_filter`

Hi Vlad,
I've recently run into an error related to non-standard evaluation in your apply_filter method. The problem appeared when building the Bioconductor "proteomics" workflow vignette by a call to rmarkdown::render from inside of another function, see at the bottom of http://docbuilder.bioconductor.org:8080/job/proteomics/20/label=master/console

It appears to me that this is some sort of scoping issue caused by the fact that eval(exprssn) evaluates exprssn in the calling environment, in this case your apply_filter method. Things seem to work fine provided that the objects are defined in the global environment, which is usually the case when working interactively, or for code chunks inside a vignette. However, things break once the rmarkdown::render function is called from another function, which is the case for the BioC workflow builder scripts. This is because by default render evaluates code chunks in its calling environment and not in the global environment; in such a case object names from the expression passed to the apply_filter method are not resolved properly.

The workaround which I've implemented on the BioC workflow builders is to run render in the global environment by specifying envir = parent.frame(2L). However, it would be good to make your code bullet proof in first place. I've already tried replacing the following line in R/MSnID-methods.R

msnidObj@psms <- msnidObj@psms[eval(exprssn),]

by

msnidObj@psms <- msnidObj@psms[eval(exprssn, msnidObj@psms, parent.frame()),]

but strangely enough, this doesn't seem to make any difference. I would expect that specifying the enclosing environments should alleviate the issue, but somehow this doesn't work as expected.

Any thoughts?

Cheers,
Andrzej

combining MSnID objects

need to add a way to combine two (and thus more) MSnID objects.
candidate approaches are: c, +, combine

mzR::openIDfile

Would you consider a patch to support mzR::openIDfile to read the ident files. It is really fast!

PSM FDR calculation

Turns out FDR calculation at the PSM level ignores peptide-to-protein redundancy. That is some PSMs are counted more then others in the FDR calculation. Not that it results in substantially different value, but still technically this is not accurate. Note, that this does not affect more FDR calculation at peptide and proteins/accession levels. This should be fixed the throwing away protein/accession column and taking unique rows before PSM FDR calculation.

Error with assess_missed_cleavages

I'm running assess_missed_cleavages() and it is returning the following error:

Error: all(grepl("^.\\..+\\..$", peptide)) is not TRUE

I've made sure that "peptide" %in% names(msnid) is true. Also, all(grepl("^.\\..+\\..$", msnid_out$peptide)) is true, where msnid_out is the output of psms(msnid).

Any help is greatly appreciated!

Here is my session information:

R version 3.4.3 (2017-11-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_Canada.1252 LC_CTYPE=English_Canada.1252 LC_MONETARY=English_Canada.1252
[4] LC_NUMERIC=C LC_TIME=English_Canada.1252

attached base packages:
[1] parallel stats graphics grDevices utils datasets methods base

other attached packages:
[1] ggplot2_2.2.1 magrittr_1.5 MSGFplus_1.12.0 MSnbase_2.4.2 ProtGenerics_1.10.0 BiocParallel_1.12.0
[7] Biobase_2.38.0 BiocGenerics_0.24.0 MSnID_1.12.1 mzID_1.16.0 mzR_2.12.0 Rcpp_0.12.16

loaded via a namespace (and not attached):
[1] reshape2_1.4.3 lattice_0.20-35 colorspace_1.3-2 stats4_3.4.3 vsn_3.46.0
[6] XML_3.98-1.11 rlang_0.2.0 R.oo_1.22.0 pillar_1.2.2 glue_1.2.0
[11] R.utils_2.6.0 affy_1.56.0 bindrcpp_0.2.2 affyio_1.48.0 foreach_1.4.4
[16] R.cache_0.13.0 bindr_0.1.1 plyr_1.8.4 stringr_1.3.1 zlibbioc_1.24.0
[21] munsell_0.4.3 pcaMethods_1.70.0 gtable_0.2.0 R.methodsS3_1.7.1 codetools_0.2-15
[26] labeling_0.3 IRanges_2.12.0 doParallel_1.0.11 BiocInstaller_1.28.0 preprocessCore_1.40.0
[31] scales_0.5.0 limma_3.34.9 S4Vectors_0.16.0 impute_1.52.0 digest_0.6.15
[36] stringi_1.2.2 dplyr_0.7.4 grid_3.4.3 tools_3.4.3 lazyeval_0.2.1
[41] tibble_1.4.2 pkgconfig_2.0.1 data.table_1.11.2 assertthat_0.2.0 iterators_1.0.9
[46] R6_2.2.2 MALDIquant_1.17 compiler_3.4.3

peptides generic

Would it be possible to ditch the peptides generic from MSnID and re-use the one defined in ProtGenerics instead?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.