Git Product home page Git Product logo

Comments (7)

benjschiller avatar benjschiller commented on August 25, 2024

Did you run MACS in --SPMR mode?

from macs.

dineshmdh avatar dineshmdh commented on August 25, 2024

I don't really know what SPMR mode is (could you possibly tell me in brief
what that is?). I just followed the how the example in
http://pypi.python.org/pypi/MACS2/2.0.10.09132012 says to do it.

i.e. I called it in this format:

macs2 callpeak -t ChIP.bam -c Control.bam -f BAM -g hs -n test -B -q 0.01

Thank you.

On Mon, Dec 24, 2012 at 10:20 PM, Benjamin Schiller <
[email protected]> wrote:

Did you run MACS in --SPMR mode?

โ€”
Reply to this email directly or view it on GitHubhttps://github.com//issues/12#issuecomment-11668594.

-- Dinesh

from macs.

benjschiller avatar benjschiller commented on August 25, 2024

Could you run samtools view -b ChIP.bam chrX:1-60215 > ChIP.short.bam and send that to me? (and for the Control file too)? And see if running MACS on those with --nomodel --shiftsize 200 changes the result? (use whatever shiftsize it reported last time)

from macs.

dineshmdh avatar dineshmdh commented on August 25, 2024

Hi,

As you suggested, I tried making the "short.bam" files. But while
implementing the "samtools view -b ChIP.bam chrX:1-60215 > ChIP.short.bam"
command - for the bam files of both transcription factor (Ap2gamma in this
case) and control file (StdAln in this case), I received the following
notification:

[bam_index_load] fail to load BAM index.
*[main_samview] random alignment retrieval only works for indexed BAM files.
*

So I am not entirely sure if the output is entirely correct. I have
attached the "short.bam" files here regardless.

I also tried running the macs2 using the short.bam files, but this also
seemed to have some issues.

My macs2 command was this:
*macs2 callpeak --nomodel --shiftsize 200 -t
wgEncodeSydhTfbsHelas3Ap2gammaStdAln_allReps.short.bam -c
wgEncodeSydhTfbsHelas3InputStdAlnRep1.short.bam -f BAM -g hs -n
wgEncodeSydhTfbsHelas3Ap2gammaStdAln_allReps.short.bam.out -B -q 0.01
*

I saved the (error) output while implementing the macs2 using the command
above and have attached it herewith.

Please let me know if I am doing something wrong (or if you want me to try
something else).

Thank you,
Dinesh.

On Sat, Dec 29, 2012 at 1:45 PM, Benjamin Schiller <[email protected]

wrote:

Could you run samtools view -b ChIP.bam chrX:1-60215 > ChIP.short.bam and
send that to me? (and for the Control file too)? And see if running MACS on
those with --nomodel --shiftsize 200 changes the result? (use whatever
shiftsize it reported last time)

โ€”
Reply to this email directly or view it on GitHubhttps://github.com//issues/12#issuecomment-11756284.

-- Dinesh
INFO @ Fri, 11 Jan 2013 14:17:46:

ARGUMENTS LIST:

name = wgEncodeSydhTfbsHelas3Ap2gammaStdAln_allReps.short.bam.out

format = BAM

ChIP-seq file = ['wgEncodeSydhTfbsHelas3Ap2gammaStdAln_allReps.short.bam']

control file = ['wgEncodeSydhTfbsHelas3InputStdAlnRep1.short.bam']

effective genome size = 2.70e+09

band width = 300

model fold = [5, 50]

qvalue cutoff = 1.00e-02

Larger dataset will be scaled towards smaller dataset.

Range for calculating regional lambda is: 1000 bps and 10000 bps

Broad region calling is off

INFO @ Fri, 11 Jan 2013 14:17:46: #1 read tag files...
INFO @ Fri, 11 Jan 2013 14:17:46: #1 read treatment tags...
Exception struct.error: 'unpack requires a string argument of length 4' in
'MACS2.IO.cParser.BAMParser.__tsize_wo_pysam' ignored
INFO @ Fri, 11 Jan 2013 14:17:46: #1.2 read input tags...
Traceback (most recent call last):
File "/usr/local/bin/macs2", line 436, in
main()
File "/usr/local/bin/macs2", line 45, in main
run( args )
File "/usr/local/lib/python2.7/site-packages/MACS2/callpeak.py", line 70, in
run
else: (treat, control) = load_tag_files_options (options)
File "/usr/local/lib/python2.7/site-packages/MACS2/callpeak.py", line 365,
in load_tag_files_options
control = options.parser(options.cfile[0]).build_fwtrack()
File "cParser.pyx", line 816, in MACS2.IO.cParser.BAMParser.build_fwtrack
(MACS2/IO/cParser.c:9736)
File "cParser.pyx", line 820, in MACS2.IO.cParser.BAMParser.build_fwtrack
(MACS2/IO/cParser.c:9684)
File "cParser.pyx", line 873, in
MACS2.IO.cParser.BAMParser.__build_fwtrack_wo_pysam (MACS2/IO/cParser.c:10391)
File "cParser.pyx", line 767, in MACS2.IO.cParser.BAMParser.get_references
(MACS2/IO/cParser.c:9069)
File "cParser.pyx", line 802, in
MACS2.IO.cParser.BAMParser.__get_references_wo_pysam (MACS2/IO/cParser.c:9400)
struct.error: unpack requires a string argument of length 4

from macs.

benjschiller avatar benjschiller commented on August 25, 2024

Oh that first error message is easy to fix. Just run "samtools index ChIP.bam" first

from macs.

taoliu avatar taoliu commented on August 25, 2024

Sorry for late participation in the thread! I am moving these days.

dineshmdh, since you got:

[bam_index_load] fail to load BAM index.
*[main_samview] random alignment retrieval only works for indexed BAM files.

That means samtools 'fail'ed. As the msg pointed out, you have to index the BAM file. If you wanna check if the output BAM file is correct, use 'samtools view short.bam'. If you see error or empty output, it failed.

As for your original question, MACS2 will scale down large sample by default. So if your treatment has more tags than control, treatment pileup will be divided by the ratio of treatment to control depth, so may not be integer.

-T

from macs.

dineshmdh avatar dineshmdh commented on August 25, 2024

Thank you Tao and everyone for helping me with this. I appreciate it.
Dinesh.

On Fri, Jan 11, 2013 at 2:56 PM, Tao Liu (รดรญ) [email protected]:

MACS2 will scale down large sample by default. So if your treatment has
more tags than control, treatment pileup will be divided by the ratio of
treatment to control depth, so may not be i

-- Dinesh

from macs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.