ensimpl_snps.create package

Submodules

ensimpl_snps.create.create_ensimpl_snps module

class ensimpl_snps.create.create_ensimpl_snps.EnsemblReference(version, release_date, assembly, assembly_patch, species_id, species_name, vcf_file)

Bases: tuple

assembly

Alias for field number 2

assembly_patch

Alias for field number 3

release_date

Alias for field number 1

species_id

Alias for field number 4

species_name

Alias for field number 5

vcf_file

Alias for field number 6

version

Alias for field number 0

ensimpl_snps.create.create_ensimpl_snps.create(ensembl, species, directory, resource)

Create Ensimpl SNPs database(s). Output database name will be:

“ensembl_snps. version . species .db3”

Parameters:
  • ensembl (list) – A list of all Ensembl versions to create, None for all.
  • species (list) – A list of all species to create, None for all.
  • directory (str) – Output directory.
  • resource (str) – Configuration file location to parse.
ensimpl_snps.create.create_ensimpl_snps.parseSNPs(db, reference)

Create ensimpl database(s).

Parameters:
  • db (str) – Ensembl databse.
  • reference (EnsemblReference) – Reference information for the Ensembl information.
ensimpl_snps.create.create_ensimpl_snps.parse_config(resource_name)

Take a resource string (file name, url) and open it. Parse the file.

Parameters:resource_name (str) – the name of the resource
Returns:
EnsemblReference with the
key being the Ensembl version
Return type:dict

ensimpl_snps.create.ensimpl_db module

This module is specific to ensimpl db operations.

ensimpl_snps.create.ensimpl_db.finalize(db, ref)

Finalize the database. Move everything to where it needs to be and create the necessary indices.

Args:

db (str): Name of the database file.

ref (ensimpl_snps.create.create_ensimpl.EnsemblReference):
Contains information about the Ensembl reference.
ensimpl_snps.create.ensimpl_db.initialize(db)

Initialize the ensimpl_snps database.

Parameters:db (str) – Full path to the database file.
ensimpl_snps.create.ensimpl_db.insert_snps(db, snps)

Insert snps into the database.

Parameters:
  • db (str) – Name of the database file.
  • snps (list) – A list of snps.

Module contents