Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • CONTRA cnv targeted resequencing

    Dear I'm trying to run CONTRA on my data (targeted resequencing) to detect CNV in exons. The program returns me this error:

    Traceback (most recent call last):
    File "contra.py", line 34, in <module>
    from scripts.assign_bin_number_v2 import *
    ImportError: No module named scripts.assign_bin_number_v2

    The python version is 2.6.5. So I can't understand what is the error. I have installed BEDtools, R and Samtools,.
    Can anyone help me?
    Thanx a lot,

  • #2
    As that just came out you may have better luck contacting the authors directly. I plan on trying it shortly but probably not for another week or two.

    Comment


    • #3
      Do you have the "scripts" directory in your contra folder? Seems like the python script cannot read that directory.

      Jason

      Comment


      • #4
        We have had some difficulties with CONTRA as well. We ran into a very similar error, so make sure that you are using versions Python2.6, R-2.13.0, and BEDTools-2.16.2. Dr. Jason Li (who I believe posted as jtjli) was very prompt and helpful via email.
        Last edited by michaelb28; 07-11-2012, 06:15 AM.

        Comment


        • #5
          I second that theme, it's either the appropriate script isnt in the directory that you are running it from, or you havn't got he path to it correctly. When you get it to work it is really good... You need to make sure you have the appropriate versions of R ( that was the problem I had) and Python. Jason Li was very helpful in helping me to get it working, after which I was able to generate some very nice results. I just need to work one some R graphs to output the results....

          Comment


          • #6
            Quick Question - Has anybody tried running CONTRA on a VM? I am running it in a Ubuntu-Linux environment, and I'm trying to find out if that may be the source of my problem. I always receive this error, even though all of my scripts are in the correct directory.

            Traceback (most recent call last):
            File "contra.py", line 569, in <module>
            main()
            File "contra.py", line 514, in main
            get_genome(params.TEST, genomeFile)
            File "/home/michaelb/Documents/Contra-II/CONTRA.v2.0.2/scripts/get_chr_length.py",
            line 31, in get_genome
            raw_header = subprocess.Popen(args, stdout =
            subprocess.PIPE).communicate()[0]
            File "/usr/local/lib/python2.6/subprocess.py", line 595, in __init__
            errread, errwrite)
            File "/usr/local/lib/python2.6/subprocess.py", line 1106, in _execute_child
            raise child_exception
            OSError: [Errno 2] No such file or directory

            Comment


            • #7
              I run it in a VM in ubuntu and have it working fine
              I don't intend to keep it in the vm, but I work stuff up in a vm to avoid breaking the production machine. Also the main Linux box has the wrong Version of R o it... If you know how to get two different versions to live side by side that would be helpful....

              Check your versions of python & R. Put all the scripts in the same directory as the data first off and call them from the one dir to start off with so that you can eliminate path issues

              It would be helpful if you posted the commands that you ran to get that error message too
              Last edited by swNGS; 07-11-2012, 03:15 PM.

              Comment


              • #8
                Here is the command that I ran.

                {
                python2.6 contra.py --target TargetSeq_Trial_Kit_Reference_target_regions_hg19.bed --test IonXpress_T_(Other file Info).bam --control IonXpress_N_(Other file Info).bam --fasta hg19.fasta --outfolder ~/Contra/Results/
                }

                I downloaded and installed R, Python, and BEDTools using a "sudo apt-get install" command.

                For some reason the files are defaulting and installing within a usr/local/lib directory (which may have certain permissions), rather than usr/lib. I don't think CONTRA can recognize these scripts when they are within this folder. Does anyone know how to help with Python directory issues?

                Comment


                • #9
                  As long as R and bedtools are available from your PATH, CONTRA will run alright..

                  Jason

                  Comment


                  • #10
                    I have uploaded a new revision of CONTRA to sourceforge. Fixed some bugs, and made it compatible with the new versions of R.

                    Cheers
                    Jason

                    Comment


                    • #11
                      I'm having trouble getting CONTRA to run on our data. I have the example files running properly, but am getting errors trying to use our own BAM files.

                      I used samtools sort in order to make sure they were sorted in coordinate order, but they still seem to be in a slightly different order than the example data files (eg, chrX is between chr7 and chr8). Might this be an issue? If so, I'm not sure how to get the order to match the example files.

                      The BAM files off an Illumina sequencer and contain short 50 bp reads. The BAM files, the BED file and the fasta all have chr*.fa notation, but I've also tried to run it with files that had the 'chr' and '.fa' removed and had no luck.

                      I have followed the instructions in the user guide, so have the proper versions of python, R, BEDTools, etc.

                      I'm at a loss as to what to try next. Help?



                      This is the error message:

                      Test file read depth = 0
                      Control file read depth = 0
                      Pre-processing Completed.
                      Getting the Log Ratio ...
                      Traceback (most recent call last):
                      File "contra.py", line 568, in <module>
                      main()
                      File "contra.py", line 550, in main
                      averageCount(testListName, controlListName, avOut, t1, n1, params.MINREADDEPTH, params.MINNBASES)
                      File "/home/klewis/src/CONTRA.v2.0.2/scripts/average_count.py", line 109, in averageCount
                      r1, r2 = getFactor(tReadCount, nReadCount)
                      File "/home/klewis/src/CONTRA.v2.0.2/scripts/average_count.py", line 93, in getFactor
                      r1 = val1/r
                      ZeroDivisionError: float division

                      Comment


                      • #12
                        Hi rynrie

                        If you can pass me your input files (bam), i can test it out for you.

                        my email is jason dot li at petermac.org

                        Jason

                        Comment


                        • #13
                          Originally posted by michaelb28 View Post
                          Quick Question - Has anybody tried running CONTRA on a VM? I am running it in a Ubuntu-Linux environment, and I'm trying to find out if that may be the source of my problem. I always receive this error, even though all of my scripts are in the correct directory.

                          Traceback (most recent call last):
                          File "contra.py", line 569, in <module>
                          main()
                          File "contra.py", line 514, in main
                          get_genome(params.TEST, genomeFile)
                          File "/home/michaelb/Documents/Contra-II/CONTRA.v2.0.2/scripts/get_chr_length.py",
                          line 31, in get_genome
                          raw_header = subprocess.Popen(args, stdout =
                          subprocess.PIPE).communicate()[0]
                          File "/usr/local/lib/python2.6/subprocess.py", line 595, in __init__
                          errread, errwrite)
                          File "/usr/local/lib/python2.6/subprocess.py", line 1106, in _execute_child
                          raise child_exception
                          OSError: [Errno 2] No such file or directory
                          Having the exact same problem. Anybody come up with a solution yet? I use Win 7 64 bit as my native OS. Hence the VM.. Also I am getting the same error when I use cygwin..

                          Comment


                          • #14
                            Same error

                            Binning ...
                            End of assign.bin.number.py with 21417 exons in 5 bins
                            Significance Test ...
                            Process Process-3:
                            Traceback (most recent call last):
                            File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
                            self.run()
                            File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
                            self._target(*self._args, **self._kwargs)
                            File "/home/genetics/bin/contra.py", line 391, in analysisPerBin
                            rscr = subprocess.call(args)
                            File "/usr/lib/python2.7/subprocess.py", line 493, in call
                            return Popen(*popenargs, **kwargs).wait()
                            File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
                            errread, errwrite)
                            File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
                            raise child_exception
                            OSError: [Errno 2] No such file or directory

                            Running:
                            contra.py -t /home/genetics/Genomes/BED_Files/BROCA_v5_BaitTiling_bed.txt -s /home/genetics/data/LMG-240/LMG-240.chromosomeprefixes.srt.bam -c /home/genetics/Genomes/CONTRA/BROCA_v4_Contra_ref.srt.bam -f /home/genetics/Genomes/hg19_chr/human_g1k_v37.fasta -o /home/genetics/data/LMG-240/LMG-240_CONTRA

                            I don't think this is a PATH problem, contra.py works.
                            I don't think is a permission issue as /home/genetics/data/LMG-240/LMG-240_CONTRA is made, with buf and table subdirectories but those are both empty.

                            I'm running this in Ubuntu 12.04 in an EC2 instance on AWS.

                            Any one have an idea how to fix this?

                            Comment


                            • #15
                              CONTRA help

                              Hello,

                              I am a junior bioinformatician! I have to implement CONTRA in laboratory. We work from a target catch (Agilent SureSelect).
                              For now I installed on a DEBIAN virtual machine CONTRA (python2.6, R 2.11.1 and bedtools). I want to create a control "baseline" from control samples (one bam file per sample and not a bam file per chromosome).

                              I get this error message:
                              command:
                              $ :/ $ python opt/CONTRA.v2.0.3 baseline.py
                              - target / [PATH] / SureSelect_capture.bed
                              - files / [PATH] / *. Bam
                              - output / [PATH] / Baseline /

                              ------- ------ Baseline.py
                              File: / [PATH] / DZ05.bam
                              File: / [PATH] / DZ15.bam
                              File: / [PATH] / DZ25.bam
                              File: / [PATH] / DZ35.bam
                              File: / [PATH] / DZ45.bam
                              Output Directory: / [PATH] / Baseline /
                              ----- ----- Creating output directory
                              / [PATH] / Baseline /
                              / [PATH] / Baseline / buf
                              ----- ----- Processing Files
                              / [PATH] / Baseline/buf/DZ05.bam
                              / [PATH] / Baseline/buf/DZ15.bam
                              / [PATH] / Baseline/buf/DZ25.bam
                              / [PATH] / Baseline/buf/DZ35.bam
                              / [PATH] / Baseline/buf/DZ45.bam
                              chr1
                              CHR10
                              / [PATH] / Baseline/buf/DZ55.bam
                              Called Effective year throwing terminate instance of 'std :: bad_alloc'
                              what (): std :: bad_alloc
                              Traceback (most recent call last):
                              File "baseline.py", line 149, in <module>
                              pool.map (processInFile, infiles)
                              File "/ usr/lib/python2.6/multiprocessing/pool.py", line 148, in map
                              self.map_async return (func, iterable, chunksize). get ()
                              File "/ usr/lib/python2.6/multiprocessing/pool.py", line 422, in get
                              raise self._value
                              IOError: [Errno 2] No such file or directory: '/ [PATH] / Baseline/buf/DZ15.bam/chr/chr10.txt'

                              Thank you in advance for your help and excuse me for my english ...

                              Antoine

                              Comment

                              Latest Articles

                              Collapse

                              • seqadmin
                                Advancing Precision Medicine for Rare Diseases in Children
                                by seqadmin




                                Many organizations study rare diseases, but few have a mission as impactful as Rady Children’s Institute for Genomic Medicine (RCIGM). “We are all about changing outcomes for children,” explained Dr. Stephen Kingsmore, President and CEO of the group. The institute’s initial goal was to provide rapid diagnoses for critically ill children and shorten their diagnostic odyssey, a term used to describe the long and arduous process it takes patients to obtain an accurate...
                                12-16-2024, 07:57 AM
                              • seqadmin
                                Recent Advances in Sequencing Technologies
                                by seqadmin



                                Innovations in next-generation sequencing technologies and techniques are driving more precise and comprehensive exploration of complex biological systems. Current advancements include improved accessibility for long-read sequencing and significant progress in single-cell and 3D genomics. This article explores some of the most impactful developments in the field over the past year.

                                Long-Read Sequencing
                                Long-read sequencing has seen remarkable advancements,...
                                12-02-2024, 01:49 PM

                              ad_right_rmr

                              Collapse

                              News

                              Collapse

                              Topics Statistics Last Post
                              Started by seqadmin, 12-17-2024, 10:28 AM
                              0 responses
                              33 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 12-13-2024, 08:24 AM
                              0 responses
                              48 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 12-12-2024, 07:41 AM
                              0 responses
                              34 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 12-11-2024, 07:45 AM
                              0 responses
                              46 views
                              0 likes
                              Last Post seqadmin  
                              Working...
                              X