Skip to content

IO

Functions related to reading and writing CySeq data.

read_cyseq_alignment_file(file, only_successful=True)

Read the data from a CySeq sam or bam file.

Parameters:

Name Type Description Default
file Path | str

sam or bam file to read

required
only_successful bool

skip reads that failed CySeq quality control. For example, consensus was not generated, or did not align to the reference genome.

True

Raises:

Type Description
ValueError

if the given file does not end in .sam or .bam.

NotImplementedError

if only_successful is false.

Yields:

Type Description
AlignmentGroup

An AlignmentGroup object with all alignments related to the same CySeq read.