<p>If you want to do this with biopython, the <a href="https://biopython.org/docs/1.75/api/Bio.SeqUtils.html" rel="nofollow noreferrer">SeqUtils</a> package could be a solution.</p>

CC BY-SA 4.0
2020-10-25T12:02:50.460Z
2020-10-25T12:02:50.460Z
Mr_Z
<p>I am looking for tools to extract features from short DNA sequences. For example, entropy, complexity, GC-content, etc.</p>
<p>I have found the <a href="https://github.com/mrzResearchArena/PyFeat/blob/master/Codes/generateFeatures.py" rel="nofollow noreferrer">generateFeatures.py</a> script from the <a href="https://github.com/mrzResearchArena/PyFeat/" rel="nofollow noreferrer">PyFeat</a> repo, but is there love a more widely used source code or a standard way to extract features from sequences biopython or similar?</p>
<p>Also, I think that since there are <span class="math-container">$2N$</span> encoded bits in a sequence of <span class="math-container">$N$</span> nucleotides, we have <strong>at most</strong> <span class="math-container">$2N$</span> independent features that could be extracted.</p>
<hr />
<p>In addition, I am curios if there are any <a href="https://huggingface.co/transformers/" rel="nofollow noreferrer">transformers</a> models for DNA sequences.</p>
<hr />
<p><em><strong>Edit</strong></em>:
In addition, you can use <a href="https://github.com/crispr-il/DeepHF/blob/d05444e6fa209e734dabc8defc853585afdffe5b/DeepHF/scripts/feature_util.py" rel="nofollow noreferrer">DeepHF's feature utils</a>, which can be accessed and consumed as seen <a href="https://github.com/crispr-il/DeepHF/blob/d05444e6fa209e734dabc8defc853585afdffe5b/DeepHF/scripts/preprocess.py#L133" rel="nofollow noreferrer">here</a>.</p>

CC BY-SA 4.0
2020-10-23T14:13:07.457Z
Great question! +1
M__
<python><phylogenetics><features>
Are there computational tools to extract features of DNA sequences?
# Are there computational tools to extract features of DNA sequences?

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

I am looking for tools to extract features from short DNA sequences. For example, entropy, complexity, GC-content, etc.

I have found the [generateFeatures.py](https://github.com/mrzResearchArena/PyFeat/blob/master/Codes/generateFeatures.py) script from the [PyFeat](https://github.com/mrzResearchArena/PyFeat/) repo, but is there love a more widely used source code or a standard way to extract features from sequences biopython or similar?

Also, I think that since there are $2N$ encoded bits in a sequence of $N$ nucleotides, we have **at most** $2N$ independent features that could be extracted.

---

In addition, I am curios if there are any [transformers](https://huggingface.co/transformers/) models for DNA sequences.

---

***Edit***:
In addition, you can use [DeepHF's feature utils](https://github.com/crispr-il/DeepHF/blob/d05444e6fa209e734dabc8defc853585afdffe5b/DeepHF/scripts/feature_util.py), which can be accessed and consumed as seen [here](https://github.com/crispr-il/DeepHF/blob/d05444e6fa209e734dabc8defc853585afdffe5b/DeepHF/scripts/preprocess.py#L133).

**Tags:** python, phylogenetics, features
> **Comments:**
> **username_1**: Great question! +1  

---

## 1 answers

### Answer by username_2 on 2020-10-25. Score: 2

If you want to do this with biopython, the [SeqUtils](https://biopython.org/docs/1.75/api/Bio.SeqUtils.html) package could be a solution.


---

