Skip to content

Commit e2afcbb

Browse files
committed
Add blast and nucmer examples
1 parent b103c88 commit e2afcbb

1 file changed

Lines changed: 33 additions & 1 deletion

File tree

README.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ conda install -c bioconda flexidot
7272
pip install the latest development version directly from this repo.
7373

7474
```bash
75-
% pip install git+https://github.com/flexidot-bio/flexidot.git
75+
pip install git+https://github.com/flexidot-bio/flexidot.git
7676
```
7777

7878
Test installation.
@@ -108,8 +108,12 @@ pre-commit install
108108

109109
## Use FlexiDot
110110

111+
### Processing fasta files
112+
111113
Flexidot accepts one or more uncompressed fasta files as input. The files can contain multiple sequences.
112114

115+
By default, Flexidot will use shared k-mers between sequence pairs to generate the dot-plot.
116+
113117
```bash
114118
# Use individual fasta file (can contain multiple sequences)
115119
flexidot -i input.fasta [optional arguments]
@@ -125,6 +129,34 @@ Optional arguments are explained below and in detail with the `--help` option.
125129

126130
Importantly, `-k` defines the word size (e.g. `-k 10`) and `-t` specifies the sequence type (`-t nuc` for DNA [default]; `-t aa` for proteins). The plotting mode is chosen via `-m` and described below.
127131

132+
### Processing pre-computed alignments
133+
134+
Flexidot can also process pre-calculated alignments from tools such as `blastn`, `nucmer`, or `minimap2`.
135+
This approach is often faster than k-mer indexing and is tolerant of gaps and mismatches.
136+
137+
[See pre-calculated alignment tutorial](docs/tutorial_pre_calculated_alignments.md) for detailed examples.
138+
139+
```bash
140+
# Run BLASTN with output format 6
141+
blastn -query sequence.fasta -subject sequence.fasta -outfmt 6 -out alignments.blast6 \
142+
-word_size 4 -evalue 1e-3 -perc_identity 60.0 -max_target_seqs 10000
143+
144+
# Plot alignments
145+
flexidot -i sequence.fasta -m 2 -a alignments.blast6 -o blast_dotplot
146+
147+
### Using Nucmer
148+
149+
# Self-alignment with nucmer (use --nosimplify for repeats in self alignments)
150+
nucmer --maxmatch --nosimplify --minmatch 15 --mincluster 20 --diagfactor 0.3 \
151+
--prefix self_align sequence.fasta sequence.fasta
152+
153+
# Convert directly using paftools (if installed with minimap2)
154+
paftools.js delta2paf self_align.delta > self_align.paf
155+
156+
# Plot alignments
157+
flexidot -i sequence.fasta -a self_align.paf -o nucmer_dotplot
158+
```
159+
128160
## Plotting modes
129161

130162
FlexiDot allows sequence investigation in three run modes via the option `-m/--mode`:

0 commit comments

Comments
 (0)