https://github.com/suchapalaver/fastas2kmers
A naive implementation of a k-mer counter in Python, takes fasta files and k-mer length requests and outputs all k-mers of length k, their reverse complement, and their frequency within their respective sequence for each sequence in the file.
https://github.com/suchapalaver/fastas2kmers
fasta-format fasta-sequences kmer kmer-counting kmer-frequency-count kmer-length kmers
Last synced: about 1 year ago
JSON representation
A naive implementation of a k-mer counter in Python, takes fasta files and k-mer length requests and outputs all k-mers of length k, their reverse complement, and their frequency within their respective sequence for each sequence in the file.
- Host: GitHub
- URL: https://github.com/suchapalaver/fastas2kmers
- Owner: suchapalaver
- License: mit
- Created: 2021-06-28T21:04:35.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2022-03-28T20:41:58.000Z (about 4 years ago)
- Last Synced: 2025-03-23T23:26:33.580Z (about 1 year ago)
- Topics: fasta-format, fasta-sequences, kmer, kmer-counting, kmer-frequency-count, kmer-length, kmers
- Language: Python
- Homepage:
- Size: 17.6 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fastas2kmers
Written in Python, this k-mer counter parses the contents of an unzipped fasta file according to length k, which can be specified by the user. It outputs a table for each sequence of all kmers of length k, their reverse complement, and their total number in the sequence.
Download fastas2kmers.py to the directory with the fasta file you want to parse.
From that directory run:
```
python fastas2kmers.py
```
e.g.:
```
python fastas2kmers.py sample.fa 31
```