Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • CONTRA updates

    Hi guys,

    Contra has a new update (v2.0.4) -- see contra-cnv.sf.net. Here are my answers to some commonly asked questions:

    1) error: /buf/chrxx.txt
    This is due to the bam files NOT containing reads on a chromosome that is defined in the BED file. E.g. 10,000 regions on Chr12 are defined in the target bed file, but the bam file has no read mapped to Chr12.
    In most cases, this is due to a truncated, corrupted bam file. So I have not "fixed" the script logic. Rather I am just catching this error and outputing an error message in the latest version.

    2) WARNING chrxx not found. & EMPTY VCF FILE
    In fasta/bam files where chromosome names have been defined with "chr" prefix, some times the script would fail. This has been fixed -- thx Eric Ho for pointing this out. This *should* fix the empty vcf file issue for some of you... let me know if it doesn't.

    3) baseline.py error...
    i haven't been able to catch the same error as reported by some of you. but perhaps point 1 about is relevant.. so check the bam files for presence of all chromosomes.

    4) false positive/negative rates..
    at exon level, the FPR is high. I have a script to detect gene-level gains and losses, and works well one some of our in house data. If you are interested, let me know.


    Best wishes,
    Jason
    Last edited by jtjli; 05-15-2013, 10:46 PM.

  • #2
    Hi!

    Hard work trying to run CONTRA...! I try with python 2.6 / 2.7, and the updated and recommended versions of BEDTools... without success...

    When running CONTRA with the test files I get this warning...

    Code:
    python contra.py --target 0247401_D_BED_20090724_hg19_MERGED.bed --test P0667T_GATKrealigned_duplicates_marked.bam --control P0667N_GATKrealigned_duplicates_marked.bam --fasta hg19.fasta --outFolder ~/CONTRA.v2.0.4/ContraTest/sampleName/
    Code:
    Significance Test ...  
    [1] "/home/administrador/CONTRA.v2.0.4/ContraTest/sampleName/buf/bin20.txt"
    [1] "End of cn_analysis.R"
    [1] 11616
    Generating Output Files ... 
    DEBUG 266b
    fastaFromBed -fi hg19.fasta -bed /home/administrador/CONTRA.v2.0.4/ContraTest/sampleName/buf/CNATable.10rd.10bases.20bins.BED -fo /home/administrador/CONTRA.v2.0.4/ContraTest/sampleName/buf/CNATable.10rd.10bases.20bins.fastaOut.txt -name
    [B][COLOR="Red"]Error[/COLOR]: The requested bed file (/home/administrador/CONTRA.v2.0.4/ContraTest/sampleName/buf/CNATable.10rd.10bases.20bins.BED) could not be opened. Exiting![/B]
    Creating VCF file ... 
    /home/administrador/CONTRA.v2.0.4/ContraTest/sampleName/table/CNATable.10rd.10bases.20bins.vcf created. 
    Done...
    I'm a noobie programming apprentice ... and I don't yet understand what the lines of code referents to "DEBUG 266b" means... any hint?

    In other hand, trying it with a pair of my own files...

    Code:
    python2.6 contra.py --target prova_CONTRA_awk.nochr.bed --test 0001.clean.bam --control 0009.clean.bam --fasta hg19.fasta --outFolder ~/CONTRA.v2.0.4/ContraTest/sampleName/
    Code:
    Significance Test ...  
    [1] "/home/administrador/CONTRA.v2.0.4/ContraTest/sampleName/buf/bin20.txt"
    Error en if (boundary.f.sd < 0) { : 
      valor ausente donde TRUE/FALSE es necesario
    Ejecución interrumpida
    Generating Output Files ... 
    Process Process-3:
    Traceback (most recent call last):
      File "/usr/lib/python2.6/multiprocessing/process.py", line 232, in _bootstrap
        self.run()
      File "/usr/lib/python2.6/multiprocessing/process.py", line 88, in run
        self._target(*self._args, **self._kwargs)
      File "contra.py", line 406, in analysisPerBin
        if "CNATable" in tName:
    UnboundLocalError: local variable 'tName' referenced before assignment
    Done...
    In another thread I've read that it could be due to not having installed Rscript, but it's not my situation... and I have BEDTools and R in my path...

    A little lost... anyone can shed some light, please?

    Thanks!

    Comment


    • #3
      I'm getting this same error with both versions. Anyone have a fix yet?

      Comment


      • #4
        I am running CONTRA 2.0.4 and I also got "Error: The requested bed file (...) could not be opened. Exiting!".

        If you look at the previous command fastaFromBed, there seems to be a problem with the -bed argument. The contra/buf/CNATable.10rd.10bases.20bins.BED file is actually empty. From what I gather, it seems to be due to the fact that there are no significant results.
        Last edited by id0; 09-11-2013, 02:39 PM.

        Comment


        • #5
          I had the same problem. Fixed by rolling back to previous version of BEDtools, the one from the CONTRA package.

          Comment


          • #6
            Rolling back to bedtools from the package (I'm using 2.0.3) got rid of the bed error for me.

            Comment


            • #7
              I have good news for anyone who has the following error running test code on CONTRA-2.0.4:

              user@ubuntu:~/Downloads$ python ./CONTRA.v2.0.4/contra.py -t 0247401_D_BED_20090724_hg19_MERGED.bed -s P0667T_GATKrealigned_duplicates_marked.bam -c P0667N_GATKrealigned_duplicates_marked.bam -f /mnt/hgfs/VMShare/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 : /mnt/hgfs/VMShare/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 CONTROL Sample...
              Converting TEST Sample...
              splitByChromosome
              Getting targeted regions DOC...
              chr1
              chr10
              ERROR: P0667Test/buf/testData/chr/chr10.txt NOT FOUND (should be generated by splitByChromosome3). Likely due to no reads found in a targeted chromosome (chr10), in turn likely due to corrupted bam files
              splitByChromosome
              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 "./CONTRA.v2.0.4/contra.py", line 573, in <module>
              main()
              File "./CONTRA.v2.0.4/contra.py", line 543, in main
              t1 = int(file.readlines(open(folder+"temp.txt"))[0].strip("\n"))
              IOError: [Errno 2] No such file or directory: 'P0667Test/buf/testData/temp.txt'
              For some reason, CONTRA has an error running concurrently on some machines (I was using Ubuntu 13.10 on VMWare Player). I have developed a workaround that seems to solve the problem.

              First, open contra.py and goto line 528. You'll notice the code looks like the following:

              # start the processes
              pTest.start()
              cTest.start()

              # wait for all the processes to finish before continuing
              pTest.join()
              cTest.join()
              To resolve the concurrent processing problem, I forced the code to run sequentially. To do this, change the code to the following:

              # start the processes
              cTest.start()
              cTest.join()

              # wait for all the processes to finish before continuing
              pTest.start()
              pTest.join()
              Run the code as normal and it should complete. If anyone was curious, I am using the following dependencies:

              R-3.0.2
              BEDTools-2.17.0
              SAMTools-0.1.19
              Python-2.7.5

              Comment


              • #8
                I know this was posted a long time ago, but I resolved your issue. The problem is with this line:

                Error en if (boundary.f.sd < 0) { :
                valor ausente donde TRUE/FALSE es necesario
                Your data is small so CONTRA is forcing it into 1 bin (Check your output to confirm this). There is a bug in the script "cn_analysis.v3.R" where it calls what you defined your bin size as (20 by default) and not by how many bins CONTRA actually created.

                The solution is to force your output into 1 bin since CONTRA is automatically doing this. You can do this by using the --numBin=1 option.

                Originally posted by jmatés View Post
                In other hand, trying it with a pair of my own files...

                Code:
                python2.6 contra.py --target prova_CONTRA_awk.nochr.bed --test 0001.clean.bam --control 0009.clean.bam --fasta hg19.fasta --outFolder ~/CONTRA.v2.0.4/ContraTest/sampleName/
                Code:
                Significance Test ...  
                [1] "/home/administrador/CONTRA.v2.0.4/ContraTest/sampleName/buf/bin20.txt"
                Error en if (boundary.f.sd < 0) { : 
                  valor ausente donde TRUE/FALSE es necesario
                Ejecución interrumpida
                Generating Output Files ... 
                Process Process-3:
                Traceback (most recent call last):
                  File "/usr/lib/python2.6/multiprocessing/process.py", line 232, in _bootstrap
                    self.run()
                  File "/usr/lib/python2.6/multiprocessing/process.py", line 88, in run
                    self._target(*self._args, **self._kwargs)
                  File "contra.py", line 406, in analysisPerBin
                    if "CNATable" in tName:
                UnboundLocalError: local variable 'tName' referenced before assignment
                Done...
                In another thread I've read that it could be due to not having installed Rscript, but it's not my situation... and I have BEDTools and R in my path...

                A little lost... anyone can shed some light, please?

                Thanks!
                Last edited by wolfpack14; 01-15-2014, 09:37 AM. Reason: .

                Comment

                Latest Articles

                Collapse

                • seqadmin
                  Exploring the Dynamics of the Tumor Microenvironment
                  by seqadmin




                  The complexity of cancer is clearly demonstrated in the diverse ecosystem of the tumor microenvironment (TME). The TME is made up of numerous cell types and its development begins with the changes that happen during oncogenesis. “Genomic mutations, copy number changes, epigenetic alterations, and alternative gene expression occur to varying degrees within the affected tumor cells,” explained Andrea O’Hara, Ph.D., Strategic Technical Specialist at Azenta. “As...
                  07-08-2024, 03:19 PM
                • seqadmin
                  Exploring Human Diversity Through Large-Scale Omics
                  by seqadmin


                  In 2003, researchers from the Human Genome Project (HGP) announced the most comprehensive genome to date1. Although the genome wasn’t fully completed until nearly 20 years later2, numerous large-scale projects, such as the International HapMap Project and 1000 Genomes Project, continued the HGP's work, capturing extensive variation and genomic diversity within humans. Recently, newer initiatives have significantly increased in scale and expanded beyond genomics, offering a more detailed...
                  06-25-2024, 06:43 AM

                ad_right_rmr

                Collapse

                News

                Collapse

                Topics Statistics Last Post
                Started by seqadmin, Yesterday, 11:09 AM
                0 responses
                16 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 07-19-2024, 07:20 AM
                0 responses
                148 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 07-16-2024, 05:49 AM
                0 responses
                124 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 07-15-2024, 06:53 AM
                0 responses
                111 views
                0 likes
                Last Post seqadmin  
                Working...
                X