1 / 6

Configuring Python on Compile

Configuring Python on Compile. Overview of steps: Get account: http:// go.vcu.edu/compile Use pythonbrew to install correct version of Python Install numpy lib using pip Install bx -python using the easy installer. numpy must be installed before bx -python!. Installing pythonbrew.

ricky
Télécharger la présentation

Configuring Python on Compile

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Configuring Python on Compile • Overview of steps: • Get account: http://go.vcu.edu/compile • Use pythonbrew to install correct version of Python • Install numpy lib using pip • Install bx-python using the easy installer numpy must be installed before bx-python!

  2. Installing pythonbrew Install pythonbrew: curl -kL http://xrl.us/pythonbrewinstall | bash Add the following line to the end of your ~/.bashrc [[ -s "$HOME/.pythonbrew/etc/bashrc" ]] && source "$HOME/.pythonbrew/etc/bashrc" list versions of python available pythonbrewlist -k install python version 2.7.3 pythonbrewinstall 2.7.3 switch the default version pythonbrew switch 2.7.3 Installation can take awhile..

  3. Installing numpyandbxpython Confirm python version python -V Install numpy pip install numpy Install bx-python (bitbucket.org/james_taylor/bx-python/wiki/Home) easy_install https://bitbucket.org/james_taylor/bx-python/get/tip.tar.bz2 If easy_install fails, see bitbucket for manual instructions

  4. Getting our Files Original files for ENCODE and other projects are available on their project sites. However, we’ve made a local mirror of key files for your convenience for this class http://mirror.vcu.edu/vcu/encode/ See also ENCODE at UCSC

  5. A bx-python usage example from bx.intervals.io import GenomicIntervalReader from bx.bbi.bigwig_file import BigWigFile import numpy as np bw = BigWigFile(open('wgEncodeBroadHistoneNhaH3k04me2Sig.bigWig')) mySummary = bw.query("chr1", 10000, 10500, 1) myInterval= bw.get("chr1", 10000, 10500) myArrayInterval = bw.get_as_array("chr1", 10000, 10500) print mySummary print myInterval Documentation is sparse, but basic usage can usually be inferred from the class defs present in the code http://mirror.vcu.edu/vcu/encode/

  6. A bx-python usage example figure() plot(x, y, linewidth = 1.0, color = 'green, label = "your_trackname" ) la = legend() xlabel('genome position') ylabel('counts') title('BigWig Data') grid(True) savefig("test.png") show() Bigwig data can be plotted with matplotlib… http://mirror.vcu.edu/vcu/encode/

More Related