<p>While my suggestion doesn't technically fit your qualifications, I do think it may be useful. I bring this up because you mention you want to continue with your R workflow. I am assuming you don't have anything against Python, but just want to stick with R to keep a tidy project. </p>

<p>The R package <code>reticulate</code> (<a href="https://rstudio.github.io/reticulate/" rel="nofollow noreferrer">homepage</a>) allows for a very easy interface between Python and R. I use it to run the Python package <code>scrublet</code> to remove doublets from scRNA-Seq data before analysis with a popular R package. </p>

<p>Just for reference, here is what using a Python package in R might look like:</p>

<pre><code>## setup
Sys.setenv("RETICULATE_PYTHON"="/n/apps/CentOS7/install/pyenv-1.0.0/pyenv/shims/python3")
use_python("/n/apps/CentOS7/install/pyenv-1.0.0/pyenv/shims/python3", required=TRUE)
reticulate::py_config()
scr &lt;- import(module="scrublet", convert=FALSE)

## usage
E150_scrub &lt;- scr<span class="math-container">$Scrublet(r_to_py(seurat_object@assays$</span>RNA@counts)<span class="math-container">$T$</span>tocsc(), expected_doublet_rate=0.06)
doublet_results &lt;- E150_scrub$scrub_doublets(min_counts=2, min_cells=3, min_gene_variability_pctl=85)
</code></pre>

<p>The Python package function calls look like <code>scr$Scrublet()</code>. There are some very convenient features like easy conversion of numpy tables to dataframes and the like. If you use RMarkdown, you can even display inline plots from <code>matplotlib</code>. I highly recommend giving it a try, it smoothly bridges the gap between the spheres of development of bioinformatic tools.</p>

CC BY-SA 4.0
2019-07-11T00:21:10.543Z
2019-07-11T00:21:10.543Z
Kohl Kinning
<p>Could you please suggest suitable R packages for statistical coupling and direct coupling analysis of protein sequences?<br>
I know there are Python packages for those: <a href="https://reynoldsk.github.io/pySCA" rel="nofollow noreferrer" title="pySCA">SCA</a> and <a href="https://github.com/giopina/pydca" rel="nofollow noreferrer" title="pyDCA">DCA</a>.
I was looking for similar packages in R so that I can continue with my present R workflow.</p>

CC BY-SA 4.0
2019-05-22T06:16:14.860Z
I think R's official blog would be helpful for this
Shreya Pandey
CC BY-SA 4.0
2019-05-22T07:16:25.843Z
Welcome to the site Tamoghna. Could you please explain what are your reference packages in Python? Also, which resources have you looked in? Did you find anything helpful in Bioconductor or similar sites?
llrs
CC BY-SA 4.0
2019-05-22T08:21:53.153Z
SCA: http://reynoldsk.github.io/pySCA/
DCA: https://github.com/giopina/pydca
Gyrtle
CC BY-SA 4.0
2019-05-22T09:58:24.673Z
@TamoghnaDas please [edit] the question to add these references. (someone can overlook them).
llrs
CC BY-SA 4.0
2019-05-22T12:32:04.357Z
Its an interesting question, because as you say this normally the area of Python. The context of the question would be useful, convolution could be an issue
M__
<r><sequence-analysis><sequence-homology>
Protein SCA and DCA
# Protein SCA and DCA

(Asked by: username_0 on 2019-05-22)

Could you please suggest suitable R packages for statistical coupling and direct coupling analysis of protein sequences?  
I know there are Python packages for those: [SCA](https://reynoldsk.github.io/pySCA "pySCA") and [DCA](https://github.com/giopina/pydca "pyDCA").
I was looking for similar packages in R so that I can continue with my present R workflow.

**Tags:** r, sequence-analysis, sequence-homology
> **Comments:**
> **username_1**: I think R's official blog would be helpful for this  
> **username_2**: Welcome to the site Tamoghna. Could you please explain what are your reference packages in Python? Also, which resources have you looked in? Did you find anything helpful in Bioconductor or similar sites?  
> **username_0**: SCA: http://reynoldsk.github.io/pySCA/ DCA: https://github.com/giopina/pydca  
> **username_2**: @TamoghnaDas please [edit] the question to add these references. (someone can overlook them).  
> **username_3**: Its an interesting question, because as you say this normally the area of Python. The context of the question would be useful, convolution could be an issue  

---

## 1 answers

### Answer by username_4 on 2019-07-11. Score: 3

While my suggestion doesn't technically fit your qualifications, I do think it may be useful. I bring this up because you mention you want to continue with your R workflow. I am assuming you don't have anything against Python, but just want to stick with R to keep a tidy project. 
The R package reticulate (homepage) allows for a very easy interface between Python and R. I use it to run the Python package scrublet to remove doublets from scRNA-Seq data before analysis with a popular R package. 
Just for reference, here is what using a Python package in R might look like:
## setup
Sys.setenv("RETICULATE_PYTHON"="/n/apps/CentOS7/install/pyenv-1.0.0/pyenv/shims/python3")
use_python("/n/apps/CentOS7/install/pyenv-1.0.0/pyenv/shims/python3", required=TRUE)
reticulate::py_config()
scr <- import(module="scrublet", convert=FALSE)

## usage
E150_scrub <- scr$Scrublet(r_to_py(seurat_object@assays$RNA@counts)$T$tocsc(), expected_doublet_rate=0.06)
doublet_results <- E150_scrub$scrub_doublets(min_counts=2, min_cells=3, min_gene_variability_pctl=85)

The Python package function calls look like scr$Scrublet(). There are some very convenient features like easy conversion of numpy tables to dataframes and the like. If you use RMarkdown, you can even display inline plots from matplotlib. I highly recommend giving it a try, it smoothly bridges the gap between the spheres of development of bioinformatic tools.


---

