{"id":15051479,"url":"https://github.com/rformassspectrometry/protgenerics","last_synced_at":"2025-08-08T01:05:33.273Z","repository":{"id":26893440,"uuid":"30354718","full_name":"rformassspectrometry/ProtGenerics","owner":"rformassspectrometry","description":"S4 generic functions for Bioconductor mass spectrometry infrastructure","archived":false,"fork":false,"pushed_at":"2024-03-12T06:29:03.000Z","size":98,"stargazers_count":7,"open_issues_count":1,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-09T23:12:50.838Z","etag":null,"topics":["bioconductor","mass-spectrometry","metabolomics","proteomics","r"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rformassspectrometry.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-02-05T12:37:53.000Z","updated_at":"2024-05-30T08:17:21.867Z","dependencies_parsed_at":"2024-03-01T09:44:10.567Z","dependency_job_id":"76fc2790-df2c-419e-b3e6-0910219f5484","html_url":"https://github.com/rformassspectrometry/ProtGenerics","commit_stats":{"total_commits":128,"total_committers":15,"mean_commits":8.533333333333333,"dds":0.7890625,"last_synced_commit":"3a470d1e1121e59bfa8e2d36ba60f4a021f37843"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rformassspectrometry%2FProtGenerics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rformassspectrometry%2FProtGenerics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rformassspectrometry%2FProtGenerics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rformassspectrometry%2FProtGenerics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rformassspectrometry","download_url":"https://codeload.github.com/rformassspectrometry/ProtGenerics/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248144929,"owners_count":21055009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bioconductor","mass-spectrometry","metabolomics","proteomics","r"],"created_at":"2024-09-24T21:35:51.401Z","updated_at":"2025-04-10T02:41:26.433Z","avatar_url":"https://github.com/rformassspectrometry.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, echo = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  fig.path = \"README-\"\n)\n```\n\n# Generic infrastructure for Bioconductor mass spectrometry packages\n\n## Description:\n\nThese generic functions and classes provide basic interfaces to\noperations on and data access to mass spectrometry infrastructure in\nthe Bioconductor project.\n\nFor the details, please consult the respective methods' manual pages.\n\n## Usage:\n\n```r\npsms(object, ...)\npeaks(object, ...)\nmodifications(object, ...)\ndatabase(object, ...)\nrtime(object, ...)\ntic(object, ...)\nspectra(object, ...)\nintensity(object, ...)\nmz(object, ...)\npeptides(object, ...)\nproteins(object, ...)\naccessions(object, ...)\nscans(object, ...)\nmass(object, ...)\nions(object, ...)\nchromatograms(object, ...)\nchromatogram(object, ...)\nisCentroided(object, ...)\n## and many more - see below\n```\n\n## Arguments:\n\n- `object`: Object of class for which methods are defined.\n- `...`: Further arguments, possibly used by downstream methods.\n\n## Details:\n\n### When should one define a generics?:\n\nGenerics are appropriate for functions that have _generic_\nnames, i.e. names that occur in multiple circumstances, (with\ndifferent input classes, most often defined in different\npackages) or, when (multiple) dispatching is better handled by\nthe generics mechanism rather than the developer. The\ndispatching mechanism will then automatically call the\nappropriate method and save the user from explicitly calling\n`package::method` or the developer to handle the multiple input\ntypes cases. When no such conflict exists or is unlikely to\nhappen (for example when the name of the function is specific to\na package or domain, or for class slots accessors and\nreplacement methods), the usage of a generic is arguably\nquestionable, and in most of these cases, simple,\nstraightforward functions would be perfectly valid.\n\n### When to define a generic in `ProtGenerics`?:\n\n`ProtGenerics` is not meant to be the central package for generics,\nnor should it stop developers from defining the generics they need. It\nis a means to centralise generics that are defined in different\npackages (for example `mzR::psms` and `mzID::psms`, or\n`IRanges::score` and `mzR::score`, now `BioGenerics::score`) or\ngenerics that live in a rather big package (say `mzR`) on which one\nwouldn't want to depend just for the sake of that generics'\ndefinition.\n\nThe goal of `ProtGenerics` is to step in when namespace conflicts\narise so as to to facilitate inter-operability of packages. In case\nsuch conflict appears due to multiple generics, we would (1) add these\nsame definitions in `ProtGenerics`, (2) remove the definitions from\nthe packages they stem from, which then (3) only need to import\n`ProtGenerics`. This would be very minor/straightforward changes for\nthe developers and would resolve issues when they arise.\n\nMore generics can be added on request by opening an issue or sending a\npull request on:\n\n[https://github.com/RforMassSpectrometry/ProtGenerics](https://github.com/RforMassSpectrometry/ProtGenerics)\n\n\n## See Also:\n\n- The `BiocGenerics` package for S4 generic functions needed by many\n  Bioconductor packages.\n- `showMethods` for displaying a summary of the methods defined for a\n  given generic function.\n- `selectMethod` for getting the definition of a specific method.\n- `setGeneric` and `setMethod` for defining generics and methods.\n\n## Examples:\n\n```{r}\nlibrary(\"ProtGenerics\")\n## List all the symbols defined in this package:\nls('package:ProtGenerics')\n\nlibrary(\"mzR\")\n## What methods exists for 'peaks'\nshowMethods(\"peaks\")\n\n## To look at one method in particular\ngetMethod(\"peaks\", \"mzRpwiz\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frformassspectrometry%2Fprotgenerics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frformassspectrometry%2Fprotgenerics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frformassspectrometry%2Fprotgenerics/lists"}