[miso-users] AttributeError when testing MISO-Sashimi plot
Yarden Katz
yarden at MIT.EDU
Mon Mar 12 22:08:43 EDT 2012
Hi Sandy,
It sounds like you might be using an older version of pysam. The "positions" attribute was added around pysam 0.5. See:
http://www.cgat.org/~andreas/documentation/pysam/release.html#release-0-6
I recommend installing the latest pysam (0.6) and using that.
Best, --Yarden
On Mar 12, 2012, at 3:07 AM, ·½Ïþæà wrote:
> Dear Yarden,
>
> Hi~!
> I've built misopy-0.4.1 in the linux os via location "~/tmp/misopy/",
> and I would like to test the sashimi-plot, then I encounter one error saying " AttributeError: 'csamtools.AlignedRead' object has no attribute 'positions' ".
> Hope you can check the warning messages and help me out! thx!
>
> the detail warning messages are below:
> ===========================================
> ~/tmp/misopy/misopy-0.4.1/misopy/sashimi_plot$ python ./plot.py --plot-event "chr17:45816186:45816265:- at chr17:45815912:45815950:- at chr17:45814875:45814965:-" test-data/event-data/ settings/sashimi_plot_settings.txt --output-dir test-plot
>
> /usr/local/lib/python2.6/dist-packages/mpl_toolkits/__init__.py:2: UserWarning: Module dateutil was already imported from /usr/local/lib/python2.6/dist-packages/dateutil/__init__.pyc, but /usr/lib/pymodules/python2.6 is being added to sys.path
> __import__('pkg_resources').declare_namespace(__name__)
>
> miso_prefix: ~/tmp/misopy/misopy-0.4.1/misopy/sashimi_plot/test-data/miso-data
> Searching for MISO files in: ~/tmp/misopy/misopy-0.4.1/misopy/sashimi_plot/test-data/miso-data/heartWT1
> - Looking for chromosome chr17 directories
> Looking for MISO files in: ~/tmp/misopy/misopy-0.4.1/misopy/sashimi_plot/test-data/miso-data/heartWT1/chr17
> Found chr17:45816186:45816265:- at chr17:45815912:45815950:- at chr17:45814875:45814965:- MISO file.
> - Location: ~/tmp/misopy/misopy-0.4.1/misopy/sashimi_plot/test-data/miso-data/heartWT1/chr17/chr17:45816186:45816265:- at chr17:45815912:45815950:- at chr17:45814875:45814965:-.miso
> Searching for MISO files in: ~/tmp/misopy/misopy-0.4.1/misopy/sashimi_plot/test-data/miso-data/heartWT2
> - Looking for chromosome chr17 directories
> Looking for MISO files in: ~/tmp/misopy/misopy-0.4.1/misopy/sashimi_plot/test-data/miso-data/heartWT2/chr17
> Found chr17:45816186:45816265:- at chr17:45815912:45815950:- at chr17:45814875:45814965:- MISO file.
> - Location: ~/tmp/misopy/misopy-0.4.1/misopy/sashimi_plot/test-data/miso-data/heartWT2/chr17/chr17:45816186:45816265:- at chr17:45815912:45815950:- at chr17:45814875:45814965:-.miso
> Searching for MISO files in: ~/tmp/misopy/misopy-0.4.1/misopy/sashimi_plot/test-data/miso-data/heartKOa
> - Looking for chromosome chr17 directories
> Looking for MISO files in: ~/tmp/misopy/misopy-0.4.1/misopy/sashimi_plot/test-data/miso-data/heartKOa/chr17
> Found chr17:45816186:45816265:- at chr17:45815912:45815950:- at chr17:45814875:45814965:- MISO file.
> - Location: ~/tmp/misopy/misopy-0.4.1/misopy/sashimi_plot/test-data/miso-data/heartKOa/chr17/chr17:45816186:45816265:- at chr17:45815912:45815950:- at chr17:45814875:45814965:-.miso
> Searching for MISO files in: ~/tmp/misopy/misopy-0.4.1/misopy/sashimi_plot/test-data/miso-data/heartKOb
> - Looking for chromosome chr17 directories
> Looking for MISO files in: ~/tmp/misopy/misopy-0.4.1/misopy/sashimi_plot/test-data/miso-data/heartKOb/chr17
> Found chr17:45816186:45816265:- at chr17:45815912:45815950:- at chr17:45814875:45814965:- MISO file.
> - Location: ~/tmp/misopy/misopy-0.4.1/misopy/sashimi_plot/test-data/miso-data/heartKOb/chr17/chr17:45816186:45816265:- at chr17:45815912:45815950:- at chr17:45814875:45814965:-.miso
> Plotting read densities and MISO estimates along event...
> - Event: chr17:45816186:45816265:- at chr17:45815912:45815950:- at chr17:45814875:45814965:-
> miso_prefix: ~/tmp/misopy/misopy-0.4.1/misopy/sashimi_plot/test-data/miso-data
> Searching for MISO files in: ~/tmp/misopy/misopy-0.4.1/misopy/sashimi_plot/test-data/miso-data/heartWT1
> - Looking for chromosome chr17 directories
> Looking for MISO files in: ~/tmp/misopy/misopy-0.4.1/misopy/sashimi_plot/test-data/miso-data/heartWT1/chr17
> Found chr17:45816186:45816265:- at chr17:45815912:45815950:- at chr17:45814875:45814965:- MISO file.
> - Location: ~/tmp/misopy/misopy-0.4.1/misopy/sashimi_plot/test-data/miso-data/heartWT1/chr17/chr17:45816186:45816265:- at chr17:45815912:45815950:- at chr17:45814875:45814965:-.miso
> Searching for MISO files in: ~/tmp/misopy/misopy-0.4.1/misopy/sashimi_plot/test-data/miso-data/heartWT2
> - Looking for chromosome chr17 directories
> Looking for MISO files in: ~/tmp/misopy/misopy-0.4.1/misopy/sashimi_plot/test-data/miso-data/heartWT2/chr17
> Found chr17:45816186:45816265:- at chr17:45815912:45815950:- at chr17:45814875:45814965:- MISO file.
> - Location: ~/tmp/misopy/misopy-0.4.1/misopy/sashimi_plot/test-data/miso-data/heartWT2/chr17/chr17:45816186:45816265:- at chr17:45815912:45815950:- at chr17:45814875:45814965:-.miso
> Searching for MISO files in: ~/tmp/misopy/misopy-0.4.1/misopy/sashimi_plot/test-data/miso-data/heartKOa
> - Looking for chromosome chr17 directories
> Looking for MISO files in: ~/tmp/misopy/misopy-0.4.1/misopy/sashimi_plot/test-data/miso-data/heartKOa/chr17
> Found chr17:45816186:45816265:- at chr17:45815912:45815950:- at chr17:45814875:45814965:- MISO file.
> - Location: ~/tmp/misopy/misopy-0.4.1/misopy/sashimi_plot/test-data/miso-data/heartKOa/chr17/chr17:45816186:45816265:- at chr17:45815912:45815950:- at chr17:45814875:45814965:-.miso
> Searching for MISO files in: ~/tmp/misopy/misopy-0.4.1/misopy/sashimi_plot/test-data/miso-data/heartKOb
> - Looking for chromosome chr17 directories
> Looking for MISO files in: ~/tmp/misopy/misopy-0.4.1/misopy/sashimi_plot/test-data/miso-data/heartKOb/chr17
> Found chr17:45816186:45816265:- at chr17:45815912:45815950:- at chr17:45814875:45814965:- MISO file.
> - Location: ~/tmp/misopy/misopy-0.4.1/misopy/sashimi_plot/test-data/miso-data/heartKOb/chr17/chr17:45816186:45816265:- at chr17:45815912:45815950:- at chr17:45814875:45814965:-.miso
> Loading BAM filename from: ./test-data/bam-data/heartWT1.sorted.bam
> Loading took 0.00 seconds
>
> Traceback (most recent call last):
> File "./plot.py", line 282, in <module>
> main()
> File "./plot.py", line 278, in main
> plot_event(event_name, pickle_dir, settings_filename, output_dir)
> File "./plot.py", line 132, in plot_event
> output_dir)
> File "/usr/local/lib/python2.6/dist-packages/misopy/sashimi_plot/plot_utils/plot_gene.py", line 540, in plot_density_from_file
> plot_density(sashimi_obj, pickle_filename, event)
> File "/usr/local/lib/python2.6/dist-packages/misopy/sashimi_plot/plot_utils/plot_gene.py", line 222, in plot_density
> junction_log_base=junction_log_base)
> File "/usr/local/lib/python2.6/dist-packages/misopy/sashimi_plot/plot_utils/plot_gene.py", line 35, in plot_density_single
> wiggle, jxns =readsToWiggle_pysam(subset_reads,tx_start, tx_end)
> File "/usr/local/lib/python2.6/dist-packages/misopy/sashimi_plot/plot_utils/plot_gene.py", line 286, in readsToWiggle_pysam
> aligned_positions = read.positions
> AttributeError: 'csamtools.AlignedRead' object has no attribute 'positions'
> ==================================================
>
> Thanks all so much & best
>
> Sandy FANG
>
> _______________________________________________
> miso-users mailing list
> miso-users at mit.edu
> http://mailman.mit.edu/mailman/listinfo/miso-users
More information about the miso-users
mailing list