daler / metaseq

Framework for integrated analysis and plotting of ChIP/RIP/RNA/*-seq data
https://daler.github.io/metaseq
MIT License
87 stars 36 forks source link

SignalMiniBrowser is not defined #3

Closed sumanex closed 11 years ago

sumanex commented 11 years ago

Thanks for your reply to the db issue ffrom gtf files for mm9. Actually finallyi want to make tss plots and heatmap from my bam files. so I created the db object

But for basic plotting checking . All my files bam and db are in working directory "Downloads"

cd Downloads python

import metaseq from matplotlib import pyplot as plt from pybedtools.contrib.plotting import Track import pybedtools G = gffutils.FeatureDB( ... 'Mus_musculus.NCBIM37.64.gtf.db') ip = metaseq.genomic_signal('galaxy226.bam') inp = metaseq.genomic_signal('galaxy58.bam') plotting_kwargs = [ ... dict(color='r', label='IP'), ... dict(color='k',linestyle=':', label='input')] local_coverage_kwargs = dict(fragment_size=200) b = SignalMiniBrowser([ip, inp], ... plotting_kwargs=plotting_kwargs, ... local_coverage_kwargs=local_coverage_kwargs) Traceback (most recent call last): File "", line 1, in NameError: name 'SignalMiniBrowser' is not defined

help with the commands will be very helpful.(minibrowser.py file is presen tin metaseq folder)

suman

daler commented 11 years ago

I would recommend going step-by-step through the tutorial at http://packages.python.org/metaseq/example_session.html to see how the framework works. You should be able to just replace the metaseq.example_filename(...) lines with the simple string paths to your files, and for dbfn, use the path to your newly created database.

As the tutorial shows, you don't have to create separate genomic_signal objects, and you don't have to set up your own minibrowser -- SignalMiniBrowser or otherwise. The Chipseq class takes care of it all for you.

The hardest part is probably choosing which features to look at, but the tutorial walks you through generating a first-draft version of TSSs of gene bodies.

The methods Chipseq.diffed_array and Chipseq.plot do most of the work for you.

If at some point you wanted to use a SignalMiniBrowser directly, import it with from metaseq.minibrowser import SignalMiniBrowser (but again it's not needed here).