<p>Recently I have done something similar for my work, I am using <a href="https://www.bioconductor.org/packages/release/bioc/html/sangerseqR.html" rel="nofollow noreferrer">sangerseqR</a> which is s Bioconductor package in Python Environment using <a href="https://rpy2.github.io/doc/latest/html/overview.html" rel="nofollow noreferrer">rpy2</a></p>
<pre><code>    import rpy2.robjects as r
    from rpy2.robjects.packages import importr
    utils = importr('utils')
    utils.install_packages('sangerseqR', repos=&quot;https://git.bioconductor.org/packages/sangerseqR&quot;)
    utils.chooseBioCmirror(ind=1) # select the first mirror in the list
    utils.install_packages('sangerseqR')

    sangerseqR = importr('sangerseqR')

   #now using the sangerseqR package to the read the sequcence
   Trace = sangerseqR.readsangerseq( file=&quot;1I1_F_P1815443_047.scf&quot;)
</code></pre>

CC BY-SA 4.0
2021-08-26T13:44:53.957Z
2021-08-30T10:18:45.940Z
2021-08-30T10:18:45.940Z
alex3465
<p>I had some trouble installing rpy2 because of binary incompatibility issues. To solve this problem, I took the following steps:</p>
<p>First, I wrote the necessary functions in R. Then, I created a straightforward REST-API using <code>library(plumber)</code> and started the server on my local machine. On the Python side, I utilized <code>requests</code> to call the functions and receive responses.</p>
<p>I know that this solution is somewhat ugly, but it has works for me</p>

CC BY-SA 4.0
2023-08-10T08:50:07.313Z
2023-08-10T08:50:07.313Z
Boris Gorelik
<p>Bioconductor packages are R packages that can only be used directly from python via rpy2 or similar. If you've ever had reason to use rpy2 you'd probably realize quickly that while it works, it's no where near as easy as doing the same thing directly in R.</p>

<p>Biopython is a package for doing a number of useful things, but it can in no way come remotely close to performing even a percent of what Bioconductor packages do. That would be an impossible feat for a single python package.</p>

CC BY-SA 4.0
2020-05-10T20:13:53.063Z
Thanks for replying. So is there a way to work around not using R (and use Python instead) while still being able to do what Bioconductor can do? Is there an ecosystem of Python packages along with Biopython that can emulate what can be done with Bioconductor to a certain extent?
An Ignorant Wanderer
CC BY-SA 4.0
2020-05-10T20:15:13.640Z
There is no python equivalent to Bioconductor. If you need to perform a statistical analysis you need to learn R.
Devon Ryan
CC BY-SA 4.0
2020-05-10T19:15:47.220Z
2020-05-10T19:15:47.220Z
Devon Ryan
<p>Has anyone used bioconductor from Python? Is there any reason I would choose to use it from R instead of Python? It seems like there is a <a href="https://pythonhosted.org/rpy2-bioconductor-extensions/" rel="nofollow noreferrer">Python extension</a> for it. Also, is there any reason to use bioconductor over Biopython? </p>

CC BY-SA 4.0
2020-05-10T17:49:36.763Z
don't quite get your question.. is there something you need to use one or the other for? The link you have uses rpy2, basically calling R from inside python.. not so easy for you to pass objects from rpy2 back into python
StupidWolf
<r><python><bioconductor>
Using bioconductor from Python
# Using bioconductor from Python

(Asked by: username_0 on 2020-05-10)

Has anyone used bioconductor from Python? Is there any reason I would choose to use it from R instead of Python? It seems like there is a [Python extension](https://pythonhosted.org/rpy2-bioconductor-extensions/) for it. Also, is there any reason to use bioconductor over Biopython?

**Tags:** r, python, bioconductor
> **Comments:**
> **username_1**: don't quite get your question.. is there something you need to use one or the other for? The link you have uses rpy2, basically calling R from inside python.. not so easy for you to pass objects from rpy2 back into python  

---

## 3 answers

### Answer by username_4 on 2020-05-10. Score: 5 | Accepted answer

Bioconductor packages are R packages that can only be used directly from python via rpy2 or similar. If you've ever had reason to use rpy2 you'd probably realize quickly that while it works, it's no where near as easy as doing the same thing directly in R.

Biopython is a package for doing a number of useful things, but it can in no way come remotely close to performing even a percent of what Bioconductor packages do. That would be an impossible feat for a single python package.

> **Comments:**
> **username_0**: Thanks for replying. So is there a way to work around not using R (and use Python instead) while still being able to do what Bioconductor can do? Is there an ecosystem of Python packages along with Biopython that can emulate what can be done with Bioconductor to a certain extent?  
> **username_4**: There is no python equivalent to Bioconductor. If you need to perform a statistical analysis you need to learn R.  

---

### Answer by username_2 on 2021-08-26. Score: 1

Recently I have done something similar for my work, I am using sangerseqR which is s Bioconductor package in Python Environment using rpy2
    import rpy2.robjects as r
    from rpy2.robjects.packages import importr
    utils = importr('utils')
    utils.install_packages('sangerseqR', repos="https://git.bioconductor.org/packages/sangerseqR")
    utils.chooseBioCmirror(ind=1) # select the first mirror in the list
    utils.install_packages('sangerseqR')

    sangerseqR = importr('sangerseqR')

   #now using the sangerseqR package to the read the sequcence
   Trace = sangerseqR.readsangerseq( file="1I1_F_P1815443_047.scf")


---

### Answer by username_3 on 2023-08-10. Score: 1

I had some trouble installing rpy2 because of binary incompatibility issues. To solve this problem, I took the following steps:

First, I wrote the necessary functions in R. Then, I created a straightforward REST-API using `library(plumber)` and started the server on my local machine. On the Python side, I utilized `requests` to call the functions and receive responses.

I know that this solution is somewhat ugly, but it has works for me


---

