Git Product home page Git Product logo

gocam-sif-pyexport's Introduction

WARNING: THIS REPO IS NOW ARCHIVED

GOCAM export to SIF

Export GO-CAMs to SIF in Python

Usage

python ttl2sif.py -i <input:directory> [-o <output:directory> -a <output:archive> -l -d -g]

Example

python ttl2sif.py -i /data/noctua-models/models/ -a gocam-sif.zip -l -d

Parameters

  • i: input directory containing GO-CAM TTL files
  • o: output directory to save the GO-CAM SIF files
  • a: zip filename to store all the GO-CAM SIF files
  • l: when specified, try to convert URIs in human readable labels
  • d: when specified, if a given entity (e.g. GO term) has multiple instances, the entity name will also be duplicated _2, _3, etc, so that it appears as different nodes in the SIF format
  • g: when specified, only extract basic Gene Product - Gene Product relationships from the GO-CAMs

SIF files

View SIF in Cytoscape

We advise using our styling in Cytoscape for a better rendering of the GO-CAM graphs. You can import GO-CAM styles in Cytoscape by going to File -> Import -> Styles from file. When viewing your GO-CAM graph in Cytoscape, go in the "Style" tab of your control panel and select any of the GO-CAM style.

CURIEs vs Labels

In the following example, the -l parameter was used trying to show the labels of each entity: GO-CAM-SIF in CytoScape with labeled entities

And without the l parameter: GO-CAM-SIF in CytoScape with at unlabeled entity

Multiple vs single instance of an entity

In the following example, the -d parameter was used, hence the two instances of the gene Pear1 Mmus appears as two separate nodes: GO-CAM-SIF in CytoScape with multiple instances of an entity

Whereas in this same example, all instances of a same entity (e.g. Pear 1 Mmus) have been merged in a single node: GO-CAM-SIF in CytoScape with at most one instance of an entity

Gene Product - Gene Product relationships

The original GO-CAM graph: GO-CAM-SIF in CytoScape

can be simplified to highlight only GP-GP relationships using the g parameter: GO-CAM-SIF in CytoScape

Additional Notes

gocam-sif-pyexport's People

Contributors

kltm avatar lpalbou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

pbordron

gocam-sif-pyexport's Issues

UnboundLocalError: local variable 'zipped_f' referenced before assignment

the variable zipped_f is only set if -a is passed AND the file does not end with .zip

    if archive and not archive.endswith(".zip"):
        archive += ".zip"
        zipped_f = zipfile.ZipFile(archive, 'w')

so if I say python3 ttl2sif.py -i examples -a gocam-sif.zip -g

it will get to this section

            if archive:
                zpf = zipped_f.open("gocam-sif/" + ttl_file[0:ttl_file.rfind(".")] + ".sif", "w")
                zpf.write(str.encode(sif_content))
                zpf.close()

and zipped_f will be unassigned, leading to the error

Activity centric representations

Yet another possible output of these exports. Could be useful to simplify large GO-CAMs representation by removing contextual information.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.