Menu

pysam.SamtoolsError: 'csamtools returned with error 1: '

Kattys
2015-04-28
2015-06-23
  • Kattys

    Kattys - 2015-04-28

    Hello,

    Thank you for made CONIFER available, I am trying to run

    python conifer.py rpkm

    in order to calculate RPKM values in my samples, I already ran de examples and everything was ok, but when I started the analysis of my samples first I have to calculate RPKM values, the program throws the following:

    [INIT] Successfully read in 194080 probes from Ejemplos/sampledata/probes.txt

    [RUNNING] Counting total number of reads in bam file...

    [E::hts_hopen] fail to open file '/Users/martamenjivar/Documents/Exomas/Project_MMenjivar/NewReads/Bamindex/F12_H.sorted.bam.bam.bai'

    [E::hts_open] fail to open file '/Users/martamenjivar/Documents/Exomas/Project_MMenjivar/NewReads/Bamindex/F12_H.sorted.bam.bam.bai'

    Traceback (most recent call last):

    File "conifer.py", line 682, in <module></module>

    args.func(args)
    

    File "conifer.py", line 559, in CF_bam2RPKM

    total_reads = float(pysam.view("-c", args.input[0])[0].strip("\n"))
    

    File "/Library/Python/2.7/site-packages/pysam/init.py", line 70, in call

    (retval, "\n".join(stderr)))
    

    pysam.SamtoolsError: 'csamtools returned with error 1: '

    My BAM files are sorted and indexed, so I do not know what is happening, it is possible that BAM files should be generated by a specifically software?

    Thank you

    Sincerely

    Katy SP

     
    • Niklas Krumm

      Niklas Krumm - 2015-04-28

      Hi Katy,

      This is a new one to me. I’m wondering if you have a version of samtools that is not supported? What does just typing samtools at the command line tell you?

      The other thing I noticed (and this may be correct) is that your filename has redundant “.bam.bam” extensions:

      /Users/martamenjivar/Documents/Exomas/Project_MMenjivar/NewReads/Bamindex/F12_H.sorted.bam.bam.bai

      I’m assuming those are the correct filenames?

      Thanks,
      Nik

      On Apr 28, 2015, at 8:16 AM, Katy Sanchez-Pozos kattys@users.sf.net wrote:

      Hello,

      Thank you for made CONIFER available, I am trying to run

      python conifer.py rpkm

      in order to calculate RPKM values in my samples, I already ran de examples and everything was ok, but when I started the analysis of my samples first I have to calculate RPKM values, the program throws the following:

      [INIT] Successfully read in 194080 probes from Ejemplos/sampledata/probes.txt

      [RUNNING] Counting total number of reads in bam file...

      [E::hts_hopen] fail to open file '/Users/martamenjivar/Documents/Exomas/Project_MMenjivar/NewReads/Bamindex/F12_H.sorted.bam.bam.bai'

      [E::hts_open] fail to open file '/Users/martamenjivar/Documents/Exomas/Project_MMenjivar/NewReads/Bamindex/F12_H.sorted.bam.bam.bai'

      Traceback (most recent call last):

      File "conifer.py", line 682, in <module></module>

      args.func(args)
      File "conifer.py", line 559, in CF_bam2RPKM

      total_reads = float(pysam.view("-c", args.input[0])[0].strip("\n"))
      File "/Library/Python/2.7/site-packages/pysam/init.py", line 70, in call

      (retval, "\n".join(stderr)))
      pysam.SamtoolsError: 'csamtools returned with error 1: '

      My BAM files are sorted and indexed, so I do not know what is happening, it is possible that BAM files should be generated by a specifically software?

      Thank you

      Sincerely

      Katy SP

      pysam.SamtoolsError: 'csamtools returned with error 1: '

      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/conifer/discussion/general/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       
    • Niklas Krumm

      Niklas Krumm - 2015-04-28

      Hi Katy,

      This is a new one to me. I’m wondering if you have a version of samtools that is not supported? What does just typing samtools at the command line tell you?

      The other thing I noticed (and this may be correct) is that your filename has redundant “.bam.bam” extensions:

      /Users/martamenjivar/Documents/Exomas/Project_MMenjivar/NewReads/Bamindex/F12_H.sorted.bam.bam.bai

      I’m assuming those are the correct filenames?

      Thanks,
      Nik

      On Apr 28, 2015, at 8:16 AM, Katy Sanchez-Pozos kattys@users.sf.net wrote:

      Hello,

      Thank you for made CONIFER available, I am trying to run

      python conifer.py rpkm

      in order to calculate RPKM values in my samples, I already ran de examples and everything was ok, but when I started the analysis of my samples first I have to calculate RPKM values, the program throws the following:

      [INIT] Successfully read in 194080 probes from Ejemplos/sampledata/probes.txt

      [RUNNING] Counting total number of reads in bam file...

      [E::hts_hopen] fail to open file '/Users/martamenjivar/Documents/Exomas/Project_MMenjivar/NewReads/Bamindex/F12_H.sorted.bam.bam.bai'

      [E::hts_open] fail to open file '/Users/martamenjivar/Documents/Exomas/Project_MMenjivar/NewReads/Bamindex/F12_H.sorted.bam.bam.bai'

      Traceback (most recent call last):

      File "conifer.py", line 682, in <module></module>

      args.func(args)
      File "conifer.py", line 559, in CF_bam2RPKM

      total_reads = float(pysam.view("-c", args.input[0])[0].strip("\n"))
      File "/Library/Python/2.7/site-packages/pysam/init.py", line 70, in call

      (retval, "\n".join(stderr)))
      pysam.SamtoolsError: 'csamtools returned with error 1: '

      My BAM files are sorted and indexed, so I do not know what is happening, it is possible that BAM files should be generated by a specifically software?

      Thank you

      Sincerely

      Katy SP

      pysam.SamtoolsError: 'csamtools returned with error 1: '

      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/conifer/discussion/general/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       
      • Kattys

        Kattys - 2015-05-22

        Hi Niklas!!!

        Thanks a lot, I had a problem with the file name and I was sorting the BAM too instead of just doing the index. Everything was perfect after that.

        Katy

         
  • Kattys

    Kattys - 2015-06-23

    Hi Niklas,

    I have another question, when I generate my RPKM files I get the following message:

    conifer.py:617: RuntimeWarning: invalid value encountered in divide
    rpkm = (10*9(readcount)/(exon_bp))/(total_reads)

    I am new in these tools, and I was looking for an answer in the internet but I didn't find it, do you know why is that? Is my numpy or python version maybe?

    Thanks

    Katy

     
    • Niklas Krumm

      Niklas Krumm - 2015-06-23

      Hi Katy,

      This ones totally benign actually-- just that you have a zero length exon somewhere in the file (which are removed later).

      Cheers

      Nik

      On Mon, Jun 22, 2015 at 9:35 PM, Kattys kattys@users.sf.net wrote:

      Hi Niklas,
      I have another question, when I generate my RPKM files I get the following message:
      conifer.py:617: RuntimeWarning: invalid value encountered in divide
      rpkm = (10*9(readcount)/(exon_bp))/(total_reads)
      I am new in these tools, and I was looking for an answer in the internet but I didn't find it, do you know why is that? Is my numpy or python version maybe?
      Thanks
      Katy


      pysam.SamtoolsError: 'csamtools returned with error 1: '

      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/conifer/discussion/general/
      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       

Log in to post a comment.

MongoDB Logo MongoDB