trackhub.Assembly
digraph inheritance6fc99b999d { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "trackhub.assembly.Assembly" [URL="#trackhub.Assembly",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "trackhub.genome.Genome" -> "trackhub.assembly.Assembly" [arrowsize=0.5,style="setlinewidth(0.5)"]; "trackhub.base.HubComponent" [URL="trackhub.base.HubComponent.html#trackhub.base.HubComponent",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Base class for various track hub components. Several methods must be"]; "trackhub.genome.Genome" [URL="trackhub.Genome.html#trackhub.Genome",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "trackhub.base.HubComponent" -> "trackhub.genome.Genome" [arrowsize=0.5,style="setlinewidth(0.5)"]; }- class trackhub.Assembly(genome, twobit_file=None, groups=None, trackdb=None, genome_file_obj=None, html_string=None, html_string_format='rst', **kwargs)[source]
- Bases: - Genome- Represents a genome stanza within a “genomes.txt” file for a non-UCSC genome. - The file itself is represented by a - GenomesFileobject.- Parameters:
- genome (str) – The genome assembly name to use for this assembly 
- twobit_file (str) – Local path to 2bit file. 
 
 - Methods - __init__(genome[, twobit_file, groups, ...])- Represents a genome stanza within a "genomes.txt" file for a non-UCSC genome. - add_child(child)- Adds self as parent to child, and then adds child. - add_groups(groups)- add_params(**kw)- Add [possibly many] parameters to the Assembly. - add_parent(parent)- Adds self as child of parent, then adds parent. - add_trackdb(trackdb)- add_twobit(twobit)- leaves(cls[, level, intermediate])- Returns an iterator of the HubComponent leaves that are of class cls. - makedirs(fn)- remove_params(*args)- Remove [possibly many] parameters from the Assembly. - render([staging])- Renders the object to file, returning a list of created files. - root([cls, level])- Returns the top-most HubComponent in the hierarchy. - validate()- Runs validation, raising exceptions as needed. - __init__(genome, twobit_file=None, groups=None, trackdb=None, genome_file_obj=None, html_string=None, html_string_format='rst', **kwargs)[source]
- Represents a genome stanza within a “genomes.txt” file for a non-UCSC genome. - The file itself is represented by a - GenomesFileobject.- Parameters:
- genome (str) – The genome assembly name to use for this assembly 
- twobit_file (str) – Local path to 2bit file. 
 
 
 - add_child(child)
- Adds self as parent to child, and then adds child. 
 - add_params(**kw)[source]
- Add [possibly many] parameters to the Assembly. - Parameters will be checked against known UCSC parameters and their supported formats. 
 - add_parent(parent)
- Adds self as child of parent, then adds parent. 
 - leaves(cls, level=0, intermediate=False)
- Returns an iterator of the HubComponent leaves that are of class cls. - If intermediate is True, then return any intermediate classes as well. 
 - remove_params(*args)[source]
- Remove [possibly many] parameters from the Assembly. - E.g., - remove_params(‘color’, ‘visibility’) 
 - render(staging=None)
- Renders the object to file, returning a list of created files. - Calls validation code, and, as long as each child is also a subclass of - HubComponent, the rendering is recursive.
 - root(cls=None, level=0)
- Returns the top-most HubComponent in the hierarchy. - If cls is not None, then return the top-most attribute HubComponent that is an instance of class cls. - For a fully-constructed track hub (and cls=None), this should return a a Hub object for every component in the hierarchy.