This is a test version of Biostars. For the public version, visit https://www.biostars.org.
CONTRA ERRORS (need urgent help!!!)

I am using CONTRA for CNV detection. I have run it successfully once. However, I was trying to run CONTRA again last week, it keeps giving me these errors:

Process Process-1:
Process Process-2:
Traceback (most recent call last):
Traceback (most recent call last):
  File "/usr/lib64/python2.6/multiprocessing/process.py", line 232, in _bootstrap
  File "/usr/lib64/python2.6/multiprocessing/process.py", line 232, in _bootstrap
    self.run()
    self.run()
  File "/usr/lib64/python2.6/multiprocessing/process.py", line 88, in run
  File "/usr/lib64/python2.6/multiprocessing/process.py", line 88, in run
    self._target(*self._args, **self._kwargs)
    self._target(*self._args, **self._kwargs)
  File "/mnt/gfsusr/files/data/bin/CONTRA.v2.0.6/contra.py", line 371, in convertBam
  File "/mnt/gfsusr/files/data/bin/CONTRA.v2.0.6/contra.py", line 371, in convertBam
    output      = subprocess.Popen(args, stdout = iOutFile).wait()
  File "/usr/lib64/python2.6/subprocess.py", line 642, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.6/subprocess.py", line 1234, in _execute_child
    output      = subprocess.Popen(args, stdout = iOutFile).wait()
    raise child_exception
  File "/usr/lib64/python2.6/subprocess.py", line 642, in __init__
OSError: [Errno 2] No such file or directory
    errread, errwrite)
  File "/usr/lib64/python2.6/subprocess.py", line 1234, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
Traceback (most recent call last):
  File "/mnt/gfsusr/files/data/bin/CONTRA.v2.0.6/contra.py", line 613, in <module>
    main()
  File "/mnt/gfsusr/files/data/bin/CONTRA.v2.0.6/contra.py", line 583, in main
    t1 = int(file.readlines(open(folder+"temp.txt"))[0].strip("\n"))
IOError: [Errno 2] No such file or directory: '/mnt/gfsusr/files/data/test/seqdata/All_Cases/project_TD_QC_test1/test1_20150728/project_TD_QC_test1_TD/calls/contra/buf/testData/temp.txt'

Does this seem a python issue? I have also downloaded python version 2.7, but I have got the same error messages.

Can anyone help me on this?

Thanks,
-J

software-error

Hi Dan, thanks for the reply. I think that is an intermediate file generated by CONTRA. I thought it was because python could not run properly (look at the first several lines), thus this temp.txt file could not be generated...

-J

Can you verify that this directory exists?

/mnt/gfsusr/files/data/test/seqdata/All_Cases/project_TD_QC_test1/test1_20150728/project_TD_QC_test1_TD/calls/contra/buf/testData/

2 answers

Did you read the error trace carefully? Look at the last line. It's pretty clearly stating that it can't find the directory you pointed it to:

  File "/mnt/gfsusr/files/data/bin/CONTRA.v2.0.6/contra.py", line 583, in main
    t1 = int(file.readlines(open(folder+"temp.txt"))[0].strip("\n"))
IOError: [Errno 2] No such file or directory:'/mnt/gfsusr/files/data/test/seqdata/All_Cases/project_TD_QC_test1/test1_20150728/project_TD_QC_test1_TD/calls/contra/buf/testData/temp.txt'

Hi Dan, I have checked that. The path

'/mnt/gfsusr/files/data/test/seqdata/All_Cases/project_TD_QC_test1/test1_20150728/project_TD_QC_test1_TD/calls/contra/buf/testData'

is there, but the temp.txt file was not successfully generated by CONTRA. The whole 'contra/but/testData/' directory was all generated by CONTRA.

I'm a bit late replying, but the original error of this thread is caused by a missing part of bedtools: Contra cannot find: convertBam

Make sure to reinstall bedtools as described in the contra documentation and double check that all bedtools executables are available in your $PATH.

Log in to answer this question.