text stringlengths 0 828 |
|---|
:raises: RuntimeError |
"""""" |
#for path in self.path.values(): |
# if not os.path.exists(path): |
# raise RuntimeError(""File '{}' is missing"".format(path)) |
for tool in ('cd-hit', 'prank', 'hmmbuild', 'hmmpress', 'hmmscan', 'phmmer', 'mafft', 'meme'): |
if not self.pathfinder.exists(tool): |
raise RuntimeError(""Dependency {} is missing"".format(tool))" |
4405,"def generate_non_rabs(self): |
"""""" Shrink the non-Rab DB size by reducing sequence redundancy. |
"""""" |
logging.info('Building non-Rab DB') |
run_cmd([self.pathfinder['cd-hit'], '-i', self.path['non_rab_db'], '-o', self.output['non_rab_db'], |
'-d', '100', '-c', str(config['param']['non_rab_db_identity_threshold']), '-g', '1', '-T', self.cpu]) |
os.remove(self.output['non_rab_db'] + '.clstr')" |
4406,"def parse_duration(duration): |
""""""Attepmts to parse an ISO8601 formatted ``duration``. |
Returns a ``datetime.timedelta`` object. |
"""""" |
duration = str(duration).upper().strip() |
elements = ELEMENTS.copy() |
for pattern in (SIMPLE_DURATION, COMBINED_DURATION): |
if pattern.match(duration): |
found = pattern.match(duration).groupdict() |
del found['time'] |
elements.update(dict((k, int(v or 0)) |
for k, v |
in found.items())) |
return datetime.timedelta(days=(elements['days'] + |
_months_to_days(elements['months']) + |
_years_to_days(elements['years'])), |
hours=elements['hours'], |
minutes=elements['minutes'], |
seconds=elements['seconds']) |
return ParseError()" |
4407,"def skin_details(skin_id, lang=""en""): |
""""""This resource returns details about a single skin. |
:param skin_id: The skin to query for. |
:param lang: The language to display the texts in. |
The response is an object with at least the following properties. Note that |
the availability of some properties depends on the type of item the skin |
applies to. |
skin_id (number): |
The skin id. |
name (string): |
The name of the skin. |
type (string): |
The type of item the skin applies to. One of ``Armor``, ``Back`` or |
``Weapon``. |
flags (list): |
Skin flags. Currently known skin flags are ``ShowInWardrobe``, |
``HideIfLocked`` and ``NoCost``. |
restrictions (list): |
Race restrictions: ``Asura``, ``Charr``, ``Human``, ``Norn`` and |
``Sylvari``. |
icon_file_id (string): |
The icon file id to be used with the render service. |
icon_file_signature (string): |
The icon file signature to be used with the render service. |
"""""" |
params = {""skin_id"": skin_id, ""lang"": lang} |
cache_name = ""skin_details.%(skin_id)s.%(lang)s.json"" % params |
return get_cached(""skin_details.json"", cache_name, params=params)" |
4408,"def bubble_to_dot(bblfile:str, dotfile:str=None, render:bool=False, |
oriented:bool=False): |
""""""Write in dotfile a graph equivalent to those depicted in bubble file"""""" |
tree = BubbleTree.from_bubble_file(bblfile, oriented=bool(oriented)) |
return tree_to_dot(tree, dotfile, render=render)" |
4409,"def bubble_to_gexf(bblfile:str, gexffile:str=None, oriented:bool=False): |
""""""Write in bblfile a graph equivalent to those depicted in bubble file"""""" |
tree = BubbleTree.from_bubble_file(bblfile, oriented=bool(oriented)) |
gexf_converter.tree_to_file(tree, gexffile) |
return gexffile" |
4410,"def bubble_to_js(bblfile:str, jsdir:str=None, oriented:bool=False, **style): |
""""""Write in jsdir a graph equivalent to those depicted in bubble file"""""" |
js_converter.bubble_to_dir(bblfile, jsdir, oriented=bool(oriented), **style) |
return jsdir" |
4411,"def tree_to_dot(tree:BubbleTree, dotfile:str=None, render:bool=False): |
""""""Write in dotfile a graph equivalent to those depicted in bubble file |
See http://graphviz.readthedocs.io/en/latest/examples.html#cluster-py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.