prism.util module — prism documentation

# prism.util module

class `prism.util.` `Region`

  Bases: `prism.util.Region`

`prism.util.` `extract_chromosome`(header)

  Extract chromosome information for epilocus header.

`prism.util.` `get_bam_handle`(bam_path)

  Returns pysam.AlignmentFile object for BAM file.

`prism.util.` `get_binary_string_representation`(read)

  Returns a binary representation string of methylation state of a read. Unmethylated state = 0, methylated state = 1.

`prism.util.` `get_common_headers_by_jaccard_similarity`(headers1, headers2, cutoff=0.5)

  Given two lists of epiloci headers, determine which epiloci are common.

`prism.util.` `is_fully_methylated_or_unmethylated`(pattern)

`prism.util.` `jaccard_similarity`(s1, s2)

  Compute Jaccard similarity of two sets.

`prism.util.` `merge_two_headers`(h1, h2)

  Union two epiloci headers.

`prism.util.` `parse_result_line`(line)

  Parse each line in the PRISM result file.

`prism.util.` `pattern_counters_from_met`(fp)

  Parse MET file and generate header, and counter of patterns.

`prism.util.` `prepare_header_bed`(headers)

  Converts a list of epiloci headers to a BedTool object.

`prism.util.` `preset_rc`(scale=1, font_family=None)

  Set visually plausible matplotlib rc file.

`prism.util.` `random_pattern`(l, n)

  Generate n random methylation pattern with length l.