Python error? OSError: [Errno 17] File exists:

1,535 views
Skip to first unread message

Matt G

unread,
Mar 12, 2012, 11:34:02 PM3/12/12
to macs-ann...@googlegroups.com
Running macs14 and got through most of the process including BEDgraph generation then received the following error (parameters included below). Any ideas?

INFO  @ Mon, 12 Mar 2012 19:19:31: #3 save the shifted and merged tag counts into wiggle file...
Traceback (most recent call last):
  File "/usr/bin/macs14", line 358, in <module>
    main()
  File "/usr/bin/macs14", line 159, in main
    peakdetect.call_peaks()
  File "/usr/lib/python2.6/dist-packages/MACS14/PeakDetect.py", line 80, in call_peaks
    self.peaks = self.__call_peaks_w_control ()
  File "/usr/lib/python2.6/dist-packages/MACS14/PeakDetect.py", line 267, in __call_peaks_w_control
    zwig_write(self.control,self.opt.wig_dir_ctl,self.zwig_ctl,self.d,log=self.info,space=self.opt.space,single=self.opt.single_profile)
  File "/usr/lib/python2.6/dist-packages/MACS14/OutputWriter.py", line 64, in zwig_write
    os.makedirs (subdir)
  File "/usr/lib/python2.6/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 17] File exists: 'peaks1_MACS_bedGraph/control/'

MACS called as follows:
$macs14 -t ChIP.sam -c gDNA_control.sam -n peaks1 -f SAM -g hs -m 5,30 -w -B --verbose 3

Jelle van de Wege

unread,
Mar 20, 2014, 10:13:23 AM3/20/14
to macs-ann...@googlegroups.com
I got the same error. Did you find a solution to this problem?

Op dinsdag 13 maart 2012 04:34:02 UTC+1 schreef Matt G:

Tao Liu

unread,
Mar 20, 2014, 11:10:38 AM3/20/14
to macs-ann...@googlegroups.com
Matt and Jelle,

To remove the existing folder 'peaks1_MACS_bedGraph/' will solve this problem.

Best,
Tao

Jelle van de Wege

unread,
Mar 24, 2014, 9:32:34 AM3/24/14
to macs-ann...@googlegroups.com
Hi Tao,

I removed the existing folder en tried to run is again. It still gives an error that is cant find the R script

best,
Jelle

Op donderdag 20 maart 2014 16:10:38 UTC+1 schreef Tao Liu:

Jelle van de Wege

unread,
Mar 25, 2014, 5:19:58 AM3/25/14
to macs-ann...@googlegroups.com
to clarify this. after removing the folder and running MACS again it gives a different error. It cant seem to find the R script that MACS creates. 
I used the options: -B, -S and -w.

Op maandag 24 maart 2014 14:32:34 UTC+1 schreef Jelle van de Wege:
Reply all
Reply to author
Forward
0 new messages