guido.off_targets

Module Contents

Functions

calculate_ot_sum_score(off_targets[, ...])

Calculate sum score for a list of off-targets.

get_off_targets_string(off_targets[, pam])

Get a string representation of a list of off-targets.

calculate_cfd_score(guide, offtargets, mm_scores, ...)

Calculate CFD score for a guide and a list of off-targets.

_parse_mismatches(mismatches, strand, seq_len)

Parse mismatches from bowtie output.

_hit_is_valid(mismatches, non_arbitrary_positions)

run_bowtie(guides[, pam, core_length, ...])

Run bowtie to find off-targets for a list of guides.

guido.off_targets.calculate_ot_sum_score(off_targets, ot_mismatch_weights=[10, 5, 4, 3, 1], pam='NGG')[source]

Calculate sum score for a list of off-targets.

guido.off_targets.get_off_targets_string(off_targets, pam='NGG')[source]

Get a string representation of a list of off-targets.

guido.off_targets.calculate_cfd_score(guide, offtargets, mm_scores, pam_scores)[source]

Calculate CFD score for a guide and a list of off-targets.

Adapted from Doench et al. 2016, https://doi.org/10.1038/nbt.3437

guido.off_targets._parse_mismatches(mismatches, strand, seq_len)[source]

Parse mismatches from bowtie output.

Returns a dictionary with mismatches positions as keys and mismatched nucleotides as values.

guido.off_targets._hit_is_valid(mismatches, non_arbitrary_positions)[source]
guido.off_targets.run_bowtie(guides, pam='NGG', core_length=10, core_mismatches=2, total_mismatches=4, genome_index_path=None, threads=1, bowtie_path='bin/bowtie/')[source]

Run bowtie to find off-targets for a list of guides.

# TODO: add description of mismatch settings

Parameters:
guidesGuide[]

List of guides to find off-targets for.

pamstr, optional

PAM sequence, by default “NGG”

core_lengthint, optional

gRNA core length, by default 10

core_mismatchesint, optional

Allowed mismatches in core gRNA sequence, by default 2

total_mismatchesint, optional

Total allowed mismatches. Max 4, by default 4

genome_index_pathGenome, optional

Genome object to search off-targets in, by default None

threadsint, optional

Number of threads to run bowtie with, by default 1

bowtie_pathstr, optional

Path to bowtie binary, by default “bin/bowtie/”

Returns:
list

List of off-targets for each guide.