Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    running - python setup.py build, i have this error. why!??!

    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

    Comment


    • #17
      Originally posted by dror View Post
      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
      ...
      The first error is usually the most important. It appears you have not installed zlib (or at least, not installed the development header files for zlib).

      Comment


      • #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

        Comment


        • #19
          Originally posted by dror View Post
          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..
          Did you also install the zlib *-dev package?

          (On my machine I think this means installing zlib1g and zlib1g-dev)

          Originally posted by dror View Post
          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
          By default it tries to install it at system level, so use sudo:

          sudo python setup.py install

          Alternatively you could install it under your home folder.

          Comment


          • #20
            thank you very much!!
            now its working!!

            Comment


            • #21
              pysam not working from terminal

              Hello,

              I am a new pysam user. I installed pysam and it is running fine in the python interpreter but when I try to run a python script (*.py) from the command line it gives me the "pysam command not found error".

              I am guessing this is something to do woth the installation. I can run samtools properly and like I said pysam is running fine in the interpreter. Could you help me with this?

              Thanks a lot,

              Praful

              Comment


              • #22
                How are you trying to run the python script?
                Usually you'd type 'python myscript.py', while the command not found error suggests
                you're inputing 'pysam myscript.py' instead.

                Comment


                • #23
                  ffinkernagel

                  Thanks for your reply..

                  Actually I am trying to run the script as ./myscript.py. Also, the error comes when python tries to import pysam: "import pysam" ...

                  Comment


                  • #24
                    Then my magic glassball says, you're missing a correct shebang at the start of your file.
                    It should start with "#! /usr/bin/python" (or wherever your python executable is located. "Which python" will tell you what to place there).
                    In effect, it tells the system with which engine to run this script.

                    If python couldn't import the module, you'd get an "ImportError" (and a complet traceback), not a 'command not found'.

                    Comment


                    • #25
                      Ohh....I am sorry for the trouble...I just missed that line on top of the script...

                      Thanks a lot...

                      Comment


                      • #26
                        don't worry, glad to help!

                        Comment


                        • #27
                          Im trying to a runs simple script to print reads that align to chr1 between 100 and 120 using pysam

                          Code:
                          import pysam
                          samfile=pysam.Samfile("sorted309.bam", "rb")
                          for alignedread in samfile.fetch('chr1', 100, 120):
                          	print alignedread
                          samfile.close()
                          However I'm getting an error:
                          code
                          Code:
                          dhcp-ws-10-55-120-36:programs vyellapantula$ python sampy.py 
                          Traceback (most recent call last):
                            File "sampy.py", line 3, in <module>
                              for alignedread in samfile.fetch('chr1', 100, 120):
                            File "csamtools.pyx", line 771, in csamtools.Samfile.fetch (pysam/csamtools.c:8233)
                            File "csamtools.pyx", line 702, in csamtools.Samfile._parseRegion (pysam/csamtools.c:7458)
                          ValueError: invalid reference `chr1`
                          Does this something to do with Tophat alignment output or is there something Im not doing right?
                          Last edited by vyellapa; 03-16-2012, 04:03 PM.

                          Comment


                          • #28
                            Are you sure that the reference sequence name in the bam file is 'chr1' and not '1'? What is shown if you add a line to your script to print samfile.references?

                            Comment


                            • #29
                              It is indeed '1' and not 'chr1'.

                              Comment


                              • #30
                                I just noticed that pysam.Samfile.pileup() only gives me primary read alignments that overlap a given position, no secondary alignments. Is there a reason for this behaviour?

                                I do get all the read alignments in a certain region with pysam.Samfile.fetch(), but for my application I find the pileup engine more convenient.

                                Did I miss anything here, or is this an undocumented "feature"?

                                Comment

                                Latest Articles

                                Collapse

                                • seqadmin
                                  Essential Discoveries and Tools in Epitranscriptomics
                                  by seqadmin


                                  The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist on Modified Bases...
                                  Yesterday, 07:01 AM
                                • seqadmin
                                  Current Approaches to Protein Sequencing
                                  by seqadmin


                                  Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
                                  04-04-2024, 04:25 PM

                                ad_right_rmr

                                Collapse

                                News

                                Collapse

                                Topics Statistics Last Post
                                Started by seqadmin, 04-11-2024, 12:08 PM
                                0 responses
                                39 views
                                0 likes
                                Last Post seqadmin  
                                Started by seqadmin, 04-10-2024, 10:19 PM
                                0 responses
                                41 views
                                0 likes
                                Last Post seqadmin  
                                Started by seqadmin, 04-10-2024, 09:21 AM
                                0 responses
                                35 views
                                0 likes
                                Last Post seqadmin  
                                Started by seqadmin, 04-04-2024, 09:00 AM
                                0 responses
                                55 views
                                0 likes
                                Last Post seqadmin  
                                Working...
                                X