Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • methylation ratio Error

    Hello folks,

    I was using the script "methratio.py" from BSMAP to extract methylation frequencies on reads from bisulphite sequencing. I have been getting this error message on some specific chromosomes. I am using a reference genome of mm9.fa.


    Traceback (most recent call last):
    File "methratio.py", line 253, in <module>
    disp('total %d valid mappings, %d covered cytosines, average coverage: %.2f fold.' % (nmap, nc, float(nd)/nc))
    ZeroDivisionError: float division by zero

    I would appreciate it if someone can help me figure out what might be going on.

    Thanks.

  • #2
    Can you show the exact command used (and perhaps the first 2 or so alignments in your BAM file)? This should only ever happen if you have no covered cytosines, which would seem rather unlikely.

    BTW, keep in mind that there are innate problems with using BSMAP's output, since you can't filter by quality. Having said that, since bsmap is much faster than anything else out there I can't really fault you for using it

    Comment


    • #3
      @dpryan

      Hello dpryan,

      Thank you very much for your response. This is the command I issued:

      > python methratio.py --ref=mm9.fa --out=brain_control_chr9.txt --chr=chr9 --context=CG --zero-meth *.bam

      The "bam" files were about 5 in all. also used the "samtools" to issue this command on one of the bm files:

      >samtools view 2_SRR955122*.bam | head

      And this is what I got:

      SRR955121-NP070.2 0 chr2 263592509 255 36M * 0 0 CTCTGCCTGCCTCCCCTCTTGNGAATCTTGCAGGCT ggggggggggggggggceggdGddda_a__gegfgd NM:i:0 ZS:Z:++
      SRR955121-NP070.3 0 chr14 60374539 255 36M * 0 0 GGAAGGACGCGCACACCTGCANTCGTATGTGTACAC ffggggdggggggggfggcfbF^aaSSVVSdfdffa NM:i:0 ZS:Z:++
      SRR955121-NP070.5 16 chr1 187870119 255 36M * 0 0 TGTGAATTCAGTTANTTCCCAGTAGCCTATTCTTGT ggcgggaaaa^aa^Eagagggggggggdcggggggg NM:i:1 ZS:Z:-+
      SRR955121-NP070.6 16 chr11 35334197 255 36M * 0 0 CATGGAGGCGATAAGCGATCCGAACATCAGCATGAA ffcfd]ffcaddaffffdfffffaffffafcfddfd NM:i:0 ZS:Z:-+
      SRR955121-NP070.13 16 chr2 20010899 255 36M * 0 0 TCGTAAGAACTCACGCTCTTCTAAGAAAGGGAGGTA dgggcgffffffffffedcggfffdfagggdggggg NM:i:0 ZS:Z:-+
      SRR955121-NP070.16 0 chr2 226862985 255 36M * 0 0 TGTGGTGCAATTCCAGCGGTGATGACGGAACTGGTG eae`dfcdfc`aaaaf_cfff_acfff\fdeSce]f NM:i:0 ZS:Z:++
      SRR955121-NP070.17 16 chr16 41229004 255 36M * 0 0 CCCATTGAGCATTTCTATGTAGGTAGTTTAAGGCCC a^S]aaYU\WNYYUYPL]JXU[U\QQcccc\cccc_ NM:i:0 ZS:Z:-+
      SRR955121-NP070.18 0 chr15 36462077 255 36M * 0 0 CCAAGGTCCAGGGACAAACCATGGGAGAGGGAGTAA f]fffaaddda^Yacdaddd[dd\dUWIYVWT_SXf NM:i:0 ZS:Z:++
      SRR955121-NP070.19 16 chr7 117682445 255 36M * 0 0 AGTAGCCCGCAAGTTTGGAAGTAGCGCTGGGCCGCT c[\O_I^ac[aZ\\X\b^Y\acY^_a^cccccaccc NM:i:0 ZS:Z:-+
      SRR955121-NP070.22 0 chr1 187649295 255 36M * 0 0 AGCACTGTTTCTTTGAATTCAGTTAGTTCCCAGTAG gfgggggggggfgggfggggaggggggfgggggggf NM:i:0 ZS:Z:++


      I really appreciate your help. In addition, I would greatly appreciate any advice on how to be efficient and effective in this analysis. Thanks.

      Comment


      • #4
        Can you confirm that you have alignments on chr9? If so then I haven't a clue what the issue is (I'd have to go through the source code). You might try to contact the authors in that case.

        Comment


        • #5
          Thanks dpryan. I think there are no alignments on chr9. It appears this problem crops up for all chr* for which there are no alignments. I have seen similar errors for chrX and chrY. I have sent a mail to the authors and waiting for their response. Thanks once again.

          Comment


          • #6
            Hello dpryan,

            Were you able to check from the source code on what might be causing the division by zero error? Authors are yet to respond to my email. I truly appreciate your help.

            Thanks

            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...
              04-22-2024, 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-25-2024, 11:49 AM
            0 responses
            19 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 04-24-2024, 08:47 AM
            0 responses
            18 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 04-11-2024, 12:08 PM
            0 responses
            62 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 04-10-2024, 10:19 PM
            0 responses
            60 views
            0 likes
            Last Post seqadmin  
            Working...
            X