Presentation is loading. Please wait.

Presentation is loading. Please wait.

Configuring Python on Compile Overview of steps: Get account: Use pythonbrew to install correct version.

Similar presentations


Presentation on theme: "Configuring Python on Compile Overview of steps: Get account: Use pythonbrew to install correct version."— Presentation transcript:

1 Configuring Python on Compile Overview of steps: Get account: 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 | 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 pythonbrew list -k install python version pythonbrew install switch the default version pythonbrew switch Installation can take awhile..

3 Installing numpy and bxpython 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 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

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…


Download ppt "Configuring Python on Compile Overview of steps: Get account: Use pythonbrew to install correct version."

Similar presentations


Ads by Google