Code Monkey home page Code Monkey logo

genome-blender's Introduction

3d Genome blender

Scripts to create cartoons of 3D genomes on blender. example of coloured TADs another example of coloured TADs

requires

  • R-base
  • RANN R package
  • blender v2.77. Have not tested other versions but it might work unless something really basic had changed.
  • Does not require but makes use of the color palettes from colorbrewer.

examples of models generated with this code

https://vimeo.com/genome3d

Based on the concepts developed on "Capturing pairwise and multi-way chromosomal conformations using chromosomal walks".

How to use

In general one has to create the semi-random walk that will determine the "chromatin". This is done on R. After saving the chromatin path in R one should import it using the python script within blender. A handful of blender files are provided and links to the corresponding videos too.

Simple example

source('tads.r')
# for a rather dense large "TAD"
gg = generate_tad_random(6000, warp = 200, limit = 0.7, abs_limit = 0.9 * 4)
# save the path as a text file
write.table(gg$path, "path_6k_dense_w_200_l_0.7.txt", quote=F, row.names=F, sep="\t");

Once the path is computed it has to be imported into blender. The code at this moment has a lot of room for improvement but for the time being one must manually change the path at the bottom of the chromosomes.py script and point towards the text file generated in R.

tad_path6 = importWalk("path_6k_dense_w_200_l_0.7.txt")

Notes

The current scripts by no means represent real information. They are just a cartoon of how I imagine things to work. This of course could be fed with real data (not sure yet what type) and draw something more "real".

keywords: 3d genome, hic, chromatin, chromosome conformation capture, 3C, chromosomal walks, C-walks.

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.