Skip to content

nucleome/nucle

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Nucleome Tools

Python version: nucle

install

Download this repository and then run the following script.

cd nucle 
python3 setup.py install

Usage

Various functions to support visualization of 3D genome structure models in Nucleome Browser

include following functions:

usage: nucle [-h] [-v]
             {hssinfo,servehss,cmm2nucle3d,hss2nucle3d,createdatasheet} ...

python tools for nucleome browser

positional arguments:
  {hssinfo,servehss,cmm2nucle3d,hss2nucle3d,createdatasheet}
                        subcommand help
    hssinfo             output basic info about hss file
    servehss            host a hss file as web data service
    cmm2nucle3d         convert cmm format to nucle3d format
    hss2nucle3d         extract a structure in a hss file and output it as
                        nucle3d format
    createdatasheet     download data from 4DN data portal and prepare an input
                        data sheet for nucleserver

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit

nucle3d file

nucle3d format is used in Nucleome Browser for displaying 3D genome structure models. You can create a nucle3d format file and put it in a web server. Make sure that the URL can be accessed by "http(s)://vis.nucleome.org" by setting its header "CORS".

Start a web file server with nucleserver

In nucleserver, we also provide a subcommand to start a simple web server with CORS Header "Access-Control-Allow-Origin: https://vis.nucleome.org". For example, if you have a nucle3d format file /home/yourname/folder/file.nucle3d. you can start a file web server using our tool nucleserver with the following script.

nucleserver file -r /home/yourname/folder 

It will start a server http://127.0.0.1:8611 and the nucle3d file url will be http://127.0.0.1:8611/get/file.nucle3d. Then, paste this URL in Nucleome Browser 3D genome structure model viewer. The 3D model will be shown in this panel. If 8611 port is occupied by another program. You can start with -p parameter to set this web service to another port.

Nucle3D format

version 0.0.1

TITLE   [NAME]        # Tab split
GENOME  hg38          # Tab split
BINSIZE [binsize]
CHR chr1 # Tab split
i,x,y,z
i,x,y,z
..
CHR chr2
..

Note that the genome coordinates i is 0-index and gaps of index i are also permitted.

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%