NDEx JavaScript Client API Reference - v0.6.0-alpha.5
    Preparing search index...

    Class CyNDExService

    CyNDEx Service - Cytoscape-NDEx Bridge

    Provides seamless integration between Cytoscape desktop application and NDEx, enabling import/export of networks with support for CX and CX2 formats.

    This service communicates with Cytoscape via its REST API and handles NDEx authentication parameters that are passed to Cytoscape for NDEx operations.

    // Basic usage
    const cyNDEx = new CyNDExService();

    // Configure NDEx server
    cyNDEx.setNDExBaseURL('https://www.ndexbio.org');

    // Set authentication
    cyNDEx.setBasicAuth('username', 'password');
    // or
    cyNDEx.setAuthToken('oauth-id-token');

    // Import network from NDEx to Cytoscape
    await cyNDEx.postNDExNetworkToCytoscape('network-uuid', 'access-key');

    // Export network from Cytoscape to NDEx
    await cyNDEx.postCytoscapeNetworkToNDEx('current');

    // Import CX2 data to Cytoscape
    await cyNDEx.postCX2NetworkToCytoscape(cx2String, 'My Network', 'My Collection');
    Index

    Constructors

    Accessors

    Methods

    • Set NDEx server base URL

      Parameters

      • ndexBaseURL: string

        Complete base URL for NDEx server (e.g., 'https://www.ndexbio.org') Must include protocol (https:// or http://)

      Returns void

      cyNDEx.setNDExBaseURL('https://www.ndexbio.org');
      cyNDEx.setNDExBaseURL('https://test.ndexbio.org');
    • Get the current NDEx server base URL

      Returns string

      Complete NDEx server base URL

    • Set basic authentication credentials for NDEx operations

      Parameters

      • username: string

        NDEx username

      • password: string

        NDEx password

      Returns void

    • Set OAuth ID token for NDEx operations

      Parameters

      • idToken: string

        OAuth ID token from authentication provider

      Returns void

    • Get the complete Cytoscape REST API URL

      Returns string

      Complete URL for Cytoscape REST API

    • Import network from NDEx to Cytoscape

      Parameters

      • uuid: string

        NDEx network UUID

      • OptionalaccessKey: string

        Optional access key for private networks

      • OptionalcreateView: boolean

        Whether to create a network view (default: undefined)

      Returns Promise<any>

      Promise resolving to import result

    • Import CX network data to Cytoscape

      Parameters

      • cx: any

        CX format network data

      Returns Promise<any>

      Promise resolving to import result

    • Import CX2 network data to Cytoscape

      Parameters

      • cx2_string: string

        CX2 format network data as string

      • title: string

        Network title

      • collection_name: string

        Collection name

      Returns Promise<any>

      Promise resolving to import result

    • Export network from Cytoscape to NDEx (create new network)

      Parameters

      • suid: string = 'current'

        Network SUID or 'current' for current network (default: 'current')

      Returns Promise<any>

      Promise resolving to export result

    • Update existing network in NDEx with data from Cytoscape

      Parameters

      • suid: string = 'current'

        Network SUID or 'current' for current network (default: 'current')

      • uuid: string

        Target NDEx network UUID to update

      Returns Promise<any>

      Promise resolving to update result