Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

  • #2
    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

    Comment


    • #3
      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:

      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, 05:44 AM.

      Comment


      • #4
        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!

        Comment


        • #5
          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 ?

          Comment


          • #6
            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

            Comment


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

              Jason

              Comment


              • #8
                no such file or directory problem

                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:

                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

                Comment


                • #9
                  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, 03:18 AM. Reason: learned about "null device 1" message and it's not the reason...

                  Comment


                  • #10
                    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..!

                    Comment


                    • #11
                      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?

                      Comment


                      • #12
                        i've some updates, see this thread
                        Discussion of next-gen sequencing related bioinformatics: resources, algorithms, open source efforts, etc


                        thanks!
                        Jason

                        Comment


                        • #13
                          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!

                          Comment


                          • #14
                            Thank you!! That worked!!

                            Comment


                            • #15
                              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

                              Comment

                              Latest Articles

                              Collapse

                              • seqadmin
                                Latest Developments in Precision Medicine
                                by seqadmin



                                Technological advances have led to drastic improvements in the field of precision medicine, enabling more personalized approaches to treatment. This article explores four leading groups that are overcoming many of the challenges of genomic profiling and precision medicine through their innovative platforms and technologies.

                                Somatic Genomics
                                “We have such a tremendous amount of genetic diversity that exists within each of us, and not just between us as individuals,”...
                                05-24-2024, 01:16 PM
                              • seqadmin
                                Recent Advances in Sequencing Analysis Tools
                                by seqadmin


                                The sequencing world is rapidly changing due to declining costs, enhanced accuracies, and the advent of newer, cutting-edge instruments. Equally important to these developments are improvements in sequencing analysis, a process that converts vast amounts of raw data into a comprehensible and meaningful form. This complex task requires expertise and the right analysis tools. In this article, we highlight the progress and innovation in sequencing analysis by reviewing several of the...
                                05-06-2024, 07:48 AM

                              ad_right_rmr

                              Collapse

                              News

                              Collapse

                              Topics Statistics Last Post
                              Started by seqadmin, 05-24-2024, 07:15 AM
                              0 responses
                              16 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 05-23-2024, 10:28 AM
                              0 responses
                              18 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 05-23-2024, 07:35 AM
                              0 responses
                              22 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 05-22-2024, 02:06 PM
                              0 responses
                              11 views
                              0 likes
                              Last Post seqadmin  
                              Working...
                              X