Annotation module

class Annotation.Annotator[source]

This class parse all information about Illumina probes.

USAGE:

annotations = Annotation.Annotator()
get_all_probe_ids()[source]

Get all probe ids.

Returns:a list of probe ids.
get_all_probes()[source]

Get a list of all probes.

Returns:A list of all probes in the Annotation object.
get_coord(probe)[source]

Get genomic coordinate of a probe.

Parameters:probe – A probe object
Returns:An integer indicator of probe numbers
get_keys(dic_keys)[source]

Get Probe id from probe dictionaries

Parameters:dic_keys – Probe dict.
Returns:returns a list of probe id.
get_number()[source]

Get numbers of probes

Returns:An integer representing the number of probes.
get_probe(probe_id)[source]

This function returns the info associated with an id.

Parameters:probe_id – ILLUMINA ID
Returns:all info
get_probes(list_of_ids)[source]

This function returns a list of probe object from a list of ids.

Parameters:list_of_ids
Returns:A list of probe objects.
get_probes_from_chr_loc(chr_loc)[source]

Get a list of probes that are within a genomic region

Parameters:chr_loc – Genomic location interval
Returns:A list of probes.
get_probes_from_cpg(cpg_loc)[source]

Get a list probe objects from cpg location.

Parameters:cpg_loc – from CpG object
Returns:probes.
get_probes_from_gene(gene_name)[source]

Get a list probe objects from an associated gene name.

Parameters:gene_name – Gene name in string format
Returns:A probe.
get_probes_from_loc(loc)[source]

Get a list probe objects from genomic location.

Parameters:loc – from Location object.
Returns:probes.
get_probes_id_from_chr_loc(chr_loc)[source]

Get a list of probe ids that are witihn a genomic region

Parameters:chr_loc – Genomic location interval
Returns:A list of probe ids.
get_probes_id_from_cpg(cpg_loc)[source]

Get all probes ids associated with CpG sites.

Parameters:cpg_loc
Returns:a list of probe ids.
get_probes_id_from_gene(gene_name)[source]

Get all probes ids associated with a gene.

Parameters:gene_name
Returns:a lst of probe ids.
get_probes_id_from_loc(probe_loc)[source]

Get all probes ids associated with genomic locations.

Parameters:probe_loc
Returns:a list of probe ids.
get_probes_id_from_probe(probe_list)[source]

Get all probes ids from a list of probe objects.

Parameters:probe_list – A list of probe ids.
Returns:a list of probe ids.
remove_snp_probes()[source]

This function will removes all SNPs associated with probes.

Returns:returns a new probe listing.
sort_coord_probe(probes)[source]

This function sorts probes based on the probe genomic location. Best used in combination with plotting module.

Parameters:probes – Input probe list.
Returns:A sorted probe list.
class Annotation.ChrLoc(chromosome, start, end)[source]

defines a chromosomal interval.

USAGE:

my_probe = Annotation.ChrLoc("X", 122333232, 123334444)
class Annotation.CpG_location[source]

CpG location is defined here.

ISLAND = 'Island'
NSHELF = 'N_Shelf'
NSHORE = 'N_Shore'
SSHELF = 'S_Shelf'
SSHORE = 'S_Shore'
class Annotation.Feature(feature)[source]

This class parse features associated with probes.

class Annotation.Location[source]

Probe location is defined here.

BODY = 'Body'
EXON = 'Exon'
TSS1500 = 'TSS1500'
TSS200 = 'TSS200'
UTR3 = "3'UTR"
UTR5 = "5'UTR"
class Annotation.Probe[source]

This class holds probe info.

USAGE:

my_probe = Annotation.Probe()
class Annotation.SNP[source]

This class defines the SNPs in probes. Can be used to filter probes.

Annotation.get_probes(annotations, probes_ids)[source]

Get a list of probes from probe ids

Parameters:
  • annotations – Annotation object that has been initiated properly.
  • probes_ids – A list of probe ids.
Returns:

A list of probes.

Annotation.get_probes_from_feature(probes_ids, filter_val)[source]

This function returns filters probes based on a feature.

Parameters:
  • probes_ids – The probe ids that you would like to filter.
  • filter_val – Feature to be filtered.
Returns:

Returns a list of probes.