<p>It was done using <a href="https://www.bioconductor.org/packages/release/bioc/html/sangerseqR.html" rel="nofollow noreferrer">sangerseqR</a> with <a href="https://rpy2.github.io/doc/latest/html/overview.html#" rel="nofollow noreferrer">rpy2</a> in python</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')
    Trace = sangerseqR.readsangerseq( file=&quot;1I1_F_P1815443_047.scf&quot;) #scf sequence file is now loaded
</code></pre>
<p><a href="https://www.bioconductor.org/packages/release/bioc/vignettes/sangerseqR/inst/doc/sangerseq_walkthrough.pdf" rel="nofollow noreferrer">sangerseqR Documentation</a>(pdf)</p>

CC BY-SA 4.0
2021-08-26T13:34:56.010Z
2021-08-26T13:34:56.010Z
alex3465
<p>Is there any way that I can read <a href="http://staden.sourceforge.net/manual/formats_unix_2.html" rel="nofollow noreferrer">SCF</a> file in python like in R using <a href="https://rdrr.io/bioc/sangerseqR/man/read.scf.html" rel="nofollow noreferrer">sangerseqR</a>, I have tried with <a href="https://biopython.org/wiki/SeqIO" rel="nofollow noreferrer">Biopython</a>, it seems it does not support this format.</p>

CC BY-SA 4.0
2021-08-25T04:56:26.830Z
You could try converting it to ABI format as asked in [this question](https://bioinformatics.stackexchange.com/questions/692/how-can-i-convert-scf-trace-files-to-abi-files) and then import that
Jan Wilamowski
CC BY-SA 4.0
2021-08-25T05:00:27.337Z
Alternatively, [bioconvert](https://bioconvert.readthedocs.io/en/master/ref_converters.html) supports conversion of SCF to FASTA and FASTQ formats.
Jan Wilamowski
CC BY-SA 4.0
2021-08-25T11:22:33.767Z
Conversion to SCF to FASTA and FASTQ formats will not help me since I need the chromatography data not just the seq
alex3465
<python><ngs><sequence-analysis><data-preprocessing>
How to Read SCF file in Python?
# How to Read SCF file in Python?

(Asked by: username_0 on 2021-08-24)

Is there any way that I can read [SCF](http://staden.sourceforge.net/manual/formats_unix_2.html) file in python like in R using [sangerseqR](https://rdrr.io/bioc/sangerseqR/man/read.scf.html), I have tried with [Biopython](https://biopython.org/wiki/SeqIO), it seems it does not support this format.

**Tags:** python, ngs, sequence-analysis, data-preprocessing
> **Comments:**
> **username_1**: You could try converting it to ABI format as asked in [this question](https://bioinformatics.stackexchange.com/questions/692/how-can-i-convert-scf-trace-files-to-abi-files) and then import that  
> **username_1**: Alternatively, [bioconvert](https://bioconvert.readthedocs.io/en/master/ref_converters.html) supports conversion of SCF to FASTA and FASTQ formats.  
> **username_0**: Conversion to SCF to FASTA and FASTQ formats will not help me since I need the chromatography data not just the seq  

---

## 1 answers

### Answer by username_0 on 2021-08-26. Score: 1 | Accepted answer

It was done using sangerseqR with rpy2 in python
    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')
    Trace = sangerseqR.readsangerseq( file="1I1_F_P1815443_047.scf") #scf sequence file is now loaded

sangerseqR Documentation(pdf)


---

