The second command probably fails because you try to write to the root directory / where you don't have permission as a regular user (I assume you are on a Unix system).
The error from the first command is trickier to troubleshoot from here... This issue seems related https://github.com/taoliu/MACS/issues/61 . What version of macs2 are you using (i.e. what is the output of macs2 --version)?
Also, can you post the full output you see on screen i.e. not just the line AttributeError: 'Namespace' ...?
macs2 2.1.1.20160309
866992_part.bam -c 866991_part.bam -f BAM --nomodel -g hs -n example -B -q 0.01 --outdir ~/peakCall
INFO @ Mon, 02 Jan 2017 10:49:21:
# Command line: callpeak -t 866992_part.bam -c 866991_part.bam -f BAM --nomodel -g hs -n example -B -q 0.01 --outdir /home/peakCall
# ARGUMENTS LIST:
# name = example
# format = BAM
# ChIP-seq file = ['866992_part.bam']
# control file = ['866991_part.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
# Paired-End mode is off
Traceback (most recent call last):
File "/usr/bin/macs2", line 614, in <module>
main()
File "/usr/bin/macs2", line 56, in main
run( args )
File "build/bdist.linux-x86_64/egg/MACS2/callpeak_cmd.py", line 68, in run
AttributeError: 'Namespace' object has no attribute 'tempdir'
b
BTW, looks like a bug but I'm waiting on the author to confirm. I didn't see where that variable is used anywhere else, so I just changed that line cited in the error message to hardcode the temp directory in my cluster:
tempfile.tempdir = '/tmp/'
Maybe this was intended to have a --tempdir argument that hasn't been implemented yet. So far, it's running...
was this ever resolved im getting the same error today and i cant find a post with the solution
Traceback (most recent call last):
File "/usr/bin/macs2", line 614, in <module>
main()
File "/usr/bin/macs2", line 56, in main
run( args )
File "/usr/local/lib/python2.7/dist-packages/MACS2/callpeak_cmd.py", line 68, in run
tempfile.tempdir = options.tempdir
AttributeError: 'Namespace' object has no attribute 'tempdir'
The second command probably fails because you try to write to the root directory
/
where you don't have permission as a regular user (I assume you are on a Unix system).The error from the first command is trickier to troubleshoot from here... This issue seems related https://github.com/taoliu/MACS/issues/61 . What version of macs2 are you using (i.e. what is the output of
macs2 --version
)?Also, can you post the full output you see on screen i.e. not just the line
AttributeError: 'Namespace' ...
?I tried what is mentioned in the link you sent and got the same error
Try
macs2 callpeak -t 866992_part.bam -c 866991_part.bam -f BAM --nomodel -g hs -n example -B -q 0.01 --outdir peakCall