Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • MACSinput file format

    Hi,
    We are trying to use illumina reads which gets converted int Sam format using export2sam and usethesam file as input for MACS. The error is as follows.Any ideas to solve this issue?

    However when trying to use 'filter PF' tags in galaxy option solves this issue. Why is it so? Thanks.
    Code:
    INFO* @ Fri, 17 Jun 2011 13:12:19: 
    # ARGUMENTS LIST:
    # name = MACS_in_Galaxy
    # format = SAM
    # ChIP-seq file = /home/galaxy/galaxy/galaxy-dist/database/files/000/dataset_339.dat
    # control file = /home/galaxy/galaxy/galaxy-dist/database/files/000/dataset_337.dat
    # effective genome size = 2.70e+09
    # band width = 300
    # model fold = 10,30
    # pvalue cutoff = 1.00e-05
    # Small dataset will be scaled towards larger dataset.
    # Range for calculating regional lambda is: 1000 bps and 10000 bps
     
    INFO* @ Fri, 17 Jun 2011 13:12:19: #1 read tag files... 
    INFO* @ Fri, 17 Jun 2011 13:12:19: #1 read treatment tags... 
    Traceback (most recent call last):
    * File "/home/galaxy/tools/bin/macs", line 354, in 
    ****main()
    * File "/home/galaxy/tools/bin/macs", line 59, in main
    *** (treat, control) = load_tag_files_options (options)
    * File "/home/galaxy/tools/bin/macs", line 323, in load_tag_files_options
    *** ttsize = tp.tsize()
    * File "/home/galaxy/tools/lib/python2.6/site-packages/MACS14/IO/Parser.py", line 655, in tsize
    *** return int(s/n)
    ZeroDivisionError: integer division or modulo by zero

  • #2
    Macs 1.4.1 input problems

    This link might be of use to anyone that comes across this thread...

    A bug was introduced in MACS 1.4, which arises if many of the initial reads in an input SAM file are unaligned. You are having this error if MACS is printing something like the following to stderr:...


    I am running MACS 1.4.1 on MAC OS X 10.5.8 Python 2.7 and received the following MACS traceback trying to input BED format:

    chr6 82635 82663 0 2 +
    chr6 90582 90610 0 2 +
    chr6 93026 93054 0 2 +
    chr6 93766 93794 0 1 +
    chr6 93912 93940 0 1 +


    Macintoshata michaelrichman$ macs14 -t lab6macsinput -n lab6q4
    INFO @ Sun, 24 Jul 2011 12:09:50:
    # ARGUMENTS LIST:
    # name = lab6q4
    # format = AUTO
    # ChIP-seq file = lab6macsinput
    # control file = None
    # effective genome size = 2.70e+09
    # band width = 300
    # model fold = 10,30
    # pvalue cutoff = 1.00e-05
    # Small dataset will be scaled towards larger dataset.
    # Range for calculating regional lambda is: 10000 bps

    INFO @ Sun, 24 Jul 2011 12:09:50: #1 read tag files...
    INFO @ Sun, 24 Jul 2011 12:09:50: #1 read treatment tags...
    Traceback (most recent call last):
    File "/Library/Frameworks/Python.framework/Versions/2.7/bin/macs14", line 358, in <module>
    main()
    File "/Library/Frameworks/Python.framework/Versions/2.7/bin/macs14", line 60, in main
    (treat, control) = load_tag_files_options (options)
    File "/Library/Frameworks/Python.framework/Versions/2.7/bin/macs14", line 325, in load_tag_files_options
    tp = options.parser(open2(options.tfile))
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/MACS14/IO/Parser.py", line 60, in guess_parser
    raise Exception("Can't detect format!")

    After installing the patch, MACS seems to be producing results...

    Macintoshata michaelrichman$ macs14 -t lab6macsinput -n lab6q4
    INFO @ Sun, 24 Jul 2011 13:16:21:
    # ARGUMENTS LIST:
    # name = lab6q4
    # format = AUTO
    # ChIP-seq file = lab6macsinput
    # control file = None
    # effective genome size = 2.70e+09
    # band width = 300
    # model fold = 10,30
    # pvalue cutoff = 1.00e-05
    # Small dataset will be scaled towards larger dataset.
    # Range for calculating regional lambda is: 10000 bps

    INFO @ Sun, 24 Jul 2011 13:16:21: #1 read tag files...
    INFO @ Sun, 24 Jul 2011 13:16:21: #1 read treatment tags...
    INFO @ Sun, 24 Jul 2011 13:16:21: Detected format is: BED
    INFO @ Sun, 24 Jul 2011 13:16:25: #1 tag size is determined as 28 bps
    INFO @ Sun, 24 Jul 2011 13:16:25: #1 tag size = 28
    INFO @ Sun, 24 Jul 2011 13:16:25: #1 total tags in treatment: 272742
    INFO @ Sun, 24 Jul 2011 13:16:25: #1 calculate max duplicate tags in single position based on binomal distribution...
    Last edited by mrichman; 07-24-2011, 12:17 PM.

    Comment


    • #3
      I have encountered just the same problem. I have a bunch of ELAND export files to run (s_#_export.txt), and MACS worked on some, but for others, it crashed with the error message described above. After a nerve wrecking search for the cause of error I found no other difference between the 'working' and 'crashing' files than the size: if it exceeded a certain size, MACS apparently couldn't recognize the format properly, it considered the read count 0, then when trying to do the s/n operation (read length/read count?), it crashed. Now it makes sense that larger files have more invalid reads at the beginning.

      I'll try to fix MACS with that patch, I'll tell if it works. I wonder whether they fixed this problem in MACS 2.# versions...?

      Comment


      • #4
        MACs 1.4.1 input

        Make sure inability to align large number of initial reads is not due to reads w/ no counts being submitted with reads with positive counts on opposite strand (ie if you are submitting both strands at the same time).
        Last edited by mrichman; 09-19-2011, 09:41 PM.

        Comment


        • #5
          Yeah! It works! My problems finally got solved.
          I highly recommend this patch for every MACS user.

          However, I have a remark. The blog site says:

          Apply the patch by cd’ing to the directory lib/IO within the MACS source code. Then do

          patch < path/to/macs14_Parser.patch.txt

          and proceed to install MACS as normal.
          It suggests that you should patch before installation. I did, and it happened, I got a message that the patching was successful, but when I installed and run MACS, the problem remained, either MACS didn't recognize the format, or when I set it manually, it crashed on the s/n operation.
          So I went to the installed library this time (for me it was /usr/local/lib/python2.7/dist-packages/MACS14/IO), and patched the installed Parser.py file. It worked again, and after that the problem was gone, MACS worked nicely.

          So I recommend to use the patch after installation.

          Comment


          • #6
            I did it all again, now with the debian package installation, just to be sure of the process, and I'd like to correct myself: apparently the key is to run the patch twice! Whether before or after install, maybe doesn't matter (I did after installation with the debian package), but for the first patch run, the result is just a message that says:

            patching file Parser.py
            But your MACS won't work correctly until you patch a second time. When you see this:

            patching file Parser.py
            Hunk #1 succeeded at 371 (offset -270 lines).
            that's when you can lay back 'cause you're done!

            Comment

            Latest Articles

            Collapse

            • seqadmin
              Choosing Between NGS and qPCR
              by seqadmin



              Next-generation sequencing (NGS) and quantitative polymerase chain reaction (qPCR) are essential techniques for investigating the genome, transcriptome, and epigenome. In many cases, choosing the appropriate technique is straightforward, but in others, it can be more challenging to determine the most effective option. A simple distinction is that smaller, more focused projects are typically better suited for qPCR, while larger, more complex datasets benefit from NGS. However,...
              10-18-2024, 07:11 AM
            • seqadmin
              Non-Coding RNA Research and Technologies
              by seqadmin




              Non-coding RNAs (ncRNAs) do not code for proteins but play important roles in numerous cellular processes including gene silencing, developmental pathways, and more. There are numerous types including microRNA (miRNA), long ncRNA (lncRNA), circular RNA (circRNA), and more. In this article, we discuss innovative ncRNA research and explore recent technological advancements that improve the study of ncRNAs.

              Nobel Prize for MicroRNA Discovery
              This week,...
              10-07-2024, 08:07 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by seqadmin, 11-01-2024, 06:09 AM
            0 responses
            21 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 10-30-2024, 05:31 AM
            0 responses
            20 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 10-24-2024, 06:58 AM
            0 responses
            24 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 10-23-2024, 08:43 AM
            0 responses
            53 views
            0 likes
            Last Post seqadmin  
            Working...
            X