<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>Autarchy of the Private Cave &#187; R</title> <atom:link href="https://bogdan.org.ua/tags/r/feed" rel="self" type="application/rss+xml" /><link>https://bogdan.org.ua</link> <description>Tiny bits of bioinformatics, [web-]programming etc</description> <lastBuildDate>Wed, 28 Dec 2022 16:09:04 +0000</lastBuildDate> <language>en-US</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>https://wordpress.org/?v=3.8.27</generator> <item><title>GUIs for R</title><link>https://bogdan.org.ua/2013/10/17/guis-for-r.html</link> <comments>https://bogdan.org.ua/2013/10/17/guis-for-r.html#comments</comments> <pubDate>Thu, 17 Oct 2013 20:59:01 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[Notepad]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Science]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[cantor]]></category> <category><![CDATA[deducer]]></category> <category><![CDATA[ipython]]></category> <category><![CDATA[notebook]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[R]]></category> <category><![CDATA[rkward]]></category> <category><![CDATA[rstudio]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1870</guid> <description><![CDATA[I&#8217;ve tried [briefly] Cantor (which also supports Octave and KAlgebra as backends), rkward, deducer/JGR, R Commander, and RStudio. My personal choice was RStudio: it is good-looking, intuitive, easy-to-use, while powerful. Next step would be using some R-equivalent of the excellent ipython&#8217;s Mathematica-like Notebook webinterface&#8230;]]></description> <content:encoded><![CDATA[<p>I&#8217;ve tried [briefly] Cantor (which also supports Octave and KAlgebra as backends), rkward, deducer/JGR, R Commander, and RStudio.</p><p>My personal choice was RStudio: it is good-looking, intuitive, easy-to-use, while powerful.</p><p>Next step would be using some R-equivalent of the excellent ipython&#8217;s Mathematica-like Notebook webinterface&#8230;</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F10%2F17%2Fguis-for-r.html&amp;linkname=GUIs%20for%20R" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F10%2F17%2Fguis-for-r.html&amp;linkname=GUIs%20for%20R" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F10%2F17%2Fguis-for-r.html&amp;linkname=GUIs%20for%20R" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F10%2F17%2Fguis-for-r.html&amp;linkname=GUIs%20for%20R" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2013%2F10%2F17%2Fguis-for-r.html&amp;linkname=GUIs%20for%20R" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2013%2F10%2F17%2Fguis-for-r.html&#038;title=GUIs%20for%20R" data-a2a-url="https://bogdan.org.ua/2013/10/17/guis-for-r.html" data-a2a-title="GUIs for R"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2013/10/17/guis-for-r.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>R functions for regression analysis cheat sheet</title><link>https://bogdan.org.ua/2012/05/29/r-functions-for-regression-analysis-cheat-sheet.html</link> <comments>https://bogdan.org.ua/2012/05/29/r-functions-for-regression-analysis-cheat-sheet.html#comments</comments> <pubDate>Tue, 29 May 2012 13:11:48 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[Bioinformatics]]></category> <category><![CDATA[Links]]></category> <category><![CDATA[Misc]]></category> <category><![CDATA[R]]></category> <category><![CDATA[statistics]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1838</guid> <description><![CDATA[Original PDF. My local copy.]]></description> <content:encoded><![CDATA[<p>Original <a
href="http://cran.r-project.org/doc/contrib/Ricci-refcard-regression.pdf">PDF</a>.<br
/> My local <a
href='/wp-content/uploads/2012/05/Ricci-refcard-regression.pdf'>copy</a>.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2012%2F05%2F29%2Fr-functions-for-regression-analysis-cheat-sheet.html&amp;linkname=R%20functions%20for%20regression%20analysis%20cheat%20sheet" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2012%2F05%2F29%2Fr-functions-for-regression-analysis-cheat-sheet.html&amp;linkname=R%20functions%20for%20regression%20analysis%20cheat%20sheet" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2012%2F05%2F29%2Fr-functions-for-regression-analysis-cheat-sheet.html&amp;linkname=R%20functions%20for%20regression%20analysis%20cheat%20sheet" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2012%2F05%2F29%2Fr-functions-for-regression-analysis-cheat-sheet.html&amp;linkname=R%20functions%20for%20regression%20analysis%20cheat%20sheet" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2012%2F05%2F29%2Fr-functions-for-regression-analysis-cheat-sheet.html&amp;linkname=R%20functions%20for%20regression%20analysis%20cheat%20sheet" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2012%2F05%2F29%2Fr-functions-for-regression-analysis-cheat-sheet.html&#038;title=R%20functions%20for%20regression%20analysis%20cheat%20sheet" data-a2a-url="https://bogdan.org.ua/2012/05/29/r-functions-for-regression-analysis-cheat-sheet.html" data-a2a-title="R functions for regression analysis cheat sheet"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2012/05/29/r-functions-for-regression-analysis-cheat-sheet.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Information criteria for choosing best predictive models</title><link>https://bogdan.org.ua/2012/05/29/information-criteria-for-choosing-best-predictive-models.html</link> <comments>https://bogdan.org.ua/2012/05/29/information-criteria-for-choosing-best-predictive-models.html#comments</comments> <pubDate>Tue, 29 May 2012 11:44:50 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[Bioinformatics]]></category> <category><![CDATA[Machine learning]]></category> <category><![CDATA[AIC]]></category> <category><![CDATA[BIC]]></category> <category><![CDATA[cross-validation]]></category> <category><![CDATA[information criterion]]></category> <category><![CDATA[R]]></category> <category><![CDATA[statistics]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1831</guid> <description><![CDATA[Usually I&#8217;m using 10-fold (non-stratified) CV to measure the predictive power of the models: it gives consistent results, and is easy to perform (at least on smaller datasets). Just came across the Akaikeâ€™s InforÂ­maÂ­tion Criterion (AIC) and Schwarz Bayesian InforÂ­maÂ­tion Criterion (BIC). Citing robjhyndman, AsympÂ­totÂ­iÂ­cally, minÂ­iÂ­mizÂ­ing the AIC is equivÂ­aÂ­lent to minÂ­iÂ­mizÂ­ing the CV value. [&#8230;]]]></description> <content:encoded><![CDATA[<p>Usually I&#8217;m using 10-fold (non-stratified) <abbr
title="cross-validation">CV</abbr> to measure the predictive power of the models: it gives consistent results, and is easy to perform (at least on smaller datasets).</p><p>Just came across the Akaikeâ€™s InforÂ­maÂ­tion Criterion (AIC) and Schwarz Bayesian InforÂ­maÂ­tion Criterion (BIC). Citing <a
href="http://robjhyndman.com/researchtips/crossvalidation/">robjhyndman</a>,</p><blockquote><p> AsympÂ­totÂ­iÂ­cally, minÂ­iÂ­mizÂ­ing the AIC is equivÂ­aÂ­lent to minÂ­iÂ­mizÂ­ing the CV value. This is true for any model (<a
href="http://www.jstor.org/stable/2984877" class="vt-p broken_link" rel="nofollow">Stone 1977</a>), not just linÂ­ear modÂ­els. It is this propÂ­erty that makes the AIC so useÂ­ful in model selecÂ­tion when the purÂ­pose is prediction.<br
/> &#8230;<br
/> Because of the heavÂ­ier penalty, the model choÂ­sen by BIC is either the same as that choÂ­sen by AIC, or one with fewer terms. AsympÂ­totÂ­iÂ­cally, for linÂ­ear modÂ­els minÂ­iÂ­mizÂ­ing BIC is equivÂ­aÂ­lent to leaveâ€“vâ€“out cross-â€‹â€‹validation when v = n[1-1/(log(n)-1)] (<a
href="http://www3.stat.sinica.edu.tw/statistica/oldpdf/A7n21.pdf" class="vt-p">Shao 1997</a>).</p></blockquote><p>Want to try AIC and maybe BIC on my models. Conveniently, both functions exist in R.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2012%2F05%2F29%2Finformation-criteria-for-choosing-best-predictive-models.html&amp;linkname=Information%20criteria%20for%20choosing%20best%20predictive%20models" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2012%2F05%2F29%2Finformation-criteria-for-choosing-best-predictive-models.html&amp;linkname=Information%20criteria%20for%20choosing%20best%20predictive%20models" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2012%2F05%2F29%2Finformation-criteria-for-choosing-best-predictive-models.html&amp;linkname=Information%20criteria%20for%20choosing%20best%20predictive%20models" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2012%2F05%2F29%2Finformation-criteria-for-choosing-best-predictive-models.html&amp;linkname=Information%20criteria%20for%20choosing%20best%20predictive%20models" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2012%2F05%2F29%2Finformation-criteria-for-choosing-best-predictive-models.html&amp;linkname=Information%20criteria%20for%20choosing%20best%20predictive%20models" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2012%2F05%2F29%2Finformation-criteria-for-choosing-best-predictive-models.html&#038;title=Information%20criteria%20for%20choosing%20best%20predictive%20models" data-a2a-url="https://bogdan.org.ua/2012/05/29/information-criteria-for-choosing-best-predictive-models.html" data-a2a-title="Information criteria for choosing best predictive models"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2012/05/29/information-criteria-for-choosing-best-predictive-models.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Batch-retrieve EntrezGene homologs using NCBI&#8217;s HomoloGene and R&#8217;s annotationTools</title><link>https://bogdan.org.ua/2010/10/27/batch-retrieve-entrezgene-homologs-using-ncbi-homologene-and-r.html</link> <comments>https://bogdan.org.ua/2010/10/27/batch-retrieve-entrezgene-homologs-using-ncbi-homologene-and-r.html#comments</comments> <pubDate>Wed, 27 Oct 2010 10:49:01 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[Bioinformatics]]></category> <category><![CDATA[how-to]]></category> <category><![CDATA[Notepad]]></category> <category><![CDATA[annotationTools]]></category> <category><![CDATA[HomoloGene]]></category> <category><![CDATA[NCBI]]></category> <category><![CDATA[R]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1168</guid> <description><![CDATA[Install the annotationTools R package: source(&#8220;http://bioconductor.org/biocLite.R&#8221;) biocLite(&#8220;annotationTools&#8221;) Download full HomoloGene data file from ftp://ftp.ncbi.nlm.nih.gov/pub/HomoloGene/current library(annotationTools) homologene = read.delim(&#8220;homologene.data&#8221;, header=FALSE) mygenes = read.table(&#8220;file with one entrez ID of the source organism per line.txt&#8221;) getHOMOLOG(unlist(mygenes), taxonomy_ID_of_target_organism, homologene) [alternatively, wrap the call to getHOMOLOG into unlist to get a vector] It might be easier to achieve the same [&#8230;]]]></description> <content:encoded><![CDATA[<ol><li>Install the <a
href="http://bioconductor.org/packages/release/bioc/html/annotationTools.html">annotationTools</a> R package:<br
/> source(&#8220;http://bioconductor.org/biocLite.R&#8221;)<br
/> biocLite(&#8220;annotationTools&#8221;)</li><li>Download full HomoloGene data file from <a
href="ftp://ftp.ncbi.nlm.nih.gov/pub/HomoloGene/current">ftp://ftp.ncbi.nlm.nih.gov/pub/HomoloGene/current</a></li><li>library(annotationTools)</li><li>homologene = read.delim(&#8220;homologene.data&#8221;, header=FALSE)</li><li>mygenes = read.table(&#8220;file with one entrez ID of the source organism per line.txt&#8221;)</li><li>getHOMOLOG(unlist(mygenes), <a
href="http://www.ncbi.nlm.nih.gov/taxonomy">taxonomy_ID_of_target_organism</a>, homologene) [alternatively, wrap the call to getHOMOLOG into unlist to get a vector]</li></ol><p>It might be easier to achieve the same results with a Perl script calling NCBI&#8217;s e-utils.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F10%2F27%2Fbatch-retrieve-entrezgene-homologs-using-ncbi-homologene-and-r.html&amp;linkname=Batch-retrieve%20EntrezGene%20homologs%20using%20NCBI%E2%80%99s%20HomoloGene%20and%20R%E2%80%99s%20annotationTools" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F10%2F27%2Fbatch-retrieve-entrezgene-homologs-using-ncbi-homologene-and-r.html&amp;linkname=Batch-retrieve%20EntrezGene%20homologs%20using%20NCBI%E2%80%99s%20HomoloGene%20and%20R%E2%80%99s%20annotationTools" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F10%2F27%2Fbatch-retrieve-entrezgene-homologs-using-ncbi-homologene-and-r.html&amp;linkname=Batch-retrieve%20EntrezGene%20homologs%20using%20NCBI%E2%80%99s%20HomoloGene%20and%20R%E2%80%99s%20annotationTools" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F10%2F27%2Fbatch-retrieve-entrezgene-homologs-using-ncbi-homologene-and-r.html&amp;linkname=Batch-retrieve%20EntrezGene%20homologs%20using%20NCBI%E2%80%99s%20HomoloGene%20and%20R%E2%80%99s%20annotationTools" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F10%2F27%2Fbatch-retrieve-entrezgene-homologs-using-ncbi-homologene-and-r.html&amp;linkname=Batch-retrieve%20EntrezGene%20homologs%20using%20NCBI%E2%80%99s%20HomoloGene%20and%20R%E2%80%99s%20annotationTools" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2010%2F10%2F27%2Fbatch-retrieve-entrezgene-homologs-using-ncbi-homologene-and-r.html&#038;title=Batch-retrieve%20EntrezGene%20homologs%20using%20NCBI%E2%80%99s%20HomoloGene%20and%20R%E2%80%99s%20annotationTools" data-a2a-url="https://bogdan.org.ua/2010/10/27/batch-retrieve-entrezgene-homologs-using-ncbi-homologene-and-r.html" data-a2a-title="Batch-retrieve EntrezGene homologs using NCBI’s HomoloGene and R’s annotationTools"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2010/10/27/batch-retrieve-entrezgene-homologs-using-ncbi-homologene-and-r.html/feed</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>R tutorial links</title><link>https://bogdan.org.ua/2010/03/29/r-tutorial-links.html</link> <comments>https://bogdan.org.ua/2010/03/29/r-tutorial-links.html#comments</comments> <pubDate>Mon, 29 Mar 2010 16:17:31 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[Bioinformatics]]></category> <category><![CDATA[Links]]></category> <category><![CDATA[Science]]></category> <category><![CDATA[Systems Biology]]></category> <category><![CDATA[R]]></category> <category><![CDATA[statistics]]></category> <category><![CDATA[tutorial]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=1015</guid> <description><![CDATA[R time series tutorial (2010, a website of the &#8220;Time Series Analysis and Its Applications: With R Examples&#8221; book) Statistics with R (2007) R for programmers PDF (2008, 104 pages, linked to from here) Brief R tutorial (2004) Statistical computing with R: a tutorial (2004) An introduction to R (from the official r-project website, should [&#8230;]]]></description> <content:encoded><![CDATA[<ul><li><a
href="http://www.stat.pitt.edu/stoffer/tsa2/R_time_series_quick_fix.htm">R time series tutorial</a> (2010, a website of the &#8220;Time Series Analysis and Its Applications: With R Examples&#8221; book)</li><li><a
href="http://zoonek2.free.fr/UNIX/48_R/all.html">Statistics with R</a> (2007)</li><li><a
href="http://heather.cs.ucdavis.edu/~matloff/R/RProg.pdf">R for programmers</a> PDF (2008, 104 pages, linked to from <a
href="http://heather.cs.ucdavis.edu/~matloff/r.html">here</a>)</li><li><a
href="http://mercury.bio.uaf.edu/mercury/R/R.html" class="broken_link" rel="nofollow">Brief R tutorial</a> (2004)</li><li><a
href="http://math.illinoisstate.edu/dhkim/rstuff/rtutor.html" class="broken_link" rel="nofollow">Statistical computing with R: a tutorial</a> (2004)</li><li><a
href="http://cran.r-project.org/doc/manuals/R-intro.html">An introduction to R</a> (from the official r-project website, should be always up-to-date)</li><li><a
href="http://www.cyclismo.org/tutorial/R/">R tutorial</a> (date unknown, definitely newer than 2005)</li></ul><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F03%2F29%2Fr-tutorial-links.html&amp;linkname=R%20tutorial%20links" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F03%2F29%2Fr-tutorial-links.html&amp;linkname=R%20tutorial%20links" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F03%2F29%2Fr-tutorial-links.html&amp;linkname=R%20tutorial%20links" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F03%2F29%2Fr-tutorial-links.html&amp;linkname=R%20tutorial%20links" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F03%2F29%2Fr-tutorial-links.html&amp;linkname=R%20tutorial%20links" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2010%2F03%2F29%2Fr-tutorial-links.html&#038;title=R%20tutorial%20links" data-a2a-url="https://bogdan.org.ua/2010/03/29/r-tutorial-links.html" data-a2a-title="R tutorial links"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2010/03/29/r-tutorial-links.html/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>R script to filter probesets with log-expression values below the lowest spike-in</title><link>https://bogdan.org.ua/2010/01/27/r-script-to-filter-probesets-with-log-expression-values-below-the-lowest-spike-in.html</link> <comments>https://bogdan.org.ua/2010/01/27/r-script-to-filter-probesets-with-log-expression-values-below-the-lowest-spike-in.html#comments</comments> <pubDate>Wed, 27 Jan 2010 12:44:02 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[Bioinformatics]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Science]]></category> <category><![CDATA[Affymetrix]]></category> <category><![CDATA[filter]]></category> <category><![CDATA[log-expression]]></category> <category><![CDATA[microarray]]></category> <category><![CDATA[probeset]]></category> <category><![CDATA[R]]></category> <category><![CDATA[spike-in]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=985</guid> <description><![CDATA[Sometimes there is a need to remove all the probesets, which have expression values below the minimal spike-in intensity on the Affymetrix microarray. The reasoning behind this procedure is simple: minimal-expression spike-ins represent the bottom margin of microarray sensitivity, and anything below that margin cannot be reliably quantified &#8211; which also means that both fold-change [&#8230;]]]></description> <content:encoded><![CDATA[<p>Sometimes there is a need to remove all the probesets, which have expression values below the minimal spike-in intensity on the <a
href="http://www.affymetrix.com/">Affymetrix</a> microarray. The reasoning behind this procedure is simple: minimal-expression spike-ins represent the bottom margin of microarray sensitivity, and anything below that margin cannot be reliably quantified &#8211; which also means that both fold-change and p-value of expression variance will be unreliable for these probesets.</p><p>Here&#8217;s a simple <a
href="http://www.r-project.org/">R</a> script to do just that. It is abundantly commented, and also contains an optional (commented out) fragment which allows the removal of more low-variance, low-intensity probesets.</p><p><span
id="more-985"></span><br
/> <em>Hint: click the &#8220;plain text&#8221; box header to be able to right-click the code, &#8220;Select All&#8221;, and then &#8220;Copy&#8221;.</em><br
/> [CODE]<br
/> filter_below_spikes = function(eset) {<br
/> # Finds max(lowest) AFFX/spike-in intensity, and removes rows consisting entirely of values below max(lowest).<br
/> # @param eset<br
/> # ExpressionSet<br
/> # @returns<br
/> # exprs(ExpressionSet), filtered</p><p> # Without Biobase exprs() will not work.<br
/> require(Biobase)<br
/> expr = exprs(eset)</p><p> # &#8216;expr&#8217; sample:<br
/> #                  1<br
/> # 1367452_at 10.880208<br
/> # 1367453_at 10.554647</p><p> cat(nrow(expr), &#8220;rows before filtering.\n&#8221;)</p><p> # Make a vector of spike row names.<br
/> spikes = grep(&#8220;AFFX&#8221;, rownames(expr), value = TRUE)<br
/> cat(&#8220;Expression matrix has&#8221;, length(spikes), &#8220;spike-in rows.\n&#8221;)<br
/> cat(&#8220;Summary of spike-in values distribution follows:\n&#8221;)<br
/> print(summary(expr[spikes, ]))</p><p> # Find max(lowest) spike-in values.<br
/> minval_max = max(as.double(substr(grep(&#8220;Min&#8221;, summary(expr[spikes, ]), value = TRUE), 10, 14)))<br
/> cat(&#8220;max(minimal spike-in log-intensity values) =&#8221;, minval_max, &#8220;\n&#8221;)</p><p> # Remove spike-ins from expr.<br
/> expr = expr[grep("AFFX", rownames(expr), value = TRUE, invert = TRUE), ]</p><p> nospike_rows = nrow(expr)<br
/> cat(nospike_rows, &#8220;rows remaining after the removal of&#8221;, length(spikes), &#8220;spike-in probesets.\n&#8221;)</p><p> # Optional: calculate max(SD) of all removed rows.<br
/> #bad_sds_max = max(apply(expr[!apply((expr > minval_max), 1, any),], 1, sd))</p><p> # Now remove all rows, where each value is <= minval_max.
expr = expr[!apply((expr <= minval_max), 1, all), ]
cat(nrow(expr), "rows remaining after filtering out", nospike_rows - nrow(expr), "probesets with all values below", minval_max, "\n")
#cat(bad_sds_max, "is max(SD) of all", nospike_rows - nrow(expr), "filtered probesets with all values below", minval_max, "\n")
# Optional: Remove *some* of the rows, which have at least one value below minval_max, and row_SD <= bad_sds_max.
#pre_final_rows = nrow(expr)
#expr = expr[(apply(expr, 1, sd) > bad_sds_max) | (apply(expr, 1, min) > minval_max), ]<br
/> #cat(pre_final_rows-nrow(expr), &#8220;rows with SD <=", bad_sds_max, "and min(row) <=", minval_max, "were removed.\n")
#cat(nrow(expr), "final rows returned.\n")
return(expr)
}
[/CODE]
Sample use:<blockquote> > source(&#8220;script.R&#8221;)<br
/> > expr.filtered = filter_below_spikes(eset)</p></blockquote><p>Comments and suggestions are welcome.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F01%2F27%2Fr-script-to-filter-probesets-with-log-expression-values-below-the-lowest-spike-in.html&amp;linkname=R%20script%20to%20filter%20probesets%20with%20log-expression%20values%20below%20the%20lowest%20spike-in" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F01%2F27%2Fr-script-to-filter-probesets-with-log-expression-values-below-the-lowest-spike-in.html&amp;linkname=R%20script%20to%20filter%20probesets%20with%20log-expression%20values%20below%20the%20lowest%20spike-in" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F01%2F27%2Fr-script-to-filter-probesets-with-log-expression-values-below-the-lowest-spike-in.html&amp;linkname=R%20script%20to%20filter%20probesets%20with%20log-expression%20values%20below%20the%20lowest%20spike-in" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F01%2F27%2Fr-script-to-filter-probesets-with-log-expression-values-below-the-lowest-spike-in.html&amp;linkname=R%20script%20to%20filter%20probesets%20with%20log-expression%20values%20below%20the%20lowest%20spike-in" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2010%2F01%2F27%2Fr-script-to-filter-probesets-with-log-expression-values-below-the-lowest-spike-in.html&amp;linkname=R%20script%20to%20filter%20probesets%20with%20log-expression%20values%20below%20the%20lowest%20spike-in" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2010%2F01%2F27%2Fr-script-to-filter-probesets-with-log-expression-values-below-the-lowest-spike-in.html&#038;title=R%20script%20to%20filter%20probesets%20with%20log-expression%20values%20below%20the%20lowest%20spike-in" data-a2a-url="https://bogdan.org.ua/2010/01/27/r-script-to-filter-probesets-with-log-expression-values-below-the-lowest-spike-in.html" data-a2a-title="R script to filter probesets with log-expression values below the lowest spike-in"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2010/01/27/r-script-to-filter-probesets-with-log-expression-values-below-the-lowest-spike-in.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>R under Debian testing/i386: permanently set pdfviewer option</title><link>https://bogdan.org.ua/2009/10/21/r-under-debian-testingi386-permanently-set-pdfviewer-option.html</link> <comments>https://bogdan.org.ua/2009/10/21/r-under-debian-testingi386-permanently-set-pdfviewer-option.html#comments</comments> <pubDate>Wed, 21 Oct 2009 14:06:37 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[how-to]]></category> <category><![CDATA[Notepad]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[pdfviewer]]></category> <category><![CDATA[R]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=909</guid> <description><![CDATA[If you get this message when opening vignettes: Error in openPDF(vif) : getOption(&#8216;pdfviewer&#8217;) is &#8221;; please use &#8216;options(pdfviewer=&#8230;)&#8217; and you are tired of running this command every time: > options(pdfviewer=&#8221;okular&#8221;) then you should check if your system-wide Renviron file has proper PDF viewer set: grep -i pdf /etc/R/Renviron R_PDFLATEXCMD=${R_PDFLATEXCMD-${PDFLATEX-&#8217;/usr/bin/pdflatex&#8217;}} R_RD4PDF=${R_RD4PDF-&#8217;times,hyper&#8217;} ## Default PDF viewer R_PDFVIEWER=${R_PDFVIEWER-&#8221;} [&#8230;]]]></description> <content:encoded><![CDATA[<p>If you get this message when opening vignettes:</p><blockquote><p>Error in openPDF(vif) :<br
/> getOption(&#8216;pdfviewer&#8217;) is &#8221;; please use &#8216;options(pdfviewer=&#8230;)&#8217;</p></blockquote><p>and you are tired of running this command every time:</p><blockquote><p>> options(pdfviewer=&#8221;okular&#8221;)</p></blockquote><p>then you should check if your system-wide <strong>Renviron</strong> file has proper PDF viewer set:<br
/> <span
id="more-909"></span><br
/> <strong>grep -i pdf /etc/R/Renviron</strong></p><blockquote><p>R_PDFLATEXCMD=${R_PDFLATEXCMD-${PDFLATEX-&#8217;/usr/bin/pdflatex&#8217;}}<br
/> R_RD4PDF=${R_RD4PDF-&#8217;times,hyper&#8217;}<br
/> ## Default PDF viewer<br
/> R_PDFVIEWER=${R_PDFVIEWER-&#8221;}</p></blockquote><p>It wasn&#8217;t in my case.</p><p>To set one, either edit the system-wide Renviron (e.g. by editing the <strong>R_PDFVIEWER=${R_PDFVIEWER-&#8221;}</strong> line to look like <strong>R_PDFVIEWER=${R_PDFVIEWER-&#8217;/usr/bin/xdg-open&#8217;}</strong> &#8211; this will use MIME types to open your preferred PDF viewer), or one of the per-user/per-directory Renviron files to fix this minor annoyance (format is the same, e.g. R_PDFVIEWER=okular ).</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F10%2F21%2Fr-under-debian-testingi386-permanently-set-pdfviewer-option.html&amp;linkname=R%20under%20Debian%20testing%2Fi386%3A%20permanently%20set%20pdfviewer%20option" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F10%2F21%2Fr-under-debian-testingi386-permanently-set-pdfviewer-option.html&amp;linkname=R%20under%20Debian%20testing%2Fi386%3A%20permanently%20set%20pdfviewer%20option" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F10%2F21%2Fr-under-debian-testingi386-permanently-set-pdfviewer-option.html&amp;linkname=R%20under%20Debian%20testing%2Fi386%3A%20permanently%20set%20pdfviewer%20option" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F10%2F21%2Fr-under-debian-testingi386-permanently-set-pdfviewer-option.html&amp;linkname=R%20under%20Debian%20testing%2Fi386%3A%20permanently%20set%20pdfviewer%20option" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F10%2F21%2Fr-under-debian-testingi386-permanently-set-pdfviewer-option.html&amp;linkname=R%20under%20Debian%20testing%2Fi386%3A%20permanently%20set%20pdfviewer%20option" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2009%2F10%2F21%2Fr-under-debian-testingi386-permanently-set-pdfviewer-option.html&#038;title=R%20under%20Debian%20testing%2Fi386%3A%20permanently%20set%20pdfviewer%20option" data-a2a-url="https://bogdan.org.ua/2009/10/21/r-under-debian-testingi386-permanently-set-pdfviewer-option.html" data-a2a-title="R under Debian testing/i386: permanently set pdfviewer option"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2009/10/21/r-under-debian-testingi386-permanently-set-pdfviewer-option.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>How to create custom Affymetrix CDF file</title><link>https://bogdan.org.ua/2009/03/23/how-to-create-custom-affymetrix-cdf-file.html</link> <comments>https://bogdan.org.ua/2009/03/23/how-to-create-custom-affymetrix-cdf-file.html#comments</comments> <pubDate>Mon, 23 Mar 2009 12:01:41 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[how-to]]></category> <category><![CDATA[Links]]></category> <category><![CDATA[Science]]></category> <category><![CDATA[affy]]></category> <category><![CDATA[Affymetrix]]></category> <category><![CDATA[annotation]]></category> <category><![CDATA[CDF]]></category> <category><![CDATA[R]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=631</guid> <description><![CDATA[First, learn about custom CDFs and why they are needed. The aroma.affymetrix R package google group has a how-to: create a CDF annotation file from scratch. Also useful: how to convert CDF into an R package, which has all CDF data available (as a PDF with more details).]]></description> <content:encoded><![CDATA[<p>First, learn about <a
href="http://brainarray.mbni.med.umich.edu/Brainarray/Database/CustomCDF/cdfreadme.htm#Reasons_for_generating_custom_CDF_files_for_Affymetrix_GeneChips_">custom <abbr
title="Chip Description File">CDF</abbr>s</a> and why they are needed.</p><p>The <a
href="http://groups.google.com/group/aroma-affymetrix">aroma.affymetrix R package</a> google group has a <a
href="http://aroma-project.org/node/40" class="broken_link" rel="nofollow">how-to: create a CDF annotation file from scratch</a>.</p><p>Also useful: <a
href="http://rss.acs.unt.edu/Rdoc/library/makecdfenv/html/make.cdf.package.html" class="broken_link" rel="nofollow">how to convert CDF into an R package</a>, which has all CDF data available (as a PDF with <a
href="http://www.bioconductor.org/packages/2.3/bioc/vignettes/makecdfenv/inst/doc/makecdfenv.pdf">more details</a>).</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F03%2F23%2Fhow-to-create-custom-affymetrix-cdf-file.html&amp;linkname=How%20to%20create%20custom%20Affymetrix%20CDF%20file" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F03%2F23%2Fhow-to-create-custom-affymetrix-cdf-file.html&amp;linkname=How%20to%20create%20custom%20Affymetrix%20CDF%20file" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F03%2F23%2Fhow-to-create-custom-affymetrix-cdf-file.html&amp;linkname=How%20to%20create%20custom%20Affymetrix%20CDF%20file" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F03%2F23%2Fhow-to-create-custom-affymetrix-cdf-file.html&amp;linkname=How%20to%20create%20custom%20Affymetrix%20CDF%20file" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2009%2F03%2F23%2Fhow-to-create-custom-affymetrix-cdf-file.html&amp;linkname=How%20to%20create%20custom%20Affymetrix%20CDF%20file" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2009%2F03%2F23%2Fhow-to-create-custom-affymetrix-cdf-file.html&#038;title=How%20to%20create%20custom%20Affymetrix%20CDF%20file" data-a2a-url="https://bogdan.org.ua/2009/03/23/how-to-create-custom-affymetrix-cdf-file.html" data-a2a-title="How to create custom Affymetrix CDF file"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2009/03/23/how-to-create-custom-affymetrix-cdf-file.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>