bioplus.genometools

requires genome.db from bioplus, an sqlite3 database w/ the following structure:

tables represent genomes and are named according to genome name each table has fields VARCHAR ‘name’ and INT UNSIGNED ‘length’ each entry describes a chromosome/scaffold in a genome

exception bioplus.genometools.GenomeNotAvailableError[source]
exception bioplus.genometools.NoMatchFoundError[source]
bioplus.genometools.TemporaryGenomeFile(genome_name)[source]

returns a file-like object pointing to a temporary file containing the chromsome names and sizes

the current file position will be 0

it will be deleted when the object is garbage collected

bioplus.genometools.add_genome(genome_name, genome_dict, replace=False)[source]

WARNING: THIS WILL PERMANENTLY ADD A GENOME

make a call to pybedtool and tries to add to genome registry then reloads module and repopulates globals note: this may not be persistent if your egg is zipped

bioplus.genometools.genome(genome_name)[source]

if available, returns a dict of {‘chr_name’: length} for all chromosomes in that genome

bioplus.genometools.genome_from_bam(bam_file_or_filename)[source]
bioplus.genometools.guess_bam_genome(bam_file_or_filename)[source]
bioplus.genometools.guess_genome(genome1)[source]

expects a dictionary or iterable of (‘name’, length)

checks for a match in the database

bioplus.genometools.import_db(db, replace=False, ignore_warnings=False)[source]

imports a db like genome.db into the existing database

note: this may not be persistent if your egg is zipped

bioplus.genometools.matches_genome(genome1, genome2, symmetric=False)[source]

expects two dictionaries or iterables of (‘name’, length) tells you if genome1 matches genome2 (not all the entries in genome2 need to be matched, but all the entries in genome1 must be)

symmetric=True means matches(genome1,genome2) and matches(genome2,genome1)

Previous topic

bioplus.fasta

Next topic

bioplus.motif

This Page