SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
CONTRA cnv targeted resequencing m_elena_bioinfo Bioinformatics 34 12-14-2015 10:40 AM
CONTRA test files available now jtjli Bioinformatics 18 06-29-2015 01:25 AM
PubMed: Establishing the baseline level of repetitive element expression in the human Newsbot! Literature Watch 0 02-09-2012 02:00 AM
CREST structural variation software .2bit file error M Stan Bioinformatics 4 12-22-2011 11:30 AM
Calculate baseline expected fpkm? M&M RNA Sequencing 0 08-26-2011 05:41 AM

Reply
 
Thread Tools
Old 07-02-2012, 06:08 AM   #1
zeib
Junior Member
 
Location: Paris, FR

Join Date: Dec 2008
Posts: 4
Default CONTRA software: error in baseline file generation

Hi all,

I'm starting to use CONTRA to detect loss/gain of exons in my dozen of samples and I got a first issue to generate the baseline..

Here is the error :

python $contra_dir/baseline.py -t annotations/BR_genes_exons_hg19_m20p10.bed -o output -n N2R -f /N2R10/N2R10.onExons.bam /N2R2/N2R2.onExons.bam /N2R11/N2R11.onExons.bam /N2R3/N2R3.onExons.bam /N2R12/N2R12.onExons.bam /N2R4/N2R4.onExons.bam /N2R13/N2R13.onExons.bam /N2R5/N2R5.onExons.bam /N2R14/N2R14.onExons.bam
------ baseline.py -------
Target: /annotations/BRCA_exons_hg19_m20p10.bed
File: /N2R10/N2R10.onExons.bam
File: /N2R2/N2R2.onExons.bam
File: /N2R11/N2R11.onExons.bam
File: /N2R3/N2R3.onExons.bam
File: /N2R12/N2R12.onExons.bam
File: /N2R4/N2R4.onExons.bam
File: /N2R13/N2R13.onExons.bam
File: /N2R5/N2R5.onExons.bam
File: /N2R14/N2R14.onExons.bam
Output Directory: output
----- creating output directory -----
output
output/buf
----- Processing Files -----
output/buf/N2R10.onExons.bam
output/buf/N2R2.onExons.bam
output/buf/N2R11.onExons.bam
output/buf/N2R3.onExons.bam
output/buf/N2R12.onExons.bam
output/buf/N2R4.onExons.bam
output/buf/N2R13.onExons.bam
Traceback (most recent call last):
File "CONTRA.v2.0.2/baseline.py", line 149, in <module>
pool.map(processInFile,infiles)
File "/usr/lib/python2.6/multiprocessing/pool.py", line 148, in map
return self.map_async(func, iterable, chunksize).get()
File "/usr/lib/python2.6/multiprocessing/pool.py", line 422, in get
raise self._value
OSError: [Errno 2] No such file or directory

output/buf/N2R5.onExons.bam

Have you any idea what is wrong here?

Thanks for your help.
zeib is offline   Reply With Quote
Old 07-02-2012, 08:36 AM   #2
swNGS
Member
 
Location: SW UK

Join Date: Nov 2011
Posts: 83
Default

The first thing that I would do is to download the sample datasets provided on the CONTRA website and see if you can run it using the default parameters. If that works then you know it's something about your data rather than your environment.
Incidentally, what is your data and what are you hoping to do?
Always interested to see what others are doing re CNV enumeration
Cheers
swNGS is offline   Reply With Quote
Old 07-03-2012, 05:34 AM   #3
zeib
Junior Member
 
Location: Paris, FR

Join Date: Dec 2008
Posts: 4
Default

Quote:
Originally Posted by swNGS View Post
The first thing that I would do is to download the sample datasets provided on the CONTRA website and see if you can run it using the default parameters. If that works then you know it's something about your data rather than your environment.
Incidentally, what is your data and what are you hoping to do?
Always interested to see what others are doing re CNV enumeration
Cheers
Thanks for your reply.

Okay actually I troubleshooted my problem with the baseline file generation by setting properly my $PATH with R bin directory.

