In this example, we’ll create two additional models made with CimpleG. One using only hypermethylated signatures, and the other using 3 CpGs per signature instead of just one.
+
set.seed ( 42 )
cimpleg_hyper <- CimpleG (
@@ -256,10 +288,10 @@ "fibroblasts"
)
)
-#> Training for target 'neurons' with 'CimpleG' has finished.: 0.407 sec elapsed
-#> Training for target 'glia' with 'CimpleG' has finished.: 0.55 sec elapsed
-#> Training for target 'blood_cells' with 'CimpleG' has finished.: 0.373 sec elapsed
-#> Training for target 'fibroblasts' with 'CimpleG' has finished.: 0.514 sec elapsed
+#> Training for target 'neurons' with 'CimpleG' has finished.: 0.342 sec elapsed
+#> Training for target 'glia' with 'CimpleG' has finished.: 0.304 sec elapsed
+#> Training for target 'blood_cells' with 'CimpleG' has finished.: 0.352 sec elapsed
+#> Training for target 'fibroblasts' with 'CimpleG' has finished.: 0.317 sec elapsed
deconv_hyper <- run_deconvolution (
cpg_obj = cimpleg_hyper ,
@@ -282,10 +314,10 @@ "fibroblasts"
)
)
-#> Training for target 'neurons' with 'CimpleG' has finished.: 0.611 sec elapsed
-#> Training for target 'glia' with 'CimpleG' has finished.: 0.614 sec elapsed
-#> Training for target 'blood_cells' with 'CimpleG' has finished.: 0.703 sec elapsed
-#> Training for target 'fibroblasts' with 'CimpleG' has finished.: 0.431 sec elapsed
+#> Training for target 'neurons' with 'CimpleG' has finished.: 0.471 sec elapsed
+#> Training for target 'glia' with 'CimpleG' has finished.: 0.39 sec elapsed
+#> Training for target 'blood_cells' with 'CimpleG' has finished.: 0.459 sec elapsed
+#> Training for target 'fibroblasts' with 'CimpleG' has finished.: 0.403 sec elapsed
deconv_3sigs <- run_deconvolution (
cpg_obj = cimpleg_3sigs ,
@@ -297,7 +329,7 @@
remember this is just an example, the results themselves are meaningless!
-
+
deconv_3sigs $ prop_3sigs <- deconv_3sigs $ proportion
deconv_hyper $ prop_hyper <- deconv_hyper $ proportion
deconv_result $ prop_cimpleg <- deconv_result $ proportion
@@ -317,7 +349,7 @@
first we can check how the true values compare against the predicted values
-
+
scatter_plts <- CimpleG ::: deconv_pred_obs_plot (
deconv_df = dummy_deconvolution_data ,
true_values_col = "true_vals" ,
@@ -328,12 +360,12 @@ scatter_panel <- scatter_plts |> patchwork :: wrap_plots ( ncol= 1 )
print ( scatter_panel )
-
+
now, more interestingly, we can see in detail and rank one of the measures used to evaluate the deconvolution results
-
+
rank_plts <- CimpleG ::: deconv_ranking_plot (
deconv_df = dummy_deconvolution_data ,
true_values_col = "true_vals" ,
@@ -345,7 +377,7 @@ rank_panel <- list ( rank_plts $ perf_boxplt [[ 1 ] ] ,rank_plts $ nemenyi_plt [[ 1 ] ] ) |> patchwork :: wrap_plots ( )
print ( rank_panel )
-
+
diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml
index 5b5e8c9..f153026 100644
--- a/docs/pkgdown.yml
+++ b/docs/pkgdown.yml
@@ -4,7 +4,7 @@ pkgdown_sha: ~
articles:
generate-signatures: generate-signatures.html
save_load_objects: save_load_objects.html
-last_built: 2023-12-13T11:14Z
+last_built: 2023-12-13T12:20Z
urls:
reference: https://costalab.github.io/CimpleG/reference
article: https://costalab.github.io/CimpleG/articles
diff --git a/docs/reference/figures/README-deconv_bar_plt-1.png b/docs/reference/figures/README-deconv_bar_plt-1.png
new file mode 100644
index 0000000..52ef320
Binary files /dev/null and b/docs/reference/figures/README-deconv_bar_plt-1.png differ
diff --git a/docs/reference/figures/README-deconv_pred_obs_plt-1.png b/docs/reference/figures/README-deconv_pred_obs_plt-1.png
new file mode 100644
index 0000000..36086a5
Binary files /dev/null and b/docs/reference/figures/README-deconv_pred_obs_plt-1.png differ
diff --git a/docs/reference/figures/README-deconv_rank_plt-1.png b/docs/reference/figures/README-deconv_rank_plt-1.png
new file mode 100644
index 0000000..9038867
Binary files /dev/null and b/docs/reference/figures/README-deconv_rank_plt-1.png differ
diff --git a/docs/reference/figures/README-dmsv_plots-1.png b/docs/reference/figures/README-dmsv_plots-1.png
new file mode 100644
index 0000000..56b6ffb
Binary files /dev/null and b/docs/reference/figures/README-dmsv_plots-1.png differ
diff --git a/docs/reference/figures/README-hl_feats_plt-1.png b/docs/reference/figures/README-hl_feats_plt-1.png
new file mode 100644
index 0000000..671e39c
Binary files /dev/null and b/docs/reference/figures/README-hl_feats_plt-1.png differ
diff --git a/docs/reference/figures/README-label_feats-1.png b/docs/reference/figures/README-label_feats-1.png
new file mode 100644
index 0000000..921e9bf
Binary files /dev/null and b/docs/reference/figures/README-label_feats-1.png differ
diff --git a/docs/reference/figures/README-plot_sigs-1.png b/docs/reference/figures/README-plot_sigs-1.png
new file mode 100644
index 0000000..f039bca
Binary files /dev/null and b/docs/reference/figures/README-plot_sigs-1.png differ
diff --git a/docs/reference/figures/README-unnamed-chunk-13-1.png b/docs/reference/figures/README-unnamed-chunk-13-1.png
index 9038867..36086a5 100644
Binary files a/docs/reference/figures/README-unnamed-chunk-13-1.png and b/docs/reference/figures/README-unnamed-chunk-13-1.png differ
diff --git a/docs/reference/figures/README-unnamed-chunk-6-1.png b/docs/reference/figures/README-unnamed-chunk-6-1.png
index 56b6ffb..f039bca 100644
Binary files a/docs/reference/figures/README-unnamed-chunk-6-1.png and b/docs/reference/figures/README-unnamed-chunk-6-1.png differ
diff --git a/docs/reference/figures/README-unnamed-chunk-7-1.png b/docs/reference/figures/README-unnamed-chunk-7-1.png
index 671e39c..56b6ffb 100644
Binary files a/docs/reference/figures/README-unnamed-chunk-7-1.png and b/docs/reference/figures/README-unnamed-chunk-7-1.png differ
diff --git a/docs/reference/figures/README-unnamed-chunk-8-1.png b/docs/reference/figures/README-unnamed-chunk-8-1.png
index 921e9bf..671e39c 100644
Binary files a/docs/reference/figures/README-unnamed-chunk-8-1.png and b/docs/reference/figures/README-unnamed-chunk-8-1.png differ
diff --git a/docs/reference/figures/README-unnamed-chunk-9-1.png b/docs/reference/figures/README-unnamed-chunk-9-1.png
index 52ef320..921e9bf 100644
Binary files a/docs/reference/figures/README-unnamed-chunk-9-1.png and b/docs/reference/figures/README-unnamed-chunk-9-1.png differ
diff --git a/docs/reference/index.html b/docs/reference/index.html
index 51cd4cf..3a1b64a 100644
--- a/docs/reference/index.html
+++ b/docs/reference/index.html
@@ -10,7 +10,7 @@
CimpleG
- 0.0.5.9024
+ 0.0.5.9028
diff --git a/docs/search.json b/docs/search.json
index a233788..5f66c36 100644
--- a/docs/search.json
+++ b/docs/search.json
@@ -1 +1 @@
-[{"path":"https://costalab.github.io/CimpleG/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://costalab.github.io/CimpleG/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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/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":"https://costalab.github.io/CimpleG/articles/generate-signatures.html","id":"cimpleg-simple-cpg-signatures","dir":"Articles","previous_headings":"","what":"CimpleG (Simple CpG signatures)","title":"Generate signatures","text":"CimpleG tries find CpGs best classify cell-type given train dataset also enables perform cell-type deconvolution couple easy steps can use beta M values show easy generate signatures","code":""},{"path":"https://costalab.github.io/CimpleG/articles/generate-signatures.html","id":"installation","dir":"Articles","previous_headings":"CimpleG (Simple CpG signatures)","what":"Installation","title":"Generate signatures","text":"haven’t installed CimpleG, can find instructions . However simple :","code":"if(!require(\"CimpleG\")) devtools::install_github(\"costalab/CimpleG\")"},{"path":"https://costalab.github.io/CimpleG/articles/generate-signatures.html","id":"loading-package","dir":"Articles","previous_headings":"CimpleG (Simple CpG signatures)","what":"Loading package","title":"Generate signatures","text":"load CimpleG package.","code":"library(\"CimpleG\") #> -------------------------- #> CimpleG version 0.0.5.9001 #> --------------------------"},{"path":"https://costalab.github.io/CimpleG/articles/generate-signatures.html","id":"loading-data","dir":"Articles","previous_headings":"CimpleG (Simple CpG signatures)","what":"Loading data","title":"Generate signatures","text":"tutorial, use small dataset just 409 samples 1000 CpGs. also use table metadata regarding samples. dataset comes included CimpleG. can read .","code":"# load data data(train_data) data(train_targets)"},{"path":"https://costalab.github.io/CimpleG/articles/generate-signatures.html","id":"running-cimpleg","dir":"Articles","previous_headings":"CimpleG (Simple CpG signatures)","what":"Running CimpleG","title":"Generate signatures","text":"Running CimpleG can quite simple. just need run CimpleG function parameters. generating signatures find leukocytes hepatocytes.","code":"# run CimpleG cimpleg_result <- CimpleG( train_data, train_targets, target_columns = c(\"blood_cells\",\"hepatocytes\"), train_only = TRUE ) #> Training for target 'blood_cells' with 'CimpleG' has finished.: 2.655 sec elapsed #> Training for target 'hepatocytes' with 'CimpleG' has finished.: 0.482 sec elapsed"},{"path":"https://costalab.github.io/CimpleG/articles/generate-signatures.html","id":"plotting-cimpleg-cpg-signature","dir":"Articles","previous_headings":"CimpleG (Simple CpG signatures)","what":"Plotting CimpleG CpG signature","title":"Generate signatures","text":"can quickly visualize signature able separate data.","code":"signature_plot( cimpleg_result, train_data, train_targets, sample_id_column = \"gsm\", true_label_column = \"cell_type\" ) #> $data #> # A tibble: 818 × 5 #> # Groups: sig_set [2] #> sample_id true_label signatures value sig_set #> #> 1 GSM1415516 adipocytes cg04785083 0.922 blood_cells #> 2 GSM1415516 adipocytes cg02258444 0.938 hepatocytes #> 3 GSM1415518 adipocytes cg04785083 0.932 blood_cells #> 4 GSM1415518 adipocytes cg02258444 0.912 hepatocytes #> 5 GSM1415520 adipocytes cg04785083 0.923 blood_cells #> 6 GSM1415520 adipocytes cg02258444 0.907 hepatocytes #> 7 GSM1415522 adipocytes cg04785083 0.936 blood_cells #> 8 GSM1415522 adipocytes cg02258444 0.908 hepatocytes #> 9 GSM1415526 adipocytes cg04785083 0.938 blood_cells #> 10 GSM1415526 adipocytes cg02258444 0.905 hepatocytes #> # ℹ 808 more rows #> #> $plot"},{"path":"https://costalab.github.io/CimpleG/articles/save_load_objects.html","id":"cimpleg-to-save-and-load-large-files-in-r","dir":"Articles","previous_headings":"","what":"CimpleG to save and load large files in R","title":"Quickly save and load (large) objects","text":"CimpleG comes couple neat functions save load objects using state art data compression algorithms ‘zstd’ ‘lz4’. allows much quickly save load R objects (.rds) files. Furthermore can also use functions load .rds files.","code":""},{"path":"https://costalab.github.io/CimpleG/articles/save_load_objects.html","id":"loading-the-package","dir":"Articles","previous_headings":"CimpleG to save and load large files in R","what":"Loading the package","title":"Quickly save and load (large) objects","text":"load CimpleG package.","code":"library(\"CimpleG\") #> -------------------------- #> CimpleG version 0.0.5.9003 #> --------------------------"},{"path":"https://costalab.github.io/CimpleG/articles/save_load_objects.html","id":"saving-an-object","dir":"Articles","previous_headings":"CimpleG to save and load large files in R","what":"Saving an object","title":"Quickly save and load (large) objects","text":"default use ‘zstd’ algorithm can choose different one. process pretty seamless. Let’s create large matrix save using CimpleG.","code":"my_matrix <- matrix(rnorm(100), nrow = 10, ncol = 10) save_object(my_matrix, \"my_matrix.rds\")"},{"path":"https://costalab.github.io/CimpleG/articles/save_load_objects.html","id":"loading-an-object","dir":"Articles","previous_headings":"CimpleG to save and load large files in R","what":"Loading an object","title":"Quickly save and load (large) objects","text":"load object process just seamless. need specify compression algorithm used. just work! larger file greater advantage using functions.","code":"my_loaded_matrix <- load_object(\"my_matrix.rds\") my_loaded_matrix"},{"path":"https://costalab.github.io/CimpleG/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Tiago F.V. Maié. Author, maintainer.","code":""},{"path":"https://costalab.github.io/CimpleG/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"F.V. Maié T (2023). CimpleG: CimpleG - Individual/Single CpG sites Classification Deconvolution. R package version 0.0.5.9024, https://costalab.github.io/CimpleG/, https://github.com/CostaLab/CimpleG.","code":"@Manual{, title = {CimpleG: CimpleG - Individual/Single CpG sites For Classification and Deconvolution}, author = {Tiago {F.V. Maié}}, year = {2023}, note = {R package version 0.0.5.9024, https://costalab.github.io/CimpleG/}, url = {https://github.com/CostaLab/CimpleG}, }"},{"path":[]},{"path":"https://costalab.github.io/CimpleG/index.html","id":"overview","dir":"","previous_headings":"","what":"Overview","title":"CimpleG - Individual/Single CpG sites For Classification and\n Deconvolution","text":"CimpleG, R package find (small) CpG signatures.","code":""},{"path":"https://costalab.github.io/CimpleG/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"CimpleG - Individual/Single CpG sites For Classification and\n Deconvolution","text":"","code":"# Install directly from github: devtools::install_github(\"costalab/CimpleG\") # Alternatively, downloading from our release page and installing it from a local source: # - ie navigating through your system install.packages(file.choose(), repos = NULL, type = \"source\") # - ie given a path to a local source install.packages(\"~/Downloads/CimpleG_0.0.5.XXXX.tar.gz\", repos = NULL, type = \"source\") # or devtools::install_local(\"~/Downloads/CimpleG_0.0.5.XXXX.tar.gz\")"},{"path":"https://costalab.github.io/CimpleG/index.html","id":"getting-started","dir":"","previous_headings":"","what":"Getting started","title":"CimpleG - Individual/Single CpG sites For Classification and\n Deconvolution","text":"","code":"library(\"CimpleG\") data(train_data) data(train_targets) data(test_data) data(test_targets) # check the train_targets table to see # what other columns can be used as targets # colnames(train_targets) # mini example with just 4 target signatures set.seed(42) cimpleg_result <- CimpleG( train_data = train_data, train_targets = train_targets, test_data = test_data, test_targets = test_targets, method = \"CimpleG\", target_columns = c( \"neurons\", \"glia\", \"blood_cells\", \"fibroblasts\" ) ) cimpleg_result$results # check generated signatures cimpleg_result$signatures #> neurons glia blood_cells fibroblasts #> \"cg24548498\" \"cg14501977\" \"cg04785083\" \"cg03369247\""},{"path":"https://costalab.github.io/CimpleG/index.html","id":"plot-generated-signatures","dir":"","previous_headings":"Getting started","what":"Plot generated signatures","title":"CimpleG - Individual/Single CpG sites For Classification and\n Deconvolution","text":"","code":"# adjust target names to match signature names # check generated signatures plt <- signature_plot( cimpleg_result, train_data, train_targets, sample_id_column = \"gsm\", true_label_column = \"cell_type\" ) print(plt$plot)"},{"path":[]},{"path":"https://costalab.github.io/CimpleG/index.html","id":"basic-plot","dir":"","previous_headings":"Difference of means vs Sum of variances (dmsv) plots","what":"basic plot","title":"CimpleG - Individual/Single CpG sites For Classification and\n Deconvolution","text":"","code":"plt <- diffmeans_sumvariance_plot( data = train_data, target_vector = train_targets$neurons == 1 ) print(plt)"},{"path":"https://costalab.github.io/CimpleG/index.html","id":"adding-color-highlighting-selected-features","dir":"","previous_headings":"Difference of means vs Sum of variances (dmsv) plots","what":"adding color, highlighting selected features","title":"CimpleG - Individual/Single CpG sites For Classification and\n Deconvolution","text":"","code":"df_dmeansvar <- compute_diffmeans_sumvar( data = train_data, target_vector = train_targets$neurons == 1 ) parab_param <- .7 df_dmeansvar$is_selected <- select_features( x = df_dmeansvar$diff_means, y = df_dmeansvar$sum_variance, a = parab_param ) plt <- diffmeans_sumvariance_plot( data = df_dmeansvar, label_var1 = \"Neurons\", color_all_points = \"purple\", threshold_func = function(x, a) (a * x) ^ 2, is_feature_selected_col = \"is_selected\", func_factor = parab_param ) print(plt)"},{"path":"https://costalab.github.io/CimpleG/index.html","id":"labeling-specific-features","dir":"","previous_headings":"Difference of means vs Sum of variances (dmsv) plots","what":"labeling specific features","title":"CimpleG - Individual/Single CpG sites For Classification and\n Deconvolution","text":"","code":"plt <- diffmeans_sumvariance_plot( data = df_dmeansvar, feats_to_highlight = cimpleg_result$signatures ) print(plt)"},{"path":[]},{"path":"https://costalab.github.io/CimpleG/index.html","id":"mini-example-with-just-4-signatures","dir":"","previous_headings":"Deconvolution plots","what":"mini example with just 4 signatures","title":"CimpleG - Individual/Single CpG sites For Classification and\n Deconvolution","text":"","code":"deconv_result <- run_deconvolution( cpg_obj = cimpleg_result, new_data = test_data ) plt <- deconvolution_barplot( deconvoluted_data = deconv_result, meta_data = test_targets, sample_id = \"gsm\", true_label = \"cell_type\" ) print(plt$plot)"},{"path":[]},{"path":"https://costalab.github.io/CimpleG/index.html","id":"first-lets-create-additional-deconvolution-results-so-that-we-can-compare-them","dir":"","previous_headings":"Deconvolution plots > this example is a little more advanced","what":"first lets create additional deconvolution results so that we can compare them","title":"CimpleG - Individual/Single CpG sites For Classification and\n Deconvolution","text":"example, ’ll create two additional models made CimpleG. One using hypermethylated signatures, using 3 CpGs per signature instead just one.","code":"set.seed(42) cimpleg_hyper <- CimpleG( train_data = train_data, train_targets = train_targets, test_data = test_data, test_targets = test_targets, method = \"CimpleG\", pred_type = \"hyper\", target_columns = c( \"neurons\", \"glia\", \"blood_cells\", \"fibroblasts\" ) ) #> Training for target 'neurons' with 'CimpleG' has finished.: 0.407 sec elapsed #> Training for target 'glia' with 'CimpleG' has finished.: 0.55 sec elapsed #> Training for target 'blood_cells' with 'CimpleG' has finished.: 0.373 sec elapsed #> Training for target 'fibroblasts' with 'CimpleG' has finished.: 0.514 sec elapsed deconv_hyper <- run_deconvolution( cpg_obj = cimpleg_hyper, new_data = test_data ) set.seed(42) cimpleg_3sigs <- CimpleG( train_data = train_data, train_targets = train_targets, test_data = test_data, test_targets = test_targets, method = \"CimpleG\", n_sigs = 3, target_columns = c( \"neurons\", \"glia\", \"blood_cells\", \"fibroblasts\" ) ) #> Training for target 'neurons' with 'CimpleG' has finished.: 0.611 sec elapsed #> Training for target 'glia' with 'CimpleG' has finished.: 0.614 sec elapsed #> Training for target 'blood_cells' with 'CimpleG' has finished.: 0.703 sec elapsed #> Training for target 'fibroblasts' with 'CimpleG' has finished.: 0.431 sec elapsed deconv_3sigs <- run_deconvolution( cpg_obj = cimpleg_3sigs, new_data = test_data )"},{"path":[]},{"path":"https://costalab.github.io/CimpleG/index.html","id":"remember-this-is-just-an-example-the-results-themselves-are-meaningless","dir":"","previous_headings":"Deconvolution plots > this example is a little more advanced","what":"remember this is just an example, the results themselves are meaningless!","title":"CimpleG - Individual/Single CpG sites For Classification and\n Deconvolution","text":"","code":"deconv_3sigs$prop_3sigs <- deconv_3sigs$proportion deconv_hyper$prop_hyper <- deconv_hyper$proportion deconv_result$prop_cimpleg <- deconv_result$proportion dummy_deconvolution_data <- deconv_result |> dplyr::mutate(true_vals = proportion + runif(nrow(deconv_result), min=-0.1,max=0.1)) |> dplyr::select(cell_type,sample_id,prop_cimpleg,true_vals) |> dplyr::left_join(deconv_hyper |> dplyr::select(-proportion), by=c(\"sample_id\",\"cell_type\")) |> dplyr::left_join(deconv_3sigs |> dplyr::select(-proportion), by=c(\"sample_id\",\"cell_type\")) |> dplyr::mutate_if(is.numeric, function(x){ifelse(x<0,0,x)}) |> dplyr::mutate_if(is.numeric, function(x){ifelse(x>1,1,x)}) |> tibble::as_tibble()"},{"path":[]},{"path":"https://costalab.github.io/CimpleG/index.html","id":"first-we-can-check-how-the-true-values-compare-against-the-predicted-values","dir":"","previous_headings":"Deconvolution plots > this example is a little more advanced","what":"first we can check how the true values compare against the predicted values","title":"CimpleG - Individual/Single CpG sites For Classification and\n Deconvolution","text":"","code":"scatter_plts <- CimpleG:::deconv_pred_obs_plot( deconv_df = dummy_deconvolution_data, true_values_col = \"true_vals\", predicted_cols = c(\"prop_cimpleg\",\"prop_hyper\",\"prop_3sigs\"), sample_id_col = \"sample_id\", group_col= \"cell_type\" ) scatter_panel <- scatter_plts |> patchwork::wrap_plots(ncol=1) print(scatter_panel)"},{"path":"https://costalab.github.io/CimpleG/index.html","id":"now-more-interestingly-we-can-see-in-detail-and-rank-one-of-the-measures-used-to-evaluate-the-deconvolution-results","dir":"","previous_headings":"Deconvolution plots > this example is a little more advanced","what":"now, more interestingly, we can see in detail and rank one of the measures used to evaluate the deconvolution results","title":"CimpleG - Individual/Single CpG sites For Classification and\n Deconvolution","text":"","code":"rank_plts <- CimpleG:::deconv_ranking_plot( deconv_df = dummy_deconvolution_data, true_values_col = \"true_vals\", predicted_cols = c(\"prop_cimpleg\",\"prop_hyper\",\"prop_3sigs\"), sample_id_col = \"sample_id\", group_col= \"cell_type\", metrics = \"rmse\" ) rank_panel <- list(rank_plts$perf_boxplt[[1]],rank_plts$nemenyi_plt[[1]]) |> patchwork::wrap_plots() print(rank_panel)"},{"path":"https://costalab.github.io/CimpleG/reference/CimpleG-package.html","id":null,"dir":"Reference","previous_headings":"","what":"CimpleG: CimpleG - Individual/Single CpG sites For Classification and Deconvolution — CimpleG-package","title":"CimpleG: CimpleG - Individual/Single CpG sites For Classification and Deconvolution — CimpleG-package","text":"CimpleG simple package find single-CpG based signatures use classification deconvolution.","code":""},{"path":[]},{"path":"https://costalab.github.io/CimpleG/reference/CimpleG-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"CimpleG: CimpleG - Individual/Single CpG sites For Classification and Deconvolution — CimpleG-package","text":"Maintainer: Tiago F.V. Maié tiagomaie@hotmail.com","code":""},{"path":"https://costalab.github.io/CimpleG/reference/CimpleG.html","id":null,"dir":"Reference","previous_headings":"","what":"Find simple CpG (CimpleG) signatures. — CimpleG","title":"Find simple CpG (CimpleG) signatures. — CimpleG","text":"Train classification model using (CpGs) features given target data.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/CimpleG.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find simple CpG (CimpleG) signatures. — CimpleG","text":"","code":"CimpleG( train_data, train_targets = NULL, target_columns = NULL, test_data = NULL, test_targets = NULL, method = c(\"CimpleG\", \"CimpleG_parab\", \"brute_force\", \"logistic_reg\", \"decision_tree\", \"boost_tree\", \"mlp\", \"rand_forest\"), pred_type = c(\"both\", \"hypo\", \"hyper\"), engine = c(\"glmnet\", \"xgboost\", \"nnet\", \"ranger\"), rank_method = c(\"ac_rank\", \"a_rank\", \"c_rank\"), k_folds = 10, grid_n = 10, param_p = 2, n_sigs = 1, quantile_threshold = 0.005, train_only = FALSE, split_data = FALSE, run_parallel = FALSE, deconvolution_reference = TRUE, save_dir = NULL, save_format = c(\"zstd\", \"lz4\", \"gzip\", \"bzip2\", \"xz\", \"nocomp\"), verbose = 1, targets = NULL ) cimpleg( train_data, train_targets = NULL, target_columns = NULL, test_data = NULL, test_targets = NULL, method = c(\"CimpleG\", \"CimpleG_parab\", \"brute_force\", \"logistic_reg\", \"decision_tree\", \"boost_tree\", \"mlp\", \"rand_forest\"), pred_type = c(\"both\", \"hypo\", \"hyper\"), engine = c(\"glmnet\", \"xgboost\", \"nnet\", \"ranger\"), rank_method = c(\"ac_rank\", \"a_rank\", \"c_rank\"), k_folds = 10, grid_n = 10, param_p = 2, n_sigs = 1, quantile_threshold = 0.005, train_only = FALSE, split_data = FALSE, run_parallel = FALSE, deconvolution_reference = TRUE, save_dir = NULL, save_format = c(\"zstd\", \"lz4\", \"gzip\", \"bzip2\", \"xz\", \"nocomp\"), verbose = 1, targets = NULL ) cpg( train_data, train_targets = NULL, target_columns = NULL, test_data = NULL, test_targets = NULL, method = c(\"CimpleG\", \"CimpleG_parab\", \"brute_force\", \"logistic_reg\", \"decision_tree\", \"boost_tree\", \"mlp\", \"rand_forest\"), pred_type = c(\"both\", \"hypo\", \"hyper\"), engine = c(\"glmnet\", \"xgboost\", \"nnet\", \"ranger\"), rank_method = c(\"ac_rank\", \"a_rank\", \"c_rank\"), k_folds = 10, grid_n = 10, param_p = 2, n_sigs = 1, quantile_threshold = 0.005, train_only = FALSE, split_data = FALSE, run_parallel = FALSE, deconvolution_reference = TRUE, save_dir = NULL, save_format = c(\"zstd\", \"lz4\", \"gzip\", \"bzip2\", \"xz\", \"nocomp\"), verbose = 1, targets = NULL )"},{"path":"https://costalab.github.io/CimpleG/reference/CimpleG.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find simple CpG (CimpleG) signatures. — CimpleG","text":"train_data Training dataset. matrix (s x f) methylation data (Beta values) used train/find predictors. Samples (s) must rows features/CpGs (f) must columns. train_targets data frame training target samples one-hot encoded. data frame least 1 column, many rows order `train_data`. Target columns need one-hot encoded, meaning , column target samples encoded `1` every sample encoded `0`. target_columns string specifying name column `train_targets` used training. Can character vector several columns `train_targets` used training. argument character vector, CimpleG search best predictors target sequentially parallel depending value `run_parallel` test_data Testing dataset. matrix (s x f) methylation data (Beta values) used test performance found predictors. Samples (s) must rows features/CpGs (f) must columns. `test_data` ** `test_targets` NULL, CimpleG generate stratified test dataset based `train_targets` removing 25 samples `train_data` `train_targets`. test_targets data frame testing target samples one-hot encoded. data frame least 1 column, many rows order `test_data`. Target columns need one-hot encoded, meaning , column target samples encoded `1` every sample encoded `0`. `test_data` ** `test_targets` NULL, CimpleG generate stratified test dataset based `train_targets` removing 25 samples `train_data` `train_targets`. method string specifying method type machine learning model/algorithm used training. divided two main groups. * simple models (classifiers use single feature), `CimpleG` (default), `brute_force`, `CimpleG_unscaled` `oner`; * complex models (classifiers use several features), `logistic_reg`, `decision_tree`, `boost_tree`, `mlp` `rand_forest`. pred_type string specifying type predictor/CpG searched training. used simple models. One `` (default), `hypo` `hyper`. `hypo`, hypomethylated predictors considered. `hyper`, hypermethylated predictors considered. engine string specifying machine learning engine behind `method`. used complex models. Currently use. rank_method string specifying ranking strategy rank features training. k_folds integer specifying number folds (K) used training stratified K-fold cross-validation procedure. grid_n integer specifying number hyperparameter combinations train . param_p even number `sigma / (delta^param_p)`. Tunes much weight given delta feature selection. Default 2. n_sigs Number signatures saved classification used deconvolution. Default 1. quantile_threshold number 0 1. Determines many features kept. Default 0.005. train_only boolean, TRUE, CimpleG train (find predictors) test test dataset. split_data boolean, `TRUE`, subset train data provided, creating smaller test set used test models training. parameter experimental. Default `FALSE`. run_parallel boolean, `FALSE`, default, search predictors multiple targets sequentially. `TRUE` search predictors multiple targets time (parallel processing) order save computational time. need set `future::plan()` running function. deconvolution_reference boolean, `TRUE`, create deconvolution reference matrix based training data. can later used perform deconvolution. Default `FALSE`. save_dir defined save resulting model given directory. Default NULL. save_format used save_dir NULL. One \"zstd\", \"lz4\", \"gzip\", \"bzip2\",\"xz\", \"nocomp\". zstd best option, fast compression loading times, low space usage. verbose verbose want CimpleG running. 0, message displayed, 3 every message displayed. Default 1. targets DEPRECATED use `target_columns`.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/CimpleG.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find simple CpG (CimpleG) signatures. — CimpleG","text":"CimpleG object results per target class.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/CimpleG.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find simple CpG (CimpleG) signatures. — CimpleG","text":"","code":"library(\"CimpleG\") # read data data(train_data) data(train_targets) data(test_data) data(test_targets) # run CimpleG cimpleg_result <- CimpleG( train_data = train_data, train_targets = train_targets, test_data = test_data, test_targets = test_targets, method = \"CimpleG\", target_columns = c(\"glia\",\"neurons\") ) #> Training for target 'glia' with 'CimpleG' has finished.: 2.464 sec elapsed #> Training for target 'neurons' with 'CimpleG' has finished.: 0.705 sec elapsed # check signatures cimpleg_result$signatures #> glia neurons #> \"cg14501977\" \"cg24548498\""},{"path":"https://costalab.github.io/CimpleG/reference/compute_ax.html","id":null,"dir":"Reference","previous_headings":"","what":"Feature selection function used in the sigma delta space — compute_ax","title":"Feature selection function used in the sigma delta space — compute_ax","text":"Feature selection function used sigma delta space","code":""},{"path":"https://costalab.github.io/CimpleG/reference/compute_ax.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Feature selection function used in the sigma delta space — compute_ax","text":"","code":"compute_ax(dm, sv, p)"},{"path":"https://costalab.github.io/CimpleG/reference/compute_ax.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Feature selection function used in the sigma delta space — compute_ax","text":"dm, delta (difference mean values) sv, sigma (sum variance values) p, even number, greater 'p' importance given sigma","code":""},{"path":"https://costalab.github.io/CimpleG/reference/compute_diffmeans_sumvar.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute diff mean sum var dataframe — compute_diffmeans_sumvar","title":"Compute diff mean sum var dataframe — compute_diffmeans_sumvar","text":"Compute diff mean sum var dataframe","code":""},{"path":"https://costalab.github.io/CimpleG/reference/compute_diffmeans_sumvar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute diff mean sum var dataframe — compute_diffmeans_sumvar","text":"","code":"compute_diffmeans_sumvar(data, target_vector)"},{"path":"https://costalab.github.io/CimpleG/reference/compute_diffmeans_sumvar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute diff mean sum var dataframe — compute_diffmeans_sumvar","text":"data Matrix beta values used compute diffmeans sumvar data frame target_vector boolean vector defining samples data part target class","code":""},{"path":"https://costalab.github.io/CimpleG/reference/darken.html","id":null,"dir":"Reference","previous_headings":"","what":"Helper function to darken down a given color. — darken","title":"Helper function to darken down a given color. — darken","text":"Helper function darken given color.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/darken.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper function to darken down a given color. — darken","text":"","code":"darken(color, factor = 0.5)"},{"path":"https://costalab.github.io/CimpleG/reference/darken.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper function to darken down a given color. — darken","text":"color Color name hex code color factor Multiplicative factor `color` darkened ","code":""},{"path":"https://costalab.github.io/CimpleG/reference/deconv_pred_obs_plot.html","id":null,"dir":"Reference","previous_headings":"","what":"Scatter plots of observed (true) vs predicted values for deconvolution. — deconv_pred_obs_plot","title":"Scatter plots of observed (true) vs predicted values for deconvolution. — deconv_pred_obs_plot","text":"Produces one plot panel per number methods predictions. plot panel one plot per cell type.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/deconv_pred_obs_plot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scatter plots of observed (true) vs predicted values for deconvolution. — deconv_pred_obs_plot","text":"","code":"deconv_pred_obs_plot( deconv_df, true_values_col, predicted_cols, sample_id_col, group_col, axis_lims = list(x = c(0, 1), y = c(0, 1)) )"},{"path":"https://costalab.github.io/CimpleG/reference/deconv_pred_obs_plot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scatter plots of observed (true) vs predicted values for deconvolution. — deconv_pred_obs_plot","text":"deconv_df data.frame meta.data, true values predictions different methods columns. row prediction given sample given group/cell type. true_values_col string name column true values `deconv_df`. predicted_cols vector strings name columns predictions different methods `deconv_df`. sample_id_col string name column sample name ID `deconv_df`. group_col string name column containing cell types groups `deconv_df`. axis_lims list two entries, `x` `y`, defining limits x y axis plot.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/deconv_ranking_plot.html","id":null,"dir":"Reference","previous_headings":"","what":"Boxplot and rankings of deconvolution metrics for deconvolution results. — deconv_ranking_plot","title":"Boxplot and rankings of deconvolution metrics for deconvolution results. — deconv_ranking_plot","text":"Produces data varied deconvolution performance metrics. Produces one boxplot one ranking plot metric.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/deconv_ranking_plot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Boxplot and rankings of deconvolution metrics for deconvolution results. — deconv_ranking_plot","text":"","code":"deconv_ranking_plot( deconv_df, true_values_col, predicted_cols, sample_id_col, group_col, metrics = c(\"rmse\", \"r_squared\", \"adj.r.squared\", \"AIC\"), custom_colours = NULL )"},{"path":"https://costalab.github.io/CimpleG/reference/deconv_ranking_plot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Boxplot and rankings of deconvolution metrics for deconvolution results. — deconv_ranking_plot","text":"deconv_df data.frame meta.data, true values predictions different methods columns. row prediction given sample given group/cell type. true_values_col string name column true values `deconv_df`. predicted_cols vector strings name columns predictions different methods `deconv_df`. sample_id_col string name column sample name ID `deconv_df`. group_col string name column containing cell types groups `deconv_df`. metrics list two entries, `x` `y`, defining limits x y axis plot. custom_colours named vector colours, names values defined `predicted_cols`. `NULL`, default colours used.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/deconvolution_barplot.html","id":null,"dir":"Reference","previous_headings":"","what":"Stacked barplot of deconvolution results — deconvolution_barplot","title":"Stacked barplot of deconvolution results — deconvolution_barplot","text":"Stacked barplot deconvolution results","code":""},{"path":"https://costalab.github.io/CimpleG/reference/deconvolution_barplot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Stacked barplot of deconvolution results — deconvolution_barplot","text":"","code":"deconvolution_barplot( deconvoluted_data, meta_data, sample_id_column, true_label_column, color_dict = NULL, show_x_label = FALSE, base_size = 14, ... )"},{"path":"https://costalab.github.io/CimpleG/reference/deconvolution_barplot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Stacked barplot of deconvolution results — deconvolution_barplot","text":"deconvoluted_data Result running `run_deconvolution` meta_data Data.frame containing metadata deconvoluted samples sample_id_column Name column containing sample id meta_data data.frame true_label_column Name column containing true labels samples meta_data data.frame color_dict Named string featuring colors values labels (true labels) names show_x_label boolean, `TRUE` sample labels X axis shown. Default `FALSE`. base_size integer defining base size text plot. Default `14`. ... Parameters passed ggplot2::theme function.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/deconvolution_barplot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Stacked barplot of deconvolution results — deconvolution_barplot","text":"list data ggplot2 plot object.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/deconvolution_epidish.html","id":null,"dir":"Reference","previous_headings":"","what":"EpiDISH deconvolution — deconvolution_epidish","title":"EpiDISH deconvolution — deconvolution_epidish","text":"EpiDISH deconvolution","code":""},{"path":"https://costalab.github.io/CimpleG/reference/deconvolution_epidish.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"EpiDISH deconvolution — deconvolution_epidish","text":"","code":"deconvolution_epidish( ref_mat, new_data, epidish_method = \"CBS\", epidish_nuv = seq(0.1, 1, 0.1), epidish_maxit = 10000 )"},{"path":"https://costalab.github.io/CimpleG/reference/deconvolution_epidish.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"EpiDISH deconvolution — deconvolution_epidish","text":"ref_mat Reference matrix. new_data New data matrix. epidish_method One `CBS` (Cibersort), `RPC` (Robust Partial Correlations), `CP` (Constrained Projection). Default `CBS`. See `EpiDISH` documentation information. epidish_nuv vector candidate values used svm. used epidish_method set `CBS`. See `EpiDISH` documentation information. epidish_maxit Integer number max iterations IWLS (Iterative Weighted Least Squares). used epidish_method set `RPC`.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/deconvolution_nmf.html","id":null,"dir":"Reference","previous_headings":"","what":"NMF deconvolution — deconvolution_nmf","title":"NMF deconvolution — deconvolution_nmf","text":"NMF deconvolution","code":""},{"path":"https://costalab.github.io/CimpleG/reference/deconvolution_nmf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"NMF deconvolution — deconvolution_nmf","text":"","code":"deconvolution_nmf(weights_mat, values_mat, ...)"},{"path":"https://costalab.github.io/CimpleG/reference/deconvolution_nmf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"NMF deconvolution — deconvolution_nmf","text":"weights_mat Reference matrix. values_mat New data matrix. ... Extra parameters set NMF options. relevant parameters probably `method` `beta`.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/deconvolution_nnls.html","id":null,"dir":"Reference","previous_headings":"","what":"NNLS deconvolution — deconvolution_nnls","title":"NNLS deconvolution — deconvolution_nnls","text":"NNLS deconvolution","code":""},{"path":"https://costalab.github.io/CimpleG/reference/deconvolution_nnls.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"NNLS deconvolution — deconvolution_nnls","text":"","code":"deconvolution_nnls(dt, compute_cols, ref_mat)"},{"path":"https://costalab.github.io/CimpleG/reference/deconvolution_nnls.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"NNLS deconvolution — deconvolution_nnls","text":"dt data.table new data features/predictions rows samples columns. compute_cols character vector columns deconvolution algorithm ran. ref_mat reference matrix created CimpleG.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/diffmeans_sumvariance_plot.html","id":null,"dir":"Reference","previous_headings":"","what":"Represent CpGs in the difference in means, sum of variances space.\nThis plot is often used to select CpGs that would be good classifiers.\nThese CpGs are often located on the bottom left and\nbottom right of this plot. — diffmeans_sumvariance_plot","title":"Represent CpGs in the difference in means, sum of variances space.\nThis plot is often used to select CpGs that would be good classifiers.\nThese CpGs are often located on the bottom left and\nbottom right of this plot. — diffmeans_sumvariance_plot","text":"Represent CpGs difference means, sum variances space. plot often used select CpGs good classifiers. CpGs often located bottom left bottom right plot.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/diffmeans_sumvariance_plot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Represent CpGs in the difference in means, sum of variances space.\nThis plot is often used to select CpGs that would be good classifiers.\nThese CpGs are often located on the bottom left and\nbottom right of this plot. — diffmeans_sumvariance_plot","text":"","code":"diffmeans_sumvariance_plot( data, xcol = \"diff_means\", ycol = \"sum_variance\", feature_id_col = \"id\", is_feature_selected_col = NULL, label_var1 = \"Target\", label_var2 = \"Others\", target_vector = NULL, mean_cutoff = NULL, var_cutoff = NULL, threshold_func = NULL, func_factor = NULL, feats_to_highlight = NULL, cpg_ranking_df = NULL, color_all_points = NULL, pltDensity = TRUE, density_type = c(\"density\", \"histogram\", \"boxplot\", \"violin\", \"densigram\"), plot_dir = NULL, id_tag = NULL, file_tag = NULL, custom_mods = FALSE )"},{"path":"https://costalab.github.io/CimpleG/reference/diffmeans_sumvariance_plot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Represent CpGs in the difference in means, sum of variances space.\nThis plot is often used to select CpGs that would be good classifiers.\nThese CpGs are often located on the bottom left and\nbottom right of this plot. — diffmeans_sumvariance_plot","text":"data Data create difference means, sum variances plot. Either data.frame `xcol`,`ycol` `feature_id_col` , `target_vector` `NULL` matrix beta values , given target, difference means target others, sum variances within target others calculated. xcol Column x-axis data ycol Column y-axis data feature_id_col Column feature ID is_feature_selected_col NULL column TRUE/FALSE features highlighted selected label_var1 Label target class label_var2 Label classes target_vector NULL vector target class assignment, see data mean_cutoff numeric draw mean cutoff given position var_cutoff numeric draw variance cutoff given position threshold_func TODO func_factor TODO feats_to_highlight TODO cpg_ranking_df TODO color_all_points TODO pltDensity TODO density_type TODO plot_dir TODO id_tag TODO file_tag TODO custom_mods TODO","code":""},{"path":"https://costalab.github.io/CimpleG/reference/diffmeans_sumvariance_plot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Represent CpGs in the difference in means, sum of variances space.\nThis plot is often used to select CpGs that would be good classifiers.\nThese CpGs are often located on the bottom left and\nbottom right of this plot. — diffmeans_sumvariance_plot","text":"","code":"library(\"CimpleG\") # read data data(train_data) data(train_targets) # make basic plot plt <- diffmeans_sumvariance_plot( train_data, target_vector = train_targets$blood_cells == 1 ) print(plt) # make plot with parabola, colored and highlighted features df_dmeansvar <- compute_diffmeans_sumvar( train_data, target_vector = train_targets$blood_cells==1 ) parab_param <- .7 df_dmeansvar$is_selected <- select_features( x = df_dmeansvar$diff_means, y = df_dmeansvar$sum_variance, a = parab_param ) plt <- diffmeans_sumvariance_plot( data=df_dmeansvar, label_var1=\"Leukocytes\", color_all_points=\"red\", is_feature_selected_col=\"is_selected\", feats_to_highlight=c(\"cg10456121\"), threshold_func=function(x,a) (a*x)^2, func_factor=parab_param ) #> Warning: Use of `sp_df$x` is discouraged. #> ℹ Use `x` instead. #> Warning: Use of `sp_df$x` is discouraged. #> ℹ Use `x` instead. #> Warning: Removed 10 rows containing missing values (`geom_line()`). #> Warning: Removed 1 rows containing missing values (`geom_label()`). #> Warning: Removed 1 rows containing missing values (`geom_label_repel()`). #> Warning: Use of `sp_df$x` is discouraged. #> ℹ Use `x` instead. #> Warning: Removed 10 rows containing missing values (`geom_line()`). #> Warning: Removed 1 rows containing missing values (`geom_label()`). #> Warning: Removed 1 rows containing missing values (`geom_label_repel()`). #> Warning: Use of `sp_df$x` is discouraged. #> ℹ Use `x` instead. #> Warning: Use of `sp_df$x` is discouraged. #> ℹ Use `x` instead. #> Warning: Removed 10 rows containing missing values (`geom_line()`). #> Warning: Removed 1 rows containing missing values (`geom_label_repel()`). #> Warning: Use of `sp_df$x` is discouraged. #> ℹ Use `x` instead. #> Warning: Removed 10 rows containing missing values (`geom_line()`). #> Warning: Removed 1 rows containing missing values (`geom_label_repel()`). print(plt)"},{"path":"https://costalab.github.io/CimpleG/reference/dmsv_plot.html","id":null,"dir":"Reference","previous_headings":"","what":"Represent CpGs in the difference in means, sum of variances space.\nThis plot is often used to select CpGs that would be good classifiers.\nThese CpGs are often located on the bottom left and\nbottom right of this plot. — dmsv_plot","title":"Represent CpGs in the difference in means, sum of variances space.\nThis plot is often used to select CpGs that would be good classifiers.\nThese CpGs are often located on the bottom left and\nbottom right of this plot. — dmsv_plot","text":"Represent CpGs difference means, sum variances space. plot often used select CpGs good classifiers. CpGs often located bottom left bottom right plot.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/dmsv_plot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Represent CpGs in the difference in means, sum of variances space.\nThis plot is often used to select CpGs that would be good classifiers.\nThese CpGs are often located on the bottom left and\nbottom right of this plot. — dmsv_plot","text":"","code":"dmsv_plot( dat, target_vector = NULL, x_var = \"diff_means\", y_var = \"sum_variance\", id_var = \"id\", highlight_var = NULL, display_var = NULL, label_var1 = \"Target\", label_var2 = \"Others\", point_color = \"black\", subtitle = NULL )"},{"path":"https://costalab.github.io/CimpleG/reference/dmsv_plot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Represent CpGs in the difference in means, sum of variances space.\nThis plot is often used to select CpGs that would be good classifiers.\nThese CpGs are often located on the bottom left and\nbottom right of this plot. — dmsv_plot","text":"dat Data create dmsv plot (difference means, sum variances plot). Either data.frame `x_var`,`y_var` `id_var` , `target_vector` `NULL` matrix beta values , given target, difference means target others, sum variances within target others calculated. target_vector NULL boolean vector target class assignment, see data x_var Name column x-axis data (difference means). y_var Name column y-axis data (sum variances). id_var Name column feature/CpG ID. highlight_var (Optional) Name column highlighted features. Values column boolean (TRUE selected, FALSE selected). display_var (Optional) Name column features displayed plot label. Values column boolean (TRUE feature displayed, FALSE feature displayed). label_var1 Label target class. Default \"Target\". label_var2 Label classes. Default \"Others\". point_color Color features/CpGs plot. Default \"black\". features highlighted, non-highlighted features lighter color. subtitle Subtitle displayed plot. Default NULL.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/dmsv_plot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Represent CpGs in the difference in means, sum of variances space.\nThis plot is often used to select CpGs that would be good classifiers.\nThese CpGs are often located on the bottom left and\nbottom right of this plot. — dmsv_plot","text":"ggplot2 object dmsv plot.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/dmsv_plot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Represent CpGs in the difference in means, sum of variances space.\nThis plot is often used to select CpGs that would be good classifiers.\nThese CpGs are often located on the bottom left and\nbottom right of this plot. — dmsv_plot","text":"","code":"library(\"CimpleG\") # load CimpleG example data data(train_data) data(train_targets) # make basic plot straight from the data plt <- dmsv_plot( dat = train_data, target_vector = train_targets$blood_cells == 1 ) print(plt) # make plot with highlighted features # first create a diffmeans sumvar data frame from the data df_dmeansvar <- compute_diffmeans_sumvar( train_data, target_vector = train_targets$blood_cells==1 ) # adding a column to this data frame \\code{hl_col} with random CpGs # selected (as TRUE) or not (as FALSE) to be highlighted and displayed. df_dmeansvar$hl_col <- sample(c(TRUE,FALSE),nrow(df_dmeansvar),replace=TRUE,prob=c(0.1,0.9)) df_dmeansvar$dp_col <- df_dmeansvar$hl_col plt <- dmsv_plot( dat=df_dmeansvar, highlight_var=\"hl_col\", display_var=\"dp_col\", label_var1=\"Leukocytes\", point_color=\"red\", subtitle=\"method: CimpleG\" ) print(plt) #> Warning: Removed 1 rows containing missing values (`geom_label_repel()`). #> Warning: ggrepel: 95 unlabeled data points (too many overlaps). Consider increasing max.overlaps"},{"path":"https://costalab.github.io/CimpleG/reference/eval_test_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Evaluation of produced models on test data — eval_test_data","title":"Evaluation of produced models on test data — eval_test_data","text":"Evaluation produced models test data","code":""},{"path":"https://costalab.github.io/CimpleG/reference/eval_test_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Evaluation of produced models on test data — eval_test_data","text":"","code":"eval_test_data(test_data, final_model, method = \"oner\", verbose = 1)"},{"path":"https://costalab.github.io/CimpleG/reference/eval_test_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Evaluation of produced models on test data — eval_test_data","text":"test_data Test data. final_model Model tested. method Method used train model. verbose verbose logs .","code":""},{"path":"https://costalab.github.io/CimpleG/reference/get_cpg_annotation.html","id":null,"dir":"Reference","previous_headings":"","what":"Get CpG annotation from Illumina — get_cpg_annotation","title":"Get CpG annotation from Illumina — get_cpg_annotation","text":"Get CpG annotation Illumina","code":""},{"path":"https://costalab.github.io/CimpleG/reference/get_cpg_annotation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get CpG annotation from Illumina — get_cpg_annotation","text":"","code":"get_cpg_annotation( cpg_id, is_epic = TRUE, short_annotation = TRUE, silence_warnings = TRUE )"},{"path":"https://costalab.github.io/CimpleG/reference/get_cpg_annotation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get CpG annotation from Illumina — get_cpg_annotation","text":"cpg_id character vector CpG IDs Illumina annotate. is_epic boolean, TRUE, annotation fetched EPIC array, otherwise 450k array. Default TRUE. short_annotation boolean, TRUE, small number columns full annotation reference kept. leads easier read output. Default TRUE. silence_warnings boolean, TRUE, warnings produced downloading loading data silenced. Default TRUE.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/get_cpg_annotation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get CpG annotation from Illumina — get_cpg_annotation","text":"table annotated CpGs order provided signatures.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/get_cpg_annotation.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get CpG annotation from Illumina — get_cpg_annotation","text":"","code":"library(\"CimpleG\") # read data signatures <- c(\"cg14501977\", \"cg24548498\") # Get signature annotation signature_annotation <- get_cpg_annotation(signatures) #> #> [CimpleG] Getting annotation manifest from Illumina. # check signature annotation signature_annotation #> # A tibble: 2 × 8 #> IlmnID CHR_hg38 Start_hg38 End_hg38 UCSC_RefGene_Name UCSC_RefGene_Group #> #> 1 cg14501977 chr12 123948446 123948448 CCDC92 5'UTR #> 2 cg24548498 chr2 181684680 181684682 NA NA #> # ℹ 2 more variables: UCSC_CpG_Islands_Name , #> # Relation_to_UCSC_CpG_Island "},{"path":"https://costalab.github.io/CimpleG/reference/lighten.html","id":null,"dir":"Reference","previous_headings":"","what":"Helper function to lighten up a given color. — lighten","title":"Helper function to lighten up a given color. — lighten","text":"Helper function lighten given color.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/lighten.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper function to lighten up a given color. — lighten","text":"","code":"lighten(color, factor = 0.5)"},{"path":"https://costalab.github.io/CimpleG/reference/lighten.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper function to lighten up a given color. — lighten","text":"color Color name hex code color factor Multiplicative factor `color` lightened ","code":""},{"path":"https://costalab.github.io/CimpleG/reference/load_object.html","id":null,"dir":"Reference","previous_headings":"","what":"Load an R object saved with CimpleG or an RDS file. — load_object","title":"Load an R object saved with CimpleG or an RDS file. — load_object","text":"Load R object saved CimpleG RDS file.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/load_object.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load an R object saved with CimpleG or an RDS file. — load_object","text":"","code":"load_object(file_name)"},{"path":"https://costalab.github.io/CimpleG/reference/load_object.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load an R object saved with CimpleG or an RDS file. — load_object","text":"file_name File name working directory path file loaded. Files saved CimpleG::save_object base::saveRDS files supported.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/make_color_palette.html","id":null,"dir":"Reference","previous_headings":"","what":"Make color palette data frame — make_color_palette","title":"Make color palette data frame — make_color_palette","text":"Make color palette data frame","code":""},{"path":"https://costalab.github.io/CimpleG/reference/make_color_palette.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make color palette data frame — make_color_palette","text":"","code":"make_color_palette(classes)"},{"path":"https://costalab.github.io/CimpleG/reference/make_color_palette.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make color palette data frame — make_color_palette","text":"classes Vector classes create color palette","code":""},{"path":"https://costalab.github.io/CimpleG/reference/make_deconv_ref_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Build deconvolution reference matrix — make_deconv_ref_matrix","title":"Build deconvolution reference matrix — make_deconv_ref_matrix","text":"Build deconvolution reference matrix","code":""},{"path":"https://costalab.github.io/CimpleG/reference/make_deconv_ref_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Build deconvolution reference matrix — make_deconv_ref_matrix","text":"","code":"make_deconv_ref_matrix(cpg_obj, ref_data, ref_data_labels, method = NULL)"},{"path":"https://costalab.github.io/CimpleG/reference/make_deconv_ref_matrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Build deconvolution reference matrix — make_deconv_ref_matrix","text":"cpg_obj CimpleG object. ref_data matrix reference data used build reference matrix. ref_data_labels character vector true labels samples `reference_data`. method Method used train models CimpleG object. provided (NULL), method taken CimpleG object.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/predict.CimpleG.html","id":null,"dir":"Reference","previous_headings":"","what":"Predict outcome from a CimpleG signatures on new data — predict.CimpleG","title":"Predict outcome from a CimpleG signatures on new data — predict.CimpleG","text":"Predict outcome CimpleG signatures new data","code":""},{"path":"https://costalab.github.io/CimpleG/reference/predict.CimpleG.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Predict outcome from a CimpleG signatures on new data — predict.CimpleG","text":"","code":"# S3 method for CimpleG predict(object, ..., new_data, class_labels = NULL)"},{"path":"https://costalab.github.io/CimpleG/reference/predict.CimpleG.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Predict outcome from a CimpleG signatures on new data — predict.CimpleG","text":"object CimpleG object. ... used moment. new_data Data predicted, samples rows features columns. Last column `new_data` target/class labels coded 0 1. class_labels Class labels new data provided directly .","code":""},{"path":"https://costalab.github.io/CimpleG/reference/run_deconvolution.html","id":null,"dir":"Reference","previous_headings":"","what":"Perform deconvolution on a new set of samples, based on the CimpleG models trained — run_deconvolution","title":"Perform deconvolution on a new set of samples, based on the CimpleG models trained — run_deconvolution","text":"Perform deconvolution new set samples, based CimpleG models trained","code":""},{"path":"https://costalab.github.io/CimpleG/reference/run_deconvolution.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Perform deconvolution on a new set of samples, based on the CimpleG models trained — run_deconvolution","text":"","code":"run_deconvolution( cpg_obj = NULL, new_data = NULL, ref_mat = NULL, deconvolution_method = c(\"NNLS\", \"EpiDISH\", \"NMF\"), ... )"},{"path":"https://costalab.github.io/CimpleG/reference/run_deconvolution.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Perform deconvolution on a new set of samples, based on the CimpleG models trained — run_deconvolution","text":"cpg_obj CimpleG object. creating/training CimpleG parameter `deconvolution_reference` set `TRUE`. new_data Matrix data.frame samples want perform deconvolution . Samples rows probes/CpGs columns. ref_mat CimpleG object reference matrix, can provide instead. See `make_deconv_ref_matrix` deconvolution_method Deconvolution method used. One #TODO ... Extra parameters used deconvolution_method set `NMF`. relevant parameter probably `method` `beta`.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/save_object.html","id":null,"dir":"Reference","previous_headings":"","what":"Save an R object to disk with fast and efficient compression algorithms. — save_object","title":"Save an R object to disk with fast and efficient compression algorithms. — save_object","text":"Save R object disk fast efficient compression algorithms.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/save_object.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Save an R object to disk with fast and efficient compression algorithms. — save_object","text":"","code":"save_object(object, file_name, file_format = \"zstd\")"},{"path":"https://costalab.github.io/CimpleG/reference/save_object.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Save an R object to disk with fast and efficient compression algorithms. — save_object","text":"object Object saved disk. file_name Name file R object saved . file_format One \"zstd\", \"lz4\", \"gzip\", \"bzip2\",\"xz\", \"nocomp\". zstd best option, fast compression loading times, low space usage. Formats \"zstd\" \"lz4\" available package archive installed.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/select_features.html","id":null,"dir":"Reference","previous_headings":"","what":"Feature selection function used in the diffmeans, sumvariance space — select_features","title":"Feature selection function used in the diffmeans, sumvariance space — select_features","text":"Feature selection function used diffmeans, sumvariance space","code":""},{"path":"https://costalab.github.io/CimpleG/reference/select_features.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Feature selection function used in the diffmeans, sumvariance space — select_features","text":"","code":"select_features(x, y, a)"},{"path":"https://costalab.github.io/CimpleG/reference/select_features.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Feature selection function used in the diffmeans, sumvariance space — select_features","text":"x, difference means value y, sum variances value , parabola parameter, scales open/closed parabola , higher value, closed parabola .","code":""},{"path":"https://costalab.github.io/CimpleG/reference/select_features.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Feature selection function used in the diffmeans, sumvariance space — select_features","text":"bool vector","code":""},{"path":"https://costalab.github.io/CimpleG/reference/signature_plot.html","id":null,"dir":"Reference","previous_headings":"","what":"CpG signature plot — signature_plot","title":"CpG signature plot — signature_plot","text":"CpG signature plot","code":""},{"path":"https://costalab.github.io/CimpleG/reference/signature_plot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"CpG signature plot — signature_plot","text":"","code":"signature_plot( cpg_obj, data, meta_data, sample_id_column, true_label_column, color_dict = NULL, color_others = \"black\", as_panel = TRUE, is_beta = TRUE, base_size = 14, ... )"},{"path":"https://costalab.github.io/CimpleG/reference/signature_plot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"CpG signature plot — signature_plot","text":"cpg_obj CimpleG object, generated CimpleG function. Alternatively names character vector list signatures. data Matrix data.frame samples signatures plot. Samples rows probes/CpGs columns. meta_data Data.frame containing metadata samples `data`. sample_id_column Name column containing sample id meta_data data.frame true_label_column Name column containing true labels samples meta_data data.frame color_dict Named string featuring colors values labels (true labels) names color_others name hex code color non-target samples colored . as_panel boolean, TRUE (default) single figure panel signatures generated. Otherwise, individual plots returned list. is_beta boolean, TRUE (default) values plotted scale suitable Beta values. Otherwise, values plotted scale suitable M values. base_size integer defining base size text plot. Default `14`. ... Parameters passed ggplot2::theme function.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/signature_plot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"CpG signature plot — signature_plot","text":"list data ggplot2 plot object.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/test_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Cell line test data — test_data","title":"Cell line test data — test_data","text":"Cell line test data","code":""},{"path":"https://costalab.github.io/CimpleG/reference/test_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cell line test data — test_data","text":"","code":"test_data"},{"path":"https://costalab.github.io/CimpleG/reference/test_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Cell line test data — test_data","text":"matrix beta values 1000 CpGs. Features/variables columns 170 samples rows","code":""},{"path":"https://costalab.github.io/CimpleG/reference/test_targets.html","id":null,"dir":"Reference","previous_headings":"","what":"Cell line test data targets — test_targets","title":"Cell line test data targets — test_targets","text":"Cell line test data targets","code":""},{"path":"https://costalab.github.io/CimpleG/reference/test_targets.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cell line test data targets — test_targets","text":"","code":"test_targets"},{"path":"https://costalab.github.io/CimpleG/reference/test_targets.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Cell line test data targets — test_targets","text":"data frame 18 variables 170 samples rows. gsm GSM identifier (GEO accession number) sample cell_type cell type respective sample adipocytes one-hot encoded (1 0) column defining given sample adipocyte astrocytes one-hot encoded (1 0) column defining given sample astrocyte blood_cells one-hot encoded (1 0) column defining given sample blood cell endothelial_cells one-hot encoded (1 0) column defining given sample endothelial cell epidermal_cells one-hot encoded (1 0) column defining given sample epidermal cell epithelial_cells one-hot encoded (1 0) column defining given sample epithelial cell fibroblasts one-hot encoded (1 0) column defining given sample fibroblast glia one-hot encoded (1 0) column defining given sample glia cell hepatocytes one-hot encoded (1 0) column defining given sample hepatocyte ips_cells one-hot encoded (1 0) column defining given sample ipsc msc one-hot encoded (1 0) column defining given sample msc muscle_cells one-hot encoded (1 0) column defining given sample muscle cell neurons one-hot encoded (1 0) column defining given sample neuron muscle_sc one-hot encoded (1 0) column defining given sample muscle stem cell group_data dataset data belong (train test) description cell type respective sample, long form","code":""},{"path":"https://costalab.github.io/CimpleG/reference/train_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Cell line train data — train_data","title":"Cell line train data — train_data","text":"Cell line train data","code":""},{"path":"https://costalab.github.io/CimpleG/reference/train_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cell line train data — train_data","text":"","code":"train_data"},{"path":"https://costalab.github.io/CimpleG/reference/train_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Cell line train data — train_data","text":"matrix beta values 1000 CpGs. Features/variables columns 409 samples rows","code":""},{"path":"https://costalab.github.io/CimpleG/reference/train_targets.html","id":null,"dir":"Reference","previous_headings":"","what":"Cell line train data targets — train_targets","title":"Cell line train data targets — train_targets","text":"Cell line train data targets","code":""},{"path":"https://costalab.github.io/CimpleG/reference/train_targets.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cell line train data targets — train_targets","text":"","code":"train_targets"},{"path":"https://costalab.github.io/CimpleG/reference/train_targets.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Cell line train data targets — train_targets","text":"data frame 18 variables 409 samples rows. gsm GSM identifier (GEO accession number) sample cell_type cell type respective sample adipocytes one-hot encoded (1 0) column defining given sample adipocyte astrocytes one-hot encoded (1 0) column defining given sample astrocyte blood_cells one-hot encoded (1 0) column defining given sample blood cell endothelial_cells one-hot encoded (1 0) column defining given sample endothelial cell epidermal_cells one-hot encoded (1 0) column defining given sample epidermal cell epithelial_cells one-hot encoded (1 0) column defining given sample epithelial cell fibroblasts one-hot encoded (1 0) column defining given sample fibroblast glia one-hot encoded (1 0) column defining given sample glia cell hepatocytes one-hot encoded (1 0) column defining given sample hepatocyte ips_cells one-hot encoded (1 0) column defining given sample ipsc msc one-hot encoded (1 0) column defining given sample msc muscle_cells one-hot encoded (1 0) column defining given sample muscle cell neurons one-hot encoded (1 0) column defining given sample neuron muscle_sc one-hot encoded (1 0) column defining given sample muscle stem cell group_data dataset data belong (train test) description cell type respective sample, long form","code":""}]
+[{"path":"https://costalab.github.io/CimpleG/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://costalab.github.io/CimpleG/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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/LICENSE.html","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://costalab.github.io/CimpleG/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":"https://costalab.github.io/CimpleG/articles/generate-signatures.html","id":"cimpleg-simple-cpg-signatures","dir":"Articles","previous_headings":"","what":"CimpleG (Simple CpG signatures)","title":"Generate signatures","text":"CimpleG tries find CpGs best classify cell-type given train dataset also enables perform cell-type deconvolution couple easy steps can use beta M values show easy generate signatures","code":""},{"path":"https://costalab.github.io/CimpleG/articles/generate-signatures.html","id":"installation","dir":"Articles","previous_headings":"CimpleG (Simple CpG signatures)","what":"Installation","title":"Generate signatures","text":"haven’t installed CimpleG, can find instructions . However simple :","code":"if(!require(\"CimpleG\")) devtools::install_github(\"costalab/CimpleG\")"},{"path":"https://costalab.github.io/CimpleG/articles/generate-signatures.html","id":"loading-package","dir":"Articles","previous_headings":"CimpleG (Simple CpG signatures)","what":"Loading package","title":"Generate signatures","text":"load CimpleG package.","code":"library(\"CimpleG\") #> -------------------------- #> CimpleG version 0.0.5.9001 #> --------------------------"},{"path":"https://costalab.github.io/CimpleG/articles/generate-signatures.html","id":"loading-data","dir":"Articles","previous_headings":"CimpleG (Simple CpG signatures)","what":"Loading data","title":"Generate signatures","text":"tutorial, use small dataset just 409 samples 1000 CpGs. also use table metadata regarding samples. dataset comes included CimpleG. can read .","code":"# load data data(train_data) data(train_targets)"},{"path":"https://costalab.github.io/CimpleG/articles/generate-signatures.html","id":"running-cimpleg","dir":"Articles","previous_headings":"CimpleG (Simple CpG signatures)","what":"Running CimpleG","title":"Generate signatures","text":"Running CimpleG can quite simple. just need run CimpleG function parameters. generating signatures find leukocytes hepatocytes.","code":"# run CimpleG cimpleg_result <- CimpleG( train_data, train_targets, target_columns = c(\"blood_cells\",\"hepatocytes\"), train_only = TRUE ) #> Training for target 'blood_cells' with 'CimpleG' has finished.: 2.655 sec elapsed #> Training for target 'hepatocytes' with 'CimpleG' has finished.: 0.482 sec elapsed"},{"path":"https://costalab.github.io/CimpleG/articles/generate-signatures.html","id":"plotting-cimpleg-cpg-signature","dir":"Articles","previous_headings":"CimpleG (Simple CpG signatures)","what":"Plotting CimpleG CpG signature","title":"Generate signatures","text":"can quickly visualize signature able separate data.","code":"signature_plot( cimpleg_result, train_data, train_targets, sample_id_column = \"gsm\", true_label_column = \"cell_type\" ) #> $data #> # A tibble: 818 × 5 #> # Groups: sig_set [2] #> sample_id true_label signatures value sig_set #> #> 1 GSM1415516 adipocytes cg04785083 0.922 blood_cells #> 2 GSM1415516 adipocytes cg02258444 0.938 hepatocytes #> 3 GSM1415518 adipocytes cg04785083 0.932 blood_cells #> 4 GSM1415518 adipocytes cg02258444 0.912 hepatocytes #> 5 GSM1415520 adipocytes cg04785083 0.923 blood_cells #> 6 GSM1415520 adipocytes cg02258444 0.907 hepatocytes #> 7 GSM1415522 adipocytes cg04785083 0.936 blood_cells #> 8 GSM1415522 adipocytes cg02258444 0.908 hepatocytes #> 9 GSM1415526 adipocytes cg04785083 0.938 blood_cells #> 10 GSM1415526 adipocytes cg02258444 0.905 hepatocytes #> # ℹ 808 more rows #> #> $plot"},{"path":"https://costalab.github.io/CimpleG/articles/save_load_objects.html","id":"cimpleg-to-save-and-load-large-files-in-r","dir":"Articles","previous_headings":"","what":"CimpleG to save and load large files in R","title":"Quickly save and load (large) objects","text":"CimpleG comes couple neat functions save load objects using state art data compression algorithms ‘zstd’ ‘lz4’. allows much quickly save load R objects (.rds) files. Furthermore can also use functions load .rds files.","code":""},{"path":"https://costalab.github.io/CimpleG/articles/save_load_objects.html","id":"loading-the-package","dir":"Articles","previous_headings":"CimpleG to save and load large files in R","what":"Loading the package","title":"Quickly save and load (large) objects","text":"load CimpleG package.","code":"library(\"CimpleG\") #> -------------------------- #> CimpleG version 0.0.5.9003 #> --------------------------"},{"path":"https://costalab.github.io/CimpleG/articles/save_load_objects.html","id":"saving-an-object","dir":"Articles","previous_headings":"CimpleG to save and load large files in R","what":"Saving an object","title":"Quickly save and load (large) objects","text":"default use ‘zstd’ algorithm can choose different one. process pretty seamless. Let’s create large matrix save using CimpleG.","code":"my_matrix <- matrix(rnorm(100), nrow = 10, ncol = 10) save_object(my_matrix, \"my_matrix.rds\")"},{"path":"https://costalab.github.io/CimpleG/articles/save_load_objects.html","id":"loading-an-object","dir":"Articles","previous_headings":"CimpleG to save and load large files in R","what":"Loading an object","title":"Quickly save and load (large) objects","text":"load object process just seamless. need specify compression algorithm used. just work! larger file greater advantage using functions.","code":"my_loaded_matrix <- load_object(\"my_matrix.rds\") my_loaded_matrix"},{"path":"https://costalab.github.io/CimpleG/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Tiago F.V. Maié. Author, maintainer.","code":""},{"path":"https://costalab.github.io/CimpleG/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"F.V. Maié T (2023). CimpleG: CimpleG - Individual/Single CpG sites Classification Deconvolution. R package version 0.0.5.9028, https://costalab.github.io/CimpleG/, https://github.com/CostaLab/CimpleG.","code":"@Manual{, title = {CimpleG: CimpleG - Individual/Single CpG sites For Classification and Deconvolution}, author = {Tiago {F.V. Maié}}, year = {2023}, note = {R package version 0.0.5.9028, https://costalab.github.io/CimpleG/}, url = {https://github.com/CostaLab/CimpleG}, }"},{"path":[]},{"path":"https://costalab.github.io/CimpleG/index.html","id":"overview","dir":"","previous_headings":"","what":"Overview","title":"CimpleG - Individual/Single CpG sites For Classification and\n Deconvolution","text":"CimpleG, R package find (small) CpG signatures.","code":""},{"path":"https://costalab.github.io/CimpleG/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"CimpleG - Individual/Single CpG sites For Classification and\n Deconvolution","text":"","code":"# Install directly from github: devtools::install_github(\"costalab/CimpleG\") # Alternatively, downloading from our release page and installing it from a local source: # - ie navigating through your system install.packages(file.choose(), repos = NULL, type = \"source\") # - ie given a path to a local source install.packages(\"~/Downloads/CimpleG_0.0.5.XXXX.tar.gz\", repos = NULL, type = \"source\") # or devtools::install_local(\"~/Downloads/CimpleG_0.0.5.XXXX.tar.gz\")"},{"path":"https://costalab.github.io/CimpleG/index.html","id":"getting-started","dir":"","previous_headings":"","what":"Getting started","title":"CimpleG - Individual/Single CpG sites For Classification and\n Deconvolution","text":"","code":"library(\"CimpleG\") data(train_data) data(train_targets) data(test_data) data(test_targets) # check the train_targets table to see # what other columns can be used as targets # colnames(train_targets) # mini example with just 4 target signatures set.seed(42) cimpleg_result <- CimpleG( train_data = train_data, train_targets = train_targets, test_data = test_data, test_targets = test_targets, method = \"CimpleG\", has_annotation = TRUE, target_columns = c( \"neurons\", \"glia\", \"blood_cells\", \"fibroblasts\" ) ) cimpleg_result$results # check generated signatures cimpleg_result$signatures #> neurons glia blood_cells fibroblasts #> \"cg24548498\" \"cg14501977\" \"cg04785083\" \"cg03369247\""},{"path":"https://costalab.github.io/CimpleG/index.html","id":"get-signature-annotation","dir":"","previous_headings":"Getting started","what":"Get signature annotation","title":"CimpleG - Individual/Single CpG sites For Classification and\n Deconvolution","text":"","code":"# Get it directly from the results object cimpleg_result$annotation #> # A tibble: 4 × 8 #> IlmnID CHR_hg38 Start_hg38 End_hg38 UCSC_RefGene_Name UCSC_RefGene_Group #> #> 1 cg24548498 chr2 181684680 181684682 #> 2 cg14501977 chr12 123948446 123948448 CCDC92 5'UTR #> 3 cg04785083 chr1 8971202 8971204 CA6 Body #> 4 cg03369247 chr8 20174518 20174520 SLC18A1;SLC18A1;S… Body;Body;Body;Bo… #> # ℹ 2 more variables: UCSC_CpG_Islands_Name , #> # Relation_to_UCSC_CpG_Island # or idependently through the \"get_cpg_annotation\" function signature_annotation <- get_cpg_annotation(cimpleg_result$signatures) # check signature annotation signature_annotation #> # A tibble: 4 × 8 #> IlmnID CHR_hg38 Start_hg38 End_hg38 UCSC_RefGene_Name UCSC_RefGene_Group #> #> 1 cg24548498 chr2 181684680 181684682 #> 2 cg14501977 chr12 123948446 123948448 CCDC92 5'UTR #> 3 cg04785083 chr1 8971202 8971204 CA6 Body #> 4 cg03369247 chr8 20174518 20174520 SLC18A1;SLC18A1;S… Body;Body;Body;Bo… #> # ℹ 2 more variables: UCSC_CpG_Islands_Name , #> # Relation_to_UCSC_CpG_Island "},{"path":"https://costalab.github.io/CimpleG/index.html","id":"plot-generated-signatures","dir":"","previous_headings":"Getting started","what":"Plot generated signatures","title":"CimpleG - Individual/Single CpG sites For Classification and\n Deconvolution","text":"","code":"# adjust target names to match signature names # check generated signatures plt <- signature_plot( cimpleg_result, train_data, train_targets, sample_id_column = \"gsm\", true_label_column = \"cell_type\" ) print(plt$plot)"},{"path":[]},{"path":"https://costalab.github.io/CimpleG/index.html","id":"basic-plot","dir":"","previous_headings":"Difference of means vs Sum of variances (dmsv) plots","what":"basic plot","title":"CimpleG - Individual/Single CpG sites For Classification and\n Deconvolution","text":"","code":"plt <- diffmeans_sumvariance_plot( data = train_data, target_vector = train_targets$neurons == 1 ) print(plt)"},{"path":"https://costalab.github.io/CimpleG/index.html","id":"adding-color-highlighting-selected-features","dir":"","previous_headings":"Difference of means vs Sum of variances (dmsv) plots","what":"adding color, highlighting selected features","title":"CimpleG - Individual/Single CpG sites For Classification and\n Deconvolution","text":"","code":"df_dmeansvar <- compute_diffmeans_sumvar( data = train_data, target_vector = train_targets$neurons == 1 ) parab_param <- .7 df_dmeansvar$is_selected <- select_features( x = df_dmeansvar$diff_means, y = df_dmeansvar$sum_variance, a = parab_param ) plt <- diffmeans_sumvariance_plot( data = df_dmeansvar, label_var1 = \"Neurons\", color_all_points = \"purple\", threshold_func = function(x, a) (a * x) ^ 2, is_feature_selected_col = \"is_selected\", func_factor = parab_param ) print(plt)"},{"path":"https://costalab.github.io/CimpleG/index.html","id":"labeling-specific-features","dir":"","previous_headings":"Difference of means vs Sum of variances (dmsv) plots","what":"labeling specific features","title":"CimpleG - Individual/Single CpG sites For Classification and\n Deconvolution","text":"","code":"plt <- diffmeans_sumvariance_plot( data = df_dmeansvar, feats_to_highlight = cimpleg_result$signatures ) print(plt)"},{"path":[]},{"path":"https://costalab.github.io/CimpleG/index.html","id":"mini-example-with-just-4-signatures","dir":"","previous_headings":"Deconvolution plots","what":"mini example with just 4 signatures","title":"CimpleG - Individual/Single CpG sites For Classification and\n Deconvolution","text":"","code":"deconv_result <- run_deconvolution( cpg_obj = cimpleg_result, new_data = test_data ) plt <- deconvolution_barplot( deconvoluted_data = deconv_result, meta_data = test_targets, sample_id = \"gsm\", true_label = \"cell_type\" ) print(plt$plot)"},{"path":[]},{"path":"https://costalab.github.io/CimpleG/index.html","id":"first-lets-create-additional-deconvolution-results-so-that-we-can-compare-them","dir":"","previous_headings":"Deconvolution plots > this example is a little more advanced","what":"first lets create additional deconvolution results so that we can compare them","title":"CimpleG - Individual/Single CpG sites For Classification and\n Deconvolution","text":"example, ’ll create two additional models made CimpleG. One using hypermethylated signatures, using 3 CpGs per signature instead just one.","code":"set.seed(42) cimpleg_hyper <- CimpleG( train_data = train_data, train_targets = train_targets, test_data = test_data, test_targets = test_targets, method = \"CimpleG\", pred_type = \"hyper\", target_columns = c( \"neurons\", \"glia\", \"blood_cells\", \"fibroblasts\" ) ) #> Training for target 'neurons' with 'CimpleG' has finished.: 0.342 sec elapsed #> Training for target 'glia' with 'CimpleG' has finished.: 0.304 sec elapsed #> Training for target 'blood_cells' with 'CimpleG' has finished.: 0.352 sec elapsed #> Training for target 'fibroblasts' with 'CimpleG' has finished.: 0.317 sec elapsed deconv_hyper <- run_deconvolution( cpg_obj = cimpleg_hyper, new_data = test_data ) set.seed(42) cimpleg_3sigs <- CimpleG( train_data = train_data, train_targets = train_targets, test_data = test_data, test_targets = test_targets, method = \"CimpleG\", n_sigs = 3, target_columns = c( \"neurons\", \"glia\", \"blood_cells\", \"fibroblasts\" ) ) #> Training for target 'neurons' with 'CimpleG' has finished.: 0.471 sec elapsed #> Training for target 'glia' with 'CimpleG' has finished.: 0.39 sec elapsed #> Training for target 'blood_cells' with 'CimpleG' has finished.: 0.459 sec elapsed #> Training for target 'fibroblasts' with 'CimpleG' has finished.: 0.403 sec elapsed deconv_3sigs <- run_deconvolution( cpg_obj = cimpleg_3sigs, new_data = test_data )"},{"path":[]},{"path":"https://costalab.github.io/CimpleG/index.html","id":"remember-this-is-just-an-example-the-results-themselves-are-meaningless","dir":"","previous_headings":"Deconvolution plots > this example is a little more advanced","what":"remember this is just an example, the results themselves are meaningless!","title":"CimpleG - Individual/Single CpG sites For Classification and\n Deconvolution","text":"","code":"deconv_3sigs$prop_3sigs <- deconv_3sigs$proportion deconv_hyper$prop_hyper <- deconv_hyper$proportion deconv_result$prop_cimpleg <- deconv_result$proportion dummy_deconvolution_data <- deconv_result |> dplyr::mutate(true_vals = proportion + runif(nrow(deconv_result), min=-0.1,max=0.1)) |> dplyr::select(cell_type,sample_id,prop_cimpleg,true_vals) |> dplyr::left_join(deconv_hyper |> dplyr::select(-proportion), by=c(\"sample_id\",\"cell_type\")) |> dplyr::left_join(deconv_3sigs |> dplyr::select(-proportion), by=c(\"sample_id\",\"cell_type\")) |> dplyr::mutate_if(is.numeric, function(x){ifelse(x<0,0,x)}) |> dplyr::mutate_if(is.numeric, function(x){ifelse(x>1,1,x)}) |> tibble::as_tibble()"},{"path":[]},{"path":"https://costalab.github.io/CimpleG/index.html","id":"first-we-can-check-how-the-true-values-compare-against-the-predicted-values","dir":"","previous_headings":"Deconvolution plots > this example is a little more advanced","what":"first we can check how the true values compare against the predicted values","title":"CimpleG - Individual/Single CpG sites For Classification and\n Deconvolution","text":"","code":"scatter_plts <- CimpleG:::deconv_pred_obs_plot( deconv_df = dummy_deconvolution_data, true_values_col = \"true_vals\", predicted_cols = c(\"prop_cimpleg\",\"prop_hyper\",\"prop_3sigs\"), sample_id_col = \"sample_id\", group_col= \"cell_type\" ) scatter_panel <- scatter_plts |> patchwork::wrap_plots(ncol=1) print(scatter_panel)"},{"path":"https://costalab.github.io/CimpleG/index.html","id":"now-more-interestingly-we-can-see-in-detail-and-rank-one-of-the-measures-used-to-evaluate-the-deconvolution-results","dir":"","previous_headings":"Deconvolution plots > this example is a little more advanced","what":"now, more interestingly, we can see in detail and rank one of the measures used to evaluate the deconvolution results","title":"CimpleG - Individual/Single CpG sites For Classification and\n Deconvolution","text":"","code":"rank_plts <- CimpleG:::deconv_ranking_plot( deconv_df = dummy_deconvolution_data, true_values_col = \"true_vals\", predicted_cols = c(\"prop_cimpleg\",\"prop_hyper\",\"prop_3sigs\"), sample_id_col = \"sample_id\", group_col= \"cell_type\", metrics = \"rmse\" ) rank_panel <- list(rank_plts$perf_boxplt[[1]],rank_plts$nemenyi_plt[[1]]) |> patchwork::wrap_plots() print(rank_panel)"},{"path":"https://costalab.github.io/CimpleG/reference/CimpleG-package.html","id":null,"dir":"Reference","previous_headings":"","what":"CimpleG: CimpleG - Individual/Single CpG sites For Classification and Deconvolution — CimpleG-package","title":"CimpleG: CimpleG - Individual/Single CpG sites For Classification and Deconvolution — CimpleG-package","text":"CimpleG simple package find single-CpG based signatures use classification deconvolution.","code":""},{"path":[]},{"path":"https://costalab.github.io/CimpleG/reference/CimpleG-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"CimpleG: CimpleG - Individual/Single CpG sites For Classification and Deconvolution — CimpleG-package","text":"Maintainer: Tiago F.V. Maié tiagomaie@hotmail.com","code":""},{"path":"https://costalab.github.io/CimpleG/reference/CimpleG.html","id":null,"dir":"Reference","previous_headings":"","what":"Find simple CpG (CimpleG) signatures. — CimpleG","title":"Find simple CpG (CimpleG) signatures. — CimpleG","text":"Train classification model using (CpGs) features given target data.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/CimpleG.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find simple CpG (CimpleG) signatures. — CimpleG","text":"","code":"CimpleG( train_data, train_targets = NULL, target_columns = NULL, test_data = NULL, test_targets = NULL, method = c(\"CimpleG\", \"CimpleG_parab\", \"brute_force\", \"logistic_reg\", \"decision_tree\", \"boost_tree\", \"mlp\", \"rand_forest\"), pred_type = c(\"both\", \"hypo\", \"hyper\"), engine = c(\"glmnet\", \"xgboost\", \"nnet\", \"ranger\"), rank_method = c(\"ac_rank\", \"a_rank\", \"c_rank\"), k_folds = 10, grid_n = 10, param_p = 2, n_sigs = 1, quantile_threshold = 0.005, train_only = FALSE, split_data = FALSE, run_parallel = FALSE, deconvolution_reference = TRUE, save_dir = NULL, save_format = c(\"zstd\", \"lz4\", \"gzip\", \"bzip2\", \"xz\", \"nocomp\"), verbose = 1, targets = NULL ) cimpleg( train_data, train_targets = NULL, target_columns = NULL, test_data = NULL, test_targets = NULL, method = c(\"CimpleG\", \"CimpleG_parab\", \"brute_force\", \"logistic_reg\", \"decision_tree\", \"boost_tree\", \"mlp\", \"rand_forest\"), pred_type = c(\"both\", \"hypo\", \"hyper\"), engine = c(\"glmnet\", \"xgboost\", \"nnet\", \"ranger\"), rank_method = c(\"ac_rank\", \"a_rank\", \"c_rank\"), k_folds = 10, grid_n = 10, param_p = 2, n_sigs = 1, quantile_threshold = 0.005, train_only = FALSE, split_data = FALSE, run_parallel = FALSE, deconvolution_reference = TRUE, save_dir = NULL, save_format = c(\"zstd\", \"lz4\", \"gzip\", \"bzip2\", \"xz\", \"nocomp\"), verbose = 1, targets = NULL ) cpg( train_data, train_targets = NULL, target_columns = NULL, test_data = NULL, test_targets = NULL, method = c(\"CimpleG\", \"CimpleG_parab\", \"brute_force\", \"logistic_reg\", \"decision_tree\", \"boost_tree\", \"mlp\", \"rand_forest\"), pred_type = c(\"both\", \"hypo\", \"hyper\"), engine = c(\"glmnet\", \"xgboost\", \"nnet\", \"ranger\"), rank_method = c(\"ac_rank\", \"a_rank\", \"c_rank\"), k_folds = 10, grid_n = 10, param_p = 2, n_sigs = 1, quantile_threshold = 0.005, train_only = FALSE, split_data = FALSE, run_parallel = FALSE, deconvolution_reference = TRUE, save_dir = NULL, save_format = c(\"zstd\", \"lz4\", \"gzip\", \"bzip2\", \"xz\", \"nocomp\"), verbose = 1, targets = NULL )"},{"path":"https://costalab.github.io/CimpleG/reference/CimpleG.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find simple CpG (CimpleG) signatures. — CimpleG","text":"train_data Training dataset. matrix (s x f) methylation data (Beta values) used train/find predictors. Samples (s) must rows features/CpGs (f) must columns. train_targets data frame training target samples one-hot encoded. data frame least 1 column, many rows order `train_data`. Target columns need one-hot encoded, meaning , column target samples encoded `1` every sample encoded `0`. target_columns string specifying name column `train_targets` used training. Can character vector several columns `train_targets` used training. argument character vector, CimpleG search best predictors target sequentially parallel depending value `run_parallel` test_data Testing dataset. matrix (s x f) methylation data (Beta values) used test performance found predictors. Samples (s) must rows features/CpGs (f) must columns. `test_data` ** `test_targets` NULL, CimpleG generate stratified test dataset based `train_targets` removing 25 samples `train_data` `train_targets`. test_targets data frame testing target samples one-hot encoded. data frame least 1 column, many rows order `test_data`. Target columns need one-hot encoded, meaning , column target samples encoded `1` every sample encoded `0`. `test_data` ** `test_targets` NULL, CimpleG generate stratified test dataset based `train_targets` removing 25 samples `train_data` `train_targets`. method string specifying method type machine learning model/algorithm used training. divided two main groups. * simple models (classifiers use single feature), `CimpleG` (default), `brute_force`, `CimpleG_unscaled` `oner`; * complex models (classifiers use several features), `logistic_reg`, `decision_tree`, `boost_tree`, `mlp` `rand_forest`. pred_type string specifying type predictor/CpG searched training. used simple models. One `` (default), `hypo` `hyper`. `hypo`, hypomethylated predictors considered. `hyper`, hypermethylated predictors considered. engine string specifying machine learning engine behind `method`. used complex models. Currently use. rank_method string specifying ranking strategy rank features training. k_folds integer specifying number folds (K) used training stratified K-fold cross-validation procedure. grid_n integer specifying number hyperparameter combinations train . param_p even number `sigma / (delta^param_p)`. Tunes much weight given delta feature selection. Default 2. n_sigs Number signatures saved classification used deconvolution. Default 1. quantile_threshold number 0 1. Determines many features kept. Default 0.005. train_only boolean, TRUE, CimpleG train (find predictors) test test dataset. split_data boolean, `TRUE`, subset train data provided, creating smaller test set used test models training. parameter experimental. Default `FALSE`. run_parallel boolean, `FALSE`, default, search predictors multiple targets sequentially. `TRUE` search predictors multiple targets time (parallel processing) order save computational time. need set `future::plan()` running function. deconvolution_reference boolean, `TRUE`, create deconvolution reference matrix based training data. can later used perform deconvolution. Default `FALSE`. save_dir defined save resulting model given directory. Default NULL. save_format used save_dir NULL. One \"zstd\", \"lz4\", \"gzip\", \"bzip2\",\"xz\", \"nocomp\". zstd best option, fast compression loading times, low space usage. verbose verbose want CimpleG running. 0, message displayed, 3 every message displayed. Default 1. targets DEPRECATED use `target_columns`.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/CimpleG.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find simple CpG (CimpleG) signatures. — CimpleG","text":"CimpleG object results per target class.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/CimpleG.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find simple CpG (CimpleG) signatures. — CimpleG","text":"","code":"library(\"CimpleG\") # read data data(train_data) data(train_targets) data(test_data) data(test_targets) # run CimpleG cimpleg_result <- CimpleG( train_data = train_data, train_targets = train_targets, test_data = test_data, test_targets = test_targets, method = \"CimpleG\", target_columns = c(\"glia\",\"neurons\") ) #> Training for target 'glia' with 'CimpleG' has finished.: 2.464 sec elapsed #> Training for target 'neurons' with 'CimpleG' has finished.: 0.705 sec elapsed # check signatures cimpleg_result$signatures #> glia neurons #> \"cg14501977\" \"cg24548498\""},{"path":"https://costalab.github.io/CimpleG/reference/compute_ax.html","id":null,"dir":"Reference","previous_headings":"","what":"Feature selection function used in the sigma delta space — compute_ax","title":"Feature selection function used in the sigma delta space — compute_ax","text":"Feature selection function used sigma delta space","code":""},{"path":"https://costalab.github.io/CimpleG/reference/compute_ax.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Feature selection function used in the sigma delta space — compute_ax","text":"","code":"compute_ax(dm, sv, p)"},{"path":"https://costalab.github.io/CimpleG/reference/compute_ax.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Feature selection function used in the sigma delta space — compute_ax","text":"dm, delta (difference mean values) sv, sigma (sum variance values) p, even number, greater 'p' importance given sigma","code":""},{"path":"https://costalab.github.io/CimpleG/reference/compute_diffmeans_sumvar.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute diff mean sum var dataframe — compute_diffmeans_sumvar","title":"Compute diff mean sum var dataframe — compute_diffmeans_sumvar","text":"Compute diff mean sum var dataframe","code":""},{"path":"https://costalab.github.io/CimpleG/reference/compute_diffmeans_sumvar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute diff mean sum var dataframe — compute_diffmeans_sumvar","text":"","code":"compute_diffmeans_sumvar(data, target_vector)"},{"path":"https://costalab.github.io/CimpleG/reference/compute_diffmeans_sumvar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute diff mean sum var dataframe — compute_diffmeans_sumvar","text":"data Matrix beta values used compute diffmeans sumvar data frame target_vector boolean vector defining samples data part target class","code":""},{"path":"https://costalab.github.io/CimpleG/reference/darken.html","id":null,"dir":"Reference","previous_headings":"","what":"Helper function to darken down a given color. — darken","title":"Helper function to darken down a given color. — darken","text":"Helper function darken given color.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/darken.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper function to darken down a given color. — darken","text":"","code":"darken(color, factor = 0.5)"},{"path":"https://costalab.github.io/CimpleG/reference/darken.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper function to darken down a given color. — darken","text":"color Color name hex code color factor Multiplicative factor `color` darkened ","code":""},{"path":"https://costalab.github.io/CimpleG/reference/deconv_pred_obs_plot.html","id":null,"dir":"Reference","previous_headings":"","what":"Scatter plots of observed (true) vs predicted values for deconvolution. — deconv_pred_obs_plot","title":"Scatter plots of observed (true) vs predicted values for deconvolution. — deconv_pred_obs_plot","text":"Produces one plot panel per number methods predictions. plot panel one plot per cell type.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/deconv_pred_obs_plot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scatter plots of observed (true) vs predicted values for deconvolution. — deconv_pred_obs_plot","text":"","code":"deconv_pred_obs_plot( deconv_df, true_values_col, predicted_cols, sample_id_col, group_col, axis_lims = list(x = c(0, 1), y = c(0, 1)) )"},{"path":"https://costalab.github.io/CimpleG/reference/deconv_pred_obs_plot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scatter plots of observed (true) vs predicted values for deconvolution. — deconv_pred_obs_plot","text":"deconv_df data.frame meta.data, true values predictions different methods columns. row prediction given sample given group/cell type. true_values_col string name column true values `deconv_df`. predicted_cols vector strings name columns predictions different methods `deconv_df`. sample_id_col string name column sample name ID `deconv_df`. group_col string name column containing cell types groups `deconv_df`. axis_lims list two entries, `x` `y`, defining limits x y axis plot.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/deconv_ranking_plot.html","id":null,"dir":"Reference","previous_headings":"","what":"Boxplot and rankings of deconvolution metrics for deconvolution results. — deconv_ranking_plot","title":"Boxplot and rankings of deconvolution metrics for deconvolution results. — deconv_ranking_plot","text":"Produces data varied deconvolution performance metrics. Produces one boxplot one ranking plot metric.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/deconv_ranking_plot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Boxplot and rankings of deconvolution metrics for deconvolution results. — deconv_ranking_plot","text":"","code":"deconv_ranking_plot( deconv_df, true_values_col, predicted_cols, sample_id_col, group_col, metrics = c(\"rmse\", \"r_squared\", \"adj.r.squared\", \"AIC\"), custom_colours = NULL )"},{"path":"https://costalab.github.io/CimpleG/reference/deconv_ranking_plot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Boxplot and rankings of deconvolution metrics for deconvolution results. — deconv_ranking_plot","text":"deconv_df data.frame meta.data, true values predictions different methods columns. row prediction given sample given group/cell type. true_values_col string name column true values `deconv_df`. predicted_cols vector strings name columns predictions different methods `deconv_df`. sample_id_col string name column sample name ID `deconv_df`. group_col string name column containing cell types groups `deconv_df`. metrics list two entries, `x` `y`, defining limits x y axis plot. custom_colours named vector colours, names values defined `predicted_cols`. `NULL`, default colours used.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/deconvolution_barplot.html","id":null,"dir":"Reference","previous_headings":"","what":"Stacked barplot of deconvolution results — deconvolution_barplot","title":"Stacked barplot of deconvolution results — deconvolution_barplot","text":"Stacked barplot deconvolution results","code":""},{"path":"https://costalab.github.io/CimpleG/reference/deconvolution_barplot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Stacked barplot of deconvolution results — deconvolution_barplot","text":"","code":"deconvolution_barplot( deconvoluted_data, meta_data, sample_id_column, true_label_column, color_dict = NULL, show_x_label = FALSE, base_size = 14, ... )"},{"path":"https://costalab.github.io/CimpleG/reference/deconvolution_barplot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Stacked barplot of deconvolution results — deconvolution_barplot","text":"deconvoluted_data Result running `run_deconvolution` meta_data Data.frame containing metadata deconvoluted samples sample_id_column Name column containing sample id meta_data data.frame true_label_column Name column containing true labels samples meta_data data.frame color_dict Named string featuring colors values labels (true labels) names show_x_label boolean, `TRUE` sample labels X axis shown. Default `FALSE`. base_size integer defining base size text plot. Default `14`. ... Parameters passed ggplot2::theme function.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/deconvolution_barplot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Stacked barplot of deconvolution results — deconvolution_barplot","text":"list data ggplot2 plot object.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/deconvolution_epidish.html","id":null,"dir":"Reference","previous_headings":"","what":"EpiDISH deconvolution — deconvolution_epidish","title":"EpiDISH deconvolution — deconvolution_epidish","text":"EpiDISH deconvolution","code":""},{"path":"https://costalab.github.io/CimpleG/reference/deconvolution_epidish.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"EpiDISH deconvolution — deconvolution_epidish","text":"","code":"deconvolution_epidish( ref_mat, new_data, epidish_method = \"CBS\", epidish_nuv = seq(0.1, 1, 0.1), epidish_maxit = 10000 )"},{"path":"https://costalab.github.io/CimpleG/reference/deconvolution_epidish.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"EpiDISH deconvolution — deconvolution_epidish","text":"ref_mat Reference matrix. new_data New data matrix. epidish_method One `CBS` (Cibersort), `RPC` (Robust Partial Correlations), `CP` (Constrained Projection). Default `CBS`. See `EpiDISH` documentation information. epidish_nuv vector candidate values used svm. used epidish_method set `CBS`. See `EpiDISH` documentation information. epidish_maxit Integer number max iterations IWLS (Iterative Weighted Least Squares). used epidish_method set `RPC`.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/deconvolution_nmf.html","id":null,"dir":"Reference","previous_headings":"","what":"NMF deconvolution — deconvolution_nmf","title":"NMF deconvolution — deconvolution_nmf","text":"NMF deconvolution","code":""},{"path":"https://costalab.github.io/CimpleG/reference/deconvolution_nmf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"NMF deconvolution — deconvolution_nmf","text":"","code":"deconvolution_nmf(weights_mat, values_mat, ...)"},{"path":"https://costalab.github.io/CimpleG/reference/deconvolution_nmf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"NMF deconvolution — deconvolution_nmf","text":"weights_mat Reference matrix. values_mat New data matrix. ... Extra parameters set NMF options. relevant parameters probably `method` `beta`.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/deconvolution_nnls.html","id":null,"dir":"Reference","previous_headings":"","what":"NNLS deconvolution — deconvolution_nnls","title":"NNLS deconvolution — deconvolution_nnls","text":"NNLS deconvolution","code":""},{"path":"https://costalab.github.io/CimpleG/reference/deconvolution_nnls.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"NNLS deconvolution — deconvolution_nnls","text":"","code":"deconvolution_nnls(dt, compute_cols, ref_mat)"},{"path":"https://costalab.github.io/CimpleG/reference/deconvolution_nnls.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"NNLS deconvolution — deconvolution_nnls","text":"dt data.table new data features/predictions rows samples columns. compute_cols character vector columns deconvolution algorithm ran. ref_mat reference matrix created CimpleG.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/diffmeans_sumvariance_plot.html","id":null,"dir":"Reference","previous_headings":"","what":"Represent CpGs in the difference in means, sum of variances space.\nThis plot is often used to select CpGs that would be good classifiers.\nThese CpGs are often located on the bottom left and\nbottom right of this plot. — diffmeans_sumvariance_plot","title":"Represent CpGs in the difference in means, sum of variances space.\nThis plot is often used to select CpGs that would be good classifiers.\nThese CpGs are often located on the bottom left and\nbottom right of this plot. — diffmeans_sumvariance_plot","text":"Represent CpGs difference means, sum variances space. plot often used select CpGs good classifiers. CpGs often located bottom left bottom right plot.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/diffmeans_sumvariance_plot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Represent CpGs in the difference in means, sum of variances space.\nThis plot is often used to select CpGs that would be good classifiers.\nThese CpGs are often located on the bottom left and\nbottom right of this plot. — diffmeans_sumvariance_plot","text":"","code":"diffmeans_sumvariance_plot( data, xcol = \"diff_means\", ycol = \"sum_variance\", feature_id_col = \"id\", is_feature_selected_col = NULL, label_var1 = \"Target\", label_var2 = \"Others\", target_vector = NULL, mean_cutoff = NULL, var_cutoff = NULL, threshold_func = NULL, func_factor = NULL, feats_to_highlight = NULL, cpg_ranking_df = NULL, color_all_points = NULL, pltDensity = TRUE, density_type = c(\"density\", \"histogram\", \"boxplot\", \"violin\", \"densigram\"), plot_dir = NULL, id_tag = NULL, file_tag = NULL, custom_mods = FALSE )"},{"path":"https://costalab.github.io/CimpleG/reference/diffmeans_sumvariance_plot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Represent CpGs in the difference in means, sum of variances space.\nThis plot is often used to select CpGs that would be good classifiers.\nThese CpGs are often located on the bottom left and\nbottom right of this plot. — diffmeans_sumvariance_plot","text":"data Data create difference means, sum variances plot. Either data.frame `xcol`,`ycol` `feature_id_col` , `target_vector` `NULL` matrix beta values , given target, difference means target others, sum variances within target others calculated. xcol Column x-axis data ycol Column y-axis data feature_id_col Column feature ID is_feature_selected_col NULL column TRUE/FALSE features highlighted selected label_var1 Label target class label_var2 Label classes target_vector NULL vector target class assignment, see data mean_cutoff numeric draw mean cutoff given position var_cutoff numeric draw variance cutoff given position threshold_func TODO func_factor TODO feats_to_highlight TODO cpg_ranking_df TODO color_all_points TODO pltDensity TODO density_type TODO plot_dir TODO id_tag TODO file_tag TODO custom_mods TODO","code":""},{"path":"https://costalab.github.io/CimpleG/reference/diffmeans_sumvariance_plot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Represent CpGs in the difference in means, sum of variances space.\nThis plot is often used to select CpGs that would be good classifiers.\nThese CpGs are often located on the bottom left and\nbottom right of this plot. — diffmeans_sumvariance_plot","text":"","code":"library(\"CimpleG\") # read data data(train_data) data(train_targets) # make basic plot plt <- diffmeans_sumvariance_plot( train_data, target_vector = train_targets$blood_cells == 1 ) print(plt) # make plot with parabola, colored and highlighted features df_dmeansvar <- compute_diffmeans_sumvar( train_data, target_vector = train_targets$blood_cells==1 ) parab_param <- .7 df_dmeansvar$is_selected <- select_features( x = df_dmeansvar$diff_means, y = df_dmeansvar$sum_variance, a = parab_param ) plt <- diffmeans_sumvariance_plot( data=df_dmeansvar, label_var1=\"Leukocytes\", color_all_points=\"red\", is_feature_selected_col=\"is_selected\", feats_to_highlight=c(\"cg10456121\"), threshold_func=function(x,a) (a*x)^2, func_factor=parab_param ) #> Warning: Use of `sp_df$x` is discouraged. #> ℹ Use `x` instead. #> Warning: Use of `sp_df$x` is discouraged. #> ℹ Use `x` instead. #> Warning: Removed 10 rows containing missing values (`geom_line()`). #> Warning: Removed 1 rows containing missing values (`geom_label()`). #> Warning: Removed 1 rows containing missing values (`geom_label_repel()`). #> Warning: Use of `sp_df$x` is discouraged. #> ℹ Use `x` instead. #> Warning: Removed 10 rows containing missing values (`geom_line()`). #> Warning: Removed 1 rows containing missing values (`geom_label()`). #> Warning: Removed 1 rows containing missing values (`geom_label_repel()`). #> Warning: Use of `sp_df$x` is discouraged. #> ℹ Use `x` instead. #> Warning: Use of `sp_df$x` is discouraged. #> ℹ Use `x` instead. #> Warning: Removed 10 rows containing missing values (`geom_line()`). #> Warning: Removed 1 rows containing missing values (`geom_label_repel()`). #> Warning: Use of `sp_df$x` is discouraged. #> ℹ Use `x` instead. #> Warning: Removed 10 rows containing missing values (`geom_line()`). #> Warning: Removed 1 rows containing missing values (`geom_label_repel()`). print(plt)"},{"path":"https://costalab.github.io/CimpleG/reference/dmsv_plot.html","id":null,"dir":"Reference","previous_headings":"","what":"Represent CpGs in the difference in means, sum of variances space.\nThis plot is often used to select CpGs that would be good classifiers.\nThese CpGs are often located on the bottom left and\nbottom right of this plot. — dmsv_plot","title":"Represent CpGs in the difference in means, sum of variances space.\nThis plot is often used to select CpGs that would be good classifiers.\nThese CpGs are often located on the bottom left and\nbottom right of this plot. — dmsv_plot","text":"Represent CpGs difference means, sum variances space. plot often used select CpGs good classifiers. CpGs often located bottom left bottom right plot.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/dmsv_plot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Represent CpGs in the difference in means, sum of variances space.\nThis plot is often used to select CpGs that would be good classifiers.\nThese CpGs are often located on the bottom left and\nbottom right of this plot. — dmsv_plot","text":"","code":"dmsv_plot( dat, target_vector = NULL, x_var = \"diff_means\", y_var = \"sum_variance\", id_var = \"id\", highlight_var = NULL, display_var = NULL, label_var1 = \"Target\", label_var2 = \"Others\", point_color = \"black\", subtitle = NULL )"},{"path":"https://costalab.github.io/CimpleG/reference/dmsv_plot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Represent CpGs in the difference in means, sum of variances space.\nThis plot is often used to select CpGs that would be good classifiers.\nThese CpGs are often located on the bottom left and\nbottom right of this plot. — dmsv_plot","text":"dat Data create dmsv plot (difference means, sum variances plot). Either data.frame `x_var`,`y_var` `id_var` , `target_vector` `NULL` matrix beta values , given target, difference means target others, sum variances within target others calculated. target_vector NULL boolean vector target class assignment, see data x_var Name column x-axis data (difference means). y_var Name column y-axis data (sum variances). id_var Name column feature/CpG ID. highlight_var (Optional) Name column highlighted features. Values column boolean (TRUE selected, FALSE selected). display_var (Optional) Name column features displayed plot label. Values column boolean (TRUE feature displayed, FALSE feature displayed). label_var1 Label target class. Default \"Target\". label_var2 Label classes. Default \"Others\". point_color Color features/CpGs plot. Default \"black\". features highlighted, non-highlighted features lighter color. subtitle Subtitle displayed plot. Default NULL.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/dmsv_plot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Represent CpGs in the difference in means, sum of variances space.\nThis plot is often used to select CpGs that would be good classifiers.\nThese CpGs are often located on the bottom left and\nbottom right of this plot. — dmsv_plot","text":"ggplot2 object dmsv plot.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/dmsv_plot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Represent CpGs in the difference in means, sum of variances space.\nThis plot is often used to select CpGs that would be good classifiers.\nThese CpGs are often located on the bottom left and\nbottom right of this plot. — dmsv_plot","text":"","code":"library(\"CimpleG\") # load CimpleG example data data(train_data) data(train_targets) # make basic plot straight from the data plt <- dmsv_plot( dat = train_data, target_vector = train_targets$blood_cells == 1 ) print(plt) # make plot with highlighted features # first create a diffmeans sumvar data frame from the data df_dmeansvar <- compute_diffmeans_sumvar( train_data, target_vector = train_targets$blood_cells==1 ) # adding a column to this data frame \\code{hl_col} with random CpGs # selected (as TRUE) or not (as FALSE) to be highlighted and displayed. df_dmeansvar$hl_col <- sample(c(TRUE,FALSE),nrow(df_dmeansvar),replace=TRUE,prob=c(0.1,0.9)) df_dmeansvar$dp_col <- df_dmeansvar$hl_col plt <- dmsv_plot( dat=df_dmeansvar, highlight_var=\"hl_col\", display_var=\"dp_col\", label_var1=\"Leukocytes\", point_color=\"red\", subtitle=\"method: CimpleG\" ) print(plt) #> Warning: Removed 1 rows containing missing values (`geom_label_repel()`). #> Warning: ggrepel: 95 unlabeled data points (too many overlaps). Consider increasing max.overlaps"},{"path":"https://costalab.github.io/CimpleG/reference/eval_test_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Evaluation of produced models on test data — eval_test_data","title":"Evaluation of produced models on test data — eval_test_data","text":"Evaluation produced models test data","code":""},{"path":"https://costalab.github.io/CimpleG/reference/eval_test_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Evaluation of produced models on test data — eval_test_data","text":"","code":"eval_test_data(test_data, final_model, method = \"oner\", verbose = 1)"},{"path":"https://costalab.github.io/CimpleG/reference/eval_test_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Evaluation of produced models on test data — eval_test_data","text":"test_data Test data. final_model Model tested. method Method used train model. verbose verbose logs .","code":""},{"path":"https://costalab.github.io/CimpleG/reference/get_cpg_annotation.html","id":null,"dir":"Reference","previous_headings":"","what":"Get CpG annotation from Illumina — get_cpg_annotation","title":"Get CpG annotation from Illumina — get_cpg_annotation","text":"Get CpG annotation Illumina","code":""},{"path":"https://costalab.github.io/CimpleG/reference/get_cpg_annotation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get CpG annotation from Illumina — get_cpg_annotation","text":"","code":"get_cpg_annotation( cpg_id, is_epic = TRUE, short_annotation = TRUE, silence_warnings = TRUE )"},{"path":"https://costalab.github.io/CimpleG/reference/get_cpg_annotation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get CpG annotation from Illumina — get_cpg_annotation","text":"cpg_id character vector CpG IDs Illumina annotate. is_epic boolean, TRUE, annotation fetched EPIC array, otherwise 450k array. Default TRUE. short_annotation boolean, TRUE, small number columns full annotation reference kept. leads easier read output. Default TRUE. silence_warnings boolean, TRUE, warnings produced downloading loading data silenced. Default TRUE.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/get_cpg_annotation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get CpG annotation from Illumina — get_cpg_annotation","text":"table annotated CpGs order provided signatures.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/get_cpg_annotation.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get CpG annotation from Illumina — get_cpg_annotation","text":"","code":"library(\"CimpleG\") # read data signatures <- c(\"cg14501977\", \"cg24548498\") # Get signature annotation signature_annotation <- get_cpg_annotation(signatures) #> #> [CimpleG] Getting annotation manifest from Illumina. # check signature annotation signature_annotation #> # A tibble: 2 × 8 #> IlmnID CHR_hg38 Start_hg38 End_hg38 UCSC_RefGene_Name UCSC_RefGene_Group #> #> 1 cg14501977 chr12 123948446 123948448 CCDC92 5'UTR #> 2 cg24548498 chr2 181684680 181684682 NA NA #> # ℹ 2 more variables: UCSC_CpG_Islands_Name , #> # Relation_to_UCSC_CpG_Island "},{"path":"https://costalab.github.io/CimpleG/reference/lighten.html","id":null,"dir":"Reference","previous_headings":"","what":"Helper function to lighten up a given color. — lighten","title":"Helper function to lighten up a given color. — lighten","text":"Helper function lighten given color.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/lighten.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper function to lighten up a given color. — lighten","text":"","code":"lighten(color, factor = 0.5)"},{"path":"https://costalab.github.io/CimpleG/reference/lighten.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper function to lighten up a given color. — lighten","text":"color Color name hex code color factor Multiplicative factor `color` lightened ","code":""},{"path":"https://costalab.github.io/CimpleG/reference/load_object.html","id":null,"dir":"Reference","previous_headings":"","what":"Load an R object saved with CimpleG or an RDS file. — load_object","title":"Load an R object saved with CimpleG or an RDS file. — load_object","text":"Load R object saved CimpleG RDS file.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/load_object.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load an R object saved with CimpleG or an RDS file. — load_object","text":"","code":"load_object(file_name)"},{"path":"https://costalab.github.io/CimpleG/reference/load_object.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load an R object saved with CimpleG or an RDS file. — load_object","text":"file_name File name working directory path file loaded. Files saved CimpleG::save_object base::saveRDS files supported.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/make_color_palette.html","id":null,"dir":"Reference","previous_headings":"","what":"Make color palette data frame — make_color_palette","title":"Make color palette data frame — make_color_palette","text":"Make color palette data frame","code":""},{"path":"https://costalab.github.io/CimpleG/reference/make_color_palette.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Make color palette data frame — make_color_palette","text":"","code":"make_color_palette(classes)"},{"path":"https://costalab.github.io/CimpleG/reference/make_color_palette.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Make color palette data frame — make_color_palette","text":"classes Vector classes create color palette","code":""},{"path":"https://costalab.github.io/CimpleG/reference/make_deconv_ref_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Build deconvolution reference matrix — make_deconv_ref_matrix","title":"Build deconvolution reference matrix — make_deconv_ref_matrix","text":"Build deconvolution reference matrix","code":""},{"path":"https://costalab.github.io/CimpleG/reference/make_deconv_ref_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Build deconvolution reference matrix — make_deconv_ref_matrix","text":"","code":"make_deconv_ref_matrix(cpg_obj, ref_data, ref_data_labels, method = NULL)"},{"path":"https://costalab.github.io/CimpleG/reference/make_deconv_ref_matrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Build deconvolution reference matrix — make_deconv_ref_matrix","text":"cpg_obj CimpleG object. ref_data matrix reference data used build reference matrix. ref_data_labels character vector true labels samples `reference_data`. method Method used train models CimpleG object. provided (NULL), method taken CimpleG object.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/predict.CimpleG.html","id":null,"dir":"Reference","previous_headings":"","what":"Predict outcome from a CimpleG signatures on new data — predict.CimpleG","title":"Predict outcome from a CimpleG signatures on new data — predict.CimpleG","text":"Predict outcome CimpleG signatures new data","code":""},{"path":"https://costalab.github.io/CimpleG/reference/predict.CimpleG.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Predict outcome from a CimpleG signatures on new data — predict.CimpleG","text":"","code":"# S3 method for CimpleG predict(object, ..., new_data, class_labels = NULL)"},{"path":"https://costalab.github.io/CimpleG/reference/predict.CimpleG.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Predict outcome from a CimpleG signatures on new data — predict.CimpleG","text":"object CimpleG object. ... used moment. new_data Data predicted, samples rows features columns. Last column `new_data` target/class labels coded 0 1. class_labels Class labels new data provided directly .","code":""},{"path":"https://costalab.github.io/CimpleG/reference/run_deconvolution.html","id":null,"dir":"Reference","previous_headings":"","what":"Perform deconvolution on a new set of samples, based on the CimpleG models trained — run_deconvolution","title":"Perform deconvolution on a new set of samples, based on the CimpleG models trained — run_deconvolution","text":"Perform deconvolution new set samples, based CimpleG models trained","code":""},{"path":"https://costalab.github.io/CimpleG/reference/run_deconvolution.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Perform deconvolution on a new set of samples, based on the CimpleG models trained — run_deconvolution","text":"","code":"run_deconvolution( cpg_obj = NULL, new_data = NULL, ref_mat = NULL, deconvolution_method = c(\"NNLS\", \"EpiDISH\", \"NMF\"), ... )"},{"path":"https://costalab.github.io/CimpleG/reference/run_deconvolution.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Perform deconvolution on a new set of samples, based on the CimpleG models trained — run_deconvolution","text":"cpg_obj CimpleG object. creating/training CimpleG parameter `deconvolution_reference` set `TRUE`. new_data Matrix data.frame samples want perform deconvolution . Samples rows probes/CpGs columns. ref_mat CimpleG object reference matrix, can provide instead. See `make_deconv_ref_matrix` deconvolution_method Deconvolution method used. One #TODO ... Extra parameters used deconvolution_method set `NMF`. relevant parameter probably `method` `beta`.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/save_object.html","id":null,"dir":"Reference","previous_headings":"","what":"Save an R object to disk with fast and efficient compression algorithms. — save_object","title":"Save an R object to disk with fast and efficient compression algorithms. — save_object","text":"Save R object disk fast efficient compression algorithms.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/save_object.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Save an R object to disk with fast and efficient compression algorithms. — save_object","text":"","code":"save_object(object, file_name, file_format = \"zstd\")"},{"path":"https://costalab.github.io/CimpleG/reference/save_object.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Save an R object to disk with fast and efficient compression algorithms. — save_object","text":"object Object saved disk. file_name Name file R object saved . file_format One \"zstd\", \"lz4\", \"gzip\", \"bzip2\",\"xz\", \"nocomp\". zstd best option, fast compression loading times, low space usage. Formats \"zstd\" \"lz4\" available package archive installed.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/select_features.html","id":null,"dir":"Reference","previous_headings":"","what":"Feature selection function used in the diffmeans, sumvariance space — select_features","title":"Feature selection function used in the diffmeans, sumvariance space — select_features","text":"Feature selection function used diffmeans, sumvariance space","code":""},{"path":"https://costalab.github.io/CimpleG/reference/select_features.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Feature selection function used in the diffmeans, sumvariance space — select_features","text":"","code":"select_features(x, y, a)"},{"path":"https://costalab.github.io/CimpleG/reference/select_features.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Feature selection function used in the diffmeans, sumvariance space — select_features","text":"x, difference means value y, sum variances value , parabola parameter, scales open/closed parabola , higher value, closed parabola .","code":""},{"path":"https://costalab.github.io/CimpleG/reference/select_features.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Feature selection function used in the diffmeans, sumvariance space — select_features","text":"bool vector","code":""},{"path":"https://costalab.github.io/CimpleG/reference/signature_plot.html","id":null,"dir":"Reference","previous_headings":"","what":"CpG signature plot — signature_plot","title":"CpG signature plot — signature_plot","text":"CpG signature plot","code":""},{"path":"https://costalab.github.io/CimpleG/reference/signature_plot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"CpG signature plot — signature_plot","text":"","code":"signature_plot( cpg_obj, data, meta_data, sample_id_column, true_label_column, color_dict = NULL, color_others = \"black\", as_panel = TRUE, is_beta = TRUE, base_size = 14, ... )"},{"path":"https://costalab.github.io/CimpleG/reference/signature_plot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"CpG signature plot — signature_plot","text":"cpg_obj CimpleG object, generated CimpleG function. Alternatively names character vector list signatures. data Matrix data.frame samples signatures plot. Samples rows probes/CpGs columns. meta_data Data.frame containing metadata samples `data`. sample_id_column Name column containing sample id meta_data data.frame true_label_column Name column containing true labels samples meta_data data.frame color_dict Named string featuring colors values labels (true labels) names color_others name hex code color non-target samples colored . as_panel boolean, TRUE (default) single figure panel signatures generated. Otherwise, individual plots returned list. is_beta boolean, TRUE (default) values plotted scale suitable Beta values. Otherwise, values plotted scale suitable M values. base_size integer defining base size text plot. Default `14`. ... Parameters passed ggplot2::theme function.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/signature_plot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"CpG signature plot — signature_plot","text":"list data ggplot2 plot object.","code":""},{"path":"https://costalab.github.io/CimpleG/reference/test_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Cell line test data — test_data","title":"Cell line test data — test_data","text":"Cell line test data","code":""},{"path":"https://costalab.github.io/CimpleG/reference/test_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cell line test data — test_data","text":"","code":"test_data"},{"path":"https://costalab.github.io/CimpleG/reference/test_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Cell line test data — test_data","text":"matrix beta values 1000 CpGs. Features/variables columns 170 samples rows","code":""},{"path":"https://costalab.github.io/CimpleG/reference/test_targets.html","id":null,"dir":"Reference","previous_headings":"","what":"Cell line test data targets — test_targets","title":"Cell line test data targets — test_targets","text":"Cell line test data targets","code":""},{"path":"https://costalab.github.io/CimpleG/reference/test_targets.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cell line test data targets — test_targets","text":"","code":"test_targets"},{"path":"https://costalab.github.io/CimpleG/reference/test_targets.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Cell line test data targets — test_targets","text":"data frame 18 variables 170 samples rows. gsm GSM identifier (GEO accession number) sample cell_type cell type respective sample adipocytes one-hot encoded (1 0) column defining given sample adipocyte astrocytes one-hot encoded (1 0) column defining given sample astrocyte blood_cells one-hot encoded (1 0) column defining given sample blood cell endothelial_cells one-hot encoded (1 0) column defining given sample endothelial cell epidermal_cells one-hot encoded (1 0) column defining given sample epidermal cell epithelial_cells one-hot encoded (1 0) column defining given sample epithelial cell fibroblasts one-hot encoded (1 0) column defining given sample fibroblast glia one-hot encoded (1 0) column defining given sample glia cell hepatocytes one-hot encoded (1 0) column defining given sample hepatocyte ips_cells one-hot encoded (1 0) column defining given sample ipsc msc one-hot encoded (1 0) column defining given sample msc muscle_cells one-hot encoded (1 0) column defining given sample muscle cell neurons one-hot encoded (1 0) column defining given sample neuron muscle_sc one-hot encoded (1 0) column defining given sample muscle stem cell group_data dataset data belong (train test) description cell type respective sample, long form","code":""},{"path":"https://costalab.github.io/CimpleG/reference/train_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Cell line train data — train_data","title":"Cell line train data — train_data","text":"Cell line train data","code":""},{"path":"https://costalab.github.io/CimpleG/reference/train_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cell line train data — train_data","text":"","code":"train_data"},{"path":"https://costalab.github.io/CimpleG/reference/train_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Cell line train data — train_data","text":"matrix beta values 1000 CpGs. Features/variables columns 409 samples rows","code":""},{"path":"https://costalab.github.io/CimpleG/reference/train_targets.html","id":null,"dir":"Reference","previous_headings":"","what":"Cell line train data targets — train_targets","title":"Cell line train data targets — train_targets","text":"Cell line train data targets","code":""},{"path":"https://costalab.github.io/CimpleG/reference/train_targets.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cell line train data targets — train_targets","text":"","code":"train_targets"},{"path":"https://costalab.github.io/CimpleG/reference/train_targets.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Cell line train data targets — train_targets","text":"data frame 18 variables 409 samples rows. gsm GSM identifier (GEO accession number) sample cell_type cell type respective sample adipocytes one-hot encoded (1 0) column defining given sample adipocyte astrocytes one-hot encoded (1 0) column defining given sample astrocyte blood_cells one-hot encoded (1 0) column defining given sample blood cell endothelial_cells one-hot encoded (1 0) column defining given sample endothelial cell epidermal_cells one-hot encoded (1 0) column defining given sample epidermal cell epithelial_cells one-hot encoded (1 0) column defining given sample epithelial cell fibroblasts one-hot encoded (1 0) column defining given sample fibroblast glia one-hot encoded (1 0) column defining given sample glia cell hepatocytes one-hot encoded (1 0) column defining given sample hepatocyte ips_cells one-hot encoded (1 0) column defining given sample ipsc msc one-hot encoded (1 0) column defining given sample msc muscle_cells one-hot encoded (1 0) column defining given sample muscle cell neurons one-hot encoded (1 0) column defining given sample neuron muscle_sc one-hot encoded (1 0) column defining given sample muscle stem cell group_data dataset data belong (train test) description cell type respective sample, long form","code":""}]