Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • BedGraphtoBigWig - UCSC

    Hi

    Would anybody be able to kindly provide step-by-step instructions for using the UCSC pre-compiled utilities such as the bedGraphtoBigWig tool? I am utilising Mac OS 10.9. I am not familiar much with terminal nor running such things and do not have any idea where to begin. Thank you very much!

    - Kayleigh

  • #2
    Here is a simple guide to Mac Terminal (there are probably others): http://blog.teamtreehouse.com/introd...x-command-line

    If you have not done this then that would be the first thing to do: http://seqanswers.com/forums/showthread.php?t=33389

    Look at the second step to see how to run the program: http://www.biostars.org/p/42844/

    Comment


    • #3
      I am also using the bedGraphToBigWig tool: I am trying to create files I can upload to IGV to view the level of methylaiton. But when I carry out this command I get an error:

      error: Expecting number field 2 line 1 of sample_CO115.bedGraph, got "start"

      This is the code I used in R:

      sample_CO115 <- read.table("sample_CO115.cov")
      col <- c("chr", "start", "end", "meth_perc", "m", "u")
      colnames(sample_CO115) <- col
      sample_CO115$m <- NULL
      sample_CO115$u <- NULL
      write.table(mm2, file = "sample_CO115.bedGraph")

      $ bedGraphToBigWig sample_CO115.bedGraph hg19.chrom.sizes CO115.bw

      I removed the column headings but this did not work...

      Please advise if you know how I can solve this!
      Last edited by Hparker; 07-01-2015, 01:03 AM.

      Comment


      • #4
        BedGraph format files should look like: http://genome.ucsc.edu/goldenpath/help/bedgraph.html

        Can you post 10 lines from your BedGraph file?

        Code:
        $ head -10 sample_CO115.bedGraph

        Comment


        • #5
          BedGraph file:

          "V1" "V2" "V3" "V4"
          "1" "chr11" " 104895" " 104895" "100.00000000"
          "2" "chr11" " 123115" " 123115" " 0.00000000"
          "3" "chr11" " 125931" " 125931" "100.00000000"
          "4" "chr11" " 128336" " 128336" "100.00000000"
          "5" "chr11" " 128338" " 128338" "100.00000000"
          "6" "chr11" " 128379" " 128379" " 0.00000000"
          "7" "chr11" " 128385" " 128385" "100.00000000"
          "8" "chr11" " 128404" " 128404" "100.00000000"
          "9" "chr11" " 128430" " 128430" "100.00000000"

          Comment


          • #6
            I tired removing the column headings which is why now they are labelled as V1, V2...

            Comment


            • #7
              Hi Hparker,
              you can modify your output from R:
              Code:
              write.table(mm2, file = "sample_CO115.bedGraph", [COLOR="Red"]row.names=F, col.names=F, quote=F, seq="\t"[/COLOR])
              BTW, why do you call mm2? Shouldn't it be "sample_CO115"?
              Cheers,
              Michael
              Last edited by Michael.Ante; 07-01-2015, 04:50 AM.

              Comment


              • #8
                Also "track type=bedGraph" declaration is minimally required for bedGraph files. Your file seems to lack that and would likely need to be added.
                Last edited by GenoMax; 07-06-2015, 03:48 AM. Reason: amended the type declaration

                Comment


                • #9
                  Thank you for your replies.

                  Yes it should be sample_CO115, but I had used the code for something else.

                  I have used:

                  write.table(sample_CO115, file = "sample_CO115.bedGraph", type=bedGraph,
                  row.names=F, col.names=F, quote=F, seq="\t")

                  ..but I get this error:

                  Error in write.table(sample_CO115, file = "sample_CO115.bedGraph", type = bedGraph, : unused arguments (type = bedGraph, seq = "\t")

                  Comment


                  • #10
                    Sorry, it has to be sep="\t" (for field-separator).

                    Comment


                    • #11
                      There was a typo in @Michael.Ante's code
                      Code:
                      write.table(sample_CO115, file = "sample_CO115.bedGraph", row.names=F, col.names=F, quote=F, sep="\t")
                      Add the "type=bedGraph" line afterwards along with any additional lines (e.g. browser intervals etc) using an editor.

                      or you could do this

                      Code:
                      cat('track type=bedGraph\n', file='sample_CO115.bedGraph', append=F)
                      write.table(sample_CO115, file = "sample_CO115.bedGraph", append=T, row.names=F, col.names=F, quote=F, sep="\t")
                      Last edited by GenoMax; 07-06-2015, 03:48 AM.

                      Comment


                      • #12
                        Thank you both for your answers. I managed to write to a bedGraph file however when I now convert to a bigWig:

                        $ bedGraphToBigWig sample_CO115.bedGraph hg19.chrom.sizes CO115.bw

                        I get the following error:
                        type=bedGraphchr7 is not found in chromosome sizes file

                        I downloaded the chrom.sizes file using the following code:

                        $ wget http://hgdownload.cse.ucsc.edu/admin...etchChromSizes
                        $ chmod 777 fetchChromSizes
                        $ ./fetchChromSizes hg19 > hg19.chrom.sizes

                        Comment


                        • #13
                          Can you show us what hg19.chrom.sizes contains?

                          Comment


                          • #14
                            chr1 249250621
                            chr2 243199373
                            chr3 198022430
                            chr4 191154276
                            chr5 180915260
                            chr6 171115067
                            chr7 159138663
                            chrX 155270560
                            chr8 146364022
                            chr9 141213431
                            chr10 135534747
                            chr11 135006516
                            chr12 133851895
                            chr13 115169878
                            chr14 107349540
                            chr15 102531392
                            chr16 90354753
                            chr17 81195210
                            chr18 78077248
                            chr20 63025520
                            chrY 59373566
                            chr19 59128983
                            chr22 51304566
                            chr21 48129895
                            chr6_ssto_hap7 4928567
                            chr6_mcf_hap5 4833398
                            chr6_cox_hap2 4795371
                            chr6_mann_hap4 4683263
                            chr6_apd_hap1 4622290

                            Comment


                            • #15
                              Is your bedGraph file sorted?

                              Comment

                              Latest Articles

                              Collapse

                              • seqadmin
                                Current Approaches to Protein Sequencing
                                by seqadmin


                                Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
                                04-04-2024, 04:25 PM
                              • seqadmin
                                Strategies for Sequencing Challenging Samples
                                by seqadmin


                                Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
                                03-22-2024, 06:39 AM

                              ad_right_rmr

                              Collapse

                              News

                              Collapse

                              Topics Statistics Last Post
                              Started by seqadmin, 04-11-2024, 12:08 PM
                              0 responses
                              25 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 04-10-2024, 10:19 PM
                              0 responses
                              28 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 04-10-2024, 09:21 AM
                              0 responses
                              24 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 04-04-2024, 09:00 AM
                              0 responses
                              52 views
                              0 likes
                              Last Post seqadmin  
                              Working...
                              X