API Reference#

PyO3 bindings to diced, a library for CRISPRs detection.

Diced is re-implementation of MinCED, a method developed by Connor T. Skennerton to identify CRISPRs in isolate and metagenomic-assembled genomes. It was derived from the CRISPR recognition tool developed by Charles Bland et al..

Example

Load a genome from a FASTA file using Biopython:

>>> import Bio.SeqIO
>>> record = Bio.SeqIO.read("Aquifex_aeolicus_VF5.fna", "fasta")

Detect CRISPR regions with Diced using the default parameters:

>>> import diced
>>> for crispr in diced.scan(str(record.seq[:300000])):
...     print(
...         crispr.start,
...         crispr.end,
...         len(crispr.repeats),
...         crispr.repeats[0],
...     )
156459 156767 5 GTTCCTAATGTACCGTGTGGAGTTGAAACC
244560 244791 4 GTTTCAACTCCACACGGTACATTAGGAAC
279263 279555 5 GTTTTAACTCCACACGGTACATTAGAAAC

Functions#

diced.scan(sequence)#

Scan a genome sequence for CRISPRs repeats.

Parameters:

sequence (str) – A string containing the genomic sequence to build a scanner for.

Returns:

Scanner – A scanner yielding CRISPRs in the given contig.

Classes#

diced.Scanner

A scanner for iterating on the CRISPR regions of a genome.

diced.Crispr

A CRISPR region in a nucleotide sequence.

diced.Repeat

A CRISPR repeat.

diced.Repeats

A list of repeats inside a CRISPR region.

diced.Spacer

A CRISPR spacer.

diced.Spacers

A list of spacers inside a CRISPR region.

diced.Region

A sequence region.