Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-26T13:44:53.957Z
Answers.LastActivityDate: 2021-08-30T10:18:45.940Z
Answers.LastEditDate: 2021-08-30T10:18:45.940Z
Answers.UserDisplayName: alex3465
Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-08-10T08:50:07.313Z
Answers.LastActivityDate: 2023-08-10T08:50:07.313Z
Answers.UserDisplayName: Boris Gorelik
Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-10T20:13:53.063Z
Answers.Text: 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?
Answers.UserDisplayName: An Ignorant Wanderer
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-10T20:15:13.640Z
Answers.Text: There is no python equivalent to Bioconductor. If you need to perform a statistical analysis you need to learn R.
Answers.UserDisplayName: Devon Ryan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-10T19:15:47.220Z
Answers.LastActivityDate: 2020-05-10T19:15:47.220Z
Answers.UserDisplayName: Devon Ryan
Body: <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>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-05-10T17:49:36.763Z
Comments.Text: 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
Comments.UserDisplayName: StupidWolf
Tags: <r><python><bioconductor>
Title: Using bioconductor from Python
ThreadText: # 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](https://www.bioconductor.org/packages/release/bioc/html/sangerseqR.html) which is s Bioconductor package in Python Environment using [rpy2](https://rpy2.github.io/doc/latest/html/overview.html)
  
  ```
      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
  
  
  ---
  
  