Sketcher#

Sketcher#

class pysylph.Sketcher(*, c=200, k=31, deduplicate=True, fpr=Ellipsis)#

A sylph sketcher.

sketch_genome(name, contigs, profiling=True)#

Sketch a genome.

Parameters:
  • name (str) – The name of the genome to sketch. In the sylph binary, this is set as the filename of the genome file.

  • contigs (iterable of str or byte buffer) – The genome contigs to be sketched.

  • profiling (bool) – Set to False to disable the tracking of unsued k-mers, which is required for profiling. This will prevent the sketch from being used with Profiler.profile.

Returns:

GenomeSketch – The sketched genome.

sketch_paired(name, r1, r2)#

Sketch a sample composed of paired reads.

Parameters:
  • name (str) – The name of the sample to sketch. In the sylph binary, this is set as the filename of the genome file.

  • r1 (iterable of str or byte buffer) – The first sequences for paired end reads to be sketched.

  • r2 (iterable of str or byte buffer) – The second sequences for paired end reads to be sketched.

Returns:

SampleSketch – The sketched sample.

Added in version 0.1.2.

sketch_single(name, reads)#

Sketch a sample composed of single-read sequences.

Parameters:
  • name (str) – The name of the sample to sketch. In the sylph binary, this is set as the filename of the genome file.

  • reads (iterable of str or byte buffer) – The sample reads to be sketched.

Returns:

SampleSketch – The sketched sample.