Here is the version of dependencies:
samtools 0.1.18
bedtools v2.16.2
R version 2.15.0 (2012-03-30)

I switch then to the sample datasets to test the main python program (contra.py) and I got an error again, probably related again to my (R?) environment:

Quote:
python $CONTRA_DIR/contra.py
-t 0247401_D_BED_20090724_hg19_MERGED.bed
-s P0667T_GATKrealigned_duplicates_marked.bam
-c P0667N_GATKrealigned_duplicates_marked.bam
-f human_g1k_v37.fasta
-o P0667Test
--plot

target : 0247401_D_BED_20090724_hg19_MERGED.bed
test : P0667T_GATKrealigned_duplicates_marked.bam
control : P0667N_GATKrealigned_duplicates_marked.bam
fasta : human_g1k_v37.fasta
outfolder : P0667Test
numBin : [20]
minreaddepth : 10
minNBases : 10
sam : False
pval : 0.05
sampleName : No-SampleName
nomultimapped : False
plot : True
bedInput : False
minExon : 2000
largeDeletion : False
Creating Output Folder : Done.
Converting TEST Sample...
Converting CONTROL Sample...
Getting targeted regions DOC...
chr1
chr10
chr11
chr12
chr13
chr14
chr15
chr16
chr17
chr18
chr19
chr2
Getting targeted regions DOC...
chr1
chr20
chr21
chr22
chr3
chr10
chr4
chr11
chr12
chr5
chr13
chr6
chr14
chr15
chr7
chr8
chr16
chr17
chr9
chrX
chr18
chr19
chr2
chr20
chr21
chr22
chr3
Targeted regions pre-processing: Done
chr4
chr5
chr6
chr7
chr8
chr9
chrX
Targeted regions pre-processing: Done
Test file read depth = 337222955
Control file read depth = 304798449
Pre-processing Completed.
Getting the Log Ratio ...
Binning ...
End of assign.bin.number.py with 11620 exons in 3 bins
Significance Test ...
[1] "P0667Test/buf/bin20.txt"
Messages d'avis :
1: sd(<matrix>) is deprecated.
Use apply(*, 2, sd) instead.
2: sd(<matrix>) is deprecated.
Use apply(*, 2, sd) instead.
3: sd(<matrix>) is deprecated.
Use apply(*, 2, sd) instead.
null device
1
Messages d'avis :
1: sd(<matrix>) is deprecated.
Use apply(*, 2, sd) instead.
2: sd(<matrix>) is deprecated.
Use apply(*, 2, sd) instead.
3: sd(<matrix>) is deprecated.
Use apply(*, 2, sd) instead.
[1] "End of cn_analysis.R"
[1] 11616
Generating Output Files ...
Error: The requested bed file (P0667Test/buf/CNATable.10rd.10bases.20bins.BED) could not be opened. Exiting!

Creating VCF file ...
P0667Test/table/CNATable.10rd.10bases.20bins.vcf created.
Temp Folder Removed
Done...
Warning R errors here and a bed file not generated at the last steps...

Last edited by zeib; 07-03-2012 at 05:44 AM.
zeib is offline   Reply With Quote
Old 07-03-2012, 09:50 AM   #4
swNGS
Member
 
Location: SW UK

Join Date: Nov 2011
Posts: 83
Default

That looks like your R version is too 'current...' I could not get CONTRA to work until I dropped my R version back to 2.13.1. You might want to try that first.
At the moment I have it running in a VM as I haven't figured out how to change the R version on my main machine. If you figure out how to do that I would like to know!
swNGS is offline   Reply With Quote
Old 07-05-2012, 01:11 AM   #5
zeib
Junior Member
 
Location: Paris, FR

Join Date: Dec 2008
Posts: 4
Default

Yes you're right.

The warnings related to R are gone when I use the 2.13 version
(I work on a server with different versions of R installed)

but the bed error still remains...

I tested 3 versions of bedtools:
BEDTools_2.16.2: error
BEDTools_2.15.0: error
BEDTools_2.12.0: OK

