corneto.io.load_graph_from_sif#

corneto.io.load_graph_from_sif(sif_file, delimiter='\t', has_header=False, discard_self_loops=True, column_order=(0, 1, 2), *, compression='auto', timeout=30.0, encoding='utf-8')#

Create a graph from a local, remote, or file-like SIF source.

Parameters:
  • sif_file (str | PathLike | BinaryIO | TextIO) – SIF path, HTTP(S) URL, binary stream, or text stream

  • delimiter (str) – Column delimiter in file

  • has_header (bool) – Whether file has a header row

  • discard_self_loops (bool | None) – Whether to ignore self-loops

  • column_order (Sequence[int]) – Order of source, interaction, target columns

  • compression (str | None) – "auto" detects gzip, bz2, or xz by magic bytes; None disables decompression, and an explicit codec forces it.

  • timeout (float) – HTTP request timeout in seconds.

  • encoding (str) – Encoding used for binary sources.

Returns:

New Graph loaded from SIF file