Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions py4cytoscape/annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def add_annotation_bounded_text(text=None, x_pos=None, y_pos=None, font_size=Non
border_color (str): hexadecimal color; default is #000000 (black)
border_opacity (int): Integer between 0 and 100; default is 100
height (int): Height of bounding shape; default is based on text height
width (int) Width of bounding shape; default is based on text length
width (int): Width of bounding shape; default is based on text length
name (str): Name of annotation object; default is "Text"
canvas (str): Canvas to display annotation, i.e., foreground (default) or background
z_order (int): Arrangement order specified by number (larger values are in front of smaller values); default is 0
Expand Down Expand Up @@ -221,7 +221,7 @@ def add_annotation_image(url=None, x_pos=None, y_pos=None, angle=None, opacity=N
border_color (str): hexadecimal color; default is #000000 (black)
border_opacity (int): Integer between 0 and 100; default is 100
height (int): Height of bounding shape; default is based on text height
width (int) Width of bounding shape; default is based on text length
width (int): Width of bounding shape; default is based on text length
name (str): Name of annotation object; default is "Text"
canvas (str): Canvas to display annotation, i.e., foreground (default) or background
z_order (int): Arrangement order specified by number (larger values are in front of smaller values); default is 0
Expand Down Expand Up @@ -311,7 +311,7 @@ def add_annotation_shape(type=None, custom_shape=None, x_pos=None, y_pos=None, a
border_color (str): hexadecimal color; default is #000000 (black)
border_opacity (int): Integer between 0 and 100; default is 100
height (int): Height of bounding shape; default is based on text height
width (int) Width of bounding shape; default is based on text length
width (int): Width of bounding shape; default is based on text length
name (str): Name of annotation object; default is "Text"
canvas (str): Canvas to display annotation, i.e., foreground (default) or background
z_order (int): Arrangement order specified by number (larger values are in front of smaller values); default is 0
Expand Down Expand Up @@ -612,7 +612,7 @@ def update_annotation_bounded_text(text=None, annotation_name=None, x_pos=None,
border_color (str): hexadecimal color; default is #000000 (black)
border_opacity (int): Integer between 0 and 100; default is 100
height (int): Height of bounding shape; default is based on text height
width (int) Width of bounding shape; default is based on text length
width (int): Width of bounding shape; default is based on text length
name (str): Name of annotation object; default is "Text"
canvas (str): Canvas to display annotation, i.e., foreground (default) or background
z_order (int): Arrangement order specified by number (larger values are in front of smaller values); default is 0
Expand Down Expand Up @@ -702,7 +702,7 @@ def update_annotation_shape(type=None, custom_shape=None, annotation_name=None,
border_color (str): hexadecimal color; default is #000000 (black)
border_opacity (int): Integer between 0 and 100; default is 100
height (int): Height of bounding shape; default is based on text height
width (int) Width of bounding shape; default is based on text length
width (int): Width of bounding shape; default is based on text length
name (str): Name of annotation object; default is "Text"
canvas (str): Canvas to display annotation, i.e., foreground (default) or background
z_order (int): Arrangement order specified by number (larger values are in front of smaller values); default is 0
Expand Down Expand Up @@ -783,7 +783,7 @@ def update_annotation_image(url=None, annotation_name=None, x_pos=None, y_pos=No
border_color (str): hexadecimal color; default is #000000 (black)
border_opacity (int): Integer between 0 and 100; default is 100
height (int): Height of bounding shape; default is based on text height
width (int) Width of bounding shape; default is based on text length
width (int): Width of bounding shape; default is based on text length
name (str): Name of annotation object; default is "Text"
canvas (str): Canvas to display annotation, i.e., foreground (default) or background
z_order (int): Arrangement order specified by number (larger values are in front of smaller values); default is 0
Expand Down
4 changes: 3 additions & 1 deletion py4cytoscape/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ def commands_post(cmd, base_url=DEFAULT_BASE_URL):
query URL, executes a POST request, and parses the result content into a dict object.

Args:
cmd_string (str): command
cmd (str): Command to be executed in Cytoscape.
base_url (str): Ignore unless you need to specify a custom domain,
port or version to connect to the CyREST API. Default is http://127.0.0.1:1234
and the latest version of the CyREST API supported by this version of py4cytoscape.
Expand Down Expand Up @@ -556,6 +556,8 @@ def command_run_file(file, args=None, base_url=DEFAULT_BASE_URL):
Cytoscape commands, one per line. Arguments to the script are provided by the args argument

Args:
file (str): Path to the file containing Cytoscape commands, one per line.
args (list or None): Provide arguments to the script. Default is None.
base_url (str): Ignore unless you need to specify a custom domain,
port or version to connect to the CyREST API. Default is http://127.0.0.1:1234
and the latest version of the CyREST API supported by this version of py4cytoscape.
Expand Down
1 change: 0 additions & 1 deletion py4cytoscape/cy_ndex.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ def get_network_ndex_id(network=None, base_url=DEFAULT_BASE_URL):
Args:
network (SUID or str or None): Name or SUID of a network. Default is the
"current" network active in Cytoscape.
metadata (dict): A list of structured information describing the network
base_url (str): Ignore unless you need to specify a custom domain,
port or version to connect to the CyREST API. Default is http://localhost:1234
and the latest version of the CyREST API supported by this version of py4cytoscape.
Expand Down
4 changes: 2 additions & 2 deletions py4cytoscape/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def create_column_filter(filter_name, column, criterion, predicate, caseSensitiv
Args:
filter_name (str): Name for new filter.
column (str): Table column to base filter upon.
criterion (list, bool, str, int or float): For boolean columns: True or False. For string columns: a
criterion (list or bool or str or int or float): For boolean columns: True or False. For string columns: a
string value, e.g., "hello". If the predicate is REGEX then this can be a regular expression as
accepted by the Java Pattern class (https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html).
For numeric columns: If the predicate is BETWEEN or IS_NOT_BETWEEN then this is a two-element list of
Expand Down Expand Up @@ -199,7 +199,7 @@ def create_degree_filter(filter_name, criterion, predicate='BETWEEN', edge_type=
filter_name (str): Name for new filter.
criterion (list): A two-element vector of numbers, example: [1,5].
predicate (str): BETWEEN (default) or IS_NOT_BETWEEN
edgeType (str): Type of edges to consider in degree count: ANY (default), UNDIRECTED, INCOMING, OUTGOING, DIRECTED
edge_type (str): Type of edges to consider in degree count: ANY (default), UNDIRECTED, INCOMING, OUTGOING, DIRECTED
hide (bool): Whether to hide filtered out nodes and edges. Default is FALSE.
Ignored if all nodes or edges are filtered out. This is an alternative to filtering for node and edge selection.
network (SUID or str or None): Name or SUID of the network. Default is the "current" network active in Cytoscape.
Expand Down
4 changes: 2 additions & 2 deletions py4cytoscape/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def get_group_info(group, network=None, base_url=DEFAULT_BASE_URL):
"""Retrieve information about a group by name or identifier.

Args:
group_name (str or SUID): Group name or SUID.
group (str or SUID): Group name or SUID.
network (SUID or str or None): Name or SUID of a network. Default is the
"current" network active in Cytoscape.
base_url (str): Ignore unless you need to specify a custom domain,
Expand Down Expand Up @@ -406,7 +406,7 @@ def delete_group(groups=None, groups_by_col='SUID', network=None, base_url=DEFAU
"""Delete one or more groups, while leaving member nodes intact.

Args:
groups (list or str or None) List of group SUIDs, names, other column values or keywords: all, selected,
groups (list or str or None): List of group SUIDs, names, other column values or keywords: all, selected,
unselected. Default is the currently selected group.
groups_by_col (str): name of node table column corresponding to provided groups list. Default is 'SUID'.
network (SUID or str or None): Name or SUID of a network. Default is the
Expand Down
4 changes: 1 addition & 3 deletions py4cytoscape/network_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def export_image(filename=None, type='PNG', resolution=None, units=None, height=
type (str): Type of image to export, e.g., PNG (default), JPEG, PDF, SVG, PS (PostScript).
resolution (int): The resolution of the exported image, in DPI. Valid only for bitmap formats, when the selected
width and height 'units' is inches. The possible values are: 72 (default), 100, 150, 300, 600. [DEPRECATED as of Cytoscape v3.10]
units (str) The units for the 'width' and 'height' values. Valid only for bitmap formats, such as PNG and JPEG.
units (str): The units for the 'width' and 'height' values. Valid only for bitmap formats, such as PNG and JPEG.
The possible values are: pixels (default), inches. [DEPRECATED as of Cytoscape v3.10]
height (float): The height of the exported image. Valid only for bitmap formats, such as PNG and JPEG. [DEPRECATED as of Cytoscape v3.10]
width (float): The width of the exported image. Valid only for bitmap formats, such as PNG and JPEG. [DEPRECATED as of Cytoscape v3.10]
Expand Down Expand Up @@ -448,8 +448,6 @@ def toggle_graphics_details(base_url=DEFAULT_BASE_URL):
See :meth:`cytoscape_memory_status`.

Args:
network (str or SUID or None): Name or SUID of the network or view. Default is the "current" network active in Cytoscape.
If a network view SUID is provided, then it is validated and returned.
base_url (str): Ignore unless you need to specify a custom domain,
port or version to connect to the CyREST API. Default is http://127.0.0.1:1234
and the latest version of the CyREST API supported by this version of py4cytoscape.
Expand Down
6 changes: 3 additions & 3 deletions py4cytoscape/networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def get_network_suid(title=None, base_url=DEFAULT_BASE_URL):
"""Get the SUID of a network.

Args:
suid (SUID or str or None): Name of the network; default is "current" network. If an SUID is
title (SUID or str or None): Name of the network; default is "current" network. If an SUID is
provided, then it is validated and returned.
base_url (str): Ignore unless you need to specify a custom domain,
port or version to connect to the CyREST API. Default is http://127.0.0.1:1234
Expand Down Expand Up @@ -608,7 +608,7 @@ def add_cy_edges(source_target_list, edge_type='interacts with', directed=False,

Args:
source_target_list (list or list of lists): Source and target node pairs
edgeType (str): The type of interaction. Default is 'interacts with'.
edge_type (str): The type of interaction. Default is 'interacts with'.
directed (bool): Indicates whether interactions are directed. Default is ``FALSE``.
network (SUID or str or None): Name or SUID of a network or view. Default is the
"current" network active in Cytoscape.
Expand Down Expand Up @@ -991,7 +991,7 @@ def create_network_from_networkx(netx, title='From networkx', collection='My Net
"""Create a Cytoscape network from a NetworkX graph.

Args:
netx (Graph, DiGraph, MultiGraph or MultiDiGraph): networkx object
netx (Graph or DiGraph or MultiGraph or MultiDiGraph): networkx object
title (str): network name
collection (str): network collection name
base_url (str): Ignore unless you need to specify a custom domain,
Expand Down
2 changes: 1 addition & 1 deletion py4cytoscape/notebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def notebook_export_show_image(filename='image', type='PNG', resolution=None, un
type (str): Type of image to export, e.g., PNG (default), JPEG, PDF, SVG, PS (PostScript).
resolution (int): The resolution of the exported image, in DPI. Valid only for bitmap formats, when the selected
width and height 'units' is inches. The possible values are: 72 (default), 100, 150, 300, 600.
units (str) The units for the 'width' and 'height' values. Valid only for bitmap formats, such as PNG and JPEG.
units (str): The units for the 'width' and 'height' values. Valid only for bitmap formats, such as PNG and JPEG.
The possible values are: pixels (default), inches.
height (float): The height of the exported image. Valid only for bitmap formats, such as PNG and JPEG.
width (float): The width of the exported image. Valid only for bitmap formats, such as PNG and JPEG.
Expand Down
1 change: 1 addition & 0 deletions py4cytoscape/sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ def sandbox_get_from(source_file, dest_file=None, overwrite=True, sandbox_name =
Args:
source_file (str): Name of file to read (as absolute path or sandbox-relative path)
dest_file (str): Name of file in the Python workflow's file system ... if None, use file name in source_file
overwrite (bool): False causes error if dest_file already exists; True replaces it if it exists
sandbox_name (str): Name of sandbox containing file. None means "the current sandbox".
base_url (str): Ignore unless you need to specify a custom domain,
port or version to connect to the CyREST API. Default is http://localhost:1234
Expand Down
21 changes: 21 additions & 0 deletions py4cytoscape/style_auto_mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,12 @@ def palette_color_brewer_d_RdYlGn(reverse=False):
def scheme_d_shapes(base_url=DEFAULT_BASE_URL):
"""Generate list of node shapes of a given size

Args:
base_url (str): Ignore unless you need to specify a custom domain, port or
version to connect to the CyREST API. Default is http://localhost:1234
and the latest version of the CyREST API supported by this version of
py4cytoscape.

Returns:
lambda: generates a list of shapes

Expand All @@ -667,6 +673,12 @@ def scheme_d_shapes(base_url=DEFAULT_BASE_URL):
def scheme_d_line_styles(base_url=DEFAULT_BASE_URL):
"""Generate list of line styles of a given size

Args:
base_url (str): Ignore unless you need to specify a custom domain, port or
version to connect to the CyREST API. Default is http://localhost:1234
and the latest version of the CyREST API supported by this version of
py4cytoscape.

Returns:
lambda: generates a list of line styles

Expand All @@ -682,6 +694,12 @@ def scheme_d_line_styles(base_url=DEFAULT_BASE_URL):
def scheme_d_arrow_shapes(base_url=DEFAULT_BASE_URL):
"""Generate list of arrow shapes of a given size

Args:
base_url (str): Ignore unless you need to specify a custom domain, port or
version to connect to the CyREST API. Default is http://localhost:1234
and the latest version of the CyREST API supported by this version of
py4cytoscape.

Returns:
lambda: generates a list of arrow shapes

Expand Down Expand Up @@ -942,6 +960,7 @@ def gen_edge_opacity_map(table_column,
Args:
table_column (str): Name of Cytoscape edge table column to map values from
number_scheme (dict or func): Descriptor for functions that return an opacity list of a given length
mapping_type (str): continuous or discrete (c, d) mapping; default is continuous
default_number (int): Opacity value to set as default for all unmapped values
style_name (str): name for style
network (SUID or str or None): Name or SUID of a network or view. Default is the
Expand Down Expand Up @@ -1000,6 +1019,7 @@ def gen_node_width_map(table_column,
Args:
table_column (str): Name of Cytoscape node table column to map values from
number_scheme (dict or func): Descriptor for functions that return a width list of a given length
mapping_type (str): continuous or discrete (c, d); default is continuous
default_number (int): width value to set as default for all unmapped values
style_name (str): name for style
network (SUID or str or None): Name or SUID of a network or view. Default is the
Expand Down Expand Up @@ -1227,6 +1247,7 @@ def gen_edge_size_map(table_column,
Args:
table_column (str): Name of Cytoscape node table column to map values from
number_scheme (dict or func): Descriptor for functions that return a size list of a given length
mapping_type (str): continuous or discrete (c, d); default is continuous
default_number (int): size value to set as default for all unmapped values
style_name (str): name for style
network (SUID or str or None): Name or SUID of a network or view. Default is the
Expand Down
7 changes: 2 additions & 5 deletions py4cytoscape/style_bypasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ def clear_node_property_bypass(node_names, visual_property, network=None, base_u
comma-separated string of node names or SUIDs, or scalar node name
or SUID. Node names should be found in the ``name`` column of the ``nodes table``.
visual_property (str): Name of a visual property. See ``get_visual_property_names``.
bypass (bool): Whether to set permanent bypass value. Default is True
network (SUID or str or None): Name or SUID of a network. Default is the
"current" network active in Cytoscape.
base_url (str): Ignore unless you need to specify a custom domain,
Expand Down Expand Up @@ -371,7 +370,6 @@ def clear_edge_property_bypass(edge_names, visual_property, network=None, base_u
comma-separated string of edge names or SUIDs, or scalar edge name
or SUID. Edge names should be found in the ``name`` column of the ``edges table``.
visual_property (str): Name of a visual property. See ``get_visual_property_names``.
bypass (bool): Whether to set permanent bypass value. Default is True
network (SUID or str or None): Name or SUID of a network. Default is the
"current" network active in Cytoscape.
base_url (str): Ignore unless you need to specify a custom domain,
Expand Down Expand Up @@ -485,7 +483,6 @@ def clear_network_property_bypass(visual_property, network=None, base_url=DEFAUL

Args:
visual_property (str): Name of a visual property. See ``get_visual_property_names``.
bypass (bool): Whether to set permanent bypass value. Default is True
network (SUID or str or None): Name or SUID of a network. Default is the
"current" network active in Cytoscape.
base_url (str): Ignore unless you need to specify a custom domain,
Expand Down Expand Up @@ -693,8 +690,8 @@ def set_node_position_bypass(node_names, new_x_locations=None, new_y_locations=N
node_names (str or list or int): List of nodes as ``list`` of node names or SUIDs,
comma-separated string of node names or SUIDs, or scalar node name
or SUID. Node names should be found in the ``name`` column of the ``nodes table``.
new_x_locations (list, int or float): List of x position values, or single value, default is current x position
new_y_locations (list, int or float): List of y position values, or single value, default is current y position
new_x_locations (list or int or float): List of x position values, or single value, default is current x position
new_y_locations (list or int or float): List of y position values, or single value, default is current y position
network (SUID or str or None): Name or SUID of a network. Default is the
"current" network active in Cytoscape.
base_url (str): Ignore unless you need to specify a custom domain,
Expand Down
Loading