Which version of BEDTools do you use ?
zeib is offline   Reply With Quote
Old 07-10-2012, 08:57 PM   #6
fjrossello
Member
 
Location: Melbourne (Victoria) Australia

Join Date: Sep 2011
Posts: 30
Default CONTRA error message

Hi guys,

I am trying to run CONTRA for exome capture CNV detection. I have downloaded and installed CONTRA and the additional software as per suggested in the installation guide (http://sourceforge.net/apps/mediawik...allation_Guide). However, I get the following message.

Traceback (most recent call last):
File "/nfs/home/fernandr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/nfs/home/fernandr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/nfs/home/fernandr/biotools/CONTRA.v2.0.2/contra.py", line 391, in analysisPerBin
rscr = subprocess.call(args)
File "/nfs/home/fernandr/lib/python2.7/subprocess.py", line 493, in call
return Popen(*popenargs, **kwargs).wait()
File "/nfs/home/fernandr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/nfs/home/fernandr/lib/python2.7/subprocess.py", line 1228, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory


I installed and double-checked the additional software requirements but I am still unsuccessful.

Any ideas? Thanks in advance.

Fernando
fjrossello is offline   Reply With Quote
Old 07-23-2012, 07:05 PM   #7
jtjli
Member
 
Location: australia

Join Date: Nov 2008
Posts: 21
Default

CONTRA.v2.0.3 is now available on sourceforge. Fixed some bugs, and made it compatible with the new versions of R.

Jason
jtjli is offline   Reply With Quote
Old 08-16-2012, 05:49 AM   #8
xushaw
Junior Member
 
Location: exeter, UK

Join Date: Feb 2012
Posts: 1
Default no such file or directory problem

Quote:
Hi guys,

I am trying to run CONTRA for exome capture CNV detection. I have downloaded and installed CONTRA and the additional software as per suggested in the installation guide (http://sourceforge.net/apps/mediawik...allation_Guide). However, I get the following message.

Traceback (most recent call last):
File "/nfs/home/fernandr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/nfs/home/fernandr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/nfs/home/fernandr/biotools/CONTRA.v2.0.2/contra.py", line 391, in analysisPerBin
rscr = subprocess.call(args)
File "/nfs/home/fernandr/lib/python2.7/subprocess.py", line 493, in call
return Popen(*popenargs, **kwargs).wait()
File "/nfs/home/fernandr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/nfs/home/fernandr/lib/python2.7/subprocess.py", line 1228, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

I installed and double-checked the additional software requirements but I am still unsuccessful.

Any ideas? Thanks in advance.

Fernando
Hi Fernando
i come across the same error like yours and i solved it.
the problem is here in contra.py:

Quote:
print "Significance Test ... "
rScriptName = os.path.join(scriptPath, "scripts", "cn_analysis.v3.R")
args = shlex.split("Rscript %s %s %s %s %s %s %s %s %s %s %s"
%(rScriptName, num_bin, params.MINREADDEPTH, params.MINNBASES, outFolder, params.SAMPLENAME,params.PLOT, numBin, params.MINCONTROL, params.MINTEST, params.MINAVG))
rscr = subprocess.call(args)
when contra.py start multiple processing and call cn_analysis.v3.R, it could not link to that R script. probably your machine doesnĺt have Rscript installed (which is different from your R environment).
Just type "Rscript" in your linux terminal to see if it installed or not.

if not, you can find it in your R directory under bin folder. make sure the "Rscript" file in your /usr/local/bin/ directory.

xiao
xushaw is offline   Reply With Quote
Old 02-12-2013, 11:42 PM   #9
jmatÚs
Member
 
Location: Girona (Catalonia)

Join Date: Jan 2013
Posts: 14
Default

Quote:
Originally Posted by swNGS View Post
That looks like your R version is too 'current...' I could not get CONTRA to work until I dropped my R version back to 2.13.1. You might want to try that first.
At the moment I have it running in a VM as I haven't figured out how to change the R version on my main machine. If you figure out how to do that I would like to know!
Hi swNGS,

Have you run the test available at the CONTRA's website? And if so... have you noticed any problem with the output files? In my vcf there is only the header... and when trying to run the program any warning appeared to me.

I don't want to start using it without knowing if it works properly...

Thank you!

Last edited by jmatÚs; 02-13-2013 at 02:18 AM. Reason: learned about "null device 1" message and it's not the reason...
jmatÚs is offline   Reply With Quote
Old 03-14-2013, 08:24 AM   #10
jmatÚs
Member
 
Location: Girona (Catalonia)

Join Date: Jan 2013
Posts: 14
Default

Hi ladies & gentlemen...

I was trying to generate a baseline with six bam files when this error warning appeared...

jmates@ubuntu:~/CONTRA.v2.0.3$ python baseline.py --target CONTRAsolid.bed --files mybam1.bam mybam2.bam mybam3.bam mybam4.bam mybam5.bam mybam6.bam --output ~/Baseline/sampleBaseline/ --name baseline_test
------ baseline.py -------
Target: CONTRAtarget.bed
File: mybam1.bam
File: mybam2.bam
File: mybam3.bam
File: mybam4.bam
File: mybam5.bam
File: mybam6.bam
Output Directory: /home/jmates/Baseline/sampleBaseline/
----- creating output directory -----
/home/jmates/Baseline/sampleBaseline/
/home/jmates/Baseline/sampleBaseline/buf
----- Processing Files -----
/home/jmates/Baseline/sampleBaseline/buf/mybam1.bam
/home/jmates/Baseline/sampleBaseline/buf/mybam2.bam
/home/jmates/Baseline/sampleBaseline/buf/mybam3.bam
/home/jmates/Baseline/sampleBaseline/buf/mybam4.bam
/home/jmates/Baseline/sampleBaseline/buf/mybam5.bam
/home/jmates/Baseline/sampleBaseline/buf/mybam6.bam
Traceback (most recent call last):
File "baseline.py", line 149, in <module>
pool.map(processInFile,infiles)
File "/usr/lib/python2.7/multiprocessing/pool.py", line 227, in map
return self.map_async(func, iterable, chunksize).get()
File "/usr/lib/python2.7/multiprocessing/pool.py", line 528, in get
raise self._value
IndexError: list index out of range



Can someone explain me what it's happening here? Any hint?

Thank you in advance..!
jmatÚs is offline   Reply With Quote
Old 04-12-2013, 06:41 AM   #11
Fauno
Junior Member
 
Location: Udine

Join Date: Apr 2013
Posts: 1
Exclamation problems running CONTRA

Hi to everybody!

Here is my attempt to run contra with a my custom baseline...

(note that I've already installed samtools/0.1.18, r/2.15.1, bedtools/2.16.2, python/3.3, python/2.6 - I've tryed them both - and the last version of contra 2.0.3)
nuie

python contra.py --target regions.bed --test sample_1.bam --control baseline.pooled2_TRIM0.2.txt --fa
sta fasta.fasta --outFolder sample_1_contra
target : regions.bed
test : sample_1.bam
control : baseline.pooled2_TRIM0.2.txt
fasta : fasta.fasta
outfolder : sample_1_contra
numBin : [20]
minreaddepth : 10
minNBases : 10
sam : False
pval : 0.05
sampleName : No-SampleName
nomultimapped : False
plot : False
bedInput : False
minExon : 2000
largeDeletion : False
Creating Output Folder : Done.
Converting TEST Sample...
Converting CONTROL Sample...
Getting targeted regions DOC...
chr1
chr10
Process Process-2:
Traceback (most recent call last):
File "/usr/lib64/python2.6/multiprocessing/process.py", line 232, in _bootstrap
self.run()
File "/usr/lib64/python2.6/multiprocessing/process.py", line 88, in run
self._target(*self._args, **self._kwargs)
File "/path/folder/contra/2.0.3/contra.py", line 364, in convertBam
convertGeneCoordinate(targetList, folder)
File "/path/folder/contra/2.0.3/scripts/convert_gene_coordinate.py", line 57, in convertGeneCoordinate
covFile = file.readlines(open(inputfile2+chr+".txt","r"))
IOError: [Errno 2] No such file or directory: sample_1_contra/buf/ctrData/chr/chr10.txt'
Getting targeted regions DOC...
chr1
chr10
chr11
chr12
chr13
chr14
chr15
chr16
chr17
chr18
chr19
chr2
chr20
chr21
chr22
chr3
chr4
chr5
chr6
chr7
chr8
chr9
chrX
Targeted regions pre-processing: Done
Traceback (most recent call last):
File "/path/folder/contra/2.0.3/contra.py", line 569, in <module>
main()
File "/path/folder/contra/2.0.3/contra.py", line 541, in main
n1 = int(file.readlines(open(folder+"temp.txt"))[0].strip("\n"))
IOError: [Errno 2] No such file or directory: 'sample_1_contra/buf/ctrData/temp.txt'


can anyone help me?
Fauno is offline   Reply With Quote
Old 05-15-2013, 10:31 PM   #12
jtjli
Member
 
Location: australia

Join Date: Nov 2008
Posts: 21
Default

i've some updates, see this thread
http://seqanswers.com/forums/showthr...829#post104829

thanks!
Jason
jtjli is offline   Reply With Quote
Old 06-19-2013, 07:31 AM   #13
selshamieh
Junior Member
 
Location: Paris

Join Date: Dec 2012
Posts: 9
Default

Hi Guys,

Is it normal that binning process takes a huge time to be done when working with WES files?

Tx in advance
selshamieh is offline   Reply With Quote
Old 09-04-2013, 11:07 AM   #14
hongcs
Junior Member
 
Location: MD

Join Date: Sep 2013
Posts: 2
Default

Hi,

I am having the same error when I create baseline file and run it.
If you resolved this problem, could you share how you did?
Thanks in advance!
hongcs is offline   Reply With Quote
Old 09-09-2013, 08:04 AM   #15
selshamieh
Junior Member
 
Location: Paris

Join Date: Dec 2012
Posts: 9
Default

I was running the contra script when I had this issue, so I've split the file by chromosome.. and after that it worked..
selshamieh is offline   Reply With Quote
Old 09-13-2013, 10:51 AM   #16
hongcs
Junior Member
 
Location: MD

Join Date: Sep 2013
Posts: 2
Default

Thank you!! That worked!!
hongcs is offline   Reply With Quote
Old 10-02-2013, 06:41 AM   #17
brusome
Junior Member
 
Location: Rome, Italy

Join Date: Oct 2009
Posts: 1
Default

Hi, I've just downloaded CONTRA_2.04 and I'm tryng to run the Test sample, but I get this error:

python contra.py --target 0247401_D_BED_20090724_hg19_MERGED.bed --test P0667T_GATKrealigned_duplicates_marked.bam --control P0667N_GATKrealigned_duplicates_marked.bam --fasta human_g1k_v37.fasta --outFolder contraTest
target : 0247401_D_BED_20090724_hg19_MERGED.bed
test : P0667T_GATKrealigned_duplicates_marked.bam
control : P0667N_GATKrealigned_duplicates_marked.bam
fasta : human_g1k_v37.fasta
outfolder : contraTest/
numBin : [20]
minreaddepth : 10
minNBases : 10
sam : False
pval : 0.05
sampleName : No-SampleName
nomultimapped : False
plot : False
bedInput : False
minExon : 2000
largeDeletion : False
Creating Output Folder : Done.
Traceback (most recent call last):
File "contra.py", line 574, in <module>
main()
File "contra.py", line 519, in main
get_genome(params.TEST, genomeFile)
File "/home/brusel/CONTRA.v2.0.4/scripts/get_chr_length.py", line 31, in get_genome
raw_header = subprocess.Popen(args, stdout = subprocess.PIPE).communicate()[0]
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
raise child_exception
OSError: [Errno 2] No such file or directory

What's happening?
Thanks
Ale
brusome is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 02:05 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO