index
int64
0
731k
package
stringlengths
2
98
name
stringlengths
1
76
docstring
stringlengths
0
281k
code
stringlengths
4
8.19k
signature
stringlengths
2
42.8k
embed_func_code
listlengths
768
768
720,768
ete3.nexml._nexml
insert_meta
null
def insert_meta(self, index, value): self.meta[index] = value
(self, index, value)
[ 0.002475359244272113, 0.00852924957871437, -0.057923823595047, -0.005597190000116825, 0.057389963418245316, 0.043509602546691895, -0.0020770495757460594, 0.04297574236989021, 0.01101920660585165, -0.0031677091028541327, -0.031114036217331886, 0.03433388099074364, 0.013980462215840816, -0.0...
720,769
ete3.nexml._nexml
insert_otus
null
def insert_otus(self, index, value): self.otus[index] = value
(self, index, value)
[ 0.00027457362739369273, -0.007001492660492659, -0.00002812425918818917, -0.010321165435016155, 0.0033498520497232676, 0.025332985445857048, -0.0624270997941494, 0.000733453780412674, -0.005333033390343189, -0.029971906915307045, -0.025798602029681206, -0.023884400725364685, -0.01595167629420...
720,770
ete3.nexml._nexml
insert_trees
null
def insert_trees(self, index, value): self.trees[index] = value
(self, index, value)
[ -0.011008141562342644, 0.018760235980153084, -0.02670634351670742, -0.022050024941563606, -0.005428152624517679, 0.07989970594644547, -0.03274605795741081, 0.02157764509320259, -0.008798077702522278, 0.005056996829807758, 0.00015671312576159835, -0.0015141466865316033, -0.014947454445064068,...
720,771
ete3.nexml._nexml
set_about
null
def set_about(self, about): self.about = about
(self, about)
[ -0.029354680329561234, 0.03134599328041077, 0.05537906289100647, 0.0018014074303209782, 0.01244569756090641, -0.02140660025179386, 0.03404112905263901, 0.05198010057210922, -0.009905058890581131, 0.011415708810091019, -0.01496058702468872, -0.0029976963996887207, 0.0394485704600811, 0.0626...
720,772
ete3.nexml._nexml
set_anyAttributes_
null
def set_anyAttributes_(self, anyAttributes_): self.anyAttributes_ = anyAttributes_
(self, anyAttributes_)
[ -0.006853841710835695, 0.01517177652567625, 0.062159761786460876, 0.021165141835808754, -0.03846028447151184, -0.02198708988726139, 0.0018964720657095313, 0.006999394856393337, 0.06041312590241432, 0.017183834686875343, -0.02525775507092476, 0.018065717071294785, 0.0223638154566288, 0.0472...
720,773
ete3.nexml._nexml
set_characters
null
def set_characters(self, characters): self.characters = characters
(self, characters)
[ 0.009645731188356876, 0.038047049194574356, 0.04886500537395477, 0.03332466259598732, -0.03414521738886833, 0.03282228112220764, -0.02681044302880764, 0.02763100154697895, 0.07555823028087616, 0.011111011728644371, -0.008406522683799267, 0.01868860423564911, 0.018336936831474304, 0.0890220...
720,774
ete3.nexml._nexml
set_generator
null
def set_generator(self, generator): self.generator = generator
(self, generator)
[ 0.04045358672738075, -0.003447156399488449, -0.00488292844966054, 0.04809945076704025, -0.02220776677131653, 0.04194800555706024, -0.04153095558285713, 0.056648921221494675, 0.027542496100068092, 0.021408425644040108, 0.02227727510035038, 0.02472742833197117, 0.005886448547244072, 0.072427...
720,775
ete3.nexml._nexml
set_meta
null
def set_meta(self, meta): self.meta = meta
(self, meta)
[ -0.022338449954986572, 0.03865538164973259, -0.007345214486122131, 0.0325300432741642, 0.036648206412792206, 0.010252154432237148, 0.023480461910367012, 0.052324920892715454, 0.023393945768475533, 0.016316931694746017, -0.044884536415338516, 0.03503900766372681, 0.022061597555875778, 0.005...
720,776
ete3.nexml._nexml
set_otus
null
def set_otus(self, otus): self.otus = otus
(self, otus)
[ -0.008297473192214966, 0.002090591238811612, 0.04810630902647972, 0.022495757788419724, -0.03215162828564644, -0.024260807782411575, -0.05018284171819687, -0.003127775387838483, -0.01462224218994379, -0.008574344217777252, -0.019900092855095863, -0.03952331468462944, -0.004425607621669769, ...
720,777
ete3.nexml._nexml
set_trees
null
def set_trees(self, trees): self.trees = trees
(self, trees)
[ -0.022778261452913284, 0.03861233964562416, 0.019205529242753983, 0.002950019668787718, -0.06890507787466049, 0.04857573285698891, -0.02834702655673027, 0.014123192988336086, 0.0038473960012197495, 0.045757804065942764, 0.017561737447977066, -0.011355583555996418, -0.0016165353590622544, 0...
720,778
ete3.nexml._nexml
set_version
null
def set_version(self, version): self.version = version
(self, version)
[ 0.040002889931201935, 0.03202945366501808, -0.008681712672114372, 0.04309047386050224, 0.04807811230421066, -0.015336137264966965, -0.021019330248236656, 0.041054703295230865, 0.018372828140854836, 0.04186901077628136, -0.03365807235240936, -0.0272793248295784, -0.02096843533217907, 0.0297...
720,779
ete3.nexml._nexml
validate_Nexml1_0
null
def validate_Nexml1_0(self, value): # Validate type Nexml1_0, a restriction on xs:decimal. pass
(self, value)
[ 0.046775512397289276, 0.01729719527065754, 0.09661371260881424, -0.017340699210762978, 0.009483874775469303, -0.0050334143452346325, -0.0028168847784399986, -0.040510933846235275, 0.048550475388765335, 0.0003382436989340931, 0.040476132184267044, 0.03057461977005005, 0.04124180227518082, 0...
720,780
ete3.nexml._nexml_tree
NexmlTree
Special PhyloTree object with nexml support
class NexmlTree(PhyloTree): """ Special PhyloTree object with nexml support """ def __repr__(self): return "NexML ETE tree <%s>" %hex(hash(self)) def _get_dist(self): return self.nexml_edge.get_length() def _set_dist(self, value): try: self.nexml_edge.set_le...
(newick=None, alignment=None, alg_format='fasta', sp_naming_function=<function _parse_species at 0x7ff39bbdf760>, format=0)
[ 0.027712291106581688, -0.02000338025391102, 0.006903205532580614, 0.014761321246623993, -0.0031855208799242973, 0.0002539588895160705, -0.07567663490772247, 0.026657911017537117, 0.030696386471390724, -0.03274546563625336, 0.014164501801133156, -0.013090227730572224, 0.02797091193497181, 0...
720,786
ete3.nexml._nexml_tree
__init__
null
def __init__(self, newick=None, alignment=None, alg_format="fasta", \ sp_naming_function=_parse_species, format=0): self.nexml_tree = FloatTree() self.nexml_tree.set_anyAttributes_({'xsi:type': 'FloatTree'}) self.nexml_node = TreeNode() self.nexml_edge = TreeFloatEdge() self.nexml_node....
(self, newick=None, alignment=None, alg_format='fasta', sp_naming_function=<function _parse_species at 0x7ff39bbdf760>, format=0)
[ 0.02968907542526722, 0.008843844756484032, 0.04727652668952942, -0.0005094551597721875, -0.02835862524807453, 0.0015844652662053704, -0.07333876192569733, 0.02866845577955246, 0.05329088866710663, 0.004806932993233204, 0.01622055098414421, 0.03236819803714752, 0.006934741046279669, 0.04490...
720,790
ete3.nexml._nexml_tree
__repr__
null
def __repr__(self): return "NexML ETE tree <%s>" %hex(hash(self))
(self)
[ 0.033452026546001434, -0.029804611578583717, 0.09066437184810638, 0.018028663471341133, 0.027494579553604126, -0.03598785027861595, -0.039982642978429794, -0.02554929070174694, 0.04710378870368004, -0.020043427124619484, 0.009196702390909195, -0.019748160615563393, -0.005979159381240606, 0...
720,795
ete3.nexml._nexml_tree
_get_dist
null
def _get_dist(self): return self.nexml_edge.get_length()
(self)
[ 0.005383345298469067, 0.017748216167092323, 0.026933548972010612, 0.050939902663230896, 0.05733262747526169, 0.04044238105416298, 0.013677061535418034, 0.0008453534101136029, 0.03495809808373451, 0.04821458458900452, -0.010817158967256546, -0.020052960142493248, 0.021617494523525238, 0.012...
720,798
ete3.nexml._nexml_tree
_get_name
null
def _get_name(self): return self.nexml_node.get_label()
(self)
[ 0.035192135721445084, -0.016168413683772087, 0.05889296159148216, 0.027782343327999115, -0.015599102713167667, 0.016816550865769386, 0.020442619919776917, 0.03860799968242645, 0.1232513040304184, -0.036821238696575165, -0.015169930644333363, -0.030777791514992714, 0.03969406709074974, 0.01...
720,801
ete3.nexml._nexml_tree
_get_support
null
def _get_support(self): return self._nexml_support.content
(self)
[ 0.04784660413861275, -0.0551261268556118, 0.03561154380440712, 0.016378918662667274, 0.04244677349925041, 0.04186578094959259, 0.001062130555510521, 0.02961363084614277, 0.07197496294975281, 0.026059312745928764, 0.05136675015091896, -0.027323829010128975, 0.005160598084330559, 0.017344394...
720,806
ete3.nexml._nexml_tree
_set_children
null
def _set_children(self, value): if isinstance(value, Children) and \ len(set([type(n)==type(self) for n in value]))<2: self._children = value else: raise ValueError("children:wrong type")
(self, value)
[ 0.02042686939239502, 0.019032122567296028, -0.01565118320286274, 0.014000439085066319, -0.07471608370542526, 0.0633462443947792, 0.012437968514859676, 0.042160212993621826, 0.02722405642271042, -0.004159966483712196, 0.0538831502199173, 0.0414540097117424, 0.05642547458410263, -0.009807368...
720,807
ete3.nexml._nexml_tree
_set_dist
null
def _set_dist(self, value): try: self.nexml_edge.set_length(value) except ValueError: raise
(self, value)
[ 0.03122369945049286, 0.0833079144358635, 0.004435375332832336, 0.021380353718996048, -0.0004849881515838206, 0.045208968222141266, -0.01354089006781578, 0.009491199627518654, 0.017791807651519775, 0.04027890786528587, -0.021631887182593346, 0.018596714362502098, 0.0500384122133255, 0.01063...
720,809
ete3.nexml._nexml_tree
_set_name
null
def _set_name(self, value): try: self.nexml_node.set_label(value) except ValueError: raise
(self, value)
[ 0.020823754370212555, 0.002605109941214323, 0.022313611581921577, 0.03053351491689682, -0.06575922667980194, 0.0201558880507946, 0.012398353777825832, 0.05842981114983559, 0.10103631019592285, -0.019590768963098526, -0.007457849569618702, -0.004392510745674372, 0.07726708799600601, 0.02178...
720,812
ete3.nexml._nexml_tree
_set_support
null
def _set_support(self, value): try: self._nexml_support.content = float(value) except ValueError: raise
(self, value)
[ 0.060750823467969894, 0.007256811019033194, 0.043307848274707794, 0.052961405366659164, 0.005654819775372744, 0.02659721113741398, -0.026647143065929413, 0.029975954443216324, 0.004183901008218527, 0.03718283399939537, 0.04840093106031418, -0.0022552702575922012, 0.03804832696914673, 0.014...
720,820
ete3.nexml._nexml_tree
build
null
def build(self, node): self.nexml_tree = FloatTree() tree = self.nexml_tree tree.build(node) # This detects the outgroup of the tree even if the root tag # is not set in any node rootid = set([e.source for e in tree.edge]) - set([e.target for e in tree.edge]) nodeid2node = {rootid.pop(): sel...
(self, node)
[ -0.0015981666510924697, -0.013137049041688442, 0.02000025473535061, 0.024753166362643242, -0.02604595758020878, 0.014049608260393143, -0.04315644130110741, 0.030646776780486107, 0.05121738091111183, -0.03908794745802879, 0.004686371423304081, 0.010770098306238651, 0.004914510995149612, 0.0...
720,832
ete3.nexml._nexml_tree
export
null
def export(self, outfile=sys.stdout, level=0, namespace_='', name_='FloatTree', namespacedef_=''): if self.nexml_tree: info = [(n.nexml_edge, n.nexml_node) for n in self.traverse()] self.nexml_node.set_root(True) self.nexml_tree.set_edge([i[0] for i in info]) self.nexml_tree.set_node...
(self, outfile=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, level=0, namespace_='', name_='FloatTree', namespacedef_='')
[ -0.038538653403520584, -0.0019651970360428095, 0.00437275692820549, -0.02516159974038601, 0.03257559984922409, 0.003844133112579584, -0.08238565921783447, -0.0016422721091657877, -0.005671091843396425, -0.009316161274909973, -0.003238096134737134, -0.06872548907995224, 0.0011158603010699153,...
720,833
ete3.nexml._nexml_tree
exportChildren
null
def exportChildren(self, outfile, level, namespace_='', name_='FloatTree'): sorted_nodes = [] sorted_edges = [] for n in self.traverse(): # process node node_obj = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'node', n.nexml_node) sorted_nodes...
(self, outfile, level, namespace_='', name_='FloatTree')
[ -0.03906552866101265, -0.015095136128365993, -0.07359441369771957, 0.00852870661765337, 0.01006342377513647, 0.04108181223273277, -0.06131667643785477, -0.02133301831781864, 0.0032112044282257557, 0.0025743641890585423, 0.013483908027410507, -0.02052290365099907, 0.0264277383685112, 0.0075...
720,874
ete3.phylo.phylotree
link_to_alignment
null
def link_to_alignment(self, alignment, alg_format="fasta", **kwargs): missing_leaves = [] missing_internal = [] if type(alignment) == SeqGroup: alg = alignment else: alg = SeqGroup(alignment, format=alg_format, **kwargs) # sets the seq of for n in self.traverse(): try: ...
(self, alignment, alg_format='fasta', **kwargs)
[ 0.01571555808186531, 0.07549049705266953, -0.006998743396252394, 0.019047047942876816, -0.006924613378942013, 0.028082186356186867, -0.047443196177482605, -0.03232067823410034, 0.04440822824835777, 0.014721345156431198, -0.023599501699209213, -0.011442182585597038, 0.061676155775785446, 0....
720,886
ete3.nexml._nexml_tree
set_nexml_project
null
def set_nexml_project(self, nexml_obj): self.nexml_project = nexml_obj
(self, nexml_obj)
[ -0.0109806964173913, 0.016734160482883453, -0.015278252772986889, -0.0002584563917480409, -0.025364356115460396, -0.01859351061284542, 0.007652282249182463, 0.06756811589002609, 0.061954982578754425, 0.025452060624957085, 0.001747526926919818, -0.02801305428147316, 0.047430992126464844, 0....
720,898
ete3.phylo.phylotree
PhyloNode
.. currentmodule:: ete3 Extends the standard :class:`TreeNode` instance. It adds specific attributes and methods to work with phylogentic trees. :argument newick: Path to the file containing the tree or, alternatively, the text string containing the same information. :argument alignment: fi...
class PhyloNode(TreeNode): """ .. currentmodule:: ete3 Extends the standard :class:`TreeNode` instance. It adds specific attributes and methods to work with phylogentic trees. :argument newick: Path to the file containing the tree or, alternatively, the text string containing the same informa...
(newick=None, alignment=None, alg_format='fasta', sp_naming_function=<function _parse_species at 0x7ff39bbdf760>, format=0, **kargs)
[ 0.05849064141511917, 0.002407805295661092, 0.015042549930512905, 0.0278386902064085, -0.013195035047829151, -0.018097247928380966, -0.05181439593434334, 0.018506640568375587, 0.027418801560997963, -0.03841991350054741, -0.025613274425268173, -0.005080665927380323, 0.038608863949775696, 0.0...
720,904
ete3.phylo.phylotree
__init__
null
def __init__(self, newick=None, alignment=None, alg_format="fasta", \ sp_naming_function=_parse_species, format=0, **kargs): # _update names? self._name = "NoName" self._species = "Unknown" self._speciesFunction = None # Caution! native __init__ has to be called after setting # _spe...
(self, newick=None, alignment=None, alg_format='fasta', sp_naming_function=<function _parse_species at 0x7ff39bbdf760>, format=0, **kargs)
[ 0.018697939813137054, 0.030553845688700676, 0.051369559019804, 0.00020179363491479307, -0.04420171305537224, 0.005371359176933765, -0.02088811621069908, 0.04626518487930298, 0.051297158002853394, -0.01803726702928543, -0.0085842190310359, 0.045142944902181625, 0.004599819891154766, 0.02879...
721,122
ete3.phyloxml
Phyloxml
null
class Phyloxml(_phyloxml.Phyloxml): def __repr__(self): return "PhyloXML project <%s>" %hex(hash(self)) def __init__(self, *args, **kargs): _phyloxml.Phyloxml.__init__(self, *args, **kargs) def build_from_file(self, fname): doc = _phyloxml.parsexml_(fname) rootNode = doc.ge...
(*args, **kargs)
[ 0.02525591105222702, -0.02064330503344536, 0.04268551245331764, -0.01780768483877182, 0.0108037069439888, -0.05845155566930771, -0.081212118268013, 0.05516223609447479, 0.008719527162611485, -0.018743440508842468, 0.03419756144285202, 0.004435380455106497, 0.03665509819984436, 0.0610603243...
721,123
ete3.phyloxml
__init__
null
def __init__(self, *args, **kargs): _phyloxml.Phyloxml.__init__(self, *args, **kargs)
(self, *args, **kargs)
[ 0.0016043162904679775, -0.026018062606453896, 0.07123120874166489, -0.011674100533127785, -0.052908629179000854, -0.020451487973332405, -0.06533308327198029, 0.07189431041479111, 0.052908629179000854, -0.0025411671958863735, 0.024953607469797134, 0.02921142615377903, 0.029316125437617302, ...
721,124
ete3.phyloxml
__repr__
null
def __repr__(self): return "PhyloXML project <%s>" %hex(hash(self))
(self)
[ 0.03668028861284256, -0.04348056763410568, 0.03520346060395241, 0.030326493084430695, 0.02208373323082924, -0.08325189352035522, -0.032352838665246964, 0.004696656949818134, 0.046812016516923904, -0.015103143639862537, 0.002069276524707675, -0.0137379365041852, 0.02041800692677498, 0.08565...
721,125
ete3.phyloxml._phyloxml
add_phylogeny
null
def add_phylogeny(self, value): self.phylogeny.append(value)
(self, value)
[ -0.02043156884610653, 0.02115466073155403, 0.05297073349356651, -0.001011068350635469, -0.021625511348247528, 0.023004433140158653, -0.07452897727489471, -0.004876670427620411, -0.0025581500958651304, 0.008584622293710709, 0.015479224734008312, 0.00603698194026947, 0.03470844030380249, 0.0...
721,127
ete3.phyloxml._phyloxml
buildAttributes
null
def buildAttributes(self, node, attrs, already_processed): pass
(self, node, attrs, already_processed)
[ 0.0012546307407319546, 0.034549176692962646, 0.03873196244239807, 0.017916826531291008, -0.006550016347318888, 0.03649235889315605, 0.0056936973705887794, 0.0036640570033341646, 0.06257715076208115, -0.008151497691869736, 0.022478371858596802, 0.050950974225997925, 0.0804281085729599, 0.06...
721,128
ete3.phyloxml._phyloxml
buildChildren
null
def buildChildren(self, child_, node, nodeName_, fromsubclass_=False): if nodeName_ == 'phylogeny': obj_ = Phylogeny.factory() obj_.build(child_) self.phylogeny.append(obj_)
(self, child_, node, nodeName_, fromsubclass_=False)
[ -0.02405525930225849, -0.009127543307840824, 0.009745744056999683, -0.03089182637631893, -0.056510768830776215, 0.04516497626900673, -0.016491398215293884, 0.053528860211372375, 0.03107365034520626, 0.006550194229930639, 0.05149243772029877, 0.08487524837255478, 0.037492021918296814, 0.026...
721,129
ete3.phyloxml
build_from_file
null
def build_from_file(self, fname): doc = _phyloxml.parsexml_(fname) rootNode = doc.getroot() rootTag, rootClass = _phyloxml.get_root_tag(rootNode) if rootClass is None: rootTag = 'phyloxml' rootClass = self.__class__ self.build(rootNode)
(self, fname)
[ 0.003172517055645585, -0.006072324700653553, 0.011981024406850338, 0.006604108028113842, -0.031343378126621246, -0.003767932066693902, -0.011408334597945213, 0.050687551498413086, 0.016153475269675255, -0.004226992838084698, 0.009408467449247837, 0.04039732366800308, -0.008131279610097408, ...
721,130
ete3.phyloxml
export
null
def export(self, outfile=stdout, level=0): namespace = 'xmlns:phy="http://www.phyloxml.org/1.10/phyloxml.xsd"' return super(Phyloxml, self).export(outfile=outfile, level=level, namespacedef_=namespace)
(self, outfile=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, level=0)
[ -0.026294374838471413, 0.004825344309210777, 0.06339611113071442, -0.0523415207862854, 0.051423247903585434, -0.04404175281524658, -0.04912756755948067, 0.015054368413984776, 0.005990843754261732, -0.01723526418209076, -0.021597057580947876, -0.03704875707626343, 0.015363401733338833, 0.02...
721,131
ete3.phyloxml._phyloxml
exportAttributes
null
def exportAttributes(self, outfile, level, already_processed, namespace_='phy:', name_='Phyloxml'): pass
(self, outfile, level, already_processed, namespace_='phy:', name_='Phyloxml')
[ 0.0036912676878273487, 0.035300008952617645, 0.05140116810798645, -0.011582283303141594, 0.040406085550785065, -0.0438782162964344, -0.04020184278488159, -0.020951934158802032, -0.00585922272875905, -0.0012914118124172091, -0.026381393894553185, -0.017803186550736427, 0.06784273684024811, ...
721,132
ete3.phyloxml._phyloxml
exportChildren
null
def exportChildren(self, outfile, level, namespace_='phy:', name_='Phyloxml', fromsubclass_=False): for phylogeny_ in self.phylogeny: phylogeny_.export(outfile, level, namespace_, name_='phylogeny')
(self, outfile, level, namespace_='phy:', name_='Phyloxml', fromsubclass_=False)
[ -0.018226394429802895, -0.009707729332149029, -0.008381124585866928, -0.02505907416343689, -0.004299263935536146, 0.0005202153697609901, -0.04940825700759888, -0.02587544545531273, -0.0034074659924954176, 0.02209528721868992, 0.01219233963638544, -0.016833238303661346, 0.0687527284026146, ...
721,133
ete3.phyloxml._phyloxml
exportLiteral
null
def exportLiteral(self, outfile, level, name_='Phyloxml'): level += 1 self.exportLiteralAttributes(outfile, level, [], name_) if self.hasContent_(): self.exportLiteralChildren(outfile, level, name_)
(self, outfile, level, name_='Phyloxml')
[ 0.011569696478545666, -0.051144789904356, 0.07785603404045105, 0.005288757849484682, 0.04776274412870407, 0.001725532696582377, -0.015650581568479538, -0.010698302648961544, -0.028039906173944473, -0.037927210330963135, 0.01546077337116003, 0.006871934048831463, 0.005840928293764591, -0.00...
721,134
ete3.phyloxml._phyloxml
exportLiteralAttributes
null
def exportLiteralAttributes(self, outfile, level, already_processed, name_): pass
(self, outfile, level, already_processed, name_)
[ -0.0007991113816387951, -0.012736224569380283, 0.06634069979190826, 0.017675435170531273, 0.04598917067050934, -0.010217062197625637, -0.008172824047505856, -0.012620590627193451, -0.010902605019509792, -0.023770982399582863, -0.019376901909708977, 0.00678521953523159, 0.025026433169841766, ...
721,135
ete3.phyloxml._phyloxml
exportLiteralChildren
null
def exportLiteralChildren(self, outfile, level, name_): showIndent(outfile, level) outfile.write('phylogeny=[\n') level += 1 for phylogeny_ in self.phylogeny: showIndent(outfile, level) outfile.write('model_.Phylogeny(\n') phylogeny_.exportLiteral(outfile, level, name_='Phylogeny...
(self, outfile, level, name_)
[ -0.012763936072587967, -0.02210911549627781, 0.03727659583091736, -0.014455961063504219, -0.0081434091553092, 0.007852727547287941, -0.049493879079818726, -0.030595269054174423, 0.0013547040289267898, 0.006156364921480417, 0.017406156286597252, -0.0031410912051796913, 0.019905146211385727, ...
721,136
ete3.phyloxml._phyloxml
factory
null
def factory(*args_, **kwargs_): if Phyloxml.subclass: return Phyloxml.subclass(*args_, **kwargs_) else: return Phyloxml(*args_, **kwargs_)
(*args_, **kwargs_)
[ 0.04442374035716057, -0.06838376820087433, 0.06543589383363724, -0.0624537467956543, -0.060465648770332336, 0.002515117172151804, -0.045863401144742966, 0.06002004072070122, 0.011363017372786999, -0.015707699581980705, 0.04620617628097534, 0.0609455332159996, -0.0016410390380769968, 0.0286...
721,158
ete3.phyloxml._phyloxml
get_phylogeny
null
def get_phylogeny(self): return self.phylogeny
(self)
[ 0.0029563545249402523, 0.012597584165632725, 0.1096649169921875, -0.007799743674695492, 0.0056480905041098595, -0.009621708653867245, -0.04414359852671623, -0.006077553611248732, 0.041228458285331726, -0.007465716917067766, 0.008654331788420677, -0.02967199496924877, 0.014922757633030415, ...
721,159
ete3.phyloxml._phyloxml
hasContent_
null
def hasContent_(self): if ( self.phylogeny ): return True else: return False
(self)
[ 0.046880919486284256, -0.028572794049978256, 0.05192911624908447, 0.008438901975750923, 0.04587128013372421, 0.0306425541639328, -0.0149679034948349, 0.021219253540039062, -0.00023255885753314942, -0.004707443527877331, 0.031517576426267624, 0.020024513825774193, 0.04846268892288208, -0.01...
721,160
ete3.phyloxml._phyloxml
insert_phylogeny
null
def insert_phylogeny(self, index, value): self.phylogeny[index] = value
(self, index, value)
[ -0.005786124151200056, 0.020704666152596474, 0.047847773879766464, -0.03436093404889107, -0.019806673750281334, 0.021416284143924713, -0.06075853854417801, 0.0071966503746807575, -0.004115094896405935, 0.010453992523252964, -0.009640716016292572, 0.014867712743580341, 0.02136545442044735, ...
721,161
ete3.phyloxml._phyloxml
set_phylogeny
null
def set_phylogeny(self, phylogeny): self.phylogeny = phylogeny
(self, phylogeny)
[ -0.009787989780306816, 0.057618577033281326, 0.10697667300701141, -0.0015531074022874236, -0.060485851019620895, -0.007180988322943449, -0.0494263619184494, 0.03689910098910332, 0.006617773324251175, 0.03304193168878555, 0.0022293918300420046, 0.007803937885910273, 0.05929115414619446, 0.0...
721,162
ete3.phyloxml._phyloxml_tree
PhyloxmlTree
PhyloTree object supporting phyloXML format.
class PhyloxmlTree(PhyloTree): ''' PhyloTree object supporting phyloXML format. ''' def __repr__(self): return "PhyloXML ETE tree <%s>" %hex(hash(self)) def _get_dist(self): v = self.phyloxml_clade.get_branch_length_attr() if v is None: v = self.phyloxml_clade.get_branc...
(phyloxml_clade=None, phyloxml_phylogeny=None, **kargs)
[ 0.020665304735302925, -0.015631206333637238, 0.03504034876823425, 0.01588621735572815, -0.013950024731457233, -0.03500256687402725, -0.06607608497142792, 0.013987804763019085, 0.004533521831035614, -0.024235453456640244, 0.01536675076931715, -0.007943108677864075, 0.04148172587156296, 0.04...
721,168
ete3.phyloxml._phyloxml_tree
__init__
null
def __init__(self, phyloxml_clade=None, phyloxml_phylogeny=None, **kargs): if not phyloxml_phylogeny: self.phyloxml_phylogeny = Phylogeny() else: self.phyloxml_phylogeny = phyloxml_phylogeny if not phyloxml_clade: self.phyloxml_clade = Clade() self.phyloxml_clade.set_branch_l...
(self, phyloxml_clade=None, phyloxml_phylogeny=None, **kargs)
[ -0.011571533046662807, 0.014730632305145264, 0.07525046169757843, 0.004308266099542379, -0.04678306728601456, -0.01654977723956108, -0.04305604100227356, 0.03411117568612099, 0.04135225713253021, -0.010568784549832344, 0.03105856105685234, 0.026302164420485497, 0.023214057087898254, 0.0327...
721,172
ete3.phyloxml._phyloxml_tree
__repr__
null
def __repr__(self): return "PhyloXML ETE tree <%s>" %hex(hash(self))
(self)
[ 0.041431937366724014, -0.03225971385836601, 0.08572365343570709, 0.017891064286231995, 0.025023076683282852, -0.05074365809559822, -0.043698836117982864, -0.009808696806430817, 0.033811669796705246, -0.026086775586009026, 0.013749613426625729, -0.025110265240073204, 0.005235664546489716, 0...
721,176
ete3.phyloxml._phyloxml_tree
_get_children
null
def _get_children(self): return self.phyloxml_clade.clade
(self)
[ 0.00220271828584373, -0.011842850595712662, 0.051137618720531464, -0.01902112178504467, -0.01750081405043602, 0.05659690499305725, 0.011385031044483185, 0.018070928752422333, 0.0993037298321724, -0.004370884504169226, 0.02019590511918068, -0.0024899356067180634, 0.04177390784025192, 0.0404...
721,177
ete3.phyloxml._phyloxml_tree
_get_dist
null
def _get_dist(self): v = self.phyloxml_clade.get_branch_length_attr() if v is None: v = self.phyloxml_clade.get_branch_length() if v is None: self._set_dist(self._dist) v = self.phyloxml_clade.get_branch_length_attr() return float(v)
(self)
[ 0.03263923153281212, 0.04785923659801483, 0.024837233126163483, 0.03972560912370682, 0.0487668514251709, 0.002090132562443614, 0.009844131767749786, -0.03562388941645622, -0.025779755786061287, 0.04154083877801895, -0.013535681180655956, -0.005554778501391411, -0.003287922590970993, 0.0161...
721,180
ete3.phyloxml._phyloxml_tree
_get_name
null
def _get_name(self): return self.phyloxml_clade.get_name()
(self)
[ 0.029273875057697296, 0.00780607620254159, 0.07314115017652512, 0.0178847536444664, -0.00891625415533781, -0.026888079941272736, 0.010056908242404461, 0.02828124538064003, 0.09403862059116364, -0.04708896949887276, -0.010318126529455185, -0.00904686376452446, 0.01149360928684473, 0.0305103...
721,183
ete3.phyloxml._phyloxml_tree
_get_support
null
def _get_support(self): if len(self.phyloxml_clade.confidence) == 0: _c = Confidence(valueOf_=1.0, type_="branch_support") self.phyloxml_clade.add_confidence(_c) return float(self.phyloxml_clade.confidence[0].valueOf_)
(self)
[ 0.024887897074222565, -0.021233996376395226, 0.038469381630420685, 0.06687329709529877, 0.0224404726177454, -0.008333309553563595, -0.030920282006263733, -0.024405306205153465, 0.012840362265706062, -0.00014178798301145434, 0.04560483247041702, -0.03733184561133385, 0.0024905132595449686, ...
721,189
ete3.phyloxml._phyloxml_tree
_set_dist
null
def _set_dist(self, value): try: self.phyloxml_clade.set_branch_length(float(value)) self.phyloxml_clade.set_branch_length_attr(float(value)) except ValueError: raise
(self, value)
[ 0.04712548851966858, 0.0868573859333992, 0.011384053155779839, 0.02518656849861145, -0.017672058194875717, 0.004733278416097164, -0.03606965392827988, -0.0260675810277462, -0.03714068979024887, 0.027656856924295425, -0.013750691898167133, 0.027242261916399002, 0.03207919001579285, 0.033616...
721,191
ete3.phyloxml._phyloxml_tree
_set_name
null
def _set_name(self, value): try: self.phyloxml_clade.set_name(value) except ValueError: raise
(self, value)
[ 0.019627878442406654, 0.03571517765522003, 0.02650279365479946, 0.023821577429771423, -0.07280533760786057, -0.013010774739086628, -0.003957372158765793, 0.03863701596856117, 0.07803027331829071, -0.014781065285205841, -0.006273359060287476, 0.012185784988105297, 0.05180247500538826, 0.035...
721,194
ete3.phyloxml._phyloxml_tree
_set_support
null
def _set_support(self, value): self._get_support() self.phyloxml_clade.confidence[0].valueOf_ = float(value)
(self, value)
[ 0.04298773780465126, -0.001508900080807507, 0.04543253779411316, 0.07157831639051437, 0.0004992528120055795, 0.011731645092368126, -0.034498848021030426, 0.009286845102906227, 0.008454933762550354, 0.027300268411636353, 0.02789449132978916, -0.01546675618737936, 0.04964302480220795, 0.0130...
721,202
ete3.phyloxml._phyloxml_tree
build
null
def build(self, node): nodetype = Tag_pattern_.match(node.tag).groups()[-1] if nodetype == 'phylogeny': self.phyloxml_phylogeny.buildAttributes(node, node.attrib, []) elif nodetype == 'clade': if "branch_length" in node.attrib: node.attrib["branch_length_attr"] = node.attrib["bra...
(self, node)
[ -0.014092053286731243, 0.030481724068522453, 0.035517334938049316, -0.0061365533620119095, -0.0237803403288126, 0.0219613928347826, -0.027169326320290565, -0.014704751782119274, 0.028490455821156502, -0.016858767718076706, 0.01934785395860672, 0.08217811584472656, 0.039155229926109314, 0.0...
721,203
ete3.phyloxml._phyloxml_tree
buildChildren
null
def buildChildren(self, child_, node, nodeName_, fromsubclass=False, nodetype=None): if nodetype == 'phylogeny': baseclass = self.phyloxml_phylogeny if nodeName_ == 'clade': self.build(child_) else: baseclass.buildChildren(child_, node, nodeName_) elif nodetype ==...
(self, child_, node, nodeName_, fromsubclass=False, nodetype=None)
[ -0.03693888336420059, -0.006942025385797024, 0.021520279347896576, -0.03246310353279114, -0.04048297181725502, 0.039058029651641846, -0.023182712495326996, 0.04000798985362053, 0.022269288077950478, 0.007403304800391197, 0.04552507400512695, 0.06434161961078644, 0.04695001617074013, 0.0453...
721,215
ete3.phyloxml._phyloxml_tree
export
null
def export(self, outfile=sys.stdout, level=0, namespace_='phy:', name_='Phylogeny', namespacedef_=''): if not self.up: self.phyloxml_phylogeny.clade = self.phyloxml_clade self.phyloxml_clade.clade = self.children self.phyloxml_phylogeny.export(outfile=outfile, level=level, name_=name_, names...
(self, outfile=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, level=0, namespace_='phy:', name_='Phylogeny', namespacedef_='')
[ -0.0376395620405674, -0.007516327779740095, 0.033344514667987823, -0.031295012682676315, 0.012163352221250534, -0.03362966328859329, -0.05471280962228775, -0.0020907153375446796, -0.01341087557375431, -0.012501966208219528, -0.010122760199010372, -0.030885113403201103, 0.03143758699297905, ...
721,279
ete3.coretype.seqgroup
SeqGroup
SeqGroup class can be used to store a set of sequences (aligned or not). :argument sequences: Path to the file containing the sequences or, alternatively, the text string containing the same information. :argument fasta format: the format in which sequences are encoded. Curre...
class SeqGroup(object): """ SeqGroup class can be used to store a set of sequences (aligned or not). :argument sequences: Path to the file containing the sequences or, alternatively, the text string containing the same information. :argument fasta format: the format in which seque...
(sequences=None, format='fasta', fix_duplicates=True, **kwargs)
[ 0.03149641305208206, 0.05511386692523956, -0.052358176559209824, 0.030564909800887108, -0.023636862635612488, -0.02466539666056633, -0.06485582888126373, 0.032854851335287094, 0.05068923532962799, -0.05127142369747162, -0.08236030489206314, 0.01761120930314064, 0.005428910255432129, 0.0784...
721,280
ete3.coretype.seqgroup
__contains__
null
def __contains__(self, item): return item in self.name2id
(self, item)
[ 0.05304223299026489, -0.04652521759271622, -0.026068061590194702, 0.021816318854689598, -0.015003074891865253, -0.031922921538352966, 0.021868593990802765, -0.010150164365768433, 0.06234727427363396, -0.042970478534698486, -0.0292045921087265, -0.016083436086773872, 0.043876588344573975, -...
721,281
ete3.coretype.seqgroup
__init__
null
def __init__(self, sequences=None , format="fasta", fix_duplicates=True, **kwargs): self.parsers = { "fasta": [read_fasta, write_fasta, {}], "phylip": [read_phylip, write_phylip, {"interleaved":False, "relaxed":False}], "iphylip": [read_phylip, write_phylip, {"interleaved":True, "relaxed":Fa...
(self, sequences=None, format='fasta', fix_duplicates=True, **kwargs)
[ -0.002306272741407156, 0.03999036177992821, 0.031403034925460815, -0.011821051128208637, -0.05091315880417824, 0.007518403697758913, -0.044373854994773865, 0.04469722509384155, 0.03142099827528, -0.005555714014917612, -0.05781176686286926, 0.07333362847566605, -0.025240996852517128, 0.0691...
721,282
ete3.coretype.seqgroup
__iter__
null
def __iter__(self): return self.iter_entries()
(self)
[ 0.042141638696193695, -0.038948092609643936, -0.08257127553224564, -0.005946744699031115, -0.01952343061566353, -0.013161031529307365, -0.01526811346411705, 0.016749655827879906, 0.11167534440755844, 0.014617880806326866, -0.0029116414953023195, -0.007424171548336744, 0.008329558186233044, ...
721,283
ete3.coretype.seqgroup
__len__
null
def __len__(self): return len(self.id2seq)
(self)
[ -0.0034808041527867317, 0.024307476356625557, 0.02218078076839447, 0.0631030723452568, 0.028943011537194252, 0.017428942024707794, 0.004282468929886818, 0.002724830061197281, 0.059215206652879715, -0.048614952713251114, -0.03788178041577339, -0.010600253008306026, 0.03528987243771553, 0.01...
721,284
ete3.coretype.seqgroup
__repr__
null
def __repr__(self): return "SeqGroup (%s)" %hex(self.__hash__())
(self)
[ 0.020168496295809746, 0.01756610907614231, -0.015772797167301178, 0.04580867663025856, 0.005884563084691763, -0.028025701642036438, -0.026624416932463646, 0.02270415425300598, 0.046943049877882004, -0.028559524565935135, -0.04087081551551819, 0.001129160518757999, 0.04447411745786667, 0.05...
721,285
ete3.coretype.seqgroup
__str__
null
def __str__(self): return write_fasta(self)
(self)
[ -0.04024982824921608, 0.006624315399676561, 0.029439596459269524, -0.009444729425013065, 0.0179628673940897, -0.04769507050514221, -0.05621321126818657, 0.04366358742117882, 0.05016598105430603, -0.0621303915977478, -0.03186173737049103, 0.023863792419433594, -0.006518651731312275, 0.06456...
721,286
ete3.coretype.seqgroup
get_entries
Returns the list of entries currently stored.
def get_entries(self): """ Returns the list of entries currently stored.""" keys = list(self.id2seq.keys()) seqs = list(self.id2seq.values()) comments = [self.id2comment.get(x, []) for x in keys] names = [self.id2name[x] for x in keys] return list(zip(names, seqs, comments))
(self)
[ 0.03436722233891487, 0.027724355459213257, -0.07118663191795349, -0.020477592945098877, 0.02062399312853813, 0.021063189953565598, 0.010979942977428436, -0.028547851368784904, 0.10972622781991959, -0.025930965319275856, -0.0571323037147522, -0.028547851368784904, -0.028017153963446617, 0.0...
721,287
ete3.coretype.seqgroup
get_seq
Returns the sequence associated to a given entry name.
def get_seq(self, name): """ Returns the sequence associated to a given entry name.""" return self.id2seq[self.name2id[name]]
(self, name)
[ 0.06268345564603806, 0.0492800809442997, -0.03387795761227608, 0.031039398163557053, -0.023632269352674484, -0.01349575538188219, -0.022154202684760094, 0.0028469576500356197, 0.10171785205602646, -0.07141748815774918, -0.08129365742206573, 0.026235681027173996, 0.016645044088363647, 0.036...
721,288
ete3.coretype.seqgroup
iter_entries
Returns an iterator over all sequences in the collection. Each item is a tuple with the sequence name, sequence, and sequence comments
def iter_entries(self): """ Returns an iterator over all sequences in the collection. Each item is a tuple with the sequence name, sequence, and sequence comments """ for i, seq in six.iteritems(self.id2seq): yield self.id2name[i], seq, self.id2comment.get(i, [])
(self)
[ 0.03572949394583702, 0.023769909515976906, -0.036494459956884384, -0.009767306037247181, -0.01836850494146347, -0.000314557139063254, -0.011483813636004925, 0.0022634121123701334, 0.10396070033311844, -0.003745533060282469, -0.06395859271287918, 0.022725077345967293, 0.0022564155515283346, ...
721,289
ete3.coretype.seqgroup
set_seq
Updates or adds a sequence
def set_seq(self, name, seq, comments = None): """Updates or adds a sequence """ if comments is None: comments = [] name = name.strip() seq = seq.replace(" ", "") seq = seq.replace("\t", "") seq = seq.replace("\n", "") seq = seq.replace("\r", "") seqid = self.name2id.get(name, ma...
(self, name, seq, comments=None)
[ 0.02151615358889103, 0.06900740414857864, -0.008718820288777351, 0.04423551633954048, -0.07304168492555618, -0.007949122227728367, -0.03804254159331322, 0.04359852150082588, 0.03991812840104103, -0.013474137522280216, -0.09462860971689224, -0.00039480195846408606, -0.004494328051805496, 0....
721,290
ete3.coretype.seqgroup
write
Returns the text representation of the sequences in the supplied given format (default=FASTA). If "oufile" argument is used, the result is written into the given path.
def write(self, format="fasta", outfile=None): """ Returns the text representation of the sequences in the supplied given format (default=FASTA). If "oufile" argument is used, the result is written into the given path.""" format = format.lower() if format in self.parsers: write = self.parser...
(self, format='fasta', outfile=None)
[ -0.003135968931019306, 0.027643468230962753, 0.018376821652054787, -0.027834711596369743, 0.024653105065226555, 0.009084095247089863, -0.03371112048625946, 0.0042138900607824326, 0.05636485666036606, -0.024931278079748154, -0.01945474185049534, 0.029781924560666084, -0.029277736321091652, ...
721,291
ete3.coretype.tree
TreeNode
TreeNode (Tree) class is used to store a tree structure. A tree consists of a collection of TreeNode instances connected in a hierarchical way. Trees can be loaded from the New Hampshire Newick format (newick). :argument newick: Path to the file containing the tree or, alternatively, the te...
class TreeNode(object): """ TreeNode (Tree) class is used to store a tree structure. A tree consists of a collection of TreeNode instances connected in a hierarchical way. Trees can be loaded from the New Hampshire Newick format (newick). :argument newick: Path to the file containing the tree o...
(newick=None, format=0, dist=None, support=None, name=None, quoted_node_names=False)
[ 0.043274518102407455, -0.030937859788537025, -0.01807737536728382, 0.01721145585179329, -0.027581091970205307, -0.001172597287222743, -0.036069225519895554, 0.05033014714717865, 0.009273874573409557, -0.01824842020869255, 0.000863913563080132, 0.01411125622689724, 0.0064409333281219006, 0....
721,296
ete3.coretype.tree
__init__
null
def __init__(self, newick=None, format=0, dist=None, support=None, name=None, quoted_node_names=False): self._children = [] self._up = None self._dist = DEFAULT_DIST self._support = DEFAULT_SUPPORT self._img_style = None self.features = set([]) # Add basic features self.feat...
(self, newick=None, format=0, dist=None, support=None, name=None, quoted_node_names=False)
[ 0.04643934965133667, 0.01347808726131916, -0.0026533594354987144, -0.0247142743319273, -0.03464268893003464, 0.013424708507955074, -0.013531466014683247, 0.04868125170469284, 0.003827687818557024, 0.05295153707265854, 0.029020145535469055, 0.05177720636129379, 0.00495530990883708, 0.037827...
721,300
ete3.coretype.tree
__repr__
null
def __repr__(self): return "Tree node '%s' (%s)" %(self.name, hex(self.__hash__()))
(self)
[ 0.02457979880273342, -0.0006728317821398377, 0.08713886141777039, 0.02644318901002407, 0.026951385661959648, -0.026765046641230583, -0.022953568026423454, 0.016075968742370605, 0.02813717909157276, -0.02483389712870121, 0.0019205615390092134, -0.013340173289179802, 0.014331158250570297, 0....
721,477
ete3.webplugin.webapp
WebTreeApplication
Provides a basic WSGI application object which can handle ETE tree visualization and interactions. Please, see the webplugin example provided with the ETE installation package (http://pypi.python.org/pypi/ete3).
class WebTreeApplication(object): """ Provides a basic WSGI application object which can handle ETE tree visualization and interactions. Please, see the webplugin example provided with the ETE installation package (http://pypi.python.org/pypi/ete3).""" def __init__(self): # Red...
()
[ 0.04609548673033714, -0.05325394123792648, -0.028757955878973007, 0.02784763276576996, 0.019954711198806763, 0.0025357173290103674, -0.053419455885887146, 0.029771726578474045, -0.05279878154397011, -0.027164889499545097, 0.02999930828809738, -0.021351231262087822, -0.034033697098493576, 0...
721,478
ete3.webplugin.webapp
__call__
This function is executed when the application is called by the WSGI apache module. It is, therefore, in charge of answering web requests.
def __call__(self, environ, start_response): """ This function is executed when the application is called by the WSGI apache module. It is, therefore, in charge of answering web requests.""" path = environ['PATH_INFO'].split("/") start_response('202 OK', [('content-type', 'text/plain')]) if envi...
(self, environ, start_response)
[ 0.042244862765073776, -0.03935994580388069, -0.0035103182308375835, -0.0011335402959957719, 0.023240726441144943, 0.0020602946169674397, -0.043293923139572144, 0.0150398975238204, -0.03001927211880684, -0.03387255221605301, 0.047570861876010895, 0.011317750439047813, -0.0008107523899525404, ...
721,479
ete3.webplugin.webapp
__init__
null
def __init__(self): # Redirects normal output msgs to stderr, since stdout in web # application is for the browser sys.stdout = sys.stderr self.TreeConstructor = None self.NODE_TARGET_ACTIONS = ["node", "face"] self.TREE_TARGET_ACTIONS = ["layout", "search"] self.actions = [] self._layou...
(self)
[ 0.01868549734354019, -0.03160852938890457, -0.01786363683640957, -0.03141959756612778, 0.008676758967339993, 0.017712490633130074, -0.022577522322535515, 0.04239661991596222, -0.04753560200333595, -0.0025931086856871843, 0.039751552045345306, 0.030588291585445404, -0.022898707538843155, 0....
721,480
ete3.webplugin.webapp
_dump_tree_to_file
null
def _dump_tree_to_file(self, t, treeid): tree_path = os.path.join(self.CONFIG["temp_dir"], treeid+".pkl") six.moves.cPickle.dump(t, open(tree_path, "wb")) #open(tree_path, "w").write(t.write(features=[]))
(self, t, treeid)
[ 0.02049744874238968, 0.026584256440401077, 0.015138979069888592, 0.006932195741683245, 0.03176931291818619, -0.03724917396903038, -0.06974682211875916, 0.023324085399508476, -0.06867165863513947, -0.04463657736778259, -0.002997881965711713, -0.03891393914818764, -0.06995491683483124, 0.017...
721,481
ete3.webplugin.webapp
_get_html_map
null
def _get_html_map(self, img_map, treeid, mapid, tree): # Scans for node-enabled actions. nid2actions = {} nid2face_actions = {} for n in tree.traverse(): for aindex, (action, target, handler, checker, html_generator) in enumerate(self.actions): if target == "node" and (not checker or...
(self, img_map, treeid, mapid, tree)
[ 0.03442675620317459, -0.0410948321223259, 0.010910547338426113, 0.007623334880918264, -0.023750340566039085, -0.002104845829308033, -0.025117671117186546, 0.00991782732307911, -0.00054172269301489, -0.0012807016028091311, 0.02157759666442871, 0.01257756631821394, -0.016866862773895264, 0.0...
721,482
ete3.webplugin.webapp
_get_tree_img
null
def _get_tree_img(self, treeid, pre_drawing_action=None): img_url = os.path.join(self.CONFIG["temp_url"], treeid+".png?"+str(time.time())) img_path = os.path.join(self.CONFIG["temp_dir"], treeid+".png") t = self._treeid2tree[treeid] tree_index = self._treeid2index[treeid] if pre_drawing_action: ...
(self, treeid, pre_drawing_action=None)
[ 0.03824102133512497, -0.05613625422120094, 0.02199322171509266, 0.0016976274782791734, 0.00019724140292964876, 0.008973357267677784, -0.005349006503820419, 0.01615513302385807, -0.01196447666734457, -0.024155475199222565, 0.07318717986345291, -0.0083864601328969, -0.0058638290502130985, -0...
721,483
ete3.webplugin.webapp
_load_tree
null
def _load_tree(self, treeid, tree=None, cache_file=None): # if a tree is given, it overwrites previous versions if tree and isinstance(tree, str): tree = self._tree(tree) self._treeid2tree[treeid] = tree self._load_tree_index(treeid) elif tree: self._treeid2tree[treeid] = tre...
(self, treeid, tree=None, cache_file=None)
[ 0.04914212226867676, 0.026345422491431236, 0.007492823526263237, 0.03847666084766388, 0.013558442704379559, 0.020385880023241043, 0.01465777587145567, 0.06302843242883682, -0.04081033170223236, -0.06322129815816879, 0.026229703798890114, -0.0050916485488414764, -0.07560326159000397, 0.0121...
721,484
ete3.webplugin.webapp
_load_tree_from_path
null
def _load_tree_from_path(self, pkl_path): tree_path = os.path.join(self.CONFIG["temp_dir"], pkl_path) if os.path.exists(tree_path): print(six.moves.cPickle.load(open(tree_path))) t = self._treeid2tree[treeid] = six.moves.cPickle.load(open(tree_path)) self._load_tree_index(treeid) ...
(self, pkl_path)
[ 0.06628867238759995, 0.007120133377611637, -0.03093225695192814, 0.04545824974775314, 0.012452168390154839, 0.031540580093860626, 0.023816730827093124, 0.05002988502383232, -0.007622459903359413, -0.03602004051208496, 0.0455319881439209, 0.011714808642864227, -0.05250003933906555, -0.00628...
721,485
ete3.webplugin.webapp
_load_tree_index
null
def _load_tree_index(self, treeid): if not self._treeid2index.get(treeid, {}): tree_index = self._treeid2index[treeid] = {} t = self._treeid2tree[treeid] for n in t.traverse(): if hasattr(n, "_nid"): tree_index[str(n._nid)] = n return True else: ...
(self, treeid)
[ 0.01990736834704876, 0.011348294094204903, 0.0008750492124818265, 0.034163378179073334, 0.01771063171327114, 0.06365983188152313, 0.008504384197294712, 0.029587600380182266, -0.014265124686062336, -0.06719648838043213, -0.003422718495130539, -0.019597455859184265, -0.037554193288087845, -0...
721,486
ete3.webplugin.webapp
register_action
Adds a new web interactive function associated to tree nodes.
def register_action(self, name, target, handler, checker, html_generator): """ Adds a new web interactive function associated to tree nodes. """ self.actions.append([name, target, handler, checker, html_generator])
(self, name, target, handler, checker, html_generator)
[ -0.024743320420384407, -0.019829628989100456, 0.0050929272547364235, 0.009495140053331852, 0.028205635026097298, 0.0649096816778183, -0.002668868750333786, 0.04424070566892624, -0.010623015463352203, -0.008970546536147594, 0.07267366349697113, 0.00973120704293251, 0.05130523070693016, 0.01...
721,487
ete3.webplugin.webapp
set_default_layout_fn
Fix the layout function used to render the tree.
def set_default_layout_fn(self, layout_fn): """ Fix the layout function used to render the tree. """ self._layout = layout_fn
(self, layout_fn)
[ 0.014152485877275467, -0.01259123906493187, 0.07331949472427368, -0.007603690959513187, -0.03790874406695366, 0.04418748617172241, -0.011181898415088654, 0.04138568416237831, -0.016144128516316414, -0.03483688831329346, 0.016785506159067154, -0.01253216527402401, 0.0036625992506742477, -0....
721,488
ete3.webplugin.webapp
set_external_app_handler
Sets a custom function that will extend current WSGI application.
def set_external_app_handler(self, handler): """ Sets a custom function that will extend current WSGI application.""" self._external_app_handler = handler
(self, handler)
[ -0.0025434433482587337, -0.04248461872339249, -0.00240674358792603, 0.05832521617412567, 0.020910916849970818, 0.025136180222034454, 0.03436548262834549, 0.04192125052213669, 0.012228411622345448, 0.003788239322602749, -0.0038773014675825834, -0.05779498815536499, 0.02397630363702774, -0.0...
721,489
ete3.webplugin.webapp
set_external_tree_renderer
If the tree needs to be processed every time is going to be drawn, the task can be delegated.
def set_external_tree_renderer(self, handler): """ If the tree needs to be processed every time is going to be drawn, the task can be delegated. """ self._custom_tree_renderer = handler
(self, handler)
[ 0.005686530377715826, -0.0018707321723923087, 0.01323966309428215, 0.07406943291425705, 0.005855846218764782, 0.06220907345414162, -0.02547169104218483, 0.06409219652414322, 0.018335653468966484, -0.0015424248995259404, 0.06785843521356583, -0.028246818110346794, 0.047177139669656754, -0.0...
721,490
ete3.webplugin.webapp
set_tree_loader
Delegate tree constructor. It allows to customize the Tree class used to create new tree instances.
def set_tree_loader(self, TreeConstructor): """ Delegate tree constructor. It allows to customize the Tree class used to create new tree instances. """ self._tree = TreeConstructor
(self, TreeConstructor)
[ -0.023414360359311104, 0.043746501207351685, 0.04203026369214058, -0.011715936474502087, -0.029456209391355515, 0.04745917394757271, 0.013449684716761112, 0.062204789370298386, -0.015323533676564693, 0.0026334587018936872, 0.05863221734762192, 0.0015498660504817963, -0.0063483212143182755, ...
721,491
ete3.webplugin.webapp
set_tree_size
Fix the size of tree image
def set_tree_size(self, w, h, units="px"): """ Fix the size of tree image """ self._width = w self._height = h self._size_units = units
(self, w, h, units='px')
[ 0.02826567180454731, -0.010640386492013931, 0.03857998177409172, -0.021847115829586983, -0.08203394711017609, 0.028540262952446938, -0.02146955393254757, -0.002797391964122653, -0.06243504211306572, 0.028643235564231873, 0.01265691127628088, -0.007152227684855461, 0.06040993705391884, 0.02...
721,492
ete3.webplugin.webapp
set_tree_style
Fix a :class:`TreeStyle` instance to render tree images.
def set_tree_style(self, handler): """ Fix a :class:`TreeStyle` instance to render tree images. """ self._tree_style = handler
(self, handler)
[ -0.01989370584487915, -0.010564827360212803, 0.03342142328619957, -0.00165075424592942, -0.020537076517939568, 0.010767997242510319, -0.004368149675428867, 0.05045382305979729, 0.04740627482533455, 0.021519063040614128, 0.009201896376907825, -0.009591305628418922, 0.03545312210917473, -0.0...
721,497
ete3.ncbi_taxonomy.ncbiquery
is_taxadb_up_to_date
Check if a valid and up-to-date taxa.sqlite database exists If dbfile= is not specified, DEFAULT_TAXADB is assumed
def is_taxadb_up_to_date(dbfile=DEFAULT_TAXADB): """Check if a valid and up-to-date taxa.sqlite database exists If dbfile= is not specified, DEFAULT_TAXADB is assumed """ db = sqlite3.connect(dbfile) try: r = db.execute('SELECT version FROM stats;') version = r.fetchone()[0] ex...
(dbfile='/root/.etetoolkit/taxa.sqlite')
[ 0.02971409261226654, 0.0026223636232316494, -0.013102775439620018, 0.0014581246068701148, 0.07689855247735977, -0.0016593232285231352, -0.03515775874257088, -0.018862932920455933, -0.026513000950217247, -0.04253654554486275, -0.014486297965049744, 0.058306898921728134, -0.0064519187435507774...
721,515
pydal.base
DAL
An instance of this class represents a database connection Args: uri(str): contains information for connecting to a database. Defaults to `'sqlite://dummy.db'` Note: experimental: you can specify a dictionary as uri parameter i.e. with:: ...
class DAL(with_metaclass(MetaDAL, Serializable, BasicStorage)): """ An instance of this class represents a database connection Args: uri(str): contains information for connecting to a database. Defaults to `'sqlite://dummy.db'` Note: experimental: you can sp...
(*args, **kwargs)
[ 0.013089874759316444, -0.01776023954153061, -0.01976335421204567, 0.0455467626452446, 0.06555648893117905, -0.053730614483356476, -0.03612034022808075, 0.029607538133859634, -0.054416172206401825, -0.0947784036397934, -0.04850323125720024, 0.050088584423065186, -0.05295936018228531, 0.0426...
721,517
pydal.base
__call__
null
def __call__(self, query=None, ignore_common_filters=None): return self.where(query, ignore_common_filters)
(self, query=None, ignore_common_filters=None)
[ -0.020695051178336143, -0.08175314962863922, 0.011939452029764652, 0.05121554434299469, -0.03139348328113556, -0.023142851889133453, 0.018247248604893684, -0.029253797605633736, 0.02490595355629921, -0.06586811691522598, 0.02153380773961544, 0.025265421718358994, 0.03363587707281113, -0.01...
721,521
pydal.base
__getitem__
null
def __getitem__(self, key): return self.__getattr__(str(key))
(self, key)
[ 0.04582010582089424, -0.05270139127969742, -0.027425896376371384, -0.023472465574741364, 0.030171794816851616, -0.014118216000497341, 0.03526659309864044, 0.007873780094087124, 0.09686733782291412, -0.046845681965351105, -0.03486959636211395, 0.04168471693992615, 0.04866525158286095, 0.008...
721,522
pydal.base
__init__
null
def __init__( self, uri="sqlite://dummy.db", pool_size=0, folder=None, db_codec="UTF-8", check_reserved=None, migrate=True, fake_migrate=False, migrate_enabled=True, fake_migrate_all=False, decode_credentials=False, driver_args=None, adapter_args=None, attempts=5,...
(self, uri='sqlite://dummy.db', pool_size=0, folder=None, db_codec='UTF-8', check_reserved=None, migrate=True, fake_migrate=False, migrate_enabled=True, fake_migrate_all=False, decode_credentials=False, driver_args=None, adapter_args=None, attempts=5, auto_import=False, bigint_id=False, debug=False, lazy_tables=False, ...
[ 0.009955660440027714, -0.06744413077831268, 0.015996620059013367, 0.0484469048678875, 0.036345113068819046, -0.03662331774830818, -0.020447852090001106, 0.047572553157806396, -0.0761478841304779, -0.060528822243213654, -0.049917399883270264, 0.07992348074913025, -0.029966337606310844, 0.09...
721,570
pydal.objects
Field
null
class Field(Expression, Serializable): Virtual = FieldVirtual Method = FieldMethod Lazy = FieldMethod # for backward compatibility """ Represents a database field Example: Usage:: a = Field(name, 'string', length=32, default=None, required=False, requires=...
(fieldname, type='string', length=None, default=<function <lambda> at 0x7fbac9f848b0>, required=False, requires=<function <lambda> at 0x7fbac9f848b0>, ondelete='CASCADE', onupdate='CASCADE', notnull=False, unique=False, uploadfield=True, widget=None, label=None, comment=None, writable=True, readable=True, searchable=Tr...
[ 0.02375727891921997, -0.03397186100482941, -0.013124064542353153, 0.0663110688328743, -0.008069101721048355, -0.05044497177004814, 0.005829429253935814, 0.012653105892241001, -0.030476298183202744, -0.06237594038248062, -0.007006827276200056, 0.028927365317940712, 0.01246472168713808, 0.05...
721,576
pydal.objects
__getitem__
null
def __getitem__(self, i): if isinstance(i, slice): start = i.start or 0 stop = i.stop db = self.db if start < 0: pos0 = "(%s - %d)" % (self.len(), abs(start) - 1) else: pos0 = start + 1 maxint = sys.maxint if PY2 else sys.maxsize if sto...
(self, i)
[ 0.009343590587377548, -0.0125195337459445, -0.010536761954426765, -0.006742299534380436, 0.015879716724157333, -0.03102247416973114, 0.019827712327241898, -0.0036847961600869894, 0.0279693566262722, -0.08429409563541412, 0.022722909227013588, 0.0611325241625309, -0.0013894751900807023, -0....
721,579
pydal.objects
__init__
null
def __init__( self, fieldname, type="string", length=None, default=DEFAULT, required=False, requires=DEFAULT, ondelete="CASCADE", onupdate="CASCADE", notnull=False, unique=False, uploadfield=True, widget=None, label=None, comment=None, writable=True, r...
(self, fieldname, type='string', length=None, default=<function <lambda> at 0x7fbac9f848b0>, required=False, requires=<function <lambda> at 0x7fbac9f848b0>, ondelete='CASCADE', onupdate='CASCADE', notnull=False, unique=False, uploadfield=True, widget=None, label=None, comment=None, writable=True, readable=True, searcha...
[ 0.023206891492009163, -0.0246293805539608, -0.01810625195503235, 0.05454229190945625, -0.01666344329714775, -0.054461006075143814, 0.03218889236450195, 0.031843431293964386, -0.015200311318039894, -0.07177472859621048, -0.043203022330999374, 0.05238823592662811, -0.015444166027009487, 0.02...
721,580
pydal.objects
__invert__
null
def __invert__(self): if hasattr(self, "_op") and self.op == self._dialect.invert: return self.first return Expression(self.db, self._dialect.invert, self, type=self.type)
(self)
[ 0.030687497928738594, -0.0686943382024765, 0.09790453314781189, 0.0192888043820858, -0.03438074141740799, -0.0741334781050682, -0.014630282297730446, -0.023586397990584373, 0.001983020221814513, -0.013354433700442314, -0.0032735569402575493, 0.006085458677262068, 0.014252563938498497, 0.02...