diff --git a/dev/index.html b/dev/index.html index f5b3591..4fd3aef 100644 --- a/dev/index.html +++ b/dev/index.html @@ -103,7 +103,8 @@

maldipickr provides documented and tested R functions that will help you dereplicate MALDI-TOF data and cherry-pick representative spectra of microbial isolates.

-

Check out the graphical overview (click for a bigger version). maldipickr can use two approaches: from taxonomic identification reports (left) or from spectra data (right). Thumbnail of maldipickr graphical overview

+

Check out the graphical overview. maldipickr can use two approaches: from taxonomic identification reports (left) or from spectra data (right). Click on the thumbnail for a bigger version.

+

Thumbnail of maldipickr graphical overview

Installation diff --git a/dev/pkgdown.yml b/dev/pkgdown.yml index d554a31..f4e827a 100644 --- a/dev/pkgdown.yml +++ b/dev/pkgdown.yml @@ -5,7 +5,7 @@ articles: dereplicate-bruker-maldi-biotyper-spectra: dereplicate-bruker-maldi-biotyper-spectra.html import-data-from-bruker-maldi-biotyper: import-data-from-bruker-maldi-biotyper.html maldipickr: maldipickr.html -last_built: 2024-09-11T16:24Z +last_built: 2024-09-11T16:33Z urls: reference: https://clavellab.github.io/maldipickr/reference article: https://clavellab.github.io/maldipickr/articles diff --git a/dev/search.json b/dev/search.json index e1ec112..c0e38c3 100644 --- a/dev/search.json +++ b/dev/search.json @@ -1 +1 @@ -[{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement cpauvert [] ukaachen [dot] de. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired [Mozilla’s code conduct enforcement ladder][https://github.com/mozilla/inclusion]. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contributing to {maldipickr}","title":"Contributing to {maldipickr}","text":"following set guidelines contributing {maldipickr}1. guidelines strict rules. Use best judgment, feel free propose changes document pull request, long abiding Contributor Code Conduct. contribution welcomed open contribution, typos new features. Thank taking time! guide throughout process make safe position contribute, whatever level R programming.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CONTRIBUTING.html","id":"maldipickr-uses-fusen-with-flat-files-rmd","dir":"","previous_headings":"","what":"{maldipickr} uses {fusen} with flat files (.Rmd)","title":"Contributing to {maldipickr}","text":"note structure R package. use {fusen} package develop. means multiple files package R/, tests/ vignettes/ issued flat file (e.g. .Rmd file). case, see following warnings top files: % Generated roxygen2: edit hand % Please edit documentation R/delineate_with_similarity.R # WARNING - Generated {fusen} dev/dereplicate-spectra.Rmd: edit hand means need make changes corresponding flat file, inflate() flat file. recommend using fusen::inflate_all() directly takes account modification. way developing fusen , new , illustration {fusen} documentation great help.","code":"% Generated by roxygen2: do not edit by hand % Please edit documentation in R/delineate_with_similarity.R # WARNING - Generated by {fusen} from dev/dereplicate-spectra.Rmd: do not edit by hand"},{"path":"https://clavellab.github.io/maldipickr/dev/CONTRIBUTING.html","id":"the-case-of-readme","dir":"","previous_headings":"{maldipickr} uses {fusen} with flat files (.Rmd)","what":"The case of README","title":"Contributing to {maldipickr}","text":"Changes README.md file done flat file README.Rmd. However, file built fusen need use devtools::build_readme().","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CONTRIBUTING.html","id":"fixing-typos","dir":"","previous_headings":"","what":"Fixing typos","title":"Contributing to {maldipickr}","text":"can fix typos, spelling mistakes, grammatical errors documentation vignettes directly using GitHub web interface, long changes made source file. generally means ’ll need edit roxygen2 comments R code chunks vignettes flat files (.Rmd) dev/ directory. can find .R file generates .Rd reading comment first line.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CONTRIBUTING.html","id":"bigger-changes","dir":"","previous_headings":"","what":"Bigger changes","title":"Contributing to {maldipickr}","text":"want make bigger change, ’s good idea first reach issue using “Feature request” template instance. found bug, please file issue illustrates bug using “Bug report” template minimal reprex. Small datasets included maldipickr can used create reprex.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CONTRIBUTING.html","id":"pull-request-process","dir":"","previous_headings":"Bigger changes","what":"Pull request process","title":"Contributing to {maldipickr}","text":"Fork package clone onto computer. haven’t done , recommend using usethis::create_from_github(\"ClavelLab/maldipickr\", fork = TRUE). Install development dependences devtools::install_dev_deps(), make sure package passes R CMD check running devtools::check(). R CMD check doesn’t pass cleanly, ’s good idea ask help continuing. Create Git branch pull request (PR). recommend using usethis::pr_init(\"brief-description--change\") usethis::pr_init(\"fix-ISSUENUMBER-short-title\") aiming fix specific issue. Make changes Open dev/dev_history.R file: rstudioapi::navigateToFile(\"dev/dev_history.R\") Find “# Dependencies —-” part run attachment::att_amend_desc(...) presented . update documentation list dependencies DESCRIPTION ones needed maldipickr. Commit git, create PR running usethis::pr_push(), following prompts browser. title PR briefly describe change. body PR contain Fixes #issue-number. Summarize changes community editing NEWS.md. follow style described Common Changelog.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CONTRIBUTING.html","id":"code-style","dir":"","previous_headings":"","what":"Code style","title":"Contributing to {maldipickr}","text":"Commit style. Commits start whenever possible verb lower case, commit title continues sentence: “Applying commit …”. New code follow tidyverse style guide. can use styler package apply styles, please don’t restyle code nothing PR. use roxygen2, Markdown syntax, documentation. use testthat unit tests. Contributions test cases included easier accept.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contributing to {maldipickr}","text":"Please note fusen project released Contributor Code Conduct. contributing project agree abide terms.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright © 2007 Free Software Foundation, Inc.  Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions","title":"GNU General Public License","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code","title":"GNU General Public License","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions","title":"GNU General Public License","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law","title":"GNU General Public License","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies","title":"GNU General Public License","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions","title":"GNU General Public License","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: ) work must carry prominent notices stating modified , giving relevant date. b) work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. c) must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . d) work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms","title":"GNU General Public License","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: ) Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. b) Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. c) Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. d) Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. e) Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms","title":"GNU General Public License","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: ) Disclaiming warranty limiting liability differently terms sections 15 16 License; b) Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; c) Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; d) Limiting use publicity purposes names licensors authors material; e) Declining grant rights trademark law use trade names, trademarks, service marks; f) Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination","title":"GNU General Public License","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies","title":"GNU General Public License","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients","title":"GNU General Public License","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents","title":"GNU General Public License","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom","title":"GNU General Public License","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License","title":"GNU General Public License","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License","title":"GNU General Public License","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty","title":"GNU General Public License","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability","title":"GNU General Public License","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16","title":"GNU General Public License","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see . GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read .","code":" Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details."},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/articles/dereplicate-bruker-maldi-biotyper-spectra.html","id":"process-from-raw-spectra-to-peak-filtering","dir":"Articles","previous_headings":"Process Bruker MALDI Biotyper spectra","what":"Process from raw spectra to peak filtering","title":"Dereplicate Bruker MALDI Biotyper spectra","text":"imported raw data Bruker MALDI Biotyper, processing spectra based original implementation, run following tasks: Square-root transformation Mass range trimming 4-10 kDa deemed determinant Strejcek et al. (2018) Signal smoothing using Savitzky-Golay method half window size 20 Baseline correction SNIP procedure Normalization Total Ion Current Peak detection using SuperSmoother procedure signal--noise ratio 3 Peak filtering. step added discard peaks negative signal--noise ratio probably due edge mass range. full procedure illustrated example . case, resulting processed spectra, peaks final spectra metadata stored -memory, process_spectra() function enables storing files locally scalable high-throughput analyses.","code":"# Get an example directory of six Bruker MALDI Biotyper spectra directory_biotyper_spectra <- system.file( \"toy-species-spectra\", package = \"maldipickr\" ) # Import the six spectra spectra_list <- import_biotyper_spectra(directory_biotyper_spectra) # Transform the spectra signals according to Strejcek et al. (2018) processed <- process_spectra(spectra_list) # Overview of the list architecture that is returned # with the list of processed spectra, peaks identified and the # metadata table str(processed, max.level = 2) #> List of 3 #> $ spectra :List of 6 #> ..$ species1_G2 :Formal class 'MassSpectrum' [package \"MALDIquant\"] with 3 slots #> ..$ species2_E11:Formal class 'MassSpectrum' [package \"MALDIquant\"] with 3 slots #> ..$ species2_E12:Formal class 'MassSpectrum' [package \"MALDIquant\"] with 3 slots #> ..$ species3_F7 :Formal class 'MassSpectrum' [package \"MALDIquant\"] with 3 slots #> ..$ species3_F8 :Formal class 'MassSpectrum' [package \"MALDIquant\"] with 3 slots #> ..$ species3_F9 :Formal class 'MassSpectrum' [package \"MALDIquant\"] with 3 slots #> $ peaks :List of 6 #> ..$ species1_G2 :Formal class 'MassPeaks' [package \"MALDIquant\"] with 4 slots #> ..$ species2_E11:Formal class 'MassPeaks' [package \"MALDIquant\"] with 4 slots #> ..$ species2_E12:Formal class 'MassPeaks' [package \"MALDIquant\"] with 4 slots #> ..$ species3_F7 :Formal class 'MassPeaks' [package \"MALDIquant\"] with 4 slots #> ..$ species3_F8 :Formal class 'MassPeaks' [package \"MALDIquant\"] with 4 slots #> ..$ species3_F9 :Formal class 'MassPeaks' [package \"MALDIquant\"] with 4 slots #> $ metadata: tibble [6 × 3] (S3: tbl_df/tbl/data.frame) # A detailed view of the metadata with the median signal-to-noise # ratio (SNR) and the number of peaks processed$metadata #> # A tibble: 6 × 3 #> name SNR peaks #> #> 1 species1_G2 5.09 21 #> 2 species2_E11 5.54 22 #> 3 species2_E12 5.63 23 #> 4 species3_F7 4.89 26 #> 5 species3_F8 5.56 25 #> 6 species3_F9 5.40 25"},{"path":"https://clavellab.github.io/maldipickr/dev/articles/dereplicate-bruker-maldi-biotyper-spectra.html","id":"merge-multiple-processed-spectra","dir":"Articles","previous_headings":"Process Bruker MALDI Biotyper spectra","what":"Merge multiple processed spectra","title":"Dereplicate Bruker MALDI Biotyper spectra","text":"high-throughput analyses, multiples runs Bruker MALDI Biotyper expected resulting several batches spectra processed compared. processing natively independent, natively run parallel, integration batches comparison needs additional step. merge_processed_spectra() function aggregates processed spectra bins together detected peaks, tolerance 0.0020.002 average peak values bin (see MALDIquant::binPeaks), translate tolerance 2000 ppm. binning step results n×pn\\times p feature matrix (intensity matrix), nn rows nn processed spectra (peak-less spectra discarded) pp columns pp peaks masses. default, Strejeck et al. (2018) procedure, intensity values spectra missing peaks interpolated processed spectra signal. current function enables analyst decide whether interpolate values leave missing peaks NA converted null intensity value.","code":"# Get an example directory of six Bruker MALDI Biotyper spectra directory_biotyper_spectra <- system.file( \"toy-species-spectra\", package = \"maldipickr\" ) # Import the six spectra spectra_list <- import_biotyper_spectra(directory_biotyper_spectra) # Transform the spectra signals according to Strejcek et al. (2018) processed <- process_spectra(spectra_list) # Merge the spectra to produce the feature matrix fm <- merge_processed_spectra(list(processed)) # The feature matrix has 6 spectra as rows and # 35 peaks as columns dim(fm) #> [1] 6 35 # Notice the difference when the interpolation is turned off fm_no_interpolation <- merge_processed_spectra( list(processed), interpolate_missing = FALSE ) sum(fm == 0) # 0 #> [1] 0 sum(fm_no_interpolation == 0) # 68 #> [1] 68 # Multiple runs can be aggregated using list() # Merge the spectra to produce the feature matrix fm_all <- merge_processed_spectra(list(processed, processed, processed)) # The feature matrix has 3×6=18 spectra as rows and # 35 peaks as columns dim(fm_all) #> [1] 18 35 # If using a list, names will be dropped and are not propagated to the matrix. #' \\dontrun{ #' fm_all <- merge_processed_spectra( #' list(\"A\" = processed, \"B\" = processed, \"C\" = processed)) #' any(grepl(\"A|B|C\", rownames(fm_all))) # FALSE #' } #'"},{"path":"https://clavellab.github.io/maldipickr/dev/articles/dereplicate-bruker-maldi-biotyper-spectra.html","id":"compute-a-similarity-matrix-between-all-processed-spectra-not-included","dir":"Articles","previous_headings":"Process Bruker MALDI Biotyper spectra","what":"Compute a similarity matrix between all processed spectra (not included)","title":"Dereplicate Bruker MALDI Biotyper spectra","text":"batches spectra processed together, can use distance metric evaluate close spectra one another. Strejcek et al. (2018) recommend cosine metric compare spectra use fast implementation {coop} package. provide specific functions generate similarity matrix, illustrate can easily computed. Note feature matrix merge_processed_spectra() spectra rows peaks values columns. get similarity matrix spectra, either feature matrix must transposed dedicated function must used.","code":"# A. Compute the similarity matrix on the transposed feature matrix # using Pearson correlation coefficient sim_matrix <- stats::cor(t(fm), method = \"pearson\") # B.1 Install the coop package # install.packages(\"coop\") # B.2 Compute the similarity matrix on the rows of the feature matrix sim_matrix <- coop::tcosine(fm)"},{"path":[]},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/articles/dereplicate-bruker-maldi-biotyper-spectra.html","id":"similarity-to-clusters","dir":"Articles","previous_headings":"Delineate clusters of spectra > From a similarity matrix","what":"Similarity to clusters","title":"Dereplicate Bruker MALDI Biotyper spectra","text":"similarity matrix computed pairs studied spectra, next step delineate clusters spectra order dereplicate measured bacterial colonies, find nearly identical colonies. delineate_with_similarity() agnostic similarity metric used provided upper bound one numeric threshold relevant metric used given. recommend cosine metric Pearson product moment. Hierarchical clustering group spectra cluster similarity spectra (equal ) provided threshold. default recommended method complete linkage, also known farthest neighbor, ensure within-group minimum similarity cluster respects threshold. Finally, table summarizes spectra, cluster number assigned size cluster, total number spectra cluster.","code":"# Toy similarity matrix between the six example spectra of # three species. The cosine metric is used and a value of # zero indicates dissimilar spectra and a value of one # indicates identical spectra. cosine_similarity <- matrix( c( 1, 0.79, 0.77, 0.99, 0.98, 0.98, 0.79, 1, 0.98, 0.79, 0.8, 0.8, 0.77, 0.98, 1, 0.77, 0.77, 0.77, 0.99, 0.79, 0.77, 1, 1, 0.99, 0.98, 0.8, 0.77, 1, 1, 1, 0.98, 0.8, 0.77, 0.99, 1, 1 ), nrow = 6, dimnames = list( c( \"species1_G2\", \"species2_E11\", \"species2_E12\", \"species3_F7\", \"species3_F8\", \"species3_F9\" ), c( \"species1_G2\", \"species2_E11\", \"species2_E12\", \"species3_F7\", \"species3_F8\", \"species3_F9\" ) ) ) # Delineate clusters based on a 0.92 threshold applied # to the similarity matrix delineate_with_similarity(cosine_similarity, threshold = 0.92) #> # A tibble: 6 × 3 #> name membership cluster_size #> #> 1 species1_G2 1 4 #> 2 species2_E11 2 2 #> 3 species2_E12 2 2 #> 4 species3_F7 1 4 #> 5 species3_F8 1 4 #> 6 species3_F9 1 4"},{"path":"https://clavellab.github.io/maldipickr/dev/articles/dereplicate-bruker-maldi-biotyper-spectra.html","id":"set-a-reference-spectrum-for-each-cluster","dir":"Articles","previous_headings":"Delineate clusters of spectra > From a similarity matrix","what":"Set a reference spectrum for each cluster","title":"Dereplicate Bruker MALDI Biotyper spectra","text":"table clusters generated similarity matrix, reference spectrum can assigned cluster. choose define high-quality spectra representative spectra clusters using internal information. , representative spectra , within cluster, highest median signal--noise ratio highest number detected peaks. function set_reference_spectra() change order cluster table merely adds additional column is_reference indicate whether corresponding spectrum representative cluster.","code":"# Get an example directory of six Bruker MALDI Biotyper spectra # Import the six spectra and # Transform the spectra signals according to Strejcek et al. (2018) processed <- system.file( \"toy-species-spectra\", package = \"maldipickr\" ) %>% import_biotyper_spectra() %>% process_spectra() # Toy similarity matrix between the six example spectra of # three species. The cosine metric is used and a value of # zero indicates dissimilar spectra and a value of one # indicates identical spectra. cosine_similarity <- matrix( c( 1, 0.79, 0.77, 0.99, 0.98, 0.98, 0.79, 1, 0.98, 0.79, 0.8, 0.8, 0.77, 0.98, 1, 0.77, 0.77, 0.77, 0.99, 0.79, 0.77, 1, 1, 0.99, 0.98, 0.8, 0.77, 1, 1, 1, 0.98, 0.8, 0.77, 0.99, 1, 1 ), nrow = 6, dimnames = list( c( \"species1_G2\", \"species2_E11\", \"species2_E12\", \"species3_F7\", \"species3_F8\", \"species3_F9\" ), c( \"species1_G2\", \"species2_E11\", \"species2_E12\", \"species3_F7\", \"species3_F8\", \"species3_F9\" ) ) ) # Delineate clusters based on a 0.92 threshold applied # to the similarity matrix clusters <- delineate_with_similarity( cosine_similarity, threshold = 0.92 ) # Set reference spectra with the toy example set_reference_spectra(clusters, processed$metadata) #> # A tibble: 6 × 6 #> name membership cluster_size SNR peaks is_reference #> #> 1 species1_G2 1 4 5.09 21 FALSE #> 2 species2_E11 2 2 5.54 22 FALSE #> 3 species2_E12 2 2 5.63 23 TRUE #> 4 species3_F7 1 4 4.89 26 FALSE #> 5 species3_F8 1 4 5.56 25 TRUE #> 6 species3_F9 1 4 5.40 25 FALSE"},{"path":"https://clavellab.github.io/maldipickr/dev/articles/dereplicate-bruker-maldi-biotyper-spectra.html","id":"from-taxonomic-identifications","dir":"Articles","previous_headings":"Delineate clusters of spectra","what":"From taxonomic identifications","title":"Dereplicate Bruker MALDI Biotyper spectra","text":"alternative similarity matrix approach previous section rely taxonomic identification spectra delineate clusters. , must use Bruker MALDI Biotyper report Compass software summarize identification microorganisms using internal database. report reports imported (R using read_biotyper_report()), function delineate_with_identification() group spectra based identifications. Clusters generated taxonomic identifications can use function set_reference_spectra() latter relies peaks information disclosed Biotyper report. Therefore, users interested cherry-picking spectra using taxonomic identifications use pick_spectra() function described combination input output tables delineate_with_identification() function pick instance spectra highest log score (using criteria_column = \"bruker_log\").","code":"report_unknown <- read_biotyper_report( system.file(\"biotyper_unknown.csv\", package = \"maldipickr\") ) delineate_with_identification(report_unknown) #> Generating clusters from single report #> # A tibble: 4 × 3 #> name membership cluster_size #> #> 1 unknown_isolate_1 2 1 #> 2 unknown_isolate_2 3 1 #> 3 unknown_isolate_3 1 2 #> 4 unknown_isolate_4 1 2"},{"path":"https://clavellab.github.io/maldipickr/dev/articles/dereplicate-bruker-maldi-biotyper-spectra.html","id":"import-clusters-results-generated-by-spede","dir":"Articles","previous_headings":"Delineate clusters of spectra","what":"Import clusters results generated by SPeDE","title":"Dereplicate Bruker MALDI Biotyper spectra","text":"Raw spectra can also processed clustered another approach, named SPeDE, developed Dumolin et al. (2019). resulting dereplication step produces comma separated table. example illustrates import table R consistent dereplication table generated within {maldipickr} package.","code":"# Reformat the output from SPeDE table # https://github.com/LM-UGent/SPeDE import_spede_clusters( system.file(\"spede.csv\", package = \"maldipickr\") ) #> # A tibble: 6 × 5 #> name membership cluster_size quality is_reference #> #> 1 species1_G2 1 1 GREEN TRUE #> 2 species2_E11 2 2 ORANGE FALSE #> 3 species2_E12 2 2 GREEN TRUE #> 4 species3_F7 3 1 GREEN TRUE #> 5 species3_F8 4 2 ORANGE FALSE #> 6 species3_F9 4 2 GREEN TRUE"},{"path":"https://clavellab.github.io/maldipickr/dev/articles/dereplicate-bruker-maldi-biotyper-spectra.html","id":"cherry-pick-bruker-maldi-biotyper-spectra","dir":"Articles","previous_headings":"","what":"Cherry-pick Bruker MALDI Biotyper spectra","title":"Dereplicate Bruker MALDI Biotyper spectra","text":"isolating bacteria environment, experimenters want thorough also work-, time- cost-savvy. One approach reduce redundancy bacterial isolates analyzing MALDI-TOF spectra Bruker Biotyper. steps previously described vignette consisted processing spectra able pick non-redundant spectra, using pick_spectra() function. function, illustrated examples , can pick spectra using different types inputs: reference spectra information present cluster table (using delineate_with_similarity() import_spede_clusters() functions; see example 1) external metadata table containing variable (e.g., optical density, fluorescence) maximized (default) minimized per cluster (see example 2) Spectra, clusters, can also excluded cherry-picking decision, procedure termed masking . distinguish two types mask implemented pick_spectra() function: soft mask discards spectra , correspond instance low-quality sample, negative control samples (see example 3) hard mask discards spectra clusters (see example 4). particularly useful spectra previously picked. instance, exclude colonies grown picked 24h streaking comparing colonies grown 72h. Advanced users can also provide directly cluster table custom sort cluster accommodate complex design. Ultimately, function delivers table many rows cluster table additional logical column named to_pick indicate whether colony associated spectra picked (TRUE) picked (FALSE).","code":"# 0. Load a toy example of a tibble of clusters created by # the `delineate_with_similarity` function. clusters <- readRDS( system.file(\"clusters_tibble.RDS\", package = \"maldipickr\" ) ) # 1. By default and if no other metadata are provided, # the function picks reference spectra for each clusters. # # N.B: The spectra `name` and `to_pick` columns are moved to the left # only for clarity using the `relocate()` function. # pick_spectra(clusters) %>% dplyr::relocate(name, to_pick) # only for clarity #> # A tibble: 6 × 7 #> name to_pick membership cluster_size SNR peaks is_reference #> #> 1 species1_G2 FALSE 1 4 5.09 21 FALSE #> 2 species2_E11 FALSE 2 2 5.54 22 FALSE #> 3 species2_E12 TRUE 2 2 5.63 23 TRUE #> 4 species3_F7 FALSE 1 4 4.89 26 FALSE #> 5 species3_F8 TRUE 1 4 5.56 25 TRUE #> 6 species3_F9 FALSE 1 4 5.40 25 FALSE # 2.1 Simulate OD600 values with uniform distribution # for each of the colonies we measured with # the Bruker MALDI Biotyper set.seed(104) metadata <- dplyr::transmute( clusters, name = name, OD600 = runif(n = nrow(clusters)) ) metadata #> # A tibble: 6 × 2 #> name OD600 #> #> 1 species1_G2 0.364 #> 2 species2_E11 0.772 #> 3 species2_E12 0.735 #> 4 species3_F7 0.973 #> 5 species3_F8 0.740 #> 6 species3_F9 0.201 # 2.2 Pick the spectra based on the highest # OD600 value per cluster pick_spectra(clusters, metadata, \"OD600\") %>% dplyr::relocate(name, to_pick) # only for clarity #> # A tibble: 6 × 8 #> name to_pick membership cluster_size SNR peaks is_reference OD600 #> #> 1 species1_G2 FALSE 1 4 5.09 21 FALSE 0.364 #> 2 species2_E11 TRUE 2 2 5.54 22 FALSE 0.772 #> 3 species2_E12 FALSE 2 2 5.63 23 TRUE 0.735 #> 4 species3_F7 TRUE 1 4 4.89 26 FALSE 0.973 #> 5 species3_F8 FALSE 1 4 5.56 25 TRUE 0.740 #> 6 species3_F9 FALSE 1 4 5.40 25 FALSE 0.201 # 3.1 Say that the wells on the right side of the plate are # used for negative controls and should not be picked. metadata <- metadata %>% dplyr::mutate( well = gsub(\".*[A-Z]([0-9]{1,2}$)\", \"\\\\1\", name) %>% strtoi(), is_edge = is_well_on_edge( well_number = well, plate_layout = 96, edges = \"right\" ) ) # 3.2 Pick the spectra after discarding (or soft masking) # the spectra indicated by the `is_edge` column. pick_spectra(clusters, metadata, \"OD600\", soft_mask_column = \"is_edge\" ) %>% dplyr::relocate(name, to_pick) # only for clarity #> # A tibble: 6 × 10 #> name to_pick membership cluster_size SNR peaks is_reference OD600 well #> #> 1 species1… FALSE 1 4 5.09 21 FALSE 0.364 2 #> 2 species2… TRUE 2 2 5.54 22 FALSE 0.772 11 #> 3 species2… FALSE 2 2 5.63 23 TRUE 0.735 12 #> 4 species3… TRUE 1 4 4.89 26 FALSE 0.973 7 #> 5 species3… FALSE 1 4 5.56 25 TRUE 0.740 8 #> 6 species3… FALSE 1 4 5.40 25 FALSE 0.201 9 #> # ℹ 1 more variable: is_edge # 4.1 Say that some spectra were picked before # (e.g., in the column F) in a previous experiment. # We do not want to pick clusters with those spectra # included to limit redundancy. metadata <- metadata %>% dplyr::mutate( picked_before = grepl(\"_F\", name) ) # 4.2 Pick the spectra from clusters without spectra # labeled as `picked_before` (hard masking). pick_spectra(clusters, metadata, \"OD600\", hard_mask_column = \"picked_before\" ) %>% dplyr::relocate(name, to_pick) # only for clarity #> # A tibble: 6 × 11 #> name to_pick membership cluster_size SNR peaks is_reference OD600 well #> #> 1 species1… FALSE 1 4 5.09 21 FALSE 0.364 2 #> 2 species2… TRUE 2 2 5.54 22 FALSE 0.772 11 #> 3 species2… FALSE 2 2 5.63 23 TRUE 0.735 12 #> 4 species3… FALSE 1 4 4.89 26 FALSE 0.973 7 #> 5 species3… FALSE 1 4 5.56 25 TRUE 0.740 8 #> 6 species3… FALSE 1 4 5.40 25 FALSE 0.201 9 #> # ℹ 2 more variables: is_edge , picked_before "},{"path":"https://clavellab.github.io/maldipickr/dev/articles/dereplicate-bruker-maldi-biotyper-spectra.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"Dereplicate Bruker MALDI Biotyper spectra","text":"Dumolin C, Aerts M, Verheyde B, Schellaert S, Vandamme T, Van Der Jeugt F, De Canck E, Cnockaert M, Wieme AD, Cleenwerck , Peiren J, Dawyndt P, Vandamme P, & Carlier . (2019). “Introducing SPeDE: High-Throughput Dereplication Accurate Determination Microbial Diversity Matrix-Assisted Laser Desorption–Ionization Time Flight Mass Spectrometry Data”. MSystems 4(5). doi:10.1128/msystems.00437-19. Strejcek M, Smrhova T, Junkova P & Uhlik O (2018). “Whole-Cell MALDI-TOF MS versus 16S rRNA Gene Analysis Identification Dereplication Recurrent Bacterial Isolates.” Frontiers Microbiology 9 doi:10.3389/fmicb.2018.01294.","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/articles/import-data-from-bruker-maldi-biotyper.html","id":"importing-a-single-report","dir":"Articles","previous_headings":"Importing generated reports from the Bruker MALDI Biotyper device","what":"Importing a single report","title":"Import data from Bruker MALDI Biotyper","text":"Bruker MALDI Biotyper generates report via Compass software summarizing identification microorganisms using internal database. file separated semi-colons, contains headers. report many columns wide format describe ten hits identification feasible, identification possible. --, makes table import R manipulation relatively painful. example import single Bruker MALDI Biotyper report {tibble}. default, best hit colony reported. hits can reported well, long format (long_format = TRUE), explorations {tidyverse} suite.","code":"# Get a example Bruker report biotyper <- system.file(\"biotyper.csv\", package = \"maldipickr\") # Import the report as a tibble report_tibble <- read_biotyper_report(biotyper) # Display the tibble report_tibble #> # A tibble: 3 × 8 #> name sample_name hit_rank bruker_quality bruker_species bruker_taxid #> #> 1 targetA NA 1 - not reliable identif… NA #> 2 targetB NA 1 +++ Escherichia coli 562 #> 3 targetC NA 1 +++ Kosakonia cowanii 208223 #> # ℹ 2 more variables: bruker_hash , bruker_log "},{"path":"https://clavellab.github.io/maldipickr/dev/articles/import-data-from-bruker-maldi-biotyper.html","id":"importing-multiple-reports","dir":"Articles","previous_headings":"Importing generated reports from the Bruker MALDI Biotyper device","what":"Importing multiple reports","title":"Import data from Bruker MALDI Biotyper","text":"large-scale analysis, batches identification run can easily imported using read_many_biotyper_reports function along custom-made metadata. example usage, one report artificially extended multiple reports.","code":"# List of Bruker MALDI Biotyper reports reports_paths <- system.file( c(\"biotyper.csv\", \"biotyper.csv\", \"biotyper.csv\"), package = \"maldipickr\" ) # Read the list of reports and combine them in a single tibble read_many_biotyper_reports( reports_paths, report_ids = c(\"first\", \"second\", \"third\"), # Additional metadata below are passed to dplyr::mutate growth_temperature = 37.0 ) #> # A tibble: 9 × 10 #> name original_name sample_name hit_rank bruker_quality bruker_species #> #> 1 first_targetA targetA NA 1 - not reliable … #> 2 first_targetB targetB NA 1 +++ Escherichia c… #> 3 first_targetC targetC NA 1 +++ Kosakonia cow… #> 4 second_targe… targetA NA 1 - not reliable … #> 5 second_targe… targetB NA 1 +++ Escherichia c… #> 6 second_targe… targetC NA 1 +++ Kosakonia cow… #> 7 third_targetA targetA NA 1 - not reliable … #> 8 third_targetB targetB NA 1 +++ Escherichia c… #> 9 third_targetC targetC NA 1 +++ Kosakonia cow… #> # ℹ 4 more variables: bruker_taxid , bruker_hash , bruker_log , #> # growth_temperature "},{"path":"https://clavellab.github.io/maldipickr/dev/articles/import-data-from-bruker-maldi-biotyper.html","id":"importing-spectra-from-the-bruker-maldi-biotyper-device","dir":"Articles","previous_headings":"","what":"Importing spectra from the Bruker MALDI Biotyper device","title":"Import data from Bruker MALDI Biotyper","text":"identification reports, Bruker MALDI Biotyper device outputs raw data used identification (database) form mass spectra. Thankfully, {MALDIquant} {readBrukerFlexData} packages help users import manipulate data R.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/articles/import-data-from-bruker-maldi-biotyper.html","id":"importing-multiple-spectra-from-a-directory-hierarchy","dir":"Articles","previous_headings":"Importing spectra from the Bruker MALDI Biotyper device","what":"Importing multiple spectra from a directory hierarchy","title":"Import data from Bruker MALDI Biotyper","text":"However, Bruker MALDI Biotyper device produces acqus files (instead native acqu files), readBrukerFlexDir() function {readBrukerFlexData} package fail following error message: following import_biotyper_spectra()) function used example circumvent error creating symbolic link conveniently helps removing calibration samples. toy dataset bundled package subset dataset {MALDIquantExamples} package consist six spectra: * 1 replicate species 1 * 2 replicates species 2 * 3 replicates species 3","code":"Error in .readAcquFile(fidFile = fidFile, verbose = verbose) : File ‘/data/maldi_dir/targetA/0_D10/1/1SLin/acqu’ doesn't exists! # Get an example directory of six Bruker MALDI Biotyper spectra directory_biotyper_spectra <- system.file( \"toy-species-spectra\", package = \"maldipickr\" ) # Import the six spectra spectra_list <- import_biotyper_spectra(directory_biotyper_spectra) # Display the list of spectra spectra_list #> [[1]] #> S4 class type : MassSpectrum #> Number of m/z values : 20882 #> Range of m/z values : 1962.222 - 20146.522 #> Range of intensity values: 2.4e+02 - 3.608e+04 #> Memory usage : 337.062 KiB #> Name : species1.G2 #> File : /home/runner/.cache/R/renv/library/maldipickr-8ce40efa/R-4.4/x86_64-pc-linux-gnu/maldipickr/toy-species-spectra/species1/0_G2/1/1SLin/fid #> #> [[2]] #> S4 class type : MassSpectrum #> Number of m/z values : 20882 #> Range of m/z values : 1962.222 - 20146.522 #> Range of intensity values: 1.82e+02 - 1.006e+04 #> Memory usage : 337.062 KiB #> Name : species2.E11 #> File : /home/runner/.cache/R/renv/library/maldipickr-8ce40efa/R-4.4/x86_64-pc-linux-gnu/maldipickr/toy-species-spectra/species2/0_E11/1/1SLin/fid #> #> [[3]] #> S4 class type : MassSpectrum #> Number of m/z values : 20882 #> Range of m/z values : 1962.222 - 20146.522 #> Range of intensity values: 3.25e+02 - 2.115e+04 #> Memory usage : 337.062 KiB #> Name : species2.E12 #> File : /home/runner/.cache/R/renv/library/maldipickr-8ce40efa/R-4.4/x86_64-pc-linux-gnu/maldipickr/toy-species-spectra/species2/0_E12/1/1SLin/fid #> #> [[4]] #> S4 class type : MassSpectrum #> Number of m/z values : 20882 #> Range of m/z values : 1961.215 - 20135.904 #> Range of intensity values: 1.94e+02 - 2.055e+04 #> Memory usage : 337.062 KiB #> Name : species3.F7 #> File : /home/runner/.cache/R/renv/library/maldipickr-8ce40efa/R-4.4/x86_64-pc-linux-gnu/maldipickr/toy-species-spectra/species3/0_F7/1/1SLin/fid #> #> [[5]] #> S4 class type : MassSpectrum #> Number of m/z values : 20882 #> Range of m/z values : 1961.215 - 20135.904 #> Range of intensity values: 1.6e+02 - 1.814e+04 #> Memory usage : 337.062 KiB #> Name : species3.F8 #> File : /home/runner/.cache/R/renv/library/maldipickr-8ce40efa/R-4.4/x86_64-pc-linux-gnu/maldipickr/toy-species-spectra/species3/0_F8/1/1SLin/fid #> #> [[6]] #> S4 class type : MassSpectrum #> Number of m/z values : 20882 #> Range of m/z values : 1961.215 - 20135.904 #> Range of intensity values: 1.59e+02 - 1.449e+04 #> Memory usage : 337.062 KiB #> Name : species3.F9 #> File : /home/runner/.cache/R/renv/library/maldipickr-8ce40efa/R-4.4/x86_64-pc-linux-gnu/maldipickr/toy-species-spectra/species3/0_F9/1/1SLin/fid"},{"path":"https://clavellab.github.io/maldipickr/dev/articles/import-data-from-bruker-maldi-biotyper.html","id":"evaluate-the-quality-of-the-spectra","dir":"Articles","previous_headings":"Importing spectra from the Bruker MALDI Biotyper device","what":"Evaluate the quality of the spectra","title":"Import data from Bruker MALDI Biotyper","text":"spectra imported, check_spectra() function can easily assess whether spectra list empty, length correspond profile data. spectra satisfy criteria, function exit warning indicate faulty spectra. Either way, function outputs list logical vectors (TRUE FALSE) indicating whether spectra empty (is_empty), odd length (is_outlier_length) profile spectra (is_not_regular).","code":"# Get an example directory of six Bruker MALDI Biotyper spectra directory_biotyper_spectra <- system.file( \"toy-species-spectra\", package = \"maldipickr\" ) # Import the six spectra spectra_list <- import_biotyper_spectra(directory_biotyper_spectra) # Display the list of checks, with FALSE where no anomaly is detected check_spectra(spectra_list) #> $is_empty #> [1] FALSE FALSE FALSE FALSE FALSE FALSE #> #> $is_outlier_length #> [1] FALSE FALSE FALSE FALSE FALSE FALSE #> #> $is_not_regular #> [1] FALSE FALSE FALSE FALSE FALSE FALSE # The overall sanity can be checked with Reduce Reduce(any, check_spectra(spectra_list)) # Should be FALSE #> [1] FALSE"},{"path":"https://clavellab.github.io/maldipickr/dev/articles/maldipickr.html","id":"quickstart","dir":"Articles","previous_headings":"","what":"Quickstart","title":"maldipickr","text":"maldipickr package helps microbiologists reduce duplicate/clonal bacteria cultures eventually exclude previously selected bacteria. maldipickr achieve feat grouping together data MALDI Biotyper helps choose representative bacteria group using user-relevant metadata – process known cherry-picking. maldipickr cherry-picks bacterial isolates MALDI Biotyper: using taxonomic identification report using spectra data","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/articles/maldipickr.html","id":"using-taxonomic-identification-report","dir":"Articles","previous_headings":"Quickstart","what":"Using taxonomic identification report","title":"maldipickr","text":"First make sure maldipickr installed loaded, alternatively follow instructions install package. Cherry-picking four isolates based taxonomic identification MALDI Biotyper done steps maldipickr.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/articles/maldipickr.html","id":"get-example-data","dir":"Articles","previous_headings":"Quickstart > Using taxonomic identification report","what":"Get example data","title":"maldipickr","text":"import example Biotyper CSV report glimpse table.","code":"report_tbl <- read_biotyper_report( system.file(\"biotyper_unknown.csv\", package = \"maldipickr\") ) report_tbl %>% dplyr::select(name, bruker_species, bruker_log) %>% knitr::kable()"},{"path":"https://clavellab.github.io/maldipickr/dev/articles/maldipickr.html","id":"delineate-clusters-and-cherry-pick","dir":"Articles","previous_headings":"Quickstart > Using taxonomic identification report","what":"Delineate clusters and cherry-pick","title":"maldipickr","text":"Delineate clusters identifications filtering reliable ones cherry-pick one representative spectra. Unreliable identifications based log-score replaced “reliable identification”, stay tuned represent isolates! chosen ones indicated to_pick column.","code":"report_tbl <- report_tbl %>% dplyr::mutate( bruker_species = dplyr::if_else(bruker_log >= 2, bruker_species, \"not reliable identification\") ) knitr::kable(report_tbl) report_tbl %>% delineate_with_identification() %>% pick_spectra(report_tbl, criteria_column = \"bruker_log\") %>% dplyr::relocate(name, to_pick, bruker_species) %>% knitr::kable() #> Generating clusters from single report"},{"path":"https://clavellab.github.io/maldipickr/dev/articles/maldipickr.html","id":"using-spectra-data","dir":"Articles","previous_headings":"Quickstart","what":"Using spectra data","title":"maldipickr","text":"parallel taxonomic identification reports, maldipickr process spectra data. Make sure maldipickr installed loaded, alternatively follow instructions install package. Cherry-picking six isolates three species based spectra data obtained MALDI Biotyper done steps maldipickr.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/articles/maldipickr.html","id":"get-example-data-1","dir":"Articles","previous_headings":"Quickstart > Using spectra data","what":"Get example data","title":"maldipickr","text":"set directory location example spectra data, adjust requirements. import process spectra gives us named list three objects: spectra, peaks metadata (details Value section process_spectra()).","code":"spectra_dir <- system.file(\"toy-species-spectra\", package = \"maldipickr\") processed <- spectra_dir %>% import_biotyper_spectra() %>% process_spectra()"},{"path":"https://clavellab.github.io/maldipickr/dev/articles/maldipickr.html","id":"delineate-clusters-and-cherry-pick-1","dir":"Articles","previous_headings":"Quickstart > Using spectra data","what":"Delineate clusters and cherry-pick","title":"maldipickr","text":"Delineate spectra clusters using Cosine similarity cherry-pick one representative spectra. chosen ones indicated to_pick column. provides brief overview features maldipickr, browse vignettes learn additional features.","code":"processed %>% list() %>% merge_processed_spectra() %>% coop::tcosine() %>% delineate_with_similarity(threshold = 0.92) %>% set_reference_spectra(processed$metadata) %>% pick_spectra() %>% dplyr::relocate(name, to_pick) %>% knitr::kable()"},{"path":"https://clavellab.github.io/maldipickr/dev/articles/maldipickr.html","id":"session-information","dir":"Articles","previous_headings":"","what":"Session information","title":"maldipickr","text":"","code":"sessionInfo() #> R version 4.4.1 (2024-06-14) #> Platform: x86_64-pc-linux-gnu #> Running under: Ubuntu 22.04.4 LTS #> #> Matrix products: default #> BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 #> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0 #> #> locale: #> [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 #> [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 #> [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C #> [10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C #> #> time zone: UTC #> tzcode source: system (glibc) #> #> attached base packages: #> [1] stats graphics grDevices datasets utils methods base #> #> other attached packages: #> [1] maldipickr_1.3.0.9000 #> #> loaded via a namespace (and not attached): #> [1] jsonlite_1.8.8 dplyr_1.1.4 compiler_4.4.1 #> [4] renv_1.0.3 MALDIquant_1.22.3 tidyselect_1.2.1 #> [7] parallel_4.4.1 tidyr_1.3.1 jquerylib_0.1.4 #> [10] systemfonts_1.1.0 textshaping_0.4.0 yaml_2.3.10 #> [13] fastmap_1.2.0 R6_2.5.1 generics_0.1.3 #> [16] knitr_1.48 tibble_3.2.1 desc_1.4.3 #> [19] readBrukerFlexData_1.9.2 bslib_0.8.0 pillar_1.9.0 #> [22] rlang_1.1.4 utf8_1.2.4 cachem_1.1.0 #> [25] xfun_0.47 fs_1.6.4 sass_0.4.9 #> [28] cli_3.6.3 withr_3.0.1 pkgdown_2.1.0 #> [31] magrittr_2.0.3 digest_0.6.37 lifecycle_1.0.4 #> [34] vctrs_0.6.5 evaluate_0.24.0 glue_1.7.0 #> [37] ragg_1.3.2 coop_0.6-3 fansi_1.0.6 #> [40] rmarkdown_2.28 purrr_1.0.2 tools_4.4.1 #> [43] pkgconfig_2.0.3 htmltools_0.5.8.1"},{"path":"https://clavellab.github.io/maldipickr/dev/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Charlie Pauvert. Author, maintainer, copyright holder. David Wylensek. Contributor. Selina Nüchtern. Contributor. Thomas Clavel. Contributor, funder, copyright holder.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Pauvert C, Wylensek D, Nüchtern S, Clavel T (2023). maldipickr: Dereplicate Cherry-pick Mass Spectrometry Spectra R. https://clavellab.github.io/maldipickr, https://github.com/ClavelLab/maldipickr.","code":"@Manual{pauvert_maldipickr_2023, title = {maldipickr: Dereplicate And Cherry-pick Mass Spectrometry Spectra in R}, author = {Charlie Pauvert and David Wylensek and Selina Nüchtern and Thomas Clavel}, year = {2023}, note = {https://clavellab.github.io/maldipickr, https://github.com/ClavelLab/maldipickr}, }"},{"path":"https://clavellab.github.io/maldipickr/dev/index.html","id":"maldipickr-","dir":"","previous_headings":"","what":"Reduce the redundancy of bacterial isolates","title":"Reduce the redundancy of bacterial isolates","text":"using MALDI-TOF1 Biotyper identify bacterial isolates want select representative isolates experiments need fast automated selection decisions can retrace maldipickr provides documented tested R functions help dereplicate MALDI-TOF data cherry-pick representative spectra microbial isolates. Check graphical overview (click bigger version). maldipickr can use two approaches: taxonomic identification reports (left) spectra data (right).","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Reduce the redundancy of bacterial isolates","text":"maldipickr available CRAN GitHub. install latest CRAN release, use following command R: using {renv}, use: install development version, use following command R:","code":"install.packages(\"maldipickr\") renv::install(\"maldipickr\") remotes::install_github(\"ClavelLab/maldipickr\", build_vignettes = TRUE) # or with renv::install(\"ClavelLab/maldipickr\")"},{"path":"https://clavellab.github.io/maldipickr/dev/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"Reduce the redundancy of bacterial isolates","text":"Start Introduction maldipickr quickstart. Otherwise, comprehensive vignettes walk package functions showcase : Import spectra data identification reports Bruker MALDI Biotyper R. Process, dereplicate cherry-pick representative spectra, simple complex design.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/index.html","id":"troubleshoot-and-contribute","dir":"","previous_headings":"","what":"Troubleshoot and Contribute","title":"Reduce the redundancy of bacterial isolates","text":"Troubleshoot something unexpected happened using package, please first search current open closed issues look similar problems. first, welcome open new issue using “Bug report” template minimal reprex. Contribute contributions welcome CONTRIBUTING.md documents participate. Please note {maldipickr} package released Contributor Code Conduct. contributing project, agree abide terms.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/index.html","id":"credits","dir":"","previous_headings":"","what":"Credits","title":"Reduce the redundancy of bacterial isolates","text":"Acknowledgements R package developed spectra data generated Bruker MALDI Biotyper device. {maldipickr} package built suite Rmarkdown files using {fusen} package Rochette S (2023). relies : {MALDIquant} package Gibb & Strimmer (2012) spectra functions work Strejcek et al. (2018) dereplication procedure. Disclaimer developers package part Clavel Lab affiliated company Bruker, therefore package independent company distributed GPL-3.0 License. hexagonal logo created Charlie Pauvert uses Atkinson Hyperlegible font font color palette generated coolors.co.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/index.html","id":"references","dir":"","previous_headings":"","what":"References","title":"Reduce the redundancy of bacterial isolates","text":"Gibb S & Strimmer K (2012). “MALDIquant: versatile R package analysis mass spectrometry data”. Bioinformatics 28, 2270-2271. https://doi.org/10.1093/bioinformatics/bts447. Rochette S (2023). “fusen: Build Package Rmarkdown Files”. https://thinkr-open.github.io/fusen/, https://github.com/Thinkr-open/fusen. Strejcek M, Smrhova T, Junkova P & Uhlik O (2018). “Whole-Cell MALDI-TOF MS versus 16S rRNA Gene Analysis Identification Dereplication Recurrent Bacterial Isolates.” Frontiers Microbiology 9 https://doi.org/10.3389/fmicb.2018.01294.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/check_spectra.html","id":null,"dir":"Reference","previous_headings":"","what":"Evaluate the spectra regularities — check_spectra","title":"Evaluate the spectra regularities — check_spectra","text":"Assess whether spectra list empty, length correspond profile data.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/check_spectra.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Evaluate the spectra regularities — check_spectra","text":"","code":"check_spectra(spectra_list, tolerance = sqrt(.Machine$double.eps))"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/check_spectra.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Evaluate the spectra regularities — check_spectra","text":"spectra_list list MALDIquant::MassSpectrum objects tolerance numeric indicating accepted tolerance spectra length. default value machine numerical precision close 1.5e-8.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/check_spectra.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Evaluate the spectra regularities — check_spectra","text":"list logical vectors length spectra_list indicating spectra empty (is_empty), odd length (is_outlier_length) profile spectra (is_not_regular).","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/reference/check_spectra.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Evaluate the spectra regularities — check_spectra","text":"","code":"# Get an example directory of six Bruker MALDI Biotyper spectra directory_biotyper_spectra <- system.file( \"toy-species-spectra\", package = \"maldipickr\" ) # Import the six spectra spectra_list <- import_biotyper_spectra(directory_biotyper_spectra) # Display the list of checks, with FALSE where no anomaly is detected check_spectra(spectra_list) #> $is_empty #> [1] FALSE FALSE FALSE FALSE FALSE FALSE #> #> $is_outlier_length #> [1] FALSE FALSE FALSE FALSE FALSE FALSE #> #> $is_not_regular #> [1] FALSE FALSE FALSE FALSE FALSE FALSE #> # The overall sanity can be checked with Reduce Reduce(any, check_spectra(spectra_list)) # Should be FALSE #> [1] FALSE"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/delineate_with_identification.html","id":null,"dir":"Reference","previous_headings":"","what":"Delineate clusters from taxonomic identifications — delineate_with_identification","title":"Delineate clusters from taxonomic identifications — delineate_with_identification","text":"report taxonomic identification produced Bruker MALDI Biotyper spectra sharing identification labeled cluster. Spectra unknown identification (e.g., due database completeness) set unique cluster.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/delineate_with_identification.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delineate clusters from taxonomic identifications — delineate_with_identification","text":"","code":"delineate_with_identification(tibble_report)"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/delineate_with_identification.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delineate clusters from taxonomic identifications — delineate_with_identification","text":"tibble_report tibble n rows, n number spectra, produced read_biotyper_report() read_many_biotyper_reports(). long format best hits options expected used functions produce compliant input tibble.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/delineate_with_identification.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Delineate clusters from taxonomic identifications — delineate_with_identification","text":"tibble n rows spectra 3 columns: name: spectra names name column output either read_biotyper_report() read_many_biotyper_reports(). membership: integers stating cluster number spectra belong . starts 1 c, total number clusters. cluster_size: integers indicating total number spectra corresponding cluster.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/delineate_with_identification.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Delineate clusters from taxonomic identifications — delineate_with_identification","text":"unknown identification considered unique clusters within one input tibble, important consider whether taxonomic identifications come single report multiple reports, depending research question. message displayed confirm type reports delineation done.","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/reference/delineate_with_identification.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Delineate clusters from taxonomic identifications — delineate_with_identification","text":"","code":"report_unknown <- read_biotyper_report( system.file(\"biotyper_unknown.csv\", package = \"maldipickr\") ) delineate_with_identification(report_unknown) #> Generating clusters from single report #> # A tibble: 4 × 3 #> name membership cluster_size #> #> 1 unknown_isolate_1 2 1 #> 2 unknown_isolate_2 3 1 #> 3 unknown_isolate_3 1 2 #> 4 unknown_isolate_4 1 2"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/delineate_with_similarity.html","id":null,"dir":"Reference","previous_headings":"","what":"Delineate clusters from a similarity matrix — delineate_with_similarity","title":"Delineate clusters from a similarity matrix — delineate_with_similarity","text":"matrix spectra similarity (e.g., cosine metric, Pearson product moment), infer species clusters based threshold (equal ) spectra considered alike.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/delineate_with_similarity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delineate clusters from a similarity matrix — delineate_with_similarity","text":"","code":"delineate_with_similarity(sim_matrix, threshold, method = \"complete\")"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/delineate_with_similarity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delineate clusters from a similarity matrix — delineate_with_similarity","text":"sim_matrix \\(n \\times n\\) similarity matrix, \\(n\\) number spectra. Columns named rows. threshold numeric value indicating minimal similarity two spectra. Adjust accordingly similarity metric used. method method hierarchical clustering use. default recommended method \"complete\", methods stats::hclust valid.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/delineate_with_similarity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Delineate clusters from a similarity matrix — delineate_with_similarity","text":"tibble \\(n\\) rows spectra 3 columns: name: rownames similarity matrix indicating spectra names membership: integers stating cluster number spectra belong . starts 1 \\(c\\), total number clusters. cluster_size: integers indicating total number spectra corresponding cluster.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/delineate_with_similarity.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Delineate clusters from a similarity matrix — delineate_with_similarity","text":"similarity matrix converted distance matrix subtracting value one. approach works cosine similarity positive correlations upper bound 1. Clusters delineated using hierarchical clustering. default method hierarchical clustering complete linkage (also known farthest neighbor clustering) ensure within-group minimum similarity cluster respects threshold. See Details section stats::hclust others valid methods use.","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/reference/delineate_with_similarity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Delineate clusters from a similarity matrix — delineate_with_similarity","text":"","code":"# Toy similarity matrix between the six example spectra of # three species. The cosine metric is used and a value of # zero indicates dissimilar spectra and a value of one # indicates identical spectra. cosine_similarity <- matrix( c( 1, 0.79, 0.77, 0.99, 0.98, 0.98, 0.79, 1, 0.98, 0.79, 0.8, 0.8, 0.77, 0.98, 1, 0.77, 0.77, 0.77, 0.99, 0.79, 0.77, 1, 1, 0.99, 0.98, 0.8, 0.77, 1, 1, 1, 0.98, 0.8, 0.77, 0.99, 1, 1 ), nrow = 6, dimnames = list( c( \"species1_G2\", \"species2_E11\", \"species2_E12\", \"species3_F7\", \"species3_F8\", \"species3_F9\" ), c( \"species1_G2\", \"species2_E11\", \"species2_E12\", \"species3_F7\", \"species3_F8\", \"species3_F9\" ) ) ) # Delineate clusters based on a 0.92 threshold applied # to the similarity matrix delineate_with_similarity(cosine_similarity, threshold = 0.92) #> # A tibble: 6 × 3 #> name membership cluster_size #> #> 1 species1_G2 1 4 #> 2 species2_E11 2 2 #> 3 species2_E12 2 2 #> 4 species3_F7 1 4 #> 5 species3_F8 1 4 #> 6 species3_F9 1 4"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/get_spectra_names.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract spectra names and check for uniqueness — get_spectra_names","title":"Extract spectra names and check for uniqueness — get_spectra_names","text":"Given list raw spectra, get_spectra_names() extracts spectra names using file metadata, warns associated sanitized names unique.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/get_spectra_names.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract spectra names and check for uniqueness — get_spectra_names","text":"","code":"get_spectra_names(spectra_list)"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/get_spectra_names.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract spectra names and check for uniqueness — get_spectra_names","text":"spectra_list list MALDIquant::MassSpectrum objects.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/get_spectra_names.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract spectra names and check for uniqueness — get_spectra_names","text":"tibble four columns sanitized_name: spectra names based fullName dots dashes converted underscores name: spectra name using name label spectra metadata fullName: spectra full name using fullName label spectra metadata file: path raw spectra data","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/get_spectra_names.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract spectra names and check for uniqueness — get_spectra_names","text":"","code":"# Get an example directory of six Bruker MALDI Biotyper spectra directory_biotyper_spectra <- system.file( \"toy-species-spectra\", package = \"maldipickr\" ) # Import the six spectra spectra_list <- import_biotyper_spectra(directory_biotyper_spectra) # Extract the names get_spectra_names(spectra_list) #> # A tibble: 6 × 4 #> sanitized_name name fullName file #> #> 1 species1_G2 species1.G2 species1.G2 /home/runner/.cache/R/renv/library/m… #> 2 species2_E11 species2.E11 species2.E11 /home/runner/.cache/R/renv/library/m… #> 3 species2_E12 species2.E12 species2.E12 /home/runner/.cache/R/renv/library/m… #> 4 species3_F7 species3.F7 species3.F7 /home/runner/.cache/R/renv/library/m… #> 5 species3_F8 species3.F8 species3.F8 /home/runner/.cache/R/renv/library/m… #> 6 species3_F9 species3.F9 species3.F9 /home/runner/.cache/R/renv/library/m… # Artificially create duplicated entries to show the warning get_spectra_names(spectra_list[c(1,1)]) #> Warning: Non-unique values in spectra names! #> #> Quickfix: use `dplyr::mutate(sanitized_name = base::make.unique(sanitized_name))` #> # A tibble: 2 × 4 #> sanitized_name name fullName file #> #> 1 species1_G2 species1.G2 species1.G2 /home/runner/.cache/R/renv/library/mal… #> 2 species1_G2 species1.G2 species1.G2 /home/runner/.cache/R/renv/library/mal…"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/import_biotyper_spectra.html","id":null,"dir":"Reference","previous_headings":"","what":"Importing spectra from the Bruker MALDI Biotyper device — import_biotyper_spectra","title":"Importing spectra from the Bruker MALDI Biotyper device — import_biotyper_spectra","text":"function wrapper around readBrukerFlexData::readBrukerFlexDir() read acqus acqu MALDI files.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/import_biotyper_spectra.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Importing spectra from the Bruker MALDI Biotyper device — import_biotyper_spectra","text":"","code":"import_biotyper_spectra( biotyper_directory, remove_calibration = c(\"BTS\", \"Autocalibration\") )"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/import_biotyper_spectra.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Importing spectra from the Bruker MALDI Biotyper device — import_biotyper_spectra","text":"biotyper_directory path folder tree spectra imported. remove_calibration vector characters used regex indicate (calibration) spectra going removed.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/import_biotyper_spectra.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Importing spectra from the Bruker MALDI Biotyper device — import_biotyper_spectra","text":"list MALDIquant::MassSpectrum objects","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/import_biotyper_spectra.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Importing spectra from the Bruker MALDI Biotyper device — import_biotyper_spectra","text":"using readBrukerFlexData::readBrukerFlexDir() acqus files (instead native acqu files), function fail following error message: turns acqu acqus files , function create acqu symbolic links point acqus files.","code":"Error in .readAcquFile(fidFile = fidFile, verbose = verbose) : File ‘/data/maldi_dir/targetA/0_D10/1/1SLin/acqu’ doesn't exists!"},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/reference/import_biotyper_spectra.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Importing spectra from the Bruker MALDI Biotyper device — import_biotyper_spectra","text":"","code":"# Get an example directory of six Bruker MALDI Biotyper spectra directory_biotyper_spectra <- system.file( \"toy-species-spectra\", package = \"maldipickr\" ) # Import the six spectra spectra_list <- import_biotyper_spectra(directory_biotyper_spectra) # Display the list of spectra spectra_list #> [[1]] #> S4 class type : MassSpectrum #> Number of m/z values : 20882 #> Range of m/z values : 1962.222 - 20146.522 #> Range of intensity values: 2.4e+02 - 3.608e+04 #> Memory usage : 337.062 KiB #> Name : species1.G2 #> File : /home/runner/.cache/R/renv/library/maldipickr-8ce40efa/R-4.4/x86_64-pc-linux-gnu/maldipickr/toy-species-spectra/species1/0_G2/1/1SLin/fid #> #> [[2]] #> S4 class type : MassSpectrum #> Number of m/z values : 20882 #> Range of m/z values : 1962.222 - 20146.522 #> Range of intensity values: 1.82e+02 - 1.006e+04 #> Memory usage : 337.062 KiB #> Name : species2.E11 #> File : /home/runner/.cache/R/renv/library/maldipickr-8ce40efa/R-4.4/x86_64-pc-linux-gnu/maldipickr/toy-species-spectra/species2/0_E11/1/1SLin/fid #> #> [[3]] #> S4 class type : MassSpectrum #> Number of m/z values : 20882 #> Range of m/z values : 1962.222 - 20146.522 #> Range of intensity values: 3.25e+02 - 2.115e+04 #> Memory usage : 337.062 KiB #> Name : species2.E12 #> File : /home/runner/.cache/R/renv/library/maldipickr-8ce40efa/R-4.4/x86_64-pc-linux-gnu/maldipickr/toy-species-spectra/species2/0_E12/1/1SLin/fid #> #> [[4]] #> S4 class type : MassSpectrum #> Number of m/z values : 20882 #> Range of m/z values : 1961.215 - 20135.904 #> Range of intensity values: 1.94e+02 - 2.055e+04 #> Memory usage : 337.062 KiB #> Name : species3.F7 #> File : /home/runner/.cache/R/renv/library/maldipickr-8ce40efa/R-4.4/x86_64-pc-linux-gnu/maldipickr/toy-species-spectra/species3/0_F7/1/1SLin/fid #> #> [[5]] #> S4 class type : MassSpectrum #> Number of m/z values : 20882 #> Range of m/z values : 1961.215 - 20135.904 #> Range of intensity values: 1.6e+02 - 1.814e+04 #> Memory usage : 337.062 KiB #> Name : species3.F8 #> File : /home/runner/.cache/R/renv/library/maldipickr-8ce40efa/R-4.4/x86_64-pc-linux-gnu/maldipickr/toy-species-spectra/species3/0_F8/1/1SLin/fid #> #> [[6]] #> S4 class type : MassSpectrum #> Number of m/z values : 20882 #> Range of m/z values : 1961.215 - 20135.904 #> Range of intensity values: 1.59e+02 - 1.449e+04 #> Memory usage : 337.062 KiB #> Name : species3.F9 #> File : /home/runner/.cache/R/renv/library/maldipickr-8ce40efa/R-4.4/x86_64-pc-linux-gnu/maldipickr/toy-species-spectra/species3/0_F9/1/1SLin/fid #>"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/import_spede_clusters.html","id":null,"dir":"Reference","previous_headings":"","what":"Import clusters results generated by SPeDE — import_spede_clusters","title":"Import clusters results generated by SPeDE — import_spede_clusters","text":"Reformat table output analysis raw Bruker MALDI Biotyper spectra SPeDE tool Dumolin et al. (2019) consistent Strejcek et al. (2018) procedure followed maldipickr package.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/import_spede_clusters.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Import clusters results generated by SPeDE — import_spede_clusters","text":"","code":"import_spede_clusters(path)"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/import_spede_clusters.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Import clusters results generated by SPeDE — import_spede_clusters","text":"path Path comma separated table generated SPeDE","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/import_spede_clusters.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Import clusters results generated by SPeDE — import_spede_clusters","text":"tibble following columns: name: character denoting spectra name (spaces, dashes dots replaced underscores \"_\" SPeDE) membership: integers stating cluster number spectra belong . starts 1 c, total number clusters. cluster_size: integers indicating total number spectra corresponding cluster. quality: character indicating spectra quality category SPeDE, GREEN, ORANGE RED. is_reference: logical indicating whether corresponding spectra reference spectra cluster.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/import_spede_clusters.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Import clusters results generated by SPeDE — import_spede_clusters","text":"Dumolin C, Aerts M, Verheyde B, Schellaert S, Vandamme T, Van Der Jeugt F, De Canck E, Cnockaert M, Wieme AD, Cleenwerck , Peiren J, Dawyndt P, Vandamme P, & Carlier . (2019). \"Introducing SPeDE: High-Throughput Dereplication Accurate Determination Microbial Diversity Matrix-Assisted Laser Desorption–Ionization Time Flight Mass Spectrometry Data\". MSystems 4(5). doi:10.1128/msystems.00437-19.","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/reference/import_spede_clusters.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Import clusters results generated by SPeDE — import_spede_clusters","text":"","code":"# Reformat the output from SPeDE table # https://github.com/LM-UGent/SPeDE import_spede_clusters( system.file(\"spede.csv\", package = \"maldipickr\") ) #> # A tibble: 6 × 5 #> name membership cluster_size quality is_reference #> #> 1 species1_G2 1 1 GREEN TRUE #> 2 species2_E11 2 2 ORANGE FALSE #> 3 species2_E12 2 2 GREEN TRUE #> 4 species3_F7 3 1 GREEN TRUE #> 5 species3_F8 4 2 ORANGE FALSE #> 6 species3_F9 4 2 GREEN TRUE"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/is_well_on_edge.html","id":null,"dir":"Reference","previous_headings":"","what":"Identify the wells on the plate's edge — is_well_on_edge","title":"Identify the wells on the plate's edge — is_well_on_edge","text":"Identify wells plate's edge","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/is_well_on_edge.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identify the wells on the plate's edge — is_well_on_edge","text":"","code":"is_well_on_edge( well_number, plate_layout = c(96, 384), edges = c(\"top\", \"bottom\", \"left\", \"right\"), details = FALSE )"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/is_well_on_edge.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Identify the wells on the plate's edge — is_well_on_edge","text":"well_number vector positive numeric well identifier plate_layout integer indicating maximum number well plate edges character vector pointing plate edges considered details logical controlling whether data.frame details returned","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/is_well_on_edge.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Identify the wells on the plate's edge — is_well_on_edge","text":"logical vector, length well_number indicating whether well edge. details = TRUE, function returns data.frame complements logical vector well_number, row column positions.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/is_well_on_edge.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Identify the wells on the plate's edge — is_well_on_edge","text":"Flag wells located edges 96- 384-well plate, based following well numbering: Well numbers start 1 Well numbered left right top bottom plate.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/is_well_on_edge.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Identify the wells on the plate's edge — is_well_on_edge","text":"","code":"# Logical vector indicating whether the wells are on the four edges is_well_on_edge(1:96, plate_layout = 96) #> [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [13] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE #> [25] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE #> [37] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE #> [49] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE #> [61] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE #> [73] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE #> [85] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE # More details can be obtained to verify the results well_df <- is_well_on_edge(1:96, plate_layout = 96, details = TRUE) # And the resulting prediction displayed matrix(well_df$is_edge, ncol = max(well_df$col), byrow = TRUE) #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] #> [1,] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [2,] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE #> [3,] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE #> [4,] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE #> [5,] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE #> [6,] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE #> [7,] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE #> [8,] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/maldipickr-package.html","id":null,"dir":"Reference","previous_headings":"","what":"maldipickr: Dereplicate and Cherry-Pick Mass Spectrometry Spectra — maldipickr-package","title":"maldipickr: Dereplicate and Cherry-Pick Mass Spectrometry Spectra — maldipickr-package","text":"Convenient wrapper functions analysis matrix-assisted laser desorption/ionization-time--flight (MALDI-TOF) spectra data order select representative spectra (also called cherry-pick). package covers preprocessing dereplication steps (based Strejcek, Smrhova, Junkova Uhlik (2018) doi:10.3389/fmicb.2018.01294 ) needed cluster MALDI-TOF spectra final cherry-picking step. enables easy exclusion spectra /clusters accommodate complex cherry-picking strategies. Alternatively, cherry-picking using taxonomic identification MALDI-TOF data made easy functions import inconsistently formatted reports.","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/reference/maldipickr-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"maldipickr: Dereplicate and Cherry-Pick Mass Spectrometry Spectra — maldipickr-package","text":"Maintainer: Charlie Pauvert cpauvert@ukaachen.de (ORCID) [copyright holder] contributors: David Wylensek (ORCID) [contributor] Selina Nüchtern [contributor] Thomas Clavel (ORCID) [contributor, funder, copyright holder]","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/merge_processed_spectra.html","id":null,"dir":"Reference","previous_headings":"","what":"Merge multiple processed spectra and peaks — merge_processed_spectra","title":"Merge multiple processed spectra and peaks — merge_processed_spectra","text":"Aggregate multiple processed spectra, associated peaks metadata feature matrix concatenated metadata table.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/merge_processed_spectra.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Merge multiple processed spectra and peaks — merge_processed_spectra","text":"","code":"merge_processed_spectra( processed_spectra, remove_peakless_spectra = TRUE, interpolate_missing = TRUE )"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/merge_processed_spectra.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Merge multiple processed spectra and peaks — merge_processed_spectra","text":"processed_spectra list processed spectra associated peaks metadata two possible formats: list -memory objects (named spectra, peaks, metadata) produced process_spectra. Named lists names dropped, see Note. list paths RDS files produced process_spectra using rds_prefix option. remove_peakless_spectra logical indicating whether discard spectra without detected peaks. interpolate_missing logical indicating intensity values missing peaks interpolated processed spectra signal left NA converted 0.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/merge_processed_spectra.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Merge multiple processed spectra and peaks — merge_processed_spectra","text":"n×p matrix, n spectra rows p features columns peaks found processed spectra.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/merge_processed_spectra.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Merge multiple processed spectra and peaks — merge_processed_spectra","text":"aggregating multiple runs processed spectra, named list provided, note names dropped, prevent downstream issues names appended rownames matrix thus preventing downstream metadata merge.","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/reference/merge_processed_spectra.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Merge multiple processed spectra and peaks — merge_processed_spectra","text":"","code":"# Get an example directory of six Bruker MALDI Biotyper spectra directory_biotyper_spectra <- system.file( \"toy-species-spectra\", package = \"maldipickr\" ) # Import the six spectra spectra_list <- import_biotyper_spectra(directory_biotyper_spectra) # Transform the spectra signals according to Strejcek et al. (2018) processed <- process_spectra(spectra_list) # Merge the spectra to produce the feature matrix fm <- merge_processed_spectra(list(processed)) # The feature matrix has 6 spectra as rows and # 35 peaks as columns dim(fm) #> [1] 6 35 # Notice the difference when the interpolation is turned off fm_no_interpolation <- merge_processed_spectra( list(processed), interpolate_missing = FALSE ) sum(fm == 0) # 0 #> [1] 0 sum(fm_no_interpolation == 0) # 68 #> [1] 68 # Multiple runs can be aggregated using list() # Merge the spectra to produce the feature matrix fm_all <- merge_processed_spectra(list(processed, processed, processed)) # The feature matrix has 3×6=18 spectra as rows and # 35 peaks as columns dim(fm_all) #> [1] 18 35 # If using a list, names will be dropped and are not propagated to the matrix. if (FALSE) { # \\dontrun{ fm_all <- merge_processed_spectra( list(\"A\" = processed, \"B\" = processed, \"C\" = processed)) any(grepl(\"A|B|C\", rownames(fm_all))) # FALSE } # }"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/pick_spectra.html","id":null,"dir":"Reference","previous_headings":"","what":"Cherry-pick Bruker MALDI Biotyper spectra — pick_spectra","title":"Cherry-pick Bruker MALDI Biotyper spectra — pick_spectra","text":"Using clusters information, potential additional metadata external criteria, spectra labeled picked cluster. Note spectra therefore clusters can explicitly removed (masked) picking decision previously picked discarded, using logical columns metadata table. metadata provided, reference spectra cluster picked.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/pick_spectra.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cherry-pick Bruker MALDI Biotyper spectra — pick_spectra","text":"","code":"pick_spectra( cluster_df, metadata_df = NULL, criteria_column = NULL, hard_mask_column = NULL, soft_mask_column = NULL, is_descending_order = TRUE, is_sorted = FALSE )"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/pick_spectra.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cherry-pick Bruker MALDI Biotyper spectra — pick_spectra","text":"cluster_df tibble clusters information delineate_with_similarity import_spede_clusters function. metadata_df Optional tibble relevant metadata guide picking process (e.g., OD600). criteria_column Optional character indicating column metadata_df used criteria. hard_mask_column Column name cluster_df metadata_df tibble indicating whether spectra, clusters belong discarded (TRUE) (FALSE) picking decision. soft_mask_column Column name cluster_df metadata_df tibble indicating whether spectra discarded (TRUE) (FALSE) picking decision. is_descending_order Optional logical indicating whether sort criteria_column highest--lowest value (TRUE) lowest--highest (FALSE). is_sorted Optional logical indicate cluster_df already sorted cluster based (usually multiple) internal criteria pick first cluster. flag overridden metadata_df provided.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/pick_spectra.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cherry-pick Bruker MALDI Biotyper spectra — pick_spectra","text":"tibble many rows cluster_df additional logical column named to_pick indicate whether colony associated spectra picked. metadata_df provided, additional columns tibble added returned tibble.","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/reference/pick_spectra.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Cherry-pick Bruker MALDI Biotyper spectra — pick_spectra","text":"","code":"# 0. Load a toy example of a tibble of clusters created by # the `delineate_with_similarity` function. clusters <- readRDS( system.file(\"clusters_tibble.RDS\", package = \"maldipickr\" ) ) # 1. By default and if no other metadata are provided, # the function picks reference spectra for each clusters. # # N.B: The spectra `name` and `to_pick` columns are moved to the left # only for clarity using the `relocate()` function. # pick_spectra(clusters) %>% dplyr::relocate(name, to_pick) # only for clarity #> # A tibble: 6 × 7 #> name to_pick membership cluster_size SNR peaks is_reference #> #> 1 species1_G2 FALSE 1 4 5.09 21 FALSE #> 2 species2_E11 FALSE 2 2 5.54 22 FALSE #> 3 species2_E12 TRUE 2 2 5.63 23 TRUE #> 4 species3_F7 FALSE 1 4 4.89 26 FALSE #> 5 species3_F8 TRUE 1 4 5.56 25 TRUE #> 6 species3_F9 FALSE 1 4 5.40 25 FALSE # 2.1 Simulate OD600 values with uniform distribution # for each of the colonies we measured with # the Bruker MALDI Biotyper set.seed(104) metadata <- dplyr::transmute( clusters, name = name, OD600 = runif(n = nrow(clusters)) ) metadata #> # A tibble: 6 × 2 #> name OD600 #> #> 1 species1_G2 0.364 #> 2 species2_E11 0.772 #> 3 species2_E12 0.735 #> 4 species3_F7 0.973 #> 5 species3_F8 0.740 #> 6 species3_F9 0.201 # 2.2 Pick the spectra based on the highest # OD600 value per cluster pick_spectra(clusters, metadata, \"OD600\") %>% dplyr::relocate(name, to_pick) # only for clarity #> # A tibble: 6 × 8 #> name to_pick membership cluster_size SNR peaks is_reference OD600 #> #> 1 species1_G2 FALSE 1 4 5.09 21 FALSE 0.364 #> 2 species2_E11 TRUE 2 2 5.54 22 FALSE 0.772 #> 3 species2_E12 FALSE 2 2 5.63 23 TRUE 0.735 #> 4 species3_F7 TRUE 1 4 4.89 26 FALSE 0.973 #> 5 species3_F8 FALSE 1 4 5.56 25 TRUE 0.740 #> 6 species3_F9 FALSE 1 4 5.40 25 FALSE 0.201 # 3.1 Say that the wells on the right side of the plate are # used for negative controls and should not be picked. metadata <- metadata %>% dplyr::mutate( well = gsub(\".*[A-Z]([0-9]{1,2}$)\", \"\\\\1\", name) %>% strtoi(), is_edge = is_well_on_edge( well_number = well, plate_layout = 96, edges = \"right\" ) ) # 3.2 Pick the spectra after discarding (or soft masking) # the spectra indicated by the `is_edge` column. pick_spectra(clusters, metadata, \"OD600\", soft_mask_column = \"is_edge\" ) %>% dplyr::relocate(name, to_pick) # only for clarity #> # A tibble: 6 × 10 #> name to_pick membership cluster_size SNR peaks is_reference OD600 well #> #> 1 species1… FALSE 1 4 5.09 21 FALSE 0.364 2 #> 2 species2… TRUE 2 2 5.54 22 FALSE 0.772 11 #> 3 species2… FALSE 2 2 5.63 23 TRUE 0.735 12 #> 4 species3… TRUE 1 4 4.89 26 FALSE 0.973 7 #> 5 species3… FALSE 1 4 5.56 25 TRUE 0.740 8 #> 6 species3… FALSE 1 4 5.40 25 FALSE 0.201 9 #> # ℹ 1 more variable: is_edge # 4.1 Say that some spectra were picked before # (e.g., in the column F) in a previous experiment. # We do not want to pick clusters with those spectra # included to limit redundancy. metadata <- metadata %>% dplyr::mutate( picked_before = grepl(\"_F\", name) ) # 4.2 Pick the spectra from clusters without spectra # labeled as `picked_before` (hard masking). pick_spectra(clusters, metadata, \"OD600\", hard_mask_column = \"picked_before\" ) %>% dplyr::relocate(name, to_pick) # only for clarity #> # A tibble: 6 × 11 #> name to_pick membership cluster_size SNR peaks is_reference OD600 well #> #> 1 species1… FALSE 1 4 5.09 21 FALSE 0.364 2 #> 2 species2… TRUE 2 2 5.54 22 FALSE 0.772 11 #> 3 species2… FALSE 2 2 5.63 23 TRUE 0.735 12 #> 4 species3… FALSE 1 4 4.89 26 FALSE 0.973 7 #> 5 species3… FALSE 1 4 5.56 25 TRUE 0.740 8 #> 6 species3… FALSE 1 4 5.40 25 FALSE 0.201 9 #> # ℹ 2 more variables: is_edge , picked_before "},{"path":"https://clavellab.github.io/maldipickr/dev/reference/pipe.html","id":null,"dir":"Reference","previous_headings":"","what":"Pipe operator — %>%","title":"Pipe operator — %>%","text":"See magrittr::%>% details.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/pipe.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pipe operator — %>%","text":"","code":"lhs %>% rhs"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/pipe.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Pipe operator — %>%","text":"lhs value magrittr placeholder. rhs function call using magrittr semantics.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/pipe.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Pipe operator — %>%","text":"result calling rhs(lhs).","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/process_spectra.html","id":null,"dir":"Reference","previous_headings":"","what":"Process Bruker MALDI Biotyper spectra à la Strejcek et al. (2018) — process_spectra","title":"Process Bruker MALDI Biotyper spectra à la Strejcek et al. (2018) — process_spectra","text":"Process Bruker MALDI Biotyper spectra à la Strejcek et al. (2018)","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/process_spectra.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Process Bruker MALDI Biotyper spectra à la Strejcek et al. (2018) — process_spectra","text":"","code":"process_spectra( spectra_list, spectra_names = get_spectra_names(spectra_list), rds_prefix = deprecated() )"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/process_spectra.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Process Bruker MALDI Biotyper spectra à la Strejcek et al. (2018) — process_spectra","text":"spectra_list list MALDIquant::MassSpectrum objects. spectra_names tibble::tibble (data.frame) sanitized spectra names default get_spectra_names. provided manually, column sanitized_name used name spectra. rds_prefix Writing disk RDS longer supported. character indicating prefix .RDS output files written processed directory. default, prefix given thus files written.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/process_spectra.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Process Bruker MALDI Biotyper spectra à la Strejcek et al. (2018) — process_spectra","text":"named list three objects: spectra: list length spectra list MALDIquant::MassSpectrum objects. peaks: list length spectra list MALDIquant::MassPeaks objects. metadata: tibble indicating median signal--noise ratio (SNR) peaks number spectra list (peaks), spectra names name column.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/process_spectra.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Process Bruker MALDI Biotyper spectra à la Strejcek et al. (2018) — process_spectra","text":"Based original implementation, function performs following tasks: Square-root transformation Mass range trimming 4-10 kDa deemed determinant Strejcek et al. (2018) Signal smoothing using Savitzky-Golay method half window size 20 Baseline correction SNIP procedure Normalization Total Ion Current Peak detection using SuperSmoother procedure signal--noise ratio 3 Peak filtering. step added discard peaks negative signal--noise ratio probably due edge mass range.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/process_spectra.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Process Bruker MALDI Biotyper spectra à la Strejcek et al. (2018) — process_spectra","text":"original R code function based accessible : https://github.com/strejcem/MALDIvs16S","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/process_spectra.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Process Bruker MALDI Biotyper spectra à la Strejcek et al. (2018) — process_spectra","text":"Strejcek M, Smrhova T, Junkova P & Uhlik O (2018). “Whole-Cell MALDI-TOF MS versus 16S rRNA Gene Analysis Identification Dereplication Recurrent Bacterial Isolates.” Frontiers Microbiology 9 doi:10.3389/fmicb.2018.01294.","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/reference/process_spectra.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Process Bruker MALDI Biotyper spectra à la Strejcek et al. (2018) — process_spectra","text":"","code":"# Get an example directory of six Bruker MALDI Biotyper spectra directory_biotyper_spectra <- system.file( \"toy-species-spectra\", package = \"maldipickr\" ) # Import the six spectra spectra_list <- import_biotyper_spectra(directory_biotyper_spectra) # Transform the spectra signals according to Strejcek et al. (2018) processed <- process_spectra(spectra_list) # Overview of the list architecture that is returned # with the list of processed spectra, peaks identified and the # metadata table str(processed, max.level = 2) #> List of 3 #> $ spectra :List of 6 #> ..$ species1_G2 :Formal class 'MassSpectrum' [package \"MALDIquant\"] with 3 slots #> ..$ species2_E11:Formal class 'MassSpectrum' [package \"MALDIquant\"] with 3 slots #> ..$ species2_E12:Formal class 'MassSpectrum' [package \"MALDIquant\"] with 3 slots #> ..$ species3_F7 :Formal class 'MassSpectrum' [package \"MALDIquant\"] with 3 slots #> ..$ species3_F8 :Formal class 'MassSpectrum' [package \"MALDIquant\"] with 3 slots #> ..$ species3_F9 :Formal class 'MassSpectrum' [package \"MALDIquant\"] with 3 slots #> $ peaks :List of 6 #> ..$ species1_G2 :Formal class 'MassPeaks' [package \"MALDIquant\"] with 4 slots #> ..$ species2_E11:Formal class 'MassPeaks' [package \"MALDIquant\"] with 4 slots #> ..$ species2_E12:Formal class 'MassPeaks' [package \"MALDIquant\"] with 4 slots #> ..$ species3_F7 :Formal class 'MassPeaks' [package \"MALDIquant\"] with 4 slots #> ..$ species3_F8 :Formal class 'MassPeaks' [package \"MALDIquant\"] with 4 slots #> ..$ species3_F9 :Formal class 'MassPeaks' [package \"MALDIquant\"] with 4 slots #> $ metadata: tibble [6 × 3] (S3: tbl_df/tbl/data.frame) # A detailed view of the metadata with the median signal-to-noise # ratio (SNR) and the number of peaks processed$metadata #> # A tibble: 6 × 3 #> name SNR peaks #> #> 1 species1_G2 5.09 21 #> 2 species2_E11 5.54 22 #> 3 species2_E12 5.63 23 #> 4 species3_F7 4.89 26 #> 5 species3_F8 5.56 25 #> 6 species3_F9 5.40 25"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/read_biotyper_report.html","id":null,"dir":"Reference","previous_headings":"","what":"Importing Bruker MALDI Biotyper CSV report — read_biotyper_report","title":"Importing Bruker MALDI Biotyper CSV report — read_biotyper_report","text":"header-less table exported Compass software Bruker MALDI Biotyper device separated semi-colons empty columns prevent easy import R. function reads report correctly tibble.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/read_biotyper_report.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Importing Bruker MALDI Biotyper CSV report — read_biotyper_report","text":"","code":"read_biotyper_report(path, best_hits = TRUE, long_format = TRUE)"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/read_biotyper_report.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Importing Bruker MALDI Biotyper CSV report — read_biotyper_report","text":"path Path semi-colon separated table best_hits logical indicating whether return best hits target analyzed long_format logical indicating whether table long format (many rows) wide format (many columns) showing hits. option effect best_hits = TRUE.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/read_biotyper_report.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Importing Bruker MALDI Biotyper CSV report — read_biotyper_report","text":"tibble 7 columns (best_hits = TRUE) 52 columns (best_hits = FALSE). See Details description columns.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/read_biotyper_report.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Importing Bruker MALDI Biotyper CSV report — read_biotyper_report","text":"header-less table contains identification information target processed Biotyper device processed read_biotyper_report, following seven columns available tibble, using best_hits = TRUE option: name: character indicating name spot MALDI target (.e., plate) sample_name: character string provided preparation MALDI target (.e., plate) hit_rank: integer indicating rank hit corresponding target identification bruker_quality: character encoding quality identification potentially multiple \"+\" symbol one \"-\" bruker_species: species name associated MALDI spectrum analyzed. bruker_taxid: NCBI Taxonomy Identifier species name column species bruker_hash: hash undocumented checksum function probably encode database entry. bruker_log: log-score identification. hits returned (best_hits = FALSE), default output format long format (long_format = TRUE), meaning previous columns remain unchanged, hits now returned, thus increasing number rows. hits returned (best_hits = FALSE) using wide format (long_format = FALSE), two columns nameandsample_nameremains unchanged, five columns prefixed bybruker_` contain hit rank, creating tibble 52 columns: bruker_01_quality bruker_01_species bruker_01_taxid bruker_01_hash bruker_01_log bruker_02_quality ... bruker_10_species bruker_10_taxid bruker_10_hash bruker_10_log","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/read_biotyper_report.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Importing Bruker MALDI Biotyper CSV report — read_biotyper_report","text":"report contains spectra peaks found return tibble 0 rows warning message.","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/reference/read_biotyper_report.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Importing Bruker MALDI Biotyper CSV report — read_biotyper_report","text":"","code":"# Get a example Bruker report biotyper <- system.file(\"biotyper.csv\", package = \"maldipickr\") # Import the report as a tibble report_tibble <- read_biotyper_report(biotyper) # Display the tibble report_tibble #> # A tibble: 3 × 8 #> name sample_name hit_rank bruker_quality bruker_species bruker_taxid #> #> 1 targetA NA 1 - not reliable identif… NA #> 2 targetB NA 1 +++ Escherichia coli 562 #> 3 targetC NA 1 +++ Kosakonia cowanii 208223 #> # ℹ 2 more variables: bruker_hash , bruker_log "},{"path":"https://clavellab.github.io/maldipickr/dev/reference/read_many_biotyper_reports.html","id":null,"dir":"Reference","previous_headings":"","what":"Importing a list of Bruker MALDI Biotyper CSV reports — read_many_biotyper_reports","title":"Importing a list of Bruker MALDI Biotyper CSV reports — read_many_biotyper_reports","text":"Importing list Bruker MALDI Biotyper CSV reports","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/read_many_biotyper_reports.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Importing a list of Bruker MALDI Biotyper CSV reports — read_many_biotyper_reports","text":"","code":"read_many_biotyper_reports(path_to_reports, report_ids, best_hits = TRUE, ...)"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/read_many_biotyper_reports.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Importing a list of Bruker MALDI Biotyper CSV reports — read_many_biotyper_reports","text":"path_to_reports vector paths csv files imported read_biotyper_report(). report_ids vector character names reports. best_hits logical indicating whether return best hit read_biotyper_report() function. ... Name-value pairs passed dplyr::mutate()","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/read_many_biotyper_reports.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Importing a list of Bruker MALDI Biotyper CSV reports — read_many_biotyper_reports","text":"tibble just like one returned read_biotyper_report() function, except name spot MALDI target (.e., plate) registered original_name column (instead name column), column name consist provided report_ids used prefix original_name column.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/read_many_biotyper_reports.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Importing a list of Bruker MALDI Biotyper CSV reports — read_many_biotyper_reports","text":"report identifiers sanitized convert dashes (-) underscores (_).","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/reference/read_many_biotyper_reports.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Importing a list of Bruker MALDI Biotyper CSV reports — read_many_biotyper_reports","text":"","code":"# List of Bruker MALDI Biotyper reports reports_paths <- system.file( c(\"biotyper.csv\", \"biotyper.csv\", \"biotyper.csv\"), package = \"maldipickr\" ) # Read the list of reports and combine them in a single tibble read_many_biotyper_reports( reports_paths, report_ids = c(\"first\", \"second\", \"third\"), # Additional metadata below are passed to dplyr::mutate growth_temperature = 37.0 ) #> # A tibble: 9 × 10 #> name original_name sample_name hit_rank bruker_quality bruker_species #> #> 1 first_targetA targetA NA 1 - not reliable … #> 2 first_targetB targetB NA 1 +++ Escherichia c… #> 3 first_targetC targetC NA 1 +++ Kosakonia cow… #> 4 second_targe… targetA NA 1 - not reliable … #> 5 second_targe… targetB NA 1 +++ Escherichia c… #> 6 second_targe… targetC NA 1 +++ Kosakonia cow… #> 7 third_targetA targetA NA 1 - not reliable … #> 8 third_targetB targetB NA 1 +++ Escherichia c… #> 9 third_targetC targetC NA 1 +++ Kosakonia cow… #> # ℹ 4 more variables: bruker_taxid , bruker_hash , bruker_log , #> # growth_temperature "},{"path":"https://clavellab.github.io/maldipickr/dev/reference/remove_spectra.html","id":null,"dir":"Reference","previous_headings":"","what":"Remove (raw or processed) spectra — remove_spectra","title":"Remove (raw or processed) spectra — remove_spectra","text":"remove_spectra() function used discard specific spectra (1) raw spectra list removing , (2) processed spectra removing spectra, peaks metadata objects.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/remove_spectra.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Remove (raw or processed) spectra — remove_spectra","text":"","code":"remove_spectra(spectra_list, to_remove)"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/remove_spectra.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Remove (raw or processed) spectra — remove_spectra","text":"spectra_list list MALDIquant::MassSpectrum objects list processed spectra process_spectra to_remove spectra removed. case raw spectra: logical vector size spectra_list check_spectra function. case processed spectra: names spectra formatted get_spectra_names sanitized_name column.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/remove_spectra.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Remove (raw or processed) spectra — remove_spectra","text":"object spectra_list minus spectra to_remove.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/remove_spectra.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Remove (raw or processed) spectra — remove_spectra","text":"","code":"# Get an example directory of six Bruker MALDI Biotyper spectra directory_biotyper_spectra <- system.file( \"toy-species-spectra\", package = \"maldipickr\" ) # Import only the first two spectra spectra_list <- import_biotyper_spectra(directory_biotyper_spectra)[1:2] # Introduce artificially an empty raw spectra spectra_list <- c(spectra_list, MALDIquant::createMassSpectrum(0, 0)) # Empty spectra are detected by `check_spectra()` # and can be removed by `remove_spectra()` spectra_list %>% remove_spectra(to_remove = check_spectra(.)) #> Some spectra are incorrect (empty, outlier length or irregular). #> They can be removed using `remove_spectra()` #> [[1]] #> S4 class type : MassSpectrum #> Number of m/z values : 20882 #> Range of m/z values : 1962.222 - 20146.522 #> Range of intensity values: 2.4e+02 - 3.608e+04 #> Memory usage : 337.062 KiB #> Name : species1.G2 #> File : /home/runner/.cache/R/renv/library/maldipickr-8ce40efa/R-4.4/x86_64-pc-linux-gnu/maldipickr/toy-species-spectra/species1/0_G2/1/1SLin/fid #> #> [[2]] #> S4 class type : MassSpectrum #> Number of m/z values : 20882 #> Range of m/z values : 1962.222 - 20146.522 #> Range of intensity values: 1.82e+02 - 1.006e+04 #> Memory usage : 337.062 KiB #> Name : species2.E11 #> File : /home/runner/.cache/R/renv/library/maldipickr-8ce40efa/R-4.4/x86_64-pc-linux-gnu/maldipickr/toy-species-spectra/species2/0_E11/1/1SLin/fid #> # Get an example processed spectra processed_path <- system.file( \"three_processed_spectra_with_one_peakless.RDS\", package = \"maldipickr\") processed <- readRDS(processed_path) %>% list() # Remove a specific spectra remove_spectra(processed, \"empty_H12\") #> $spectra #> $spectra$species1_G2 #> S4 class type : MassSpectrum #> Number of m/z values : 7867 #> Range of m/z values : 4000.066 - 9999.46 #> Range of intensity values: 0e+00 - 2.181e-03 #> Memory usage : 133.625 KiB #> Name : species1.G2 #> File : /maldipickr/inst/toy-species-spectra/species1/0_G2/1/1SLin/fid #> #> $spectra$species2_E11 #> S4 class type : MassSpectrum #> Number of m/z values : 7867 #> Range of m/z values : 4000.066 - 9999.46 #> Range of intensity values: 0e+00 - 2.58e-03 #> Memory usage : 133.625 KiB #> Name : species2.E11 #> File : /maldipickr/inst/toy-species-spectra/species2/0_E11/1/1SLin/fid #> #> #> $peaks #> $peaks$species1_G2 #> S4 class type : MassPeaks #> Number of m/z values : 21 #> Range of m/z values : 4030.815 - 9989.171 #> Range of intensity values: 3.871e-04 - 2.181e-03 #> Range of snr values : 3.623 - 10.382 #> Memory usage : 11.352 KiB #> Name : species1.G2 #> File : /maldipickr/inst/toy-species-spectra/species1/0_G2/1/1SLin/fid #> #> $peaks$species2_E11 #> S4 class type : MassPeaks #> Number of m/z values : 22 #> Range of m/z values : 4031.408 - 9990.106 #> Range of intensity values: 2.034e-04 - 2.58e-03 #> Range of snr values : 3.14 - 11.027 #> Memory usage : 11.375 KiB #> Name : species2.E11 #> File : /maldipickr/inst/toy-species-spectra/species2/0_E11/1/1SLin/fid #> #> #> $metadata #> # A tibble: 2 × 3 #> name SNR peaks #> #> 1 species1_G2 5.09 21 #> 2 species2_E11 5.54 22 #>"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/set_reference_spectra.html","id":null,"dir":"Reference","previous_headings":"","what":"Set a reference spectrum for each cluster — set_reference_spectra","title":"Set a reference spectrum for each cluster — set_reference_spectra","text":"Define high-quality spectra representative spectra cluster based highest median signal--noise ratio number detected peaks","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/set_reference_spectra.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set a reference spectrum for each cluster — set_reference_spectra","text":"","code":"set_reference_spectra(cluster_df, metadata_df)"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/set_reference_spectra.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set a reference spectrum for each cluster — set_reference_spectra","text":"cluster_df tibble n rows spectra produced delineate_with_similarity function least following columns: name: rownames similarity matrix indicating spectra names membership: integers stating cluster number spectra belong . starts 1 c, total number clusters. cluster_size: integers indicating total number spectra corresponding cluster. metadata_df tibble n rows spectra produced process_spectra function median signal--noise ratio (SNR), peaks number (peaks), spectra names name column.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/set_reference_spectra.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set a reference spectrum for each cluster — set_reference_spectra","text":"merged tibble order cluster_df columns cluster_df metadata_df, well logical column is_reference indicating spectrum reference spectra cluster.","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/reference/set_reference_spectra.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set a reference spectrum for each cluster — set_reference_spectra","text":"","code":"# Get an example directory of six Bruker MALDI Biotyper spectra # Import the six spectra and # Transform the spectra signals according to Strejcek et al. (2018) processed <- system.file( \"toy-species-spectra\", package = \"maldipickr\" ) %>% import_biotyper_spectra() %>% process_spectra() # Toy similarity matrix between the six example spectra of # three species. The cosine metric is used and a value of # zero indicates dissimilar spectra and a value of one # indicates identical spectra. cosine_similarity <- matrix( c( 1, 0.79, 0.77, 0.99, 0.98, 0.98, 0.79, 1, 0.98, 0.79, 0.8, 0.8, 0.77, 0.98, 1, 0.77, 0.77, 0.77, 0.99, 0.79, 0.77, 1, 1, 0.99, 0.98, 0.8, 0.77, 1, 1, 1, 0.98, 0.8, 0.77, 0.99, 1, 1 ), nrow = 6, dimnames = list( c( \"species1_G2\", \"species2_E11\", \"species2_E12\", \"species3_F7\", \"species3_F8\", \"species3_F9\" ), c( \"species1_G2\", \"species2_E11\", \"species2_E12\", \"species3_F7\", \"species3_F8\", \"species3_F9\" ) ) ) # Delineate clusters based on a 0.92 threshold applied # to the similarity matrix clusters <- delineate_with_similarity( cosine_similarity, threshold = 0.92 ) # Set reference spectra with the toy example set_reference_spectra(clusters, processed$metadata) #> # A tibble: 6 × 6 #> name membership cluster_size SNR peaks is_reference #> #> 1 species1_G2 1 4 5.09 21 FALSE #> 2 species2_E11 2 2 5.54 22 FALSE #> 3 species2_E12 2 2 5.63 23 TRUE #> 4 species3_F7 1 4 4.89 26 FALSE #> 5 species3_F8 1 4 5.56 25 TRUE #> 6 species3_F9 1 4 5.40 25 FALSE"},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"maldipickr-130","dir":"Changelog","previous_headings":"","what":"maldipickr 1.3.0","title":"maldipickr 1.3.0","text":"CRAN release: 2023-12-14","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"fixed-1-3-0","dir":"Changelog","previous_headings":"","what":"Fixed","title":"maldipickr 1.3.0","text":"Fix non-unique names possibility spectra processing (#37)","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"changed-1-3-0","dir":"Changelog","previous_headings":"","what":"Changed","title":"maldipickr 1.3.0","text":"Deprecate ability write RDS process_spectra() (#38) Deprecate ability read RDS merge_processed_spectra() Change warnings check_spectra() messages pointing use remove_spectra()","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"added-1-3-0","dir":"Changelog","previous_headings":"","what":"Added","title":"maldipickr 1.3.0","text":"Add get_spectra_names() extract, format spectra names warn non-uniqueness Add remove_spectra() better handle discarding raw processed spectra Add lifecycle better handle deprecation Add sections function reference list improve clarity website","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"maldipickr-120","dir":"Changelog","previous_headings":"","what":"maldipickr 1.2.0","title":"maldipickr 1.2.0","text":"CRAN release: 2023-10-25","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"changed-1-2-0","dir":"Changelog","previous_headings":"","what":"Changed","title":"maldipickr 1.2.0","text":"(BREAKING) Change homemade clustering robust hierarchical clustering delineate_with_similarity() (#32). default method hierarchical clustering complete linkage (also known farthest neighbor clustering) ensure within-group minimum similarity cluster respects threshold Change sapply() calls type-robust vapply() calls","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"added-1-2-0","dir":"Changelog","previous_headings":"","what":"Added","title":"maldipickr 1.2.0","text":"(BREAKING) Set minimum R version >= 3.2.0 (#31) Add hierarchical clustering linkage method argument delineate_with_similarity() Add tolerance argument check_spectra() allow flexible spectra length checks Add unit tests key functions: pick_spectra() (#26) merge_processed_spectra() (#27)","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"fixed-1-2-0","dir":"Changelog","previous_headings":"","what":"Fixed","title":"maldipickr 1.2.0","text":"Fix missing spectra names merging spectra lists peak-less spectra Fix coverage update issue adding codecov token (#34)","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"maldipickr-111","dir":"Changelog","previous_headings":"","what":"maldipickr 1.1.1","title":"maldipickr 1.1.1","text":"CRAN release: 2023-09-07","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"fixed-1-1-1","dir":"Changelog","previous_headings":"","what":"Fixed","title":"maldipickr 1.1.1","text":"Fix typos CRAN re-submission: missing brackets reference, spelling errors.","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"fixed-1-1-0","dir":"Changelog","previous_headings":"","what":"Fixed","title":"maldipickr 1.1.0","text":"(URGENT) Fix delineate_with_similarity() include friends--friends clusters removal igraph #18. Add relevant similarity matrix test accordingly.","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"changed-1-0-2","dir":"Changelog","previous_headings":"","what":"Changed","title":"maldipickr 1.0.2","text":"Fix invalid file URIs NEWS.md README.md","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"changed-1-0-1","dir":"Changelog","previous_headings":"","what":"Changed","title":"maldipickr 1.0.1","text":"Fix title title case CRAN","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"changed-1-0-0","dir":"Changelog","previous_headings":"","what":"Changed","title":"maldipickr 1.0.0","text":"(BREAKING) read_biotyper_report() first column now name instead spot, meaning read_many_biotyper_reports() renames name columns original_name. pick_spectra() easily usable taxonomy identification reports (38a614173fd21315a40e0823600a2082fa0935bb) Change similarity_to_clusters() delineate_with_similarity() Change identification_to_clusters() delineate_with_identification() Refactor delineate_with_similarity() clustering function (formerly: similarity_to_clusters()) without using igraph tidygraph R packages, fewer dependencies simpler codebase (#18) Update DESCRIPTION include Strejcek reference (#22) better highlight package added-value Refactor pkgdown website accessible font color schema inline logo color palette Change vignettes titles outline better structure documents Refactor cosine similarity computation example highlighting dedicated coop::tcosine() instead t() %>% coop::cosine()","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"added-1-0-0","dir":"Changelog","previous_headings":"","what":"Added","title":"maldipickr 1.0.0","text":"Add long wide output format read_biotyper_report() (#12) Document quickstart maldipickr package hurry (#15) Document precisely install tagged release maldipickr package Add better tests merge_processed_spectra() (b39c1313fd38239b4b1821a243c9debf467fd092) Document authors list according CRAN policy Add CRAN comments file track submission notes","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"removed-1-0-0","dir":"Changelog","previous_headings":"","what":"Removed","title":"maldipickr 1.0.0","text":"Deprecate CHANGELOG.md favor R specific NEWS.md (#20) Remove redundant check symbolic links creation (#19)","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"fixed-1-0-0","dir":"Changelog","previous_headings":"","what":"Fixed","title":"maldipickr 1.0.0","text":"Fix summarise() usage pick_spectra(), code simplification (#11) Remove symbolic links created importing acqu spectra files (#21) Fix CRAN warnings regarding qpdf (3b19dd36a6ec0f5dc277418c98977c526981b6e3) Fix masked relevant to_pick column vignette (#17)","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"added-0-1-1","dir":"Changelog","previous_headings":"","what":"Added","title":"maldipickr 0.1.1","text":"Add citation file R (CITATION) GitHub CITATION.cff Add CHANGELOG.md (Common Changelog)","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"changed-0-1-1","dir":"Changelog","previous_headings":"","what":"Changed","title":"maldipickr 0.1.1","text":"Improve package description according CRAN recommendations","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"maldipickr-010","dir":"Changelog","previous_headings":"","what":"maldipickr 0.1.0","title":"maldipickr 0.1.0","text":"First stable version","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"maldipickr-0009000","dir":"Changelog","previous_headings":"","what":"maldipickr 0.0.0.9000","title":"maldipickr 0.0.0.9000","text":"Added NEWS.md file track changes package.","code":""}] +[{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement cpauvert [] ukaachen [dot] de. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired [Mozilla’s code conduct enforcement ladder][https://github.com/mozilla/inclusion]. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contributing to {maldipickr}","title":"Contributing to {maldipickr}","text":"following set guidelines contributing {maldipickr}1. guidelines strict rules. Use best judgment, feel free propose changes document pull request, long abiding Contributor Code Conduct. contribution welcomed open contribution, typos new features. Thank taking time! guide throughout process make safe position contribute, whatever level R programming.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CONTRIBUTING.html","id":"maldipickr-uses-fusen-with-flat-files-rmd","dir":"","previous_headings":"","what":"{maldipickr} uses {fusen} with flat files (.Rmd)","title":"Contributing to {maldipickr}","text":"note structure R package. use {fusen} package develop. means multiple files package R/, tests/ vignettes/ issued flat file (e.g. .Rmd file). case, see following warnings top files: % Generated roxygen2: edit hand % Please edit documentation R/delineate_with_similarity.R # WARNING - Generated {fusen} dev/dereplicate-spectra.Rmd: edit hand means need make changes corresponding flat file, inflate() flat file. recommend using fusen::inflate_all() directly takes account modification. way developing fusen , new , illustration {fusen} documentation great help.","code":"% Generated by roxygen2: do not edit by hand % Please edit documentation in R/delineate_with_similarity.R # WARNING - Generated by {fusen} from dev/dereplicate-spectra.Rmd: do not edit by hand"},{"path":"https://clavellab.github.io/maldipickr/dev/CONTRIBUTING.html","id":"the-case-of-readme","dir":"","previous_headings":"{maldipickr} uses {fusen} with flat files (.Rmd)","what":"The case of README","title":"Contributing to {maldipickr}","text":"Changes README.md file done flat file README.Rmd. However, file built fusen need use devtools::build_readme().","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CONTRIBUTING.html","id":"fixing-typos","dir":"","previous_headings":"","what":"Fixing typos","title":"Contributing to {maldipickr}","text":"can fix typos, spelling mistakes, grammatical errors documentation vignettes directly using GitHub web interface, long changes made source file. generally means ’ll need edit roxygen2 comments R code chunks vignettes flat files (.Rmd) dev/ directory. can find .R file generates .Rd reading comment first line.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CONTRIBUTING.html","id":"bigger-changes","dir":"","previous_headings":"","what":"Bigger changes","title":"Contributing to {maldipickr}","text":"want make bigger change, ’s good idea first reach issue using “Feature request” template instance. found bug, please file issue illustrates bug using “Bug report” template minimal reprex. Small datasets included maldipickr can used create reprex.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CONTRIBUTING.html","id":"pull-request-process","dir":"","previous_headings":"Bigger changes","what":"Pull request process","title":"Contributing to {maldipickr}","text":"Fork package clone onto computer. haven’t done , recommend using usethis::create_from_github(\"ClavelLab/maldipickr\", fork = TRUE). Install development dependences devtools::install_dev_deps(), make sure package passes R CMD check running devtools::check(). R CMD check doesn’t pass cleanly, ’s good idea ask help continuing. Create Git branch pull request (PR). recommend using usethis::pr_init(\"brief-description--change\") usethis::pr_init(\"fix-ISSUENUMBER-short-title\") aiming fix specific issue. Make changes Open dev/dev_history.R file: rstudioapi::navigateToFile(\"dev/dev_history.R\") Find “# Dependencies —-” part run attachment::att_amend_desc(...) presented . update documentation list dependencies DESCRIPTION ones needed maldipickr. Commit git, create PR running usethis::pr_push(), following prompts browser. title PR briefly describe change. body PR contain Fixes #issue-number. Summarize changes community editing NEWS.md. follow style described Common Changelog.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CONTRIBUTING.html","id":"code-style","dir":"","previous_headings":"","what":"Code style","title":"Contributing to {maldipickr}","text":"Commit style. Commits start whenever possible verb lower case, commit title continues sentence: “Applying commit …”. New code follow tidyverse style guide. can use styler package apply styles, please don’t restyle code nothing PR. use roxygen2, Markdown syntax, documentation. use testthat unit tests. Contributions test cases included easier accept.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contributing to {maldipickr}","text":"Please note fusen project released Contributor Code Conduct. contributing project agree abide terms.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright © 2007 Free Software Foundation, Inc.  Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions","title":"GNU General Public License","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code","title":"GNU General Public License","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions","title":"GNU General Public License","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law","title":"GNU General Public License","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies","title":"GNU General Public License","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions","title":"GNU General Public License","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: ) work must carry prominent notices stating modified , giving relevant date. b) work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. c) must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . d) work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms","title":"GNU General Public License","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: ) Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. b) Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. c) Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. d) Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. e) Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms","title":"GNU General Public License","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: ) Disclaiming warranty limiting liability differently terms sections 15 16 License; b) Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; c) Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; d) Limiting use publicity purposes names licensors authors material; e) Declining grant rights trademark law use trade names, trademarks, service marks; f) Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination","title":"GNU General Public License","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies","title":"GNU General Public License","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients","title":"GNU General Public License","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents","title":"GNU General Public License","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom","title":"GNU General Public License","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License","title":"GNU General Public License","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License","title":"GNU General Public License","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty","title":"GNU General Public License","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability","title":"GNU General Public License","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16","title":"GNU General Public License","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see . GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read .","code":" Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details."},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/articles/dereplicate-bruker-maldi-biotyper-spectra.html","id":"process-from-raw-spectra-to-peak-filtering","dir":"Articles","previous_headings":"Process Bruker MALDI Biotyper spectra","what":"Process from raw spectra to peak filtering","title":"Dereplicate Bruker MALDI Biotyper spectra","text":"imported raw data Bruker MALDI Biotyper, processing spectra based original implementation, run following tasks: Square-root transformation Mass range trimming 4-10 kDa deemed determinant Strejcek et al. (2018) Signal smoothing using Savitzky-Golay method half window size 20 Baseline correction SNIP procedure Normalization Total Ion Current Peak detection using SuperSmoother procedure signal--noise ratio 3 Peak filtering. step added discard peaks negative signal--noise ratio probably due edge mass range. full procedure illustrated example . case, resulting processed spectra, peaks final spectra metadata stored -memory, process_spectra() function enables storing files locally scalable high-throughput analyses.","code":"# Get an example directory of six Bruker MALDI Biotyper spectra directory_biotyper_spectra <- system.file( \"toy-species-spectra\", package = \"maldipickr\" ) # Import the six spectra spectra_list <- import_biotyper_spectra(directory_biotyper_spectra) # Transform the spectra signals according to Strejcek et al. (2018) processed <- process_spectra(spectra_list) # Overview of the list architecture that is returned # with the list of processed spectra, peaks identified and the # metadata table str(processed, max.level = 2) #> List of 3 #> $ spectra :List of 6 #> ..$ species1_G2 :Formal class 'MassSpectrum' [package \"MALDIquant\"] with 3 slots #> ..$ species2_E11:Formal class 'MassSpectrum' [package \"MALDIquant\"] with 3 slots #> ..$ species2_E12:Formal class 'MassSpectrum' [package \"MALDIquant\"] with 3 slots #> ..$ species3_F7 :Formal class 'MassSpectrum' [package \"MALDIquant\"] with 3 slots #> ..$ species3_F8 :Formal class 'MassSpectrum' [package \"MALDIquant\"] with 3 slots #> ..$ species3_F9 :Formal class 'MassSpectrum' [package \"MALDIquant\"] with 3 slots #> $ peaks :List of 6 #> ..$ species1_G2 :Formal class 'MassPeaks' [package \"MALDIquant\"] with 4 slots #> ..$ species2_E11:Formal class 'MassPeaks' [package \"MALDIquant\"] with 4 slots #> ..$ species2_E12:Formal class 'MassPeaks' [package \"MALDIquant\"] with 4 slots #> ..$ species3_F7 :Formal class 'MassPeaks' [package \"MALDIquant\"] with 4 slots #> ..$ species3_F8 :Formal class 'MassPeaks' [package \"MALDIquant\"] with 4 slots #> ..$ species3_F9 :Formal class 'MassPeaks' [package \"MALDIquant\"] with 4 slots #> $ metadata: tibble [6 × 3] (S3: tbl_df/tbl/data.frame) # A detailed view of the metadata with the median signal-to-noise # ratio (SNR) and the number of peaks processed$metadata #> # A tibble: 6 × 3 #> name SNR peaks #> #> 1 species1_G2 5.09 21 #> 2 species2_E11 5.54 22 #> 3 species2_E12 5.63 23 #> 4 species3_F7 4.89 26 #> 5 species3_F8 5.56 25 #> 6 species3_F9 5.40 25"},{"path":"https://clavellab.github.io/maldipickr/dev/articles/dereplicate-bruker-maldi-biotyper-spectra.html","id":"merge-multiple-processed-spectra","dir":"Articles","previous_headings":"Process Bruker MALDI Biotyper spectra","what":"Merge multiple processed spectra","title":"Dereplicate Bruker MALDI Biotyper spectra","text":"high-throughput analyses, multiples runs Bruker MALDI Biotyper expected resulting several batches spectra processed compared. processing natively independent, natively run parallel, integration batches comparison needs additional step. merge_processed_spectra() function aggregates processed spectra bins together detected peaks, tolerance 0.0020.002 average peak values bin (see MALDIquant::binPeaks), translate tolerance 2000 ppm. binning step results n×pn\\times p feature matrix (intensity matrix), nn rows nn processed spectra (peak-less spectra discarded) pp columns pp peaks masses. default, Strejeck et al. (2018) procedure, intensity values spectra missing peaks interpolated processed spectra signal. current function enables analyst decide whether interpolate values leave missing peaks NA converted null intensity value.","code":"# Get an example directory of six Bruker MALDI Biotyper spectra directory_biotyper_spectra <- system.file( \"toy-species-spectra\", package = \"maldipickr\" ) # Import the six spectra spectra_list <- import_biotyper_spectra(directory_biotyper_spectra) # Transform the spectra signals according to Strejcek et al. (2018) processed <- process_spectra(spectra_list) # Merge the spectra to produce the feature matrix fm <- merge_processed_spectra(list(processed)) # The feature matrix has 6 spectra as rows and # 35 peaks as columns dim(fm) #> [1] 6 35 # Notice the difference when the interpolation is turned off fm_no_interpolation <- merge_processed_spectra( list(processed), interpolate_missing = FALSE ) sum(fm == 0) # 0 #> [1] 0 sum(fm_no_interpolation == 0) # 68 #> [1] 68 # Multiple runs can be aggregated using list() # Merge the spectra to produce the feature matrix fm_all <- merge_processed_spectra(list(processed, processed, processed)) # The feature matrix has 3×6=18 spectra as rows and # 35 peaks as columns dim(fm_all) #> [1] 18 35 # If using a list, names will be dropped and are not propagated to the matrix. #' \\dontrun{ #' fm_all <- merge_processed_spectra( #' list(\"A\" = processed, \"B\" = processed, \"C\" = processed)) #' any(grepl(\"A|B|C\", rownames(fm_all))) # FALSE #' } #'"},{"path":"https://clavellab.github.io/maldipickr/dev/articles/dereplicate-bruker-maldi-biotyper-spectra.html","id":"compute-a-similarity-matrix-between-all-processed-spectra-not-included","dir":"Articles","previous_headings":"Process Bruker MALDI Biotyper spectra","what":"Compute a similarity matrix between all processed spectra (not included)","title":"Dereplicate Bruker MALDI Biotyper spectra","text":"batches spectra processed together, can use distance metric evaluate close spectra one another. Strejcek et al. (2018) recommend cosine metric compare spectra use fast implementation {coop} package. provide specific functions generate similarity matrix, illustrate can easily computed. Note feature matrix merge_processed_spectra() spectra rows peaks values columns. get similarity matrix spectra, either feature matrix must transposed dedicated function must used.","code":"# A. Compute the similarity matrix on the transposed feature matrix # using Pearson correlation coefficient sim_matrix <- stats::cor(t(fm), method = \"pearson\") # B.1 Install the coop package # install.packages(\"coop\") # B.2 Compute the similarity matrix on the rows of the feature matrix sim_matrix <- coop::tcosine(fm)"},{"path":[]},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/articles/dereplicate-bruker-maldi-biotyper-spectra.html","id":"similarity-to-clusters","dir":"Articles","previous_headings":"Delineate clusters of spectra > From a similarity matrix","what":"Similarity to clusters","title":"Dereplicate Bruker MALDI Biotyper spectra","text":"similarity matrix computed pairs studied spectra, next step delineate clusters spectra order dereplicate measured bacterial colonies, find nearly identical colonies. delineate_with_similarity() agnostic similarity metric used provided upper bound one numeric threshold relevant metric used given. recommend cosine metric Pearson product moment. Hierarchical clustering group spectra cluster similarity spectra (equal ) provided threshold. default recommended method complete linkage, also known farthest neighbor, ensure within-group minimum similarity cluster respects threshold. Finally, table summarizes spectra, cluster number assigned size cluster, total number spectra cluster.","code":"# Toy similarity matrix between the six example spectra of # three species. The cosine metric is used and a value of # zero indicates dissimilar spectra and a value of one # indicates identical spectra. cosine_similarity <- matrix( c( 1, 0.79, 0.77, 0.99, 0.98, 0.98, 0.79, 1, 0.98, 0.79, 0.8, 0.8, 0.77, 0.98, 1, 0.77, 0.77, 0.77, 0.99, 0.79, 0.77, 1, 1, 0.99, 0.98, 0.8, 0.77, 1, 1, 1, 0.98, 0.8, 0.77, 0.99, 1, 1 ), nrow = 6, dimnames = list( c( \"species1_G2\", \"species2_E11\", \"species2_E12\", \"species3_F7\", \"species3_F8\", \"species3_F9\" ), c( \"species1_G2\", \"species2_E11\", \"species2_E12\", \"species3_F7\", \"species3_F8\", \"species3_F9\" ) ) ) # Delineate clusters based on a 0.92 threshold applied # to the similarity matrix delineate_with_similarity(cosine_similarity, threshold = 0.92) #> # A tibble: 6 × 3 #> name membership cluster_size #> #> 1 species1_G2 1 4 #> 2 species2_E11 2 2 #> 3 species2_E12 2 2 #> 4 species3_F7 1 4 #> 5 species3_F8 1 4 #> 6 species3_F9 1 4"},{"path":"https://clavellab.github.io/maldipickr/dev/articles/dereplicate-bruker-maldi-biotyper-spectra.html","id":"set-a-reference-spectrum-for-each-cluster","dir":"Articles","previous_headings":"Delineate clusters of spectra > From a similarity matrix","what":"Set a reference spectrum for each cluster","title":"Dereplicate Bruker MALDI Biotyper spectra","text":"table clusters generated similarity matrix, reference spectrum can assigned cluster. choose define high-quality spectra representative spectra clusters using internal information. , representative spectra , within cluster, highest median signal--noise ratio highest number detected peaks. function set_reference_spectra() change order cluster table merely adds additional column is_reference indicate whether corresponding spectrum representative cluster.","code":"# Get an example directory of six Bruker MALDI Biotyper spectra # Import the six spectra and # Transform the spectra signals according to Strejcek et al. (2018) processed <- system.file( \"toy-species-spectra\", package = \"maldipickr\" ) %>% import_biotyper_spectra() %>% process_spectra() # Toy similarity matrix between the six example spectra of # three species. The cosine metric is used and a value of # zero indicates dissimilar spectra and a value of one # indicates identical spectra. cosine_similarity <- matrix( c( 1, 0.79, 0.77, 0.99, 0.98, 0.98, 0.79, 1, 0.98, 0.79, 0.8, 0.8, 0.77, 0.98, 1, 0.77, 0.77, 0.77, 0.99, 0.79, 0.77, 1, 1, 0.99, 0.98, 0.8, 0.77, 1, 1, 1, 0.98, 0.8, 0.77, 0.99, 1, 1 ), nrow = 6, dimnames = list( c( \"species1_G2\", \"species2_E11\", \"species2_E12\", \"species3_F7\", \"species3_F8\", \"species3_F9\" ), c( \"species1_G2\", \"species2_E11\", \"species2_E12\", \"species3_F7\", \"species3_F8\", \"species3_F9\" ) ) ) # Delineate clusters based on a 0.92 threshold applied # to the similarity matrix clusters <- delineate_with_similarity( cosine_similarity, threshold = 0.92 ) # Set reference spectra with the toy example set_reference_spectra(clusters, processed$metadata) #> # A tibble: 6 × 6 #> name membership cluster_size SNR peaks is_reference #> #> 1 species1_G2 1 4 5.09 21 FALSE #> 2 species2_E11 2 2 5.54 22 FALSE #> 3 species2_E12 2 2 5.63 23 TRUE #> 4 species3_F7 1 4 4.89 26 FALSE #> 5 species3_F8 1 4 5.56 25 TRUE #> 6 species3_F9 1 4 5.40 25 FALSE"},{"path":"https://clavellab.github.io/maldipickr/dev/articles/dereplicate-bruker-maldi-biotyper-spectra.html","id":"from-taxonomic-identifications","dir":"Articles","previous_headings":"Delineate clusters of spectra","what":"From taxonomic identifications","title":"Dereplicate Bruker MALDI Biotyper spectra","text":"alternative similarity matrix approach previous section rely taxonomic identification spectra delineate clusters. , must use Bruker MALDI Biotyper report Compass software summarize identification microorganisms using internal database. report reports imported (R using read_biotyper_report()), function delineate_with_identification() group spectra based identifications. Clusters generated taxonomic identifications can use function set_reference_spectra() latter relies peaks information disclosed Biotyper report. Therefore, users interested cherry-picking spectra using taxonomic identifications use pick_spectra() function described combination input output tables delineate_with_identification() function pick instance spectra highest log score (using criteria_column = \"bruker_log\").","code":"report_unknown <- read_biotyper_report( system.file(\"biotyper_unknown.csv\", package = \"maldipickr\") ) delineate_with_identification(report_unknown) #> Generating clusters from single report #> # A tibble: 4 × 3 #> name membership cluster_size #> #> 1 unknown_isolate_1 2 1 #> 2 unknown_isolate_2 3 1 #> 3 unknown_isolate_3 1 2 #> 4 unknown_isolate_4 1 2"},{"path":"https://clavellab.github.io/maldipickr/dev/articles/dereplicate-bruker-maldi-biotyper-spectra.html","id":"import-clusters-results-generated-by-spede","dir":"Articles","previous_headings":"Delineate clusters of spectra","what":"Import clusters results generated by SPeDE","title":"Dereplicate Bruker MALDI Biotyper spectra","text":"Raw spectra can also processed clustered another approach, named SPeDE, developed Dumolin et al. (2019). resulting dereplication step produces comma separated table. example illustrates import table R consistent dereplication table generated within {maldipickr} package.","code":"# Reformat the output from SPeDE table # https://github.com/LM-UGent/SPeDE import_spede_clusters( system.file(\"spede.csv\", package = \"maldipickr\") ) #> # A tibble: 6 × 5 #> name membership cluster_size quality is_reference #> #> 1 species1_G2 1 1 GREEN TRUE #> 2 species2_E11 2 2 ORANGE FALSE #> 3 species2_E12 2 2 GREEN TRUE #> 4 species3_F7 3 1 GREEN TRUE #> 5 species3_F8 4 2 ORANGE FALSE #> 6 species3_F9 4 2 GREEN TRUE"},{"path":"https://clavellab.github.io/maldipickr/dev/articles/dereplicate-bruker-maldi-biotyper-spectra.html","id":"cherry-pick-bruker-maldi-biotyper-spectra","dir":"Articles","previous_headings":"","what":"Cherry-pick Bruker MALDI Biotyper spectra","title":"Dereplicate Bruker MALDI Biotyper spectra","text":"isolating bacteria environment, experimenters want thorough also work-, time- cost-savvy. One approach reduce redundancy bacterial isolates analyzing MALDI-TOF spectra Bruker Biotyper. steps previously described vignette consisted processing spectra able pick non-redundant spectra, using pick_spectra() function. function, illustrated examples , can pick spectra using different types inputs: reference spectra information present cluster table (using delineate_with_similarity() import_spede_clusters() functions; see example 1) external metadata table containing variable (e.g., optical density, fluorescence) maximized (default) minimized per cluster (see example 2) Spectra, clusters, can also excluded cherry-picking decision, procedure termed masking . distinguish two types mask implemented pick_spectra() function: soft mask discards spectra , correspond instance low-quality sample, negative control samples (see example 3) hard mask discards spectra clusters (see example 4). particularly useful spectra previously picked. instance, exclude colonies grown picked 24h streaking comparing colonies grown 72h. Advanced users can also provide directly cluster table custom sort cluster accommodate complex design. Ultimately, function delivers table many rows cluster table additional logical column named to_pick indicate whether colony associated spectra picked (TRUE) picked (FALSE).","code":"# 0. Load a toy example of a tibble of clusters created by # the `delineate_with_similarity` function. clusters <- readRDS( system.file(\"clusters_tibble.RDS\", package = \"maldipickr\" ) ) # 1. By default and if no other metadata are provided, # the function picks reference spectra for each clusters. # # N.B: The spectra `name` and `to_pick` columns are moved to the left # only for clarity using the `relocate()` function. # pick_spectra(clusters) %>% dplyr::relocate(name, to_pick) # only for clarity #> # A tibble: 6 × 7 #> name to_pick membership cluster_size SNR peaks is_reference #> #> 1 species1_G2 FALSE 1 4 5.09 21 FALSE #> 2 species2_E11 FALSE 2 2 5.54 22 FALSE #> 3 species2_E12 TRUE 2 2 5.63 23 TRUE #> 4 species3_F7 FALSE 1 4 4.89 26 FALSE #> 5 species3_F8 TRUE 1 4 5.56 25 TRUE #> 6 species3_F9 FALSE 1 4 5.40 25 FALSE # 2.1 Simulate OD600 values with uniform distribution # for each of the colonies we measured with # the Bruker MALDI Biotyper set.seed(104) metadata <- dplyr::transmute( clusters, name = name, OD600 = runif(n = nrow(clusters)) ) metadata #> # A tibble: 6 × 2 #> name OD600 #> #> 1 species1_G2 0.364 #> 2 species2_E11 0.772 #> 3 species2_E12 0.735 #> 4 species3_F7 0.973 #> 5 species3_F8 0.740 #> 6 species3_F9 0.201 # 2.2 Pick the spectra based on the highest # OD600 value per cluster pick_spectra(clusters, metadata, \"OD600\") %>% dplyr::relocate(name, to_pick) # only for clarity #> # A tibble: 6 × 8 #> name to_pick membership cluster_size SNR peaks is_reference OD600 #> #> 1 species1_G2 FALSE 1 4 5.09 21 FALSE 0.364 #> 2 species2_E11 TRUE 2 2 5.54 22 FALSE 0.772 #> 3 species2_E12 FALSE 2 2 5.63 23 TRUE 0.735 #> 4 species3_F7 TRUE 1 4 4.89 26 FALSE 0.973 #> 5 species3_F8 FALSE 1 4 5.56 25 TRUE 0.740 #> 6 species3_F9 FALSE 1 4 5.40 25 FALSE 0.201 # 3.1 Say that the wells on the right side of the plate are # used for negative controls and should not be picked. metadata <- metadata %>% dplyr::mutate( well = gsub(\".*[A-Z]([0-9]{1,2}$)\", \"\\\\1\", name) %>% strtoi(), is_edge = is_well_on_edge( well_number = well, plate_layout = 96, edges = \"right\" ) ) # 3.2 Pick the spectra after discarding (or soft masking) # the spectra indicated by the `is_edge` column. pick_spectra(clusters, metadata, \"OD600\", soft_mask_column = \"is_edge\" ) %>% dplyr::relocate(name, to_pick) # only for clarity #> # A tibble: 6 × 10 #> name to_pick membership cluster_size SNR peaks is_reference OD600 well #> #> 1 species1… FALSE 1 4 5.09 21 FALSE 0.364 2 #> 2 species2… TRUE 2 2 5.54 22 FALSE 0.772 11 #> 3 species2… FALSE 2 2 5.63 23 TRUE 0.735 12 #> 4 species3… TRUE 1 4 4.89 26 FALSE 0.973 7 #> 5 species3… FALSE 1 4 5.56 25 TRUE 0.740 8 #> 6 species3… FALSE 1 4 5.40 25 FALSE 0.201 9 #> # ℹ 1 more variable: is_edge # 4.1 Say that some spectra were picked before # (e.g., in the column F) in a previous experiment. # We do not want to pick clusters with those spectra # included to limit redundancy. metadata <- metadata %>% dplyr::mutate( picked_before = grepl(\"_F\", name) ) # 4.2 Pick the spectra from clusters without spectra # labeled as `picked_before` (hard masking). pick_spectra(clusters, metadata, \"OD600\", hard_mask_column = \"picked_before\" ) %>% dplyr::relocate(name, to_pick) # only for clarity #> # A tibble: 6 × 11 #> name to_pick membership cluster_size SNR peaks is_reference OD600 well #> #> 1 species1… FALSE 1 4 5.09 21 FALSE 0.364 2 #> 2 species2… TRUE 2 2 5.54 22 FALSE 0.772 11 #> 3 species2… FALSE 2 2 5.63 23 TRUE 0.735 12 #> 4 species3… FALSE 1 4 4.89 26 FALSE 0.973 7 #> 5 species3… FALSE 1 4 5.56 25 TRUE 0.740 8 #> 6 species3… FALSE 1 4 5.40 25 FALSE 0.201 9 #> # ℹ 2 more variables: is_edge , picked_before "},{"path":"https://clavellab.github.io/maldipickr/dev/articles/dereplicate-bruker-maldi-biotyper-spectra.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"Dereplicate Bruker MALDI Biotyper spectra","text":"Dumolin C, Aerts M, Verheyde B, Schellaert S, Vandamme T, Van Der Jeugt F, De Canck E, Cnockaert M, Wieme AD, Cleenwerck , Peiren J, Dawyndt P, Vandamme P, & Carlier . (2019). “Introducing SPeDE: High-Throughput Dereplication Accurate Determination Microbial Diversity Matrix-Assisted Laser Desorption–Ionization Time Flight Mass Spectrometry Data”. MSystems 4(5). doi:10.1128/msystems.00437-19. Strejcek M, Smrhova T, Junkova P & Uhlik O (2018). “Whole-Cell MALDI-TOF MS versus 16S rRNA Gene Analysis Identification Dereplication Recurrent Bacterial Isolates.” Frontiers Microbiology 9 doi:10.3389/fmicb.2018.01294.","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/articles/import-data-from-bruker-maldi-biotyper.html","id":"importing-a-single-report","dir":"Articles","previous_headings":"Importing generated reports from the Bruker MALDI Biotyper device","what":"Importing a single report","title":"Import data from Bruker MALDI Biotyper","text":"Bruker MALDI Biotyper generates report via Compass software summarizing identification microorganisms using internal database. file separated semi-colons, contains headers. report many columns wide format describe ten hits identification feasible, identification possible. --, makes table import R manipulation relatively painful. example import single Bruker MALDI Biotyper report {tibble}. default, best hit colony reported. hits can reported well, long format (long_format = TRUE), explorations {tidyverse} suite.","code":"# Get a example Bruker report biotyper <- system.file(\"biotyper.csv\", package = \"maldipickr\") # Import the report as a tibble report_tibble <- read_biotyper_report(biotyper) # Display the tibble report_tibble #> # A tibble: 3 × 8 #> name sample_name hit_rank bruker_quality bruker_species bruker_taxid #> #> 1 targetA NA 1 - not reliable identif… NA #> 2 targetB NA 1 +++ Escherichia coli 562 #> 3 targetC NA 1 +++ Kosakonia cowanii 208223 #> # ℹ 2 more variables: bruker_hash , bruker_log "},{"path":"https://clavellab.github.io/maldipickr/dev/articles/import-data-from-bruker-maldi-biotyper.html","id":"importing-multiple-reports","dir":"Articles","previous_headings":"Importing generated reports from the Bruker MALDI Biotyper device","what":"Importing multiple reports","title":"Import data from Bruker MALDI Biotyper","text":"large-scale analysis, batches identification run can easily imported using read_many_biotyper_reports function along custom-made metadata. example usage, one report artificially extended multiple reports.","code":"# List of Bruker MALDI Biotyper reports reports_paths <- system.file( c(\"biotyper.csv\", \"biotyper.csv\", \"biotyper.csv\"), package = \"maldipickr\" ) # Read the list of reports and combine them in a single tibble read_many_biotyper_reports( reports_paths, report_ids = c(\"first\", \"second\", \"third\"), # Additional metadata below are passed to dplyr::mutate growth_temperature = 37.0 ) #> # A tibble: 9 × 10 #> name original_name sample_name hit_rank bruker_quality bruker_species #> #> 1 first_targetA targetA NA 1 - not reliable … #> 2 first_targetB targetB NA 1 +++ Escherichia c… #> 3 first_targetC targetC NA 1 +++ Kosakonia cow… #> 4 second_targe… targetA NA 1 - not reliable … #> 5 second_targe… targetB NA 1 +++ Escherichia c… #> 6 second_targe… targetC NA 1 +++ Kosakonia cow… #> 7 third_targetA targetA NA 1 - not reliable … #> 8 third_targetB targetB NA 1 +++ Escherichia c… #> 9 third_targetC targetC NA 1 +++ Kosakonia cow… #> # ℹ 4 more variables: bruker_taxid , bruker_hash , bruker_log , #> # growth_temperature "},{"path":"https://clavellab.github.io/maldipickr/dev/articles/import-data-from-bruker-maldi-biotyper.html","id":"importing-spectra-from-the-bruker-maldi-biotyper-device","dir":"Articles","previous_headings":"","what":"Importing spectra from the Bruker MALDI Biotyper device","title":"Import data from Bruker MALDI Biotyper","text":"identification reports, Bruker MALDI Biotyper device outputs raw data used identification (database) form mass spectra. Thankfully, {MALDIquant} {readBrukerFlexData} packages help users import manipulate data R.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/articles/import-data-from-bruker-maldi-biotyper.html","id":"importing-multiple-spectra-from-a-directory-hierarchy","dir":"Articles","previous_headings":"Importing spectra from the Bruker MALDI Biotyper device","what":"Importing multiple spectra from a directory hierarchy","title":"Import data from Bruker MALDI Biotyper","text":"However, Bruker MALDI Biotyper device produces acqus files (instead native acqu files), readBrukerFlexDir() function {readBrukerFlexData} package fail following error message: following import_biotyper_spectra()) function used example circumvent error creating symbolic link conveniently helps removing calibration samples. toy dataset bundled package subset dataset {MALDIquantExamples} package consist six spectra: * 1 replicate species 1 * 2 replicates species 2 * 3 replicates species 3","code":"Error in .readAcquFile(fidFile = fidFile, verbose = verbose) : File ‘/data/maldi_dir/targetA/0_D10/1/1SLin/acqu’ doesn't exists! # Get an example directory of six Bruker MALDI Biotyper spectra directory_biotyper_spectra <- system.file( \"toy-species-spectra\", package = \"maldipickr\" ) # Import the six spectra spectra_list <- import_biotyper_spectra(directory_biotyper_spectra) # Display the list of spectra spectra_list #> [[1]] #> S4 class type : MassSpectrum #> Number of m/z values : 20882 #> Range of m/z values : 1962.222 - 20146.522 #> Range of intensity values: 2.4e+02 - 3.608e+04 #> Memory usage : 337.062 KiB #> Name : species1.G2 #> File : /home/runner/.cache/R/renv/library/maldipickr-8ce40efa/R-4.4/x86_64-pc-linux-gnu/maldipickr/toy-species-spectra/species1/0_G2/1/1SLin/fid #> #> [[2]] #> S4 class type : MassSpectrum #> Number of m/z values : 20882 #> Range of m/z values : 1962.222 - 20146.522 #> Range of intensity values: 1.82e+02 - 1.006e+04 #> Memory usage : 337.062 KiB #> Name : species2.E11 #> File : /home/runner/.cache/R/renv/library/maldipickr-8ce40efa/R-4.4/x86_64-pc-linux-gnu/maldipickr/toy-species-spectra/species2/0_E11/1/1SLin/fid #> #> [[3]] #> S4 class type : MassSpectrum #> Number of m/z values : 20882 #> Range of m/z values : 1962.222 - 20146.522 #> Range of intensity values: 3.25e+02 - 2.115e+04 #> Memory usage : 337.062 KiB #> Name : species2.E12 #> File : /home/runner/.cache/R/renv/library/maldipickr-8ce40efa/R-4.4/x86_64-pc-linux-gnu/maldipickr/toy-species-spectra/species2/0_E12/1/1SLin/fid #> #> [[4]] #> S4 class type : MassSpectrum #> Number of m/z values : 20882 #> Range of m/z values : 1961.215 - 20135.904 #> Range of intensity values: 1.94e+02 - 2.055e+04 #> Memory usage : 337.062 KiB #> Name : species3.F7 #> File : /home/runner/.cache/R/renv/library/maldipickr-8ce40efa/R-4.4/x86_64-pc-linux-gnu/maldipickr/toy-species-spectra/species3/0_F7/1/1SLin/fid #> #> [[5]] #> S4 class type : MassSpectrum #> Number of m/z values : 20882 #> Range of m/z values : 1961.215 - 20135.904 #> Range of intensity values: 1.6e+02 - 1.814e+04 #> Memory usage : 337.062 KiB #> Name : species3.F8 #> File : /home/runner/.cache/R/renv/library/maldipickr-8ce40efa/R-4.4/x86_64-pc-linux-gnu/maldipickr/toy-species-spectra/species3/0_F8/1/1SLin/fid #> #> [[6]] #> S4 class type : MassSpectrum #> Number of m/z values : 20882 #> Range of m/z values : 1961.215 - 20135.904 #> Range of intensity values: 1.59e+02 - 1.449e+04 #> Memory usage : 337.062 KiB #> Name : species3.F9 #> File : /home/runner/.cache/R/renv/library/maldipickr-8ce40efa/R-4.4/x86_64-pc-linux-gnu/maldipickr/toy-species-spectra/species3/0_F9/1/1SLin/fid"},{"path":"https://clavellab.github.io/maldipickr/dev/articles/import-data-from-bruker-maldi-biotyper.html","id":"evaluate-the-quality-of-the-spectra","dir":"Articles","previous_headings":"Importing spectra from the Bruker MALDI Biotyper device","what":"Evaluate the quality of the spectra","title":"Import data from Bruker MALDI Biotyper","text":"spectra imported, check_spectra() function can easily assess whether spectra list empty, length correspond profile data. spectra satisfy criteria, function exit warning indicate faulty spectra. Either way, function outputs list logical vectors (TRUE FALSE) indicating whether spectra empty (is_empty), odd length (is_outlier_length) profile spectra (is_not_regular).","code":"# Get an example directory of six Bruker MALDI Biotyper spectra directory_biotyper_spectra <- system.file( \"toy-species-spectra\", package = \"maldipickr\" ) # Import the six spectra spectra_list <- import_biotyper_spectra(directory_biotyper_spectra) # Display the list of checks, with FALSE where no anomaly is detected check_spectra(spectra_list) #> $is_empty #> [1] FALSE FALSE FALSE FALSE FALSE FALSE #> #> $is_outlier_length #> [1] FALSE FALSE FALSE FALSE FALSE FALSE #> #> $is_not_regular #> [1] FALSE FALSE FALSE FALSE FALSE FALSE # The overall sanity can be checked with Reduce Reduce(any, check_spectra(spectra_list)) # Should be FALSE #> [1] FALSE"},{"path":"https://clavellab.github.io/maldipickr/dev/articles/maldipickr.html","id":"quickstart","dir":"Articles","previous_headings":"","what":"Quickstart","title":"maldipickr","text":"maldipickr package helps microbiologists reduce duplicate/clonal bacteria cultures eventually exclude previously selected bacteria. maldipickr achieve feat grouping together data MALDI Biotyper helps choose representative bacteria group using user-relevant metadata – process known cherry-picking. maldipickr cherry-picks bacterial isolates MALDI Biotyper: using taxonomic identification report using spectra data","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/articles/maldipickr.html","id":"using-taxonomic-identification-report","dir":"Articles","previous_headings":"Quickstart","what":"Using taxonomic identification report","title":"maldipickr","text":"First make sure maldipickr installed loaded, alternatively follow instructions install package. Cherry-picking four isolates based taxonomic identification MALDI Biotyper done steps maldipickr.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/articles/maldipickr.html","id":"get-example-data","dir":"Articles","previous_headings":"Quickstart > Using taxonomic identification report","what":"Get example data","title":"maldipickr","text":"import example Biotyper CSV report glimpse table.","code":"report_tbl <- read_biotyper_report( system.file(\"biotyper_unknown.csv\", package = \"maldipickr\") ) report_tbl %>% dplyr::select(name, bruker_species, bruker_log) %>% knitr::kable()"},{"path":"https://clavellab.github.io/maldipickr/dev/articles/maldipickr.html","id":"delineate-clusters-and-cherry-pick","dir":"Articles","previous_headings":"Quickstart > Using taxonomic identification report","what":"Delineate clusters and cherry-pick","title":"maldipickr","text":"Delineate clusters identifications filtering reliable ones cherry-pick one representative spectra. Unreliable identifications based log-score replaced “reliable identification”, stay tuned represent isolates! chosen ones indicated to_pick column.","code":"report_tbl <- report_tbl %>% dplyr::mutate( bruker_species = dplyr::if_else(bruker_log >= 2, bruker_species, \"not reliable identification\") ) knitr::kable(report_tbl) report_tbl %>% delineate_with_identification() %>% pick_spectra(report_tbl, criteria_column = \"bruker_log\") %>% dplyr::relocate(name, to_pick, bruker_species) %>% knitr::kable() #> Generating clusters from single report"},{"path":"https://clavellab.github.io/maldipickr/dev/articles/maldipickr.html","id":"using-spectra-data","dir":"Articles","previous_headings":"Quickstart","what":"Using spectra data","title":"maldipickr","text":"parallel taxonomic identification reports, maldipickr process spectra data. Make sure maldipickr installed loaded, alternatively follow instructions install package. Cherry-picking six isolates three species based spectra data obtained MALDI Biotyper done steps maldipickr.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/articles/maldipickr.html","id":"get-example-data-1","dir":"Articles","previous_headings":"Quickstart > Using spectra data","what":"Get example data","title":"maldipickr","text":"set directory location example spectra data, adjust requirements. import process spectra gives us named list three objects: spectra, peaks metadata (details Value section process_spectra()).","code":"spectra_dir <- system.file(\"toy-species-spectra\", package = \"maldipickr\") processed <- spectra_dir %>% import_biotyper_spectra() %>% process_spectra()"},{"path":"https://clavellab.github.io/maldipickr/dev/articles/maldipickr.html","id":"delineate-clusters-and-cherry-pick-1","dir":"Articles","previous_headings":"Quickstart > Using spectra data","what":"Delineate clusters and cherry-pick","title":"maldipickr","text":"Delineate spectra clusters using Cosine similarity cherry-pick one representative spectra. chosen ones indicated to_pick column. provides brief overview features maldipickr, browse vignettes learn additional features.","code":"processed %>% list() %>% merge_processed_spectra() %>% coop::tcosine() %>% delineate_with_similarity(threshold = 0.92) %>% set_reference_spectra(processed$metadata) %>% pick_spectra() %>% dplyr::relocate(name, to_pick) %>% knitr::kable()"},{"path":"https://clavellab.github.io/maldipickr/dev/articles/maldipickr.html","id":"session-information","dir":"Articles","previous_headings":"","what":"Session information","title":"maldipickr","text":"","code":"sessionInfo() #> R version 4.4.1 (2024-06-14) #> Platform: x86_64-pc-linux-gnu #> Running under: Ubuntu 22.04.4 LTS #> #> Matrix products: default #> BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 #> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0 #> #> locale: #> [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 #> [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 #> [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C #> [10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C #> #> time zone: UTC #> tzcode source: system (glibc) #> #> attached base packages: #> [1] stats graphics grDevices datasets utils methods base #> #> other attached packages: #> [1] maldipickr_1.3.0.9000 #> #> loaded via a namespace (and not attached): #> [1] jsonlite_1.8.8 dplyr_1.1.4 compiler_4.4.1 #> [4] renv_1.0.3 MALDIquant_1.22.3 tidyselect_1.2.1 #> [7] parallel_4.4.1 tidyr_1.3.1 jquerylib_0.1.4 #> [10] systemfonts_1.1.0 textshaping_0.4.0 yaml_2.3.10 #> [13] fastmap_1.2.0 R6_2.5.1 generics_0.1.3 #> [16] knitr_1.48 tibble_3.2.1 desc_1.4.3 #> [19] readBrukerFlexData_1.9.2 bslib_0.8.0 pillar_1.9.0 #> [22] rlang_1.1.4 utf8_1.2.4 cachem_1.1.0 #> [25] xfun_0.47 fs_1.6.4 sass_0.4.9 #> [28] cli_3.6.3 withr_3.0.1 pkgdown_2.1.0 #> [31] magrittr_2.0.3 digest_0.6.37 lifecycle_1.0.4 #> [34] vctrs_0.6.5 evaluate_0.24.0 glue_1.7.0 #> [37] ragg_1.3.2 coop_0.6-3 fansi_1.0.6 #> [40] rmarkdown_2.28 purrr_1.0.2 tools_4.4.1 #> [43] pkgconfig_2.0.3 htmltools_0.5.8.1"},{"path":"https://clavellab.github.io/maldipickr/dev/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Charlie Pauvert. Author, maintainer, copyright holder. David Wylensek. Contributor. Selina Nüchtern. Contributor. Thomas Clavel. Contributor, funder, copyright holder.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Pauvert C, Wylensek D, Nüchtern S, Clavel T (2023). maldipickr: Dereplicate Cherry-pick Mass Spectrometry Spectra R. https://clavellab.github.io/maldipickr, https://github.com/ClavelLab/maldipickr.","code":"@Manual{pauvert_maldipickr_2023, title = {maldipickr: Dereplicate And Cherry-pick Mass Spectrometry Spectra in R}, author = {Charlie Pauvert and David Wylensek and Selina Nüchtern and Thomas Clavel}, year = {2023}, note = {https://clavellab.github.io/maldipickr, https://github.com/ClavelLab/maldipickr}, }"},{"path":"https://clavellab.github.io/maldipickr/dev/index.html","id":"maldipickr-","dir":"","previous_headings":"","what":"Reduce the redundancy of bacterial isolates","title":"Reduce the redundancy of bacterial isolates","text":"using MALDI-TOF1 Biotyper identify bacterial isolates want select representative isolates experiments need fast automated selection decisions can retrace maldipickr provides documented tested R functions help dereplicate MALDI-TOF data cherry-pick representative spectra microbial isolates. Check graphical overview. maldipickr can use two approaches: taxonomic identification reports (left) spectra data (right). Click thumbnail bigger version.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Reduce the redundancy of bacterial isolates","text":"maldipickr available CRAN GitHub. install latest CRAN release, use following command R: using {renv}, use: install development version, use following command R:","code":"install.packages(\"maldipickr\") renv::install(\"maldipickr\") remotes::install_github(\"ClavelLab/maldipickr\", build_vignettes = TRUE) # or with renv::install(\"ClavelLab/maldipickr\")"},{"path":"https://clavellab.github.io/maldipickr/dev/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"Reduce the redundancy of bacterial isolates","text":"Start Introduction maldipickr quickstart. Otherwise, comprehensive vignettes walk package functions showcase : Import spectra data identification reports Bruker MALDI Biotyper R. Process, dereplicate cherry-pick representative spectra, simple complex design.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/index.html","id":"troubleshoot-and-contribute","dir":"","previous_headings":"","what":"Troubleshoot and Contribute","title":"Reduce the redundancy of bacterial isolates","text":"Troubleshoot something unexpected happened using package, please first search current open closed issues look similar problems. first, welcome open new issue using “Bug report” template minimal reprex. Contribute contributions welcome CONTRIBUTING.md documents participate. Please note {maldipickr} package released Contributor Code Conduct. contributing project, agree abide terms.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/index.html","id":"credits","dir":"","previous_headings":"","what":"Credits","title":"Reduce the redundancy of bacterial isolates","text":"Acknowledgements R package developed spectra data generated Bruker MALDI Biotyper device. {maldipickr} package built suite Rmarkdown files using {fusen} package Rochette S (2023). relies : {MALDIquant} package Gibb & Strimmer (2012) spectra functions work Strejcek et al. (2018) dereplication procedure. Disclaimer developers package part Clavel Lab affiliated company Bruker, therefore package independent company distributed GPL-3.0 License. hexagonal logo created Charlie Pauvert uses Atkinson Hyperlegible font font color palette generated coolors.co.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/index.html","id":"references","dir":"","previous_headings":"","what":"References","title":"Reduce the redundancy of bacterial isolates","text":"Gibb S & Strimmer K (2012). “MALDIquant: versatile R package analysis mass spectrometry data”. Bioinformatics 28, 2270-2271. https://doi.org/10.1093/bioinformatics/bts447. Rochette S (2023). “fusen: Build Package Rmarkdown Files”. https://thinkr-open.github.io/fusen/, https://github.com/Thinkr-open/fusen. Strejcek M, Smrhova T, Junkova P & Uhlik O (2018). “Whole-Cell MALDI-TOF MS versus 16S rRNA Gene Analysis Identification Dereplication Recurrent Bacterial Isolates.” Frontiers Microbiology 9 https://doi.org/10.3389/fmicb.2018.01294.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/check_spectra.html","id":null,"dir":"Reference","previous_headings":"","what":"Evaluate the spectra regularities — check_spectra","title":"Evaluate the spectra regularities — check_spectra","text":"Assess whether spectra list empty, length correspond profile data.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/check_spectra.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Evaluate the spectra regularities — check_spectra","text":"","code":"check_spectra(spectra_list, tolerance = sqrt(.Machine$double.eps))"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/check_spectra.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Evaluate the spectra regularities — check_spectra","text":"spectra_list list MALDIquant::MassSpectrum objects tolerance numeric indicating accepted tolerance spectra length. default value machine numerical precision close 1.5e-8.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/check_spectra.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Evaluate the spectra regularities — check_spectra","text":"list logical vectors length spectra_list indicating spectra empty (is_empty), odd length (is_outlier_length) profile spectra (is_not_regular).","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/reference/check_spectra.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Evaluate the spectra regularities — check_spectra","text":"","code":"# Get an example directory of six Bruker MALDI Biotyper spectra directory_biotyper_spectra <- system.file( \"toy-species-spectra\", package = \"maldipickr\" ) # Import the six spectra spectra_list <- import_biotyper_spectra(directory_biotyper_spectra) # Display the list of checks, with FALSE where no anomaly is detected check_spectra(spectra_list) #> $is_empty #> [1] FALSE FALSE FALSE FALSE FALSE FALSE #> #> $is_outlier_length #> [1] FALSE FALSE FALSE FALSE FALSE FALSE #> #> $is_not_regular #> [1] FALSE FALSE FALSE FALSE FALSE FALSE #> # The overall sanity can be checked with Reduce Reduce(any, check_spectra(spectra_list)) # Should be FALSE #> [1] FALSE"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/delineate_with_identification.html","id":null,"dir":"Reference","previous_headings":"","what":"Delineate clusters from taxonomic identifications — delineate_with_identification","title":"Delineate clusters from taxonomic identifications — delineate_with_identification","text":"report taxonomic identification produced Bruker MALDI Biotyper spectra sharing identification labeled cluster. Spectra unknown identification (e.g., due database completeness) set unique cluster.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/delineate_with_identification.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delineate clusters from taxonomic identifications — delineate_with_identification","text":"","code":"delineate_with_identification(tibble_report)"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/delineate_with_identification.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delineate clusters from taxonomic identifications — delineate_with_identification","text":"tibble_report tibble n rows, n number spectra, produced read_biotyper_report() read_many_biotyper_reports(). long format best hits options expected used functions produce compliant input tibble.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/delineate_with_identification.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Delineate clusters from taxonomic identifications — delineate_with_identification","text":"tibble n rows spectra 3 columns: name: spectra names name column output either read_biotyper_report() read_many_biotyper_reports(). membership: integers stating cluster number spectra belong . starts 1 c, total number clusters. cluster_size: integers indicating total number spectra corresponding cluster.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/delineate_with_identification.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Delineate clusters from taxonomic identifications — delineate_with_identification","text":"unknown identification considered unique clusters within one input tibble, important consider whether taxonomic identifications come single report multiple reports, depending research question. message displayed confirm type reports delineation done.","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/reference/delineate_with_identification.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Delineate clusters from taxonomic identifications — delineate_with_identification","text":"","code":"report_unknown <- read_biotyper_report( system.file(\"biotyper_unknown.csv\", package = \"maldipickr\") ) delineate_with_identification(report_unknown) #> Generating clusters from single report #> # A tibble: 4 × 3 #> name membership cluster_size #> #> 1 unknown_isolate_1 2 1 #> 2 unknown_isolate_2 3 1 #> 3 unknown_isolate_3 1 2 #> 4 unknown_isolate_4 1 2"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/delineate_with_similarity.html","id":null,"dir":"Reference","previous_headings":"","what":"Delineate clusters from a similarity matrix — delineate_with_similarity","title":"Delineate clusters from a similarity matrix — delineate_with_similarity","text":"matrix spectra similarity (e.g., cosine metric, Pearson product moment), infer species clusters based threshold (equal ) spectra considered alike.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/delineate_with_similarity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Delineate clusters from a similarity matrix — delineate_with_similarity","text":"","code":"delineate_with_similarity(sim_matrix, threshold, method = \"complete\")"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/delineate_with_similarity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Delineate clusters from a similarity matrix — delineate_with_similarity","text":"sim_matrix \\(n \\times n\\) similarity matrix, \\(n\\) number spectra. Columns named rows. threshold numeric value indicating minimal similarity two spectra. Adjust accordingly similarity metric used. method method hierarchical clustering use. default recommended method \"complete\", methods stats::hclust valid.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/delineate_with_similarity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Delineate clusters from a similarity matrix — delineate_with_similarity","text":"tibble \\(n\\) rows spectra 3 columns: name: rownames similarity matrix indicating spectra names membership: integers stating cluster number spectra belong . starts 1 \\(c\\), total number clusters. cluster_size: integers indicating total number spectra corresponding cluster.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/delineate_with_similarity.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Delineate clusters from a similarity matrix — delineate_with_similarity","text":"similarity matrix converted distance matrix subtracting value one. approach works cosine similarity positive correlations upper bound 1. Clusters delineated using hierarchical clustering. default method hierarchical clustering complete linkage (also known farthest neighbor clustering) ensure within-group minimum similarity cluster respects threshold. See Details section stats::hclust others valid methods use.","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/reference/delineate_with_similarity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Delineate clusters from a similarity matrix — delineate_with_similarity","text":"","code":"# Toy similarity matrix between the six example spectra of # three species. The cosine metric is used and a value of # zero indicates dissimilar spectra and a value of one # indicates identical spectra. cosine_similarity <- matrix( c( 1, 0.79, 0.77, 0.99, 0.98, 0.98, 0.79, 1, 0.98, 0.79, 0.8, 0.8, 0.77, 0.98, 1, 0.77, 0.77, 0.77, 0.99, 0.79, 0.77, 1, 1, 0.99, 0.98, 0.8, 0.77, 1, 1, 1, 0.98, 0.8, 0.77, 0.99, 1, 1 ), nrow = 6, dimnames = list( c( \"species1_G2\", \"species2_E11\", \"species2_E12\", \"species3_F7\", \"species3_F8\", \"species3_F9\" ), c( \"species1_G2\", \"species2_E11\", \"species2_E12\", \"species3_F7\", \"species3_F8\", \"species3_F9\" ) ) ) # Delineate clusters based on a 0.92 threshold applied # to the similarity matrix delineate_with_similarity(cosine_similarity, threshold = 0.92) #> # A tibble: 6 × 3 #> name membership cluster_size #> #> 1 species1_G2 1 4 #> 2 species2_E11 2 2 #> 3 species2_E12 2 2 #> 4 species3_F7 1 4 #> 5 species3_F8 1 4 #> 6 species3_F9 1 4"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/get_spectra_names.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract spectra names and check for uniqueness — get_spectra_names","title":"Extract spectra names and check for uniqueness — get_spectra_names","text":"Given list raw spectra, get_spectra_names() extracts spectra names using file metadata, warns associated sanitized names unique.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/get_spectra_names.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract spectra names and check for uniqueness — get_spectra_names","text":"","code":"get_spectra_names(spectra_list)"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/get_spectra_names.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract spectra names and check for uniqueness — get_spectra_names","text":"spectra_list list MALDIquant::MassSpectrum objects.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/get_spectra_names.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract spectra names and check for uniqueness — get_spectra_names","text":"tibble four columns sanitized_name: spectra names based fullName dots dashes converted underscores name: spectra name using name label spectra metadata fullName: spectra full name using fullName label spectra metadata file: path raw spectra data","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/get_spectra_names.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract spectra names and check for uniqueness — get_spectra_names","text":"","code":"# Get an example directory of six Bruker MALDI Biotyper spectra directory_biotyper_spectra <- system.file( \"toy-species-spectra\", package = \"maldipickr\" ) # Import the six spectra spectra_list <- import_biotyper_spectra(directory_biotyper_spectra) # Extract the names get_spectra_names(spectra_list) #> # A tibble: 6 × 4 #> sanitized_name name fullName file #> #> 1 species1_G2 species1.G2 species1.G2 /home/runner/.cache/R/renv/library/m… #> 2 species2_E11 species2.E11 species2.E11 /home/runner/.cache/R/renv/library/m… #> 3 species2_E12 species2.E12 species2.E12 /home/runner/.cache/R/renv/library/m… #> 4 species3_F7 species3.F7 species3.F7 /home/runner/.cache/R/renv/library/m… #> 5 species3_F8 species3.F8 species3.F8 /home/runner/.cache/R/renv/library/m… #> 6 species3_F9 species3.F9 species3.F9 /home/runner/.cache/R/renv/library/m… # Artificially create duplicated entries to show the warning get_spectra_names(spectra_list[c(1,1)]) #> Warning: Non-unique values in spectra names! #> #> Quickfix: use `dplyr::mutate(sanitized_name = base::make.unique(sanitized_name))` #> # A tibble: 2 × 4 #> sanitized_name name fullName file #> #> 1 species1_G2 species1.G2 species1.G2 /home/runner/.cache/R/renv/library/mal… #> 2 species1_G2 species1.G2 species1.G2 /home/runner/.cache/R/renv/library/mal…"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/import_biotyper_spectra.html","id":null,"dir":"Reference","previous_headings":"","what":"Importing spectra from the Bruker MALDI Biotyper device — import_biotyper_spectra","title":"Importing spectra from the Bruker MALDI Biotyper device — import_biotyper_spectra","text":"function wrapper around readBrukerFlexData::readBrukerFlexDir() read acqus acqu MALDI files.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/import_biotyper_spectra.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Importing spectra from the Bruker MALDI Biotyper device — import_biotyper_spectra","text":"","code":"import_biotyper_spectra( biotyper_directory, remove_calibration = c(\"BTS\", \"Autocalibration\") )"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/import_biotyper_spectra.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Importing spectra from the Bruker MALDI Biotyper device — import_biotyper_spectra","text":"biotyper_directory path folder tree spectra imported. remove_calibration vector characters used regex indicate (calibration) spectra going removed.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/import_biotyper_spectra.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Importing spectra from the Bruker MALDI Biotyper device — import_biotyper_spectra","text":"list MALDIquant::MassSpectrum objects","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/import_biotyper_spectra.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Importing spectra from the Bruker MALDI Biotyper device — import_biotyper_spectra","text":"using readBrukerFlexData::readBrukerFlexDir() acqus files (instead native acqu files), function fail following error message: turns acqu acqus files , function create acqu symbolic links point acqus files.","code":"Error in .readAcquFile(fidFile = fidFile, verbose = verbose) : File ‘/data/maldi_dir/targetA/0_D10/1/1SLin/acqu’ doesn't exists!"},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/reference/import_biotyper_spectra.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Importing spectra from the Bruker MALDI Biotyper device — import_biotyper_spectra","text":"","code":"# Get an example directory of six Bruker MALDI Biotyper spectra directory_biotyper_spectra <- system.file( \"toy-species-spectra\", package = \"maldipickr\" ) # Import the six spectra spectra_list <- import_biotyper_spectra(directory_biotyper_spectra) # Display the list of spectra spectra_list #> [[1]] #> S4 class type : MassSpectrum #> Number of m/z values : 20882 #> Range of m/z values : 1962.222 - 20146.522 #> Range of intensity values: 2.4e+02 - 3.608e+04 #> Memory usage : 337.062 KiB #> Name : species1.G2 #> File : /home/runner/.cache/R/renv/library/maldipickr-8ce40efa/R-4.4/x86_64-pc-linux-gnu/maldipickr/toy-species-spectra/species1/0_G2/1/1SLin/fid #> #> [[2]] #> S4 class type : MassSpectrum #> Number of m/z values : 20882 #> Range of m/z values : 1962.222 - 20146.522 #> Range of intensity values: 1.82e+02 - 1.006e+04 #> Memory usage : 337.062 KiB #> Name : species2.E11 #> File : /home/runner/.cache/R/renv/library/maldipickr-8ce40efa/R-4.4/x86_64-pc-linux-gnu/maldipickr/toy-species-spectra/species2/0_E11/1/1SLin/fid #> #> [[3]] #> S4 class type : MassSpectrum #> Number of m/z values : 20882 #> Range of m/z values : 1962.222 - 20146.522 #> Range of intensity values: 3.25e+02 - 2.115e+04 #> Memory usage : 337.062 KiB #> Name : species2.E12 #> File : /home/runner/.cache/R/renv/library/maldipickr-8ce40efa/R-4.4/x86_64-pc-linux-gnu/maldipickr/toy-species-spectra/species2/0_E12/1/1SLin/fid #> #> [[4]] #> S4 class type : MassSpectrum #> Number of m/z values : 20882 #> Range of m/z values : 1961.215 - 20135.904 #> Range of intensity values: 1.94e+02 - 2.055e+04 #> Memory usage : 337.062 KiB #> Name : species3.F7 #> File : /home/runner/.cache/R/renv/library/maldipickr-8ce40efa/R-4.4/x86_64-pc-linux-gnu/maldipickr/toy-species-spectra/species3/0_F7/1/1SLin/fid #> #> [[5]] #> S4 class type : MassSpectrum #> Number of m/z values : 20882 #> Range of m/z values : 1961.215 - 20135.904 #> Range of intensity values: 1.6e+02 - 1.814e+04 #> Memory usage : 337.062 KiB #> Name : species3.F8 #> File : /home/runner/.cache/R/renv/library/maldipickr-8ce40efa/R-4.4/x86_64-pc-linux-gnu/maldipickr/toy-species-spectra/species3/0_F8/1/1SLin/fid #> #> [[6]] #> S4 class type : MassSpectrum #> Number of m/z values : 20882 #> Range of m/z values : 1961.215 - 20135.904 #> Range of intensity values: 1.59e+02 - 1.449e+04 #> Memory usage : 337.062 KiB #> Name : species3.F9 #> File : /home/runner/.cache/R/renv/library/maldipickr-8ce40efa/R-4.4/x86_64-pc-linux-gnu/maldipickr/toy-species-spectra/species3/0_F9/1/1SLin/fid #>"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/import_spede_clusters.html","id":null,"dir":"Reference","previous_headings":"","what":"Import clusters results generated by SPeDE — import_spede_clusters","title":"Import clusters results generated by SPeDE — import_spede_clusters","text":"Reformat table output analysis raw Bruker MALDI Biotyper spectra SPeDE tool Dumolin et al. (2019) consistent Strejcek et al. (2018) procedure followed maldipickr package.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/import_spede_clusters.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Import clusters results generated by SPeDE — import_spede_clusters","text":"","code":"import_spede_clusters(path)"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/import_spede_clusters.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Import clusters results generated by SPeDE — import_spede_clusters","text":"path Path comma separated table generated SPeDE","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/import_spede_clusters.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Import clusters results generated by SPeDE — import_spede_clusters","text":"tibble following columns: name: character denoting spectra name (spaces, dashes dots replaced underscores \"_\" SPeDE) membership: integers stating cluster number spectra belong . starts 1 c, total number clusters. cluster_size: integers indicating total number spectra corresponding cluster. quality: character indicating spectra quality category SPeDE, GREEN, ORANGE RED. is_reference: logical indicating whether corresponding spectra reference spectra cluster.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/import_spede_clusters.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Import clusters results generated by SPeDE — import_spede_clusters","text":"Dumolin C, Aerts M, Verheyde B, Schellaert S, Vandamme T, Van Der Jeugt F, De Canck E, Cnockaert M, Wieme AD, Cleenwerck , Peiren J, Dawyndt P, Vandamme P, & Carlier . (2019). \"Introducing SPeDE: High-Throughput Dereplication Accurate Determination Microbial Diversity Matrix-Assisted Laser Desorption–Ionization Time Flight Mass Spectrometry Data\". MSystems 4(5). doi:10.1128/msystems.00437-19.","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/reference/import_spede_clusters.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Import clusters results generated by SPeDE — import_spede_clusters","text":"","code":"# Reformat the output from SPeDE table # https://github.com/LM-UGent/SPeDE import_spede_clusters( system.file(\"spede.csv\", package = \"maldipickr\") ) #> # A tibble: 6 × 5 #> name membership cluster_size quality is_reference #> #> 1 species1_G2 1 1 GREEN TRUE #> 2 species2_E11 2 2 ORANGE FALSE #> 3 species2_E12 2 2 GREEN TRUE #> 4 species3_F7 3 1 GREEN TRUE #> 5 species3_F8 4 2 ORANGE FALSE #> 6 species3_F9 4 2 GREEN TRUE"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/is_well_on_edge.html","id":null,"dir":"Reference","previous_headings":"","what":"Identify the wells on the plate's edge — is_well_on_edge","title":"Identify the wells on the plate's edge — is_well_on_edge","text":"Identify wells plate's edge","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/is_well_on_edge.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identify the wells on the plate's edge — is_well_on_edge","text":"","code":"is_well_on_edge( well_number, plate_layout = c(96, 384), edges = c(\"top\", \"bottom\", \"left\", \"right\"), details = FALSE )"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/is_well_on_edge.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Identify the wells on the plate's edge — is_well_on_edge","text":"well_number vector positive numeric well identifier plate_layout integer indicating maximum number well plate edges character vector pointing plate edges considered details logical controlling whether data.frame details returned","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/is_well_on_edge.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Identify the wells on the plate's edge — is_well_on_edge","text":"logical vector, length well_number indicating whether well edge. details = TRUE, function returns data.frame complements logical vector well_number, row column positions.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/is_well_on_edge.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Identify the wells on the plate's edge — is_well_on_edge","text":"Flag wells located edges 96- 384-well plate, based following well numbering: Well numbers start 1 Well numbered left right top bottom plate.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/is_well_on_edge.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Identify the wells on the plate's edge — is_well_on_edge","text":"","code":"# Logical vector indicating whether the wells are on the four edges is_well_on_edge(1:96, plate_layout = 96) #> [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [13] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE #> [25] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE #> [37] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE #> [49] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE #> [61] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE #> [73] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE #> [85] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE # More details can be obtained to verify the results well_df <- is_well_on_edge(1:96, plate_layout = 96, details = TRUE) # And the resulting prediction displayed matrix(well_df$is_edge, ncol = max(well_df$col), byrow = TRUE) #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] #> [1,] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE #> [2,] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE #> [3,] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE #> [4,] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE #> [5,] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE #> [6,] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE #> [7,] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE #> [8,] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/maldipickr-package.html","id":null,"dir":"Reference","previous_headings":"","what":"maldipickr: Dereplicate and Cherry-Pick Mass Spectrometry Spectra — maldipickr-package","title":"maldipickr: Dereplicate and Cherry-Pick Mass Spectrometry Spectra — maldipickr-package","text":"Convenient wrapper functions analysis matrix-assisted laser desorption/ionization-time--flight (MALDI-TOF) spectra data order select representative spectra (also called cherry-pick). package covers preprocessing dereplication steps (based Strejcek, Smrhova, Junkova Uhlik (2018) doi:10.3389/fmicb.2018.01294 ) needed cluster MALDI-TOF spectra final cherry-picking step. enables easy exclusion spectra /clusters accommodate complex cherry-picking strategies. Alternatively, cherry-picking using taxonomic identification MALDI-TOF data made easy functions import inconsistently formatted reports.","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/reference/maldipickr-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"maldipickr: Dereplicate and Cherry-Pick Mass Spectrometry Spectra — maldipickr-package","text":"Maintainer: Charlie Pauvert cpauvert@ukaachen.de (ORCID) [copyright holder] contributors: David Wylensek (ORCID) [contributor] Selina Nüchtern [contributor] Thomas Clavel (ORCID) [contributor, funder, copyright holder]","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/merge_processed_spectra.html","id":null,"dir":"Reference","previous_headings":"","what":"Merge multiple processed spectra and peaks — merge_processed_spectra","title":"Merge multiple processed spectra and peaks — merge_processed_spectra","text":"Aggregate multiple processed spectra, associated peaks metadata feature matrix concatenated metadata table.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/merge_processed_spectra.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Merge multiple processed spectra and peaks — merge_processed_spectra","text":"","code":"merge_processed_spectra( processed_spectra, remove_peakless_spectra = TRUE, interpolate_missing = TRUE )"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/merge_processed_spectra.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Merge multiple processed spectra and peaks — merge_processed_spectra","text":"processed_spectra list processed spectra associated peaks metadata two possible formats: list -memory objects (named spectra, peaks, metadata) produced process_spectra. Named lists names dropped, see Note. list paths RDS files produced process_spectra using rds_prefix option. remove_peakless_spectra logical indicating whether discard spectra without detected peaks. interpolate_missing logical indicating intensity values missing peaks interpolated processed spectra signal left NA converted 0.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/merge_processed_spectra.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Merge multiple processed spectra and peaks — merge_processed_spectra","text":"n×p matrix, n spectra rows p features columns peaks found processed spectra.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/merge_processed_spectra.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Merge multiple processed spectra and peaks — merge_processed_spectra","text":"aggregating multiple runs processed spectra, named list provided, note names dropped, prevent downstream issues names appended rownames matrix thus preventing downstream metadata merge.","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/reference/merge_processed_spectra.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Merge multiple processed spectra and peaks — merge_processed_spectra","text":"","code":"# Get an example directory of six Bruker MALDI Biotyper spectra directory_biotyper_spectra <- system.file( \"toy-species-spectra\", package = \"maldipickr\" ) # Import the six spectra spectra_list <- import_biotyper_spectra(directory_biotyper_spectra) # Transform the spectra signals according to Strejcek et al. (2018) processed <- process_spectra(spectra_list) # Merge the spectra to produce the feature matrix fm <- merge_processed_spectra(list(processed)) # The feature matrix has 6 spectra as rows and # 35 peaks as columns dim(fm) #> [1] 6 35 # Notice the difference when the interpolation is turned off fm_no_interpolation <- merge_processed_spectra( list(processed), interpolate_missing = FALSE ) sum(fm == 0) # 0 #> [1] 0 sum(fm_no_interpolation == 0) # 68 #> [1] 68 # Multiple runs can be aggregated using list() # Merge the spectra to produce the feature matrix fm_all <- merge_processed_spectra(list(processed, processed, processed)) # The feature matrix has 3×6=18 spectra as rows and # 35 peaks as columns dim(fm_all) #> [1] 18 35 # If using a list, names will be dropped and are not propagated to the matrix. if (FALSE) { # \\dontrun{ fm_all <- merge_processed_spectra( list(\"A\" = processed, \"B\" = processed, \"C\" = processed)) any(grepl(\"A|B|C\", rownames(fm_all))) # FALSE } # }"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/pick_spectra.html","id":null,"dir":"Reference","previous_headings":"","what":"Cherry-pick Bruker MALDI Biotyper spectra — pick_spectra","title":"Cherry-pick Bruker MALDI Biotyper spectra — pick_spectra","text":"Using clusters information, potential additional metadata external criteria, spectra labeled picked cluster. Note spectra therefore clusters can explicitly removed (masked) picking decision previously picked discarded, using logical columns metadata table. metadata provided, reference spectra cluster picked.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/pick_spectra.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cherry-pick Bruker MALDI Biotyper spectra — pick_spectra","text":"","code":"pick_spectra( cluster_df, metadata_df = NULL, criteria_column = NULL, hard_mask_column = NULL, soft_mask_column = NULL, is_descending_order = TRUE, is_sorted = FALSE )"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/pick_spectra.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cherry-pick Bruker MALDI Biotyper spectra — pick_spectra","text":"cluster_df tibble clusters information delineate_with_similarity import_spede_clusters function. metadata_df Optional tibble relevant metadata guide picking process (e.g., OD600). criteria_column Optional character indicating column metadata_df used criteria. hard_mask_column Column name cluster_df metadata_df tibble indicating whether spectra, clusters belong discarded (TRUE) (FALSE) picking decision. soft_mask_column Column name cluster_df metadata_df tibble indicating whether spectra discarded (TRUE) (FALSE) picking decision. is_descending_order Optional logical indicating whether sort criteria_column highest--lowest value (TRUE) lowest--highest (FALSE). is_sorted Optional logical indicate cluster_df already sorted cluster based (usually multiple) internal criteria pick first cluster. flag overridden metadata_df provided.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/pick_spectra.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cherry-pick Bruker MALDI Biotyper spectra — pick_spectra","text":"tibble many rows cluster_df additional logical column named to_pick indicate whether colony associated spectra picked. metadata_df provided, additional columns tibble added returned tibble.","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/reference/pick_spectra.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Cherry-pick Bruker MALDI Biotyper spectra — pick_spectra","text":"","code":"# 0. Load a toy example of a tibble of clusters created by # the `delineate_with_similarity` function. clusters <- readRDS( system.file(\"clusters_tibble.RDS\", package = \"maldipickr\" ) ) # 1. By default and if no other metadata are provided, # the function picks reference spectra for each clusters. # # N.B: The spectra `name` and `to_pick` columns are moved to the left # only for clarity using the `relocate()` function. # pick_spectra(clusters) %>% dplyr::relocate(name, to_pick) # only for clarity #> # A tibble: 6 × 7 #> name to_pick membership cluster_size SNR peaks is_reference #> #> 1 species1_G2 FALSE 1 4 5.09 21 FALSE #> 2 species2_E11 FALSE 2 2 5.54 22 FALSE #> 3 species2_E12 TRUE 2 2 5.63 23 TRUE #> 4 species3_F7 FALSE 1 4 4.89 26 FALSE #> 5 species3_F8 TRUE 1 4 5.56 25 TRUE #> 6 species3_F9 FALSE 1 4 5.40 25 FALSE # 2.1 Simulate OD600 values with uniform distribution # for each of the colonies we measured with # the Bruker MALDI Biotyper set.seed(104) metadata <- dplyr::transmute( clusters, name = name, OD600 = runif(n = nrow(clusters)) ) metadata #> # A tibble: 6 × 2 #> name OD600 #> #> 1 species1_G2 0.364 #> 2 species2_E11 0.772 #> 3 species2_E12 0.735 #> 4 species3_F7 0.973 #> 5 species3_F8 0.740 #> 6 species3_F9 0.201 # 2.2 Pick the spectra based on the highest # OD600 value per cluster pick_spectra(clusters, metadata, \"OD600\") %>% dplyr::relocate(name, to_pick) # only for clarity #> # A tibble: 6 × 8 #> name to_pick membership cluster_size SNR peaks is_reference OD600 #> #> 1 species1_G2 FALSE 1 4 5.09 21 FALSE 0.364 #> 2 species2_E11 TRUE 2 2 5.54 22 FALSE 0.772 #> 3 species2_E12 FALSE 2 2 5.63 23 TRUE 0.735 #> 4 species3_F7 TRUE 1 4 4.89 26 FALSE 0.973 #> 5 species3_F8 FALSE 1 4 5.56 25 TRUE 0.740 #> 6 species3_F9 FALSE 1 4 5.40 25 FALSE 0.201 # 3.1 Say that the wells on the right side of the plate are # used for negative controls and should not be picked. metadata <- metadata %>% dplyr::mutate( well = gsub(\".*[A-Z]([0-9]{1,2}$)\", \"\\\\1\", name) %>% strtoi(), is_edge = is_well_on_edge( well_number = well, plate_layout = 96, edges = \"right\" ) ) # 3.2 Pick the spectra after discarding (or soft masking) # the spectra indicated by the `is_edge` column. pick_spectra(clusters, metadata, \"OD600\", soft_mask_column = \"is_edge\" ) %>% dplyr::relocate(name, to_pick) # only for clarity #> # A tibble: 6 × 10 #> name to_pick membership cluster_size SNR peaks is_reference OD600 well #> #> 1 species1… FALSE 1 4 5.09 21 FALSE 0.364 2 #> 2 species2… TRUE 2 2 5.54 22 FALSE 0.772 11 #> 3 species2… FALSE 2 2 5.63 23 TRUE 0.735 12 #> 4 species3… TRUE 1 4 4.89 26 FALSE 0.973 7 #> 5 species3… FALSE 1 4 5.56 25 TRUE 0.740 8 #> 6 species3… FALSE 1 4 5.40 25 FALSE 0.201 9 #> # ℹ 1 more variable: is_edge # 4.1 Say that some spectra were picked before # (e.g., in the column F) in a previous experiment. # We do not want to pick clusters with those spectra # included to limit redundancy. metadata <- metadata %>% dplyr::mutate( picked_before = grepl(\"_F\", name) ) # 4.2 Pick the spectra from clusters without spectra # labeled as `picked_before` (hard masking). pick_spectra(clusters, metadata, \"OD600\", hard_mask_column = \"picked_before\" ) %>% dplyr::relocate(name, to_pick) # only for clarity #> # A tibble: 6 × 11 #> name to_pick membership cluster_size SNR peaks is_reference OD600 well #> #> 1 species1… FALSE 1 4 5.09 21 FALSE 0.364 2 #> 2 species2… TRUE 2 2 5.54 22 FALSE 0.772 11 #> 3 species2… FALSE 2 2 5.63 23 TRUE 0.735 12 #> 4 species3… FALSE 1 4 4.89 26 FALSE 0.973 7 #> 5 species3… FALSE 1 4 5.56 25 TRUE 0.740 8 #> 6 species3… FALSE 1 4 5.40 25 FALSE 0.201 9 #> # ℹ 2 more variables: is_edge , picked_before "},{"path":"https://clavellab.github.io/maldipickr/dev/reference/pipe.html","id":null,"dir":"Reference","previous_headings":"","what":"Pipe operator — %>%","title":"Pipe operator — %>%","text":"See magrittr::%>% details.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/pipe.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pipe operator — %>%","text":"","code":"lhs %>% rhs"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/pipe.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Pipe operator — %>%","text":"lhs value magrittr placeholder. rhs function call using magrittr semantics.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/pipe.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Pipe operator — %>%","text":"result calling rhs(lhs).","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/process_spectra.html","id":null,"dir":"Reference","previous_headings":"","what":"Process Bruker MALDI Biotyper spectra à la Strejcek et al. (2018) — process_spectra","title":"Process Bruker MALDI Biotyper spectra à la Strejcek et al. (2018) — process_spectra","text":"Process Bruker MALDI Biotyper spectra à la Strejcek et al. (2018)","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/process_spectra.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Process Bruker MALDI Biotyper spectra à la Strejcek et al. (2018) — process_spectra","text":"","code":"process_spectra( spectra_list, spectra_names = get_spectra_names(spectra_list), rds_prefix = deprecated() )"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/process_spectra.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Process Bruker MALDI Biotyper spectra à la Strejcek et al. (2018) — process_spectra","text":"spectra_list list MALDIquant::MassSpectrum objects. spectra_names tibble::tibble (data.frame) sanitized spectra names default get_spectra_names. provided manually, column sanitized_name used name spectra. rds_prefix Writing disk RDS longer supported. character indicating prefix .RDS output files written processed directory. default, prefix given thus files written.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/process_spectra.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Process Bruker MALDI Biotyper spectra à la Strejcek et al. (2018) — process_spectra","text":"named list three objects: spectra: list length spectra list MALDIquant::MassSpectrum objects. peaks: list length spectra list MALDIquant::MassPeaks objects. metadata: tibble indicating median signal--noise ratio (SNR) peaks number spectra list (peaks), spectra names name column.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/process_spectra.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Process Bruker MALDI Biotyper spectra à la Strejcek et al. (2018) — process_spectra","text":"Based original implementation, function performs following tasks: Square-root transformation Mass range trimming 4-10 kDa deemed determinant Strejcek et al. (2018) Signal smoothing using Savitzky-Golay method half window size 20 Baseline correction SNIP procedure Normalization Total Ion Current Peak detection using SuperSmoother procedure signal--noise ratio 3 Peak filtering. step added discard peaks negative signal--noise ratio probably due edge mass range.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/process_spectra.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Process Bruker MALDI Biotyper spectra à la Strejcek et al. (2018) — process_spectra","text":"original R code function based accessible : https://github.com/strejcem/MALDIvs16S","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/process_spectra.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Process Bruker MALDI Biotyper spectra à la Strejcek et al. (2018) — process_spectra","text":"Strejcek M, Smrhova T, Junkova P & Uhlik O (2018). “Whole-Cell MALDI-TOF MS versus 16S rRNA Gene Analysis Identification Dereplication Recurrent Bacterial Isolates.” Frontiers Microbiology 9 doi:10.3389/fmicb.2018.01294.","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/reference/process_spectra.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Process Bruker MALDI Biotyper spectra à la Strejcek et al. (2018) — process_spectra","text":"","code":"# Get an example directory of six Bruker MALDI Biotyper spectra directory_biotyper_spectra <- system.file( \"toy-species-spectra\", package = \"maldipickr\" ) # Import the six spectra spectra_list <- import_biotyper_spectra(directory_biotyper_spectra) # Transform the spectra signals according to Strejcek et al. (2018) processed <- process_spectra(spectra_list) # Overview of the list architecture that is returned # with the list of processed spectra, peaks identified and the # metadata table str(processed, max.level = 2) #> List of 3 #> $ spectra :List of 6 #> ..$ species1_G2 :Formal class 'MassSpectrum' [package \"MALDIquant\"] with 3 slots #> ..$ species2_E11:Formal class 'MassSpectrum' [package \"MALDIquant\"] with 3 slots #> ..$ species2_E12:Formal class 'MassSpectrum' [package \"MALDIquant\"] with 3 slots #> ..$ species3_F7 :Formal class 'MassSpectrum' [package \"MALDIquant\"] with 3 slots #> ..$ species3_F8 :Formal class 'MassSpectrum' [package \"MALDIquant\"] with 3 slots #> ..$ species3_F9 :Formal class 'MassSpectrum' [package \"MALDIquant\"] with 3 slots #> $ peaks :List of 6 #> ..$ species1_G2 :Formal class 'MassPeaks' [package \"MALDIquant\"] with 4 slots #> ..$ species2_E11:Formal class 'MassPeaks' [package \"MALDIquant\"] with 4 slots #> ..$ species2_E12:Formal class 'MassPeaks' [package \"MALDIquant\"] with 4 slots #> ..$ species3_F7 :Formal class 'MassPeaks' [package \"MALDIquant\"] with 4 slots #> ..$ species3_F8 :Formal class 'MassPeaks' [package \"MALDIquant\"] with 4 slots #> ..$ species3_F9 :Formal class 'MassPeaks' [package \"MALDIquant\"] with 4 slots #> $ metadata: tibble [6 × 3] (S3: tbl_df/tbl/data.frame) # A detailed view of the metadata with the median signal-to-noise # ratio (SNR) and the number of peaks processed$metadata #> # A tibble: 6 × 3 #> name SNR peaks #> #> 1 species1_G2 5.09 21 #> 2 species2_E11 5.54 22 #> 3 species2_E12 5.63 23 #> 4 species3_F7 4.89 26 #> 5 species3_F8 5.56 25 #> 6 species3_F9 5.40 25"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/read_biotyper_report.html","id":null,"dir":"Reference","previous_headings":"","what":"Importing Bruker MALDI Biotyper CSV report — read_biotyper_report","title":"Importing Bruker MALDI Biotyper CSV report — read_biotyper_report","text":"header-less table exported Compass software Bruker MALDI Biotyper device separated semi-colons empty columns prevent easy import R. function reads report correctly tibble.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/read_biotyper_report.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Importing Bruker MALDI Biotyper CSV report — read_biotyper_report","text":"","code":"read_biotyper_report(path, best_hits = TRUE, long_format = TRUE)"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/read_biotyper_report.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Importing Bruker MALDI Biotyper CSV report — read_biotyper_report","text":"path Path semi-colon separated table best_hits logical indicating whether return best hits target analyzed long_format logical indicating whether table long format (many rows) wide format (many columns) showing hits. option effect best_hits = TRUE.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/read_biotyper_report.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Importing Bruker MALDI Biotyper CSV report — read_biotyper_report","text":"tibble 7 columns (best_hits = TRUE) 52 columns (best_hits = FALSE). See Details description columns.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/read_biotyper_report.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Importing Bruker MALDI Biotyper CSV report — read_biotyper_report","text":"header-less table contains identification information target processed Biotyper device processed read_biotyper_report, following seven columns available tibble, using best_hits = TRUE option: name: character indicating name spot MALDI target (.e., plate) sample_name: character string provided preparation MALDI target (.e., plate) hit_rank: integer indicating rank hit corresponding target identification bruker_quality: character encoding quality identification potentially multiple \"+\" symbol one \"-\" bruker_species: species name associated MALDI spectrum analyzed. bruker_taxid: NCBI Taxonomy Identifier species name column species bruker_hash: hash undocumented checksum function probably encode database entry. bruker_log: log-score identification. hits returned (best_hits = FALSE), default output format long format (long_format = TRUE), meaning previous columns remain unchanged, hits now returned, thus increasing number rows. hits returned (best_hits = FALSE) using wide format (long_format = FALSE), two columns nameandsample_nameremains unchanged, five columns prefixed bybruker_` contain hit rank, creating tibble 52 columns: bruker_01_quality bruker_01_species bruker_01_taxid bruker_01_hash bruker_01_log bruker_02_quality ... bruker_10_species bruker_10_taxid bruker_10_hash bruker_10_log","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/read_biotyper_report.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Importing Bruker MALDI Biotyper CSV report — read_biotyper_report","text":"report contains spectra peaks found return tibble 0 rows warning message.","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/reference/read_biotyper_report.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Importing Bruker MALDI Biotyper CSV report — read_biotyper_report","text":"","code":"# Get a example Bruker report biotyper <- system.file(\"biotyper.csv\", package = \"maldipickr\") # Import the report as a tibble report_tibble <- read_biotyper_report(biotyper) # Display the tibble report_tibble #> # A tibble: 3 × 8 #> name sample_name hit_rank bruker_quality bruker_species bruker_taxid #> #> 1 targetA NA 1 - not reliable identif… NA #> 2 targetB NA 1 +++ Escherichia coli 562 #> 3 targetC NA 1 +++ Kosakonia cowanii 208223 #> # ℹ 2 more variables: bruker_hash , bruker_log "},{"path":"https://clavellab.github.io/maldipickr/dev/reference/read_many_biotyper_reports.html","id":null,"dir":"Reference","previous_headings":"","what":"Importing a list of Bruker MALDI Biotyper CSV reports — read_many_biotyper_reports","title":"Importing a list of Bruker MALDI Biotyper CSV reports — read_many_biotyper_reports","text":"Importing list Bruker MALDI Biotyper CSV reports","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/read_many_biotyper_reports.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Importing a list of Bruker MALDI Biotyper CSV reports — read_many_biotyper_reports","text":"","code":"read_many_biotyper_reports(path_to_reports, report_ids, best_hits = TRUE, ...)"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/read_many_biotyper_reports.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Importing a list of Bruker MALDI Biotyper CSV reports — read_many_biotyper_reports","text":"path_to_reports vector paths csv files imported read_biotyper_report(). report_ids vector character names reports. best_hits logical indicating whether return best hit read_biotyper_report() function. ... Name-value pairs passed dplyr::mutate()","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/read_many_biotyper_reports.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Importing a list of Bruker MALDI Biotyper CSV reports — read_many_biotyper_reports","text":"tibble just like one returned read_biotyper_report() function, except name spot MALDI target (.e., plate) registered original_name column (instead name column), column name consist provided report_ids used prefix original_name column.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/read_many_biotyper_reports.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Importing a list of Bruker MALDI Biotyper CSV reports — read_many_biotyper_reports","text":"report identifiers sanitized convert dashes (-) underscores (_).","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/reference/read_many_biotyper_reports.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Importing a list of Bruker MALDI Biotyper CSV reports — read_many_biotyper_reports","text":"","code":"# List of Bruker MALDI Biotyper reports reports_paths <- system.file( c(\"biotyper.csv\", \"biotyper.csv\", \"biotyper.csv\"), package = \"maldipickr\" ) # Read the list of reports and combine them in a single tibble read_many_biotyper_reports( reports_paths, report_ids = c(\"first\", \"second\", \"third\"), # Additional metadata below are passed to dplyr::mutate growth_temperature = 37.0 ) #> # A tibble: 9 × 10 #> name original_name sample_name hit_rank bruker_quality bruker_species #> #> 1 first_targetA targetA NA 1 - not reliable … #> 2 first_targetB targetB NA 1 +++ Escherichia c… #> 3 first_targetC targetC NA 1 +++ Kosakonia cow… #> 4 second_targe… targetA NA 1 - not reliable … #> 5 second_targe… targetB NA 1 +++ Escherichia c… #> 6 second_targe… targetC NA 1 +++ Kosakonia cow… #> 7 third_targetA targetA NA 1 - not reliable … #> 8 third_targetB targetB NA 1 +++ Escherichia c… #> 9 third_targetC targetC NA 1 +++ Kosakonia cow… #> # ℹ 4 more variables: bruker_taxid , bruker_hash , bruker_log , #> # growth_temperature "},{"path":"https://clavellab.github.io/maldipickr/dev/reference/remove_spectra.html","id":null,"dir":"Reference","previous_headings":"","what":"Remove (raw or processed) spectra — remove_spectra","title":"Remove (raw or processed) spectra — remove_spectra","text":"remove_spectra() function used discard specific spectra (1) raw spectra list removing , (2) processed spectra removing spectra, peaks metadata objects.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/remove_spectra.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Remove (raw or processed) spectra — remove_spectra","text":"","code":"remove_spectra(spectra_list, to_remove)"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/remove_spectra.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Remove (raw or processed) spectra — remove_spectra","text":"spectra_list list MALDIquant::MassSpectrum objects list processed spectra process_spectra to_remove spectra removed. case raw spectra: logical vector size spectra_list check_spectra function. case processed spectra: names spectra formatted get_spectra_names sanitized_name column.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/remove_spectra.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Remove (raw or processed) spectra — remove_spectra","text":"object spectra_list minus spectra to_remove.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/remove_spectra.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Remove (raw or processed) spectra — remove_spectra","text":"","code":"# Get an example directory of six Bruker MALDI Biotyper spectra directory_biotyper_spectra <- system.file( \"toy-species-spectra\", package = \"maldipickr\" ) # Import only the first two spectra spectra_list <- import_biotyper_spectra(directory_biotyper_spectra)[1:2] # Introduce artificially an empty raw spectra spectra_list <- c(spectra_list, MALDIquant::createMassSpectrum(0, 0)) # Empty spectra are detected by `check_spectra()` # and can be removed by `remove_spectra()` spectra_list %>% remove_spectra(to_remove = check_spectra(.)) #> Some spectra are incorrect (empty, outlier length or irregular). #> They can be removed using `remove_spectra()` #> [[1]] #> S4 class type : MassSpectrum #> Number of m/z values : 20882 #> Range of m/z values : 1962.222 - 20146.522 #> Range of intensity values: 2.4e+02 - 3.608e+04 #> Memory usage : 337.062 KiB #> Name : species1.G2 #> File : /home/runner/.cache/R/renv/library/maldipickr-8ce40efa/R-4.4/x86_64-pc-linux-gnu/maldipickr/toy-species-spectra/species1/0_G2/1/1SLin/fid #> #> [[2]] #> S4 class type : MassSpectrum #> Number of m/z values : 20882 #> Range of m/z values : 1962.222 - 20146.522 #> Range of intensity values: 1.82e+02 - 1.006e+04 #> Memory usage : 337.062 KiB #> Name : species2.E11 #> File : /home/runner/.cache/R/renv/library/maldipickr-8ce40efa/R-4.4/x86_64-pc-linux-gnu/maldipickr/toy-species-spectra/species2/0_E11/1/1SLin/fid #> # Get an example processed spectra processed_path <- system.file( \"three_processed_spectra_with_one_peakless.RDS\", package = \"maldipickr\") processed <- readRDS(processed_path) %>% list() # Remove a specific spectra remove_spectra(processed, \"empty_H12\") #> $spectra #> $spectra$species1_G2 #> S4 class type : MassSpectrum #> Number of m/z values : 7867 #> Range of m/z values : 4000.066 - 9999.46 #> Range of intensity values: 0e+00 - 2.181e-03 #> Memory usage : 133.625 KiB #> Name : species1.G2 #> File : /maldipickr/inst/toy-species-spectra/species1/0_G2/1/1SLin/fid #> #> $spectra$species2_E11 #> S4 class type : MassSpectrum #> Number of m/z values : 7867 #> Range of m/z values : 4000.066 - 9999.46 #> Range of intensity values: 0e+00 - 2.58e-03 #> Memory usage : 133.625 KiB #> Name : species2.E11 #> File : /maldipickr/inst/toy-species-spectra/species2/0_E11/1/1SLin/fid #> #> #> $peaks #> $peaks$species1_G2 #> S4 class type : MassPeaks #> Number of m/z values : 21 #> Range of m/z values : 4030.815 - 9989.171 #> Range of intensity values: 3.871e-04 - 2.181e-03 #> Range of snr values : 3.623 - 10.382 #> Memory usage : 11.352 KiB #> Name : species1.G2 #> File : /maldipickr/inst/toy-species-spectra/species1/0_G2/1/1SLin/fid #> #> $peaks$species2_E11 #> S4 class type : MassPeaks #> Number of m/z values : 22 #> Range of m/z values : 4031.408 - 9990.106 #> Range of intensity values: 2.034e-04 - 2.58e-03 #> Range of snr values : 3.14 - 11.027 #> Memory usage : 11.375 KiB #> Name : species2.E11 #> File : /maldipickr/inst/toy-species-spectra/species2/0_E11/1/1SLin/fid #> #> #> $metadata #> # A tibble: 2 × 3 #> name SNR peaks #> #> 1 species1_G2 5.09 21 #> 2 species2_E11 5.54 22 #>"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/set_reference_spectra.html","id":null,"dir":"Reference","previous_headings":"","what":"Set a reference spectrum for each cluster — set_reference_spectra","title":"Set a reference spectrum for each cluster — set_reference_spectra","text":"Define high-quality spectra representative spectra cluster based highest median signal--noise ratio number detected peaks","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/set_reference_spectra.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set a reference spectrum for each cluster — set_reference_spectra","text":"","code":"set_reference_spectra(cluster_df, metadata_df)"},{"path":"https://clavellab.github.io/maldipickr/dev/reference/set_reference_spectra.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set a reference spectrum for each cluster — set_reference_spectra","text":"cluster_df tibble n rows spectra produced delineate_with_similarity function least following columns: name: rownames similarity matrix indicating spectra names membership: integers stating cluster number spectra belong . starts 1 c, total number clusters. cluster_size: integers indicating total number spectra corresponding cluster. metadata_df tibble n rows spectra produced process_spectra function median signal--noise ratio (SNR), peaks number (peaks), spectra names name column.","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/reference/set_reference_spectra.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set a reference spectrum for each cluster — set_reference_spectra","text":"merged tibble order cluster_df columns cluster_df metadata_df, well logical column is_reference indicating spectrum reference spectra cluster.","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/reference/set_reference_spectra.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set a reference spectrum for each cluster — set_reference_spectra","text":"","code":"# Get an example directory of six Bruker MALDI Biotyper spectra # Import the six spectra and # Transform the spectra signals according to Strejcek et al. (2018) processed <- system.file( \"toy-species-spectra\", package = \"maldipickr\" ) %>% import_biotyper_spectra() %>% process_spectra() # Toy similarity matrix between the six example spectra of # three species. The cosine metric is used and a value of # zero indicates dissimilar spectra and a value of one # indicates identical spectra. cosine_similarity <- matrix( c( 1, 0.79, 0.77, 0.99, 0.98, 0.98, 0.79, 1, 0.98, 0.79, 0.8, 0.8, 0.77, 0.98, 1, 0.77, 0.77, 0.77, 0.99, 0.79, 0.77, 1, 1, 0.99, 0.98, 0.8, 0.77, 1, 1, 1, 0.98, 0.8, 0.77, 0.99, 1, 1 ), nrow = 6, dimnames = list( c( \"species1_G2\", \"species2_E11\", \"species2_E12\", \"species3_F7\", \"species3_F8\", \"species3_F9\" ), c( \"species1_G2\", \"species2_E11\", \"species2_E12\", \"species3_F7\", \"species3_F8\", \"species3_F9\" ) ) ) # Delineate clusters based on a 0.92 threshold applied # to the similarity matrix clusters <- delineate_with_similarity( cosine_similarity, threshold = 0.92 ) # Set reference spectra with the toy example set_reference_spectra(clusters, processed$metadata) #> # A tibble: 6 × 6 #> name membership cluster_size SNR peaks is_reference #> #> 1 species1_G2 1 4 5.09 21 FALSE #> 2 species2_E11 2 2 5.54 22 FALSE #> 3 species2_E12 2 2 5.63 23 TRUE #> 4 species3_F7 1 4 4.89 26 FALSE #> 5 species3_F8 1 4 5.56 25 TRUE #> 6 species3_F9 1 4 5.40 25 FALSE"},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"maldipickr-130","dir":"Changelog","previous_headings":"","what":"maldipickr 1.3.0","title":"maldipickr 1.3.0","text":"CRAN release: 2023-12-14","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"fixed-1-3-0","dir":"Changelog","previous_headings":"","what":"Fixed","title":"maldipickr 1.3.0","text":"Fix non-unique names possibility spectra processing (#37)","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"changed-1-3-0","dir":"Changelog","previous_headings":"","what":"Changed","title":"maldipickr 1.3.0","text":"Deprecate ability write RDS process_spectra() (#38) Deprecate ability read RDS merge_processed_spectra() Change warnings check_spectra() messages pointing use remove_spectra()","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"added-1-3-0","dir":"Changelog","previous_headings":"","what":"Added","title":"maldipickr 1.3.0","text":"Add get_spectra_names() extract, format spectra names warn non-uniqueness Add remove_spectra() better handle discarding raw processed spectra Add lifecycle better handle deprecation Add sections function reference list improve clarity website","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"maldipickr-120","dir":"Changelog","previous_headings":"","what":"maldipickr 1.2.0","title":"maldipickr 1.2.0","text":"CRAN release: 2023-10-25","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"changed-1-2-0","dir":"Changelog","previous_headings":"","what":"Changed","title":"maldipickr 1.2.0","text":"(BREAKING) Change homemade clustering robust hierarchical clustering delineate_with_similarity() (#32). default method hierarchical clustering complete linkage (also known farthest neighbor clustering) ensure within-group minimum similarity cluster respects threshold Change sapply() calls type-robust vapply() calls","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"added-1-2-0","dir":"Changelog","previous_headings":"","what":"Added","title":"maldipickr 1.2.0","text":"(BREAKING) Set minimum R version >= 3.2.0 (#31) Add hierarchical clustering linkage method argument delineate_with_similarity() Add tolerance argument check_spectra() allow flexible spectra length checks Add unit tests key functions: pick_spectra() (#26) merge_processed_spectra() (#27)","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"fixed-1-2-0","dir":"Changelog","previous_headings":"","what":"Fixed","title":"maldipickr 1.2.0","text":"Fix missing spectra names merging spectra lists peak-less spectra Fix coverage update issue adding codecov token (#34)","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"maldipickr-111","dir":"Changelog","previous_headings":"","what":"maldipickr 1.1.1","title":"maldipickr 1.1.1","text":"CRAN release: 2023-09-07","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"fixed-1-1-1","dir":"Changelog","previous_headings":"","what":"Fixed","title":"maldipickr 1.1.1","text":"Fix typos CRAN re-submission: missing brackets reference, spelling errors.","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"fixed-1-1-0","dir":"Changelog","previous_headings":"","what":"Fixed","title":"maldipickr 1.1.0","text":"(URGENT) Fix delineate_with_similarity() include friends--friends clusters removal igraph #18. Add relevant similarity matrix test accordingly.","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"changed-1-0-2","dir":"Changelog","previous_headings":"","what":"Changed","title":"maldipickr 1.0.2","text":"Fix invalid file URIs NEWS.md README.md","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"changed-1-0-1","dir":"Changelog","previous_headings":"","what":"Changed","title":"maldipickr 1.0.1","text":"Fix title title case CRAN","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"changed-1-0-0","dir":"Changelog","previous_headings":"","what":"Changed","title":"maldipickr 1.0.0","text":"(BREAKING) read_biotyper_report() first column now name instead spot, meaning read_many_biotyper_reports() renames name columns original_name. pick_spectra() easily usable taxonomy identification reports (38a614173fd21315a40e0823600a2082fa0935bb) Change similarity_to_clusters() delineate_with_similarity() Change identification_to_clusters() delineate_with_identification() Refactor delineate_with_similarity() clustering function (formerly: similarity_to_clusters()) without using igraph tidygraph R packages, fewer dependencies simpler codebase (#18) Update DESCRIPTION include Strejcek reference (#22) better highlight package added-value Refactor pkgdown website accessible font color schema inline logo color palette Change vignettes titles outline better structure documents Refactor cosine similarity computation example highlighting dedicated coop::tcosine() instead t() %>% coop::cosine()","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"added-1-0-0","dir":"Changelog","previous_headings":"","what":"Added","title":"maldipickr 1.0.0","text":"Add long wide output format read_biotyper_report() (#12) Document quickstart maldipickr package hurry (#15) Document precisely install tagged release maldipickr package Add better tests merge_processed_spectra() (b39c1313fd38239b4b1821a243c9debf467fd092) Document authors list according CRAN policy Add CRAN comments file track submission notes","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"removed-1-0-0","dir":"Changelog","previous_headings":"","what":"Removed","title":"maldipickr 1.0.0","text":"Deprecate CHANGELOG.md favor R specific NEWS.md (#20) Remove redundant check symbolic links creation (#19)","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"fixed-1-0-0","dir":"Changelog","previous_headings":"","what":"Fixed","title":"maldipickr 1.0.0","text":"Fix summarise() usage pick_spectra(), code simplification (#11) Remove symbolic links created importing acqu spectra files (#21) Fix CRAN warnings regarding qpdf (3b19dd36a6ec0f5dc277418c98977c526981b6e3) Fix masked relevant to_pick column vignette (#17)","code":""},{"path":[]},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"added-0-1-1","dir":"Changelog","previous_headings":"","what":"Added","title":"maldipickr 0.1.1","text":"Add citation file R (CITATION) GitHub CITATION.cff Add CHANGELOG.md (Common Changelog)","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"changed-0-1-1","dir":"Changelog","previous_headings":"","what":"Changed","title":"maldipickr 0.1.1","text":"Improve package description according CRAN recommendations","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"maldipickr-010","dir":"Changelog","previous_headings":"","what":"maldipickr 0.1.0","title":"maldipickr 0.1.0","text":"First stable version","code":""},{"path":"https://clavellab.github.io/maldipickr/dev/news/index.html","id":"maldipickr-0009000","dir":"Changelog","previous_headings":"","what":"maldipickr 0.0.0.9000","title":"maldipickr 0.0.0.9000","text":"Added NEWS.md file track changes package.","code":""}]