![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
pybedtools - a Python wrapper for BEDTools | daler | Bioinformatics | 7 | 09-30-2014 11:10 AM |
bowtie wrapper script | lh3 | Bioinformatics | 5 | 06-28-2012 11:27 AM |
pysam IteratorSNPCall output different than the samtools mpileup | aggp11 | Genomic Resequencing | 0 | 07-13-2011 10:25 AM |
pysam pileup wierdness | mbreese | Bioinformatics | 1 | 06-29-2011 12:04 PM |
coverage by strand with pysam | desaila | Bioinformatics | 1 | 10-15-2010 11:54 AM |
![]() |
|
Thread Tools |
![]() |
#1 |
Junior Member
Location: Oxford, UK & Maryland, US Join Date: Oct 2009
Posts: 4
|
![]()
Dear NGS community:
We announce the first release of pysam, a free/open-source lightweight wrapper of SAMtools with a pythonic interface. The code and documentation can be found at the Pysam website: http://code.google.com/p/pysam/ The python module wraps most functionality of Heng Li's C implementation of SAMtools (http://samtools.sourceforge.net). We would like to thank Heng Li for his assistance and, of course, all the samtools developers for providing samtools in the first place. We hope you find it useful and we welcome feedback and comments. Best wishes, The pysam developers |
![]() |
![]() |
![]() |
#2 |
Senior Member
Location: Marburg, Germany Join Date: Oct 2009
Posts: 110
|
![]()
I've used pysam for a couple of days now and greatly appreciate your effort!
|
![]() |
![]() |
![]() |
#3 |
Senior Member
Location: Charlottesville Join Date: Sep 2008
Posts: 119
|
![]()
This is very welcome news, thanks for taking the time to create it. Does it use SWIG?
|
![]() |
![]() |
![]() |
#4 |
Junior Member
Location: Oxford, UK & Maryland, US Join Date: Oct 2009
Posts: 4
|
![]() |
![]() |
![]() |
![]() |
#5 |
Member
Location: Michigan Join Date: Jul 2009
Posts: 14
|
![]()
I tried pysam today and found that it is not compatible with python <2.6.
The reason is because it uses the 'namedtuple' object which is new is python 2.6 I downloaded the following namedtuple implementation and am now able to use pysam with python 2.5 -- http://code.activestate.com/recipes/500261/ Pysam developers -- you might consider making a python2.5 version available too! Thanks a lot for your sharing this great tool! |
![]() |
![]() |
![]() |
#6 |
Nils Homer
Location: Boston, MA, USA Join Date: Nov 2008
Posts: 1,285
|
![]()
Any chance of supporting python 3.1 or greater?
|
![]() |
![]() |
![]() |
#7 |
Junior Member
Location: Oxford, UK & Maryland, US Join Date: Oct 2009
Posts: 4
|
![]()
We intend to support python 3 in the near future (this requires moving to cython from pyrex). For older versions of python 2 (<2.6), we would suggest using choy's work-around (using the namedtuple available from ActiveState code).
|
![]() |
![]() |
![]() |
#8 |
Member
Location: Sydney, Australia Join Date: Jan 2009
Posts: 17
|
![]()
Yes, thanks for making this available.
Unfortunately I have not been able to install it and get the compilation errors below. If anyone can help I'd be grateful. Using: pysam-0.1.1 Python 2.6.4 Pyrex-0.9.8.5 gcc (GCC) 4.3.2 20081105 (Red Hat 4.3.2-7) Linux 2.6.27.5-117.fc10.x86_64 pysam-0.1.1: python2.6 setup.py build running build running build_py running build_ext building 'pysam/csamtools' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Isamtools -I/c/matthew/include/py thon2.6 -c pysam/csamtools.c -o build/temp.linux-x86_64-2.6/pysam/csamtools.o In file included from pysam/csamtools.c:35: samtools/bam.h:341: warning: function declaration isnât a prototype samtools/bam.h:351: warning: function declaration isnât a prototype pysam/csamtools.c: In function â: pysam/csamtools.c:1740: warning: passing argument 7 of â from incompatible pointer type pysam/csamtools.c: In function â: pysam/csamtools.c:2020: warning: passing argument 1 of â from incompatible pointer type pysam/csamtools.c:2023: warning: passing argument 7 of â from incompatible pointer type pysam/csamtools.c: In function â: pysam/csamtools.c:4042: warning: assignment from incompatible pointer type pysam/csamtools.c: In function â: pysam/csamtools.c:7162: error: â undeclared (first use in this function) pysam/csamtools.c:7162: error: (Each undeclared identifier is reported only once pysam/csamtools.c:7162: error: for each function it appears in.) pysam/csamtools.c:7163: error: â undeclared (first use in this function) pysam/csamtools.c:7168: error: â undeclared (first use in this function) pysam/csamtools.c:7191: error: â undeclared (first use in this function) error: command 'gcc' failed with exit status 1 |
![]() |
![]() |
![]() |
#9 |
Member
Location: Sydney, Australia Join Date: Jan 2009
Posts: 17
|
![]()
for the record - this was caused by not cleaning up an earlier unsuccessful installation attempt with an older version of pyrex
|
![]() |
![]() |
![]() |
#10 |
Member
Location: seattle Join Date: Mar 2010
Posts: 14
|
![]()
I apologize if this is not an appropriate forum for this type of thing, but it is the only forum I can find that mentions pysam.
I'm trying to compile the latest version of pysam (0.1.2) under Windows Vista 64-bit (and that is not by choice). I started using gcc from the cygwin tools, but gcc.exe would not run on this 64-bit system (odd). I switched to MinGW toolchain and got pysam to compile, but it won't link. The build process for python extensions generates a .def file with an undefined symbol, in this case "initpysam/csamtools". I can see where this symbol name is generated but I am wondering if anyone else has run into this. It seems like it would affect anyone compiling pysam under cygwin or MinGW32. Thanks in advance, -csw |
![]() |
![]() |
![]() |
#11 |
Member
Location: seattle Join Date: Mar 2010
Posts: 14
|
![]()
I spoke with one of the authors of pysam and he said they had not tried much to make it work under windows. A colleague said it worked well under linux and mac. I compiled it easily under macos, and I'll just dual boot this windows machine with linux. Problem solved.
|
![]() |
![]() |
![]() |
#12 |
Senior Member
Location: USA Join Date: Jan 2008
Posts: 482
|
![]()
Installation issue:
$ which python /usr/local/python/2.5.1/bin/python $ python setup.py install Traceback (most recent call last): File "setup.py", line 56, in <module> from Cython.Distutils import build_ext ImportError: No module named Cython.Distutils |
![]() |
![]() |
![]() |
#13 |
Peter (Biopython etc)
Location: Dundee, Scotland, UK Join Date: Jul 2009
Posts: 1,543
|
![]() Last edited by maubp; 11-18-2010 at 12:54 PM. Reason: added URL |
![]() |
![]() |
![]() |
#14 | |
Senior Member
Location: USA Join Date: Jan 2008
Posts: 482
|
![]() Quote:
|
|
![]() |
![]() |
![]() |
#15 |
Member
Location: T"A Join Date: May 2010
Posts: 18
|
![]()
running build
running build_py running build_ext building 'csamtools' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DFILE_OFFSET_BITS=64 -D_USE_KNETFILE= -Isamtools -Ipysam -I/usr/include/python2.6 -c pysam/csamtools.c -o build/temp.linux-i686-2.6/pysam/csamtools.o In file included from pysam/csamtools.c:140: samtools/razf.h:38:18: error: zlib.h: No such file or directory In file included from pysam/csamtools.c:140: samtools/razf.h:91: error: expected specifier-qualifier-list before ‘z_stream’ In file included from pysam/csamtools.c:142: samtools/bam.h:354: warning: function declaration isn’t a prototype samtools/bam.h:369: warning: function declaration isn’t a prototype pysam/csamtools.c: In function ‘__pyx_pf_9csamtools_7Samfile_fetch’: pysam/csamtools.c:5363: warning: passing argument 7 of ‘bam_fetch’ from incompatible pointer type samtools/bam.h:596: note: expected ‘bam_fetch_f’ but argument is of type ‘int (*)(struct bam1_t *, void *)’ pysam/csamtools.c: In function ‘__pyx_pf_9csamtools_7Samfile_pileup’: pysam/csamtools.c:6057: warning: passing argument 1 of ‘bam_plbuf_init’ from incompatible pointer type samtools/bam.h:525: note: expected ‘bam_pileup_f’ but argument is of type ‘int (*)(uint32_t, uint32_t, int, struct bam_pileup1_t *, void *)’ pysam/csamtools.c:6066: warning: passing argument 7 of ‘bam_fetch’ from incompatible pointer type samtools/bam.h:596: note: expected ‘bam_fetch_f’ but argument is of type ‘int (*)(struct bam1_t *, void *)’ pysam/csamtools.c: In function ‘__pyx_f_9csamtools_14IteratorColumn_cnext’: pysam/csamtools.c:10974: warning: assignment discards qualifiers from pointer target type pysam/csamtools.c: In function ‘__pyx_pf_9csamtools_11AlignedRead_5cigar___set__’: pysam/csamtools.c:12631: warning: passing argument 4 of ‘pysam_bam_update’ from incompatible pointer type pysam/pysam_util.h:33: note: expected ‘uint8_t *’ but argument is of type ‘uint32_t *’ pysam/csamtools.c: In function ‘__Pyx_InitGlobals’: pysam/csamtools.c:21875: warning: this decimal constant is unsigned only in ISO C90 error: command 'gcc' failed with exit status 1 |
![]() |
![]() |
![]() |
#16 |
Member
Location: T"A Join Date: May 2010
Posts: 18
|
![]()
running build
running build_py running build_ext building 'csamtools' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DFILE_OFFSET_BITS=64 -D_USE_KNETFILE= -Isamtools -Ipysam -I/usr/include/python2.6 -c pysam/csamtools.c -o build/temp.linux-i686-2.6/pysam/csamtools.o In file included from pysam/csamtools.c:140: samtools/razf.h:38:18: error: zlib.h: No such file or directory In file included from pysam/csamtools.c:140: samtools/razf.h:91: error: expected specifier-qualifier-list before ‘z_stream’ In file included from pysam/csamtools.c:142: samtools/bam.h:354: warning: function declaration isn’t a prototype samtools/bam.h:369: warning: function declaration isn’t a prototype pysam/csamtools.c: In function ‘__pyx_pf_9csamtools_7Samfile_fetch’: pysam/csamtools.c:5363: warning: passing argument 7 of ‘bam_fetch’ from incompatible pointer type samtools/bam.h:596: note: expected ‘bam_fetch_f’ but argument is of type ‘int (*)(struct bam1_t *, void *)’ pysam/csamtools.c: In function ‘__pyx_pf_9csamtools_7Samfile_pileup’: pysam/csamtools.c:6057: warning: passing argument 1 of ‘bam_plbuf_init’ from incompatible pointer type samtools/bam.h:525: note: expected ‘bam_pileup_f’ but argument is of type ‘int (*)(uint32_t, uint32_t, int, struct bam_pileup1_t *, void *)’ pysam/csamtools.c:6066: warning: passing argument 7 of ‘bam_fetch’ from incompatible pointer type samtools/bam.h:596: note: expected ‘bam_fetch_f’ but argument is of type ‘int (*)(struct bam1_t *, void *)’ pysam/csamtools.c: In function ‘__pyx_f_9csamtools_14IteratorColumn_cnext’: pysam/csamtools.c:10974: warning: assignment discards qualifiers from pointer target type pysam/csamtools.c: In function ‘__pyx_pf_9csamtools_11AlignedRead_5cigar___set__’: pysam/csamtools.c:12631: warning: passing argument 4 of ‘pysam_bam_update’ from incompatible pointer type pysam/pysam_util.h:33: note: expected ‘uint8_t *’ but argument is of type ‘uint32_t *’ pysam/csamtools.c: In function ‘__Pyx_InitGlobals’: pysam/csamtools.c:21875: warning: this decimal constant is unsigned only in ISO C90 error: command 'gcc' failed with exit status 1 |
![]() |
![]() |
![]() |
#17 | |
Peter (Biopython etc)
Location: Dundee, Scotland, UK Join Date: Jul 2009
Posts: 1,543
|
![]() Quote:
|
|
![]() |
![]() |
![]() |
#18 |
Member
Location: T"A Join Date: May 2010
Posts: 18
|
![]()
i installed zlib from the synaptic in ubuntu.
do you know which specific should i install? after i installed another zlib it run, but with many warning.. an now the installation isn't work... python setup.py install running install running build running build_py running build_ext running install_lib copying build/lib.linux-i686-2.6/ctabix.so -> /usr/local/lib/python2.6/dist-packages error: /usr/local/lib/python2.6/dist-packages/ctabix.so: Permission denied |
![]() |
![]() |
![]() |
#19 | ||
Peter (Biopython etc)
Location: Dundee, Scotland, UK Join Date: Jul 2009
Posts: 1,543
|
![]() Quote:
(On my machine I think this means installing zlib1g and zlib1g-dev) Quote:
sudo python setup.py install Alternatively you could install it under your home folder. |
||
![]() |
![]() |
![]() |
#20 |
Member
Location: T"A Join Date: May 2010
Posts: 18
|
![]()
thank you very much!!
now its working!! ![]() |
![]() |
![]() |
![]() |
Thread Tools | |
|
|