Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • UCSC histogram view

    Thanks to USers arvid, GenoMax & dpryan I managed to get

    $ ./genomeCoverageBed -ibam test.bam -g human.hg19.genome -bg > testBamHisto.BedGraph

    to produce a file for UCSC which has this kind of format.
    chr22 16212591 16212595 5
    chr22 16212595 16212598 6
    chr22 16212598 16212599 15
    chr22 16212599 16212600 20
    chr22 16212600 16212602 23

    What heading and setting do I need to use or is it a different command to get the proper Histogram view like this



    Full details are here but its not working right.

    Any suggestions for the final step?

  • #2


    track type=bedGraph

    Comment


    • #3
      Thanks for that removed the "" that I had but still getting an error message from UCSC

      Error line 1 of var browser position chr22:1-51,304,566 in custom input: type=bedGraph name=CoverageHistogram color=0,128,0 visibility=full browser position chr22:1-51,304,566 missing = in var/val pair

      here is the file header and first few rows to see if there is anything obvious I'm missing in it


      track type=bedGraph name=CoverageHistogram color=0,128,0 visibility=full browser position chr22:1-51,304,566
      chr22 16053393 16053543 1
      chr22 16057729 16057880 1
      chr22 16059069 16059218 1
      chr22 16064203 16064352 1
      chr22 16067018 16067167 2
      chr22 16067279 16067429 1
      chr22 16067596 16067719 1
      chr22 16067719 16067744 2
      chr22 16067744 16067870 1
      chr22 16069197 16069313 1
      chr22 16069404 16069554 1
      chr22 16070502 16070652 2
      chr22 16073372 16073516 2
      chr22 16075124 16075274 1
      chr22 16075641 16075789 2
      chr22 16076121 16076271 1


      This header is all one line is that correct or should position be on another line also do I need to save the file with line breaks and Carriage returns as the file is so big its crashing my MSword at the moment

      The track type=bedGraph name=CoverageHistogram color=0,128,0 visibility=full browser position chr22:1-51,304,566

      Comment


      • #4
        Awesome got it working its the header which is wrong some where probably browser position?

        LOL on to the next challenge.

        Comment


        • #5
          Originally posted by qnc View Post
          Awesome got it working its the header which is wrong some where probably browser position?

          LOL on to the next challenge.

          Pls be so kind as to provide the solution to your problem as others might find it useful

          Comment


          • #6
            Originally posted by SEQond View Post
            Pls be so kind as to provide the solution to your problem as others might find it useful

            I can see what I can do to help I'm no expert. What are you having trouble with?

            Comment


            • #7
              did you find out how to show a figure like this above? (green histogram in a wiggle form)
              thanks

              Comment


              • #8
                fine I got it by the way. In case you do not see sthng like the one above just unzoom...

                Comment


                • #9
                  Originally posted by SEQond View Post
                  Pls be so kind as to provide the solution to your problem as others might find it useful
                  HI SEQond,

                  Here is what I found so far

                  A MINI GUIDE TO MAKING A HISTOGRAM FOR COVERAGE OF NEXT GEN SEQ DATA ON UCSC GEMONE BROWSER

                  There are 3 parts to this mini guide: 1) Required files, 2.1) Installing and 2.2) Testing BEDtools and 3) Once you have it installed the simple command to make your histogram. Jump to which ever section is appropriate or start at the top and work your way through. There may be other ways of doing this and you might have to adjust the commands slightly for computers other than a Mac. Once installed it is really just one line command, some header annotation and uploading of the resulting bedGraph file to UCSC.


                  1 ) REQUIRED RESULTS FILES

                  - *.bam and *.bai (Bam and Bai files can be used with IGV viewer or Tablet) (Thanks to advice from maubp from this post)

                  - Note VCF files can be analysed for comparison with known SNPs by SeattleSeq or Annovar. A bed file of this can also be made to compare with the resulting Histogram.



                  2.1) INSTALLING BEDTools on Mac OSX v10.6.8 using Terminal v2.1.2 (-bash)

                  - $ curl http://bedtools.googlecode.com/files...v2.13.3.tar.gz > BEDTools.tar.gz (This command downloads and gets the files ready for unzipping)

                  - $ tar -zxvf BEDTools.tar.gz (Unzips the Uncomplied Programs and makes a folder “BEDTools-Version-2.13.3”) The OUTPUT is x ./._BEDTools-Version-2.13.3. You get lots of these and finally "x ./.BEDTools-Version-2.13.3/data/rmsk.hg18.chr21.bed"

                  - $ cd BEDTools-Version-2.13.3 (Moves you into the folder)

                  - $ ls (Lists the content of the folder)

                  - $ make clean (error messages here and on “$ make all” below mean that Xcode compiler is not installed. The programs come un-complied which means that you will have to compile them on your computer to run them. On a Mac you will need Xcode installed. Xcode contains the "Make" program that compiles the executables to a program that will run on your mac. Register and download Xcode on your Mac (http://developer.apple.com/xcode/ N.B. "Make" is integrated into Xcode so you have to download all of it to get it. Xcode is a large file and takes a while to install. Be patient with it and refresh if you see error messages as you register.)

                  - $ make all

                  - Then Look in the /bin folder in BEDTools to see compiled programs

                  - Your BEDTools/bin folder should look something like this



                  - Place Bam and Bai files in this /bin folder for Local operation. The test files are more.bed and less.bed in the above picture.

                  - Continue to operate in this local /bin folder with command “./” placed in front of the BEDTools command you want to use, unless the executables are put in the PATH folder with a command like “$ sudo cp bin/* /usr/local/bin/”



                  2.2) TESTING BEDTools
                  - To test BEDTools we used a bed file (more.bed) and a copy with a few lines deliberately missing (less.bed) placed in the Local BEDTools/bin folder (see picture above)

                  - Type into the $ "./intersectBed -a ./less.bed -b ./more.bed and you should see the lines that they both share.
                  (With advice from GenoMax and dpryan from this post)





                  3) HOW TO MAKE A HISTOGRAM ONCE BEDTools is INSTALLED :

                  - $ ./genomeCoverageBed -ibam YOUR.bam -g human.hg19.genome -bg > YOURBamHisto.BedGraph

                  - Output is like
                  o Chr22 16212591 16212595 5
                  o chr22 16212595 16212598 6

                  - Add “track type=bedGraph name=YourCoverageHistogram color=0,128,0” to header/top line Save in Word as *.txt with Mas OS (Default) (Western (Mac OS Roman) Insert Line Breaks and End Lines with CR only "color=0,128,0" = Green (Advice provided by mgogol)

                  - Under Manage custom track. Upload your prepared bedGraph

                  - Go to desired coordinates and save the UCSC session to access that portion again or share. There is a way of adding this info to the header but I couldn't get that to work. Any ideas?

                  - THE FINAL RESULT ON UCSC



                  Hope this helps anyone who comes across this post. If anyone wants to add corrections or show how to make the PATH command for executables work properly that would be good. But for now this should allow you to get going on BEDTools from scratch.
                  Last edited by qnc; 01-23-2012, 11:24 AM.

                  Comment


                  • #10
                    Originally posted by SEQond View Post
                    did you find out how to show a figure like this above? (green histogram in a wiggle form)
                    thanks
                    This from this post

                    might help with making it Wiggle Format. I haven't tried so I'll leave the advice as I got it.

                    Originally posted by mgogol View Post
                    Code:
                    genomeCoverageBed -bg -ibam $file.sorted.bam -g sacCer2.fa.fai > file.bedgraph
                    
                    wigToBigWig file.bedgraph sacCer2.fa.fai file.bw
                    There may be a way to put those two together, come to think of it.

                    (bash)

                    Code:
                    wigToBigWig <(genomeCoverageBed -bg -ibam async.sorted.bam -g sacCer2.fa.fai) sacCer2.fa.fai file.bw
                    You could also try IGV, which does the histogram for you.
                    Hope that helps people. If there are any mistakes or it doesn't work for you I'll try and see what I can do to help but I'm sure there are many more experienced people on here to ask.

                    Comment


                    • #11
                      samtools has a hidden parameter : "depth"

                      eg. ....

                      /h1/yrhomedir/samtools-0.1.18/samtools depth
                      Usage: bam2depth [-r reg] [-q baseQthres] [-Q mapQthres] [-b in.bed] <in1.bam> [...]
                      Last edited by Richard Finney; 01-23-2012, 12:40 PM.

                      Comment


                      • #12
                        Originally posted by qnc View Post
                        HI SEQond,

                        - Add “track type=bedGraph name=YourCoverageHistogram color=0,128,0” to header/top line Save in Word as *.txt with Mas OS (Default) (Western (Mac OS Roman) Insert Line Breaks and End Lines with CR only "color=0,128,0" = Green (Advice provided by mgogol)
                        I made a header file and merged that with my bedGraph file to put the track info in the bedGraph file. I check the first few lines and saw

                        track type=bedGraph name=G949histogram color=0,128,0
                        12 60228 60247 1
                        12 60247 60270 2
                        12 60270 60328 3
                        12 60328 60347 2
                        12 60347 60369 1
                        12 60369 60370 2
                        12 60370 60469 1
                        12 60830 60838 1
                        12 60838 60896 4

                        I restricted my file to only 1 chromosome because it was my entire file was 727MB and I don't know how large of a file I can upload. The smaller file is 197MB. I get an error when I try and upload this bedGraph file to UCSC. It says something about chromosomes being case sensitive and the track definition not being correct. I have tried uploading the file as a .txt file and a .bedGraph file to see if that would make a difference. Any suggestions about what I am doing wrong.

                        Comment


                        • #13
                          You need chr in front of your chromosome names, for one thing.

                          Comment


                          • #14
                            SNP histogram

                            Hi

                            I have SNP table with position, I want to draw histogram for that. Cam anybody suggest me any tool to do that.
                            My data looks like this-

                            chromosome Position Strand sequence polymorphism
                            chr01 151 + C>A
                            chr01 5918 + G>T
                            chr01 16263 + A>C
                            chr01 20546 + T>A
                            chr01 32667 + A>G
                            chr01 33057 + C>T
                            chr01 34239 + A>C
                            chr01 37389 + T>C
                            chr01 40890 + T>C
                            chr01 45471 + A>G
                            chr01 54398 + A>G
                            chr01 79681 + T>G
                            chr01 83683 + A>C
                            chr01 94019 + G>A
                            chr01 108794 + A>T
                            chr01 124929 + T>C
                            chr01 132537 + T>C
                            chr01 149920 + T>A
                            chr01 155854 + A>T
                            chr01 160393 + G>A
                            chr01 160907 + G>A

                            Thank you

                            Rashmi

                            Comment


                            • #15
                              I don't think a histogram is really what you need in that case. VCF is the more suitable format for polymorphisms and SNPs. This article contains the information you need to display it on the Genome Browser.

                              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, 07-19-2024, 07:20 AM
                              0 responses
                              40 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 07-16-2024, 05:49 AM
                              0 responses
                              52 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 07-15-2024, 06:53 AM
                              0 responses
                              64 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 07-10-2024, 07:30 AM
                              0 responses
                              43 views
                              0 likes
                              Last Post seqadmin  
                              Working...
                              X