3
$\begingroup$

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 and DCA. I was looking for similar packages in R so that I can continue with my present R workflow.

$\endgroup$
  • $\begingroup$ I think R's official blog would be helpful for this $\endgroup$ – Shreya Pandey May 22 at 6:16
  • $\begingroup$ 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? $\endgroup$ – llrs May 22 at 7:16
  • $\begingroup$ SCA: reynoldsk.github.io/pySCA DCA: github.com/giopina/pydca $\endgroup$ – Tamoghna Das May 22 at 8:21
  • $\begingroup$ @TamoghnaDas please edit the question to add these references. (someone can overlook them). $\endgroup$ – llrs May 22 at 9:58
  • $\begingroup$ 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 $\endgroup$ – Michael G. May 22 at 12:32
2
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.