Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • Sushi.R

    Hi all. Last year we released Sushi, an R package distributed by Bioconductor for the visualization of mutli-panel publication quality genomic images. Here are links to:

    The paper: http://bioinformatics.oxfordjournals...ent/30/19/2808
    The software (bioconductor): https://www.bioconductor.org/package...tml/Sushi.html
    The software (github): https://github.com/dphansti/Sushi

    Several users have asked me if there is a blog, FAQ, or forum where they can search for common questions regarding using Sushi. Please use this thread to post any questions, suggestions, or issues regarding Sushi. Thanks.
    Doug
    www.sharedproteomics.com

  • #2
    Hi Doug, very simple (for you) first question. When I follow the Sushi documenation, with plotBedgraph I get an error message which I did not get before:

    plotBedgraph(Sushi_DNaseI.bedgraph,chrom,chromstart,chromend,colorbycol= SushiColors(5))
    Error: could not find function "plotBedgraph"

    Thanks,
    Soumitra

    Comment


    • #3
      Works for me.
      You'll get that error message if you haven't loaded the library.
      Of course, you'll need to install the library first, or you won't be able to load it.

      Code:
      source("http://bioconductor.org/biocLite.R")
      biocLite("Sushi")
      
      library(Sushi)
      
      data(Sushi_ChIPSeq_CTCF.bedgraph)
      data(Sushi_DNaseI.bedgraph)
      
      chrom            = "chr11"
      chromstart       = 1955000
      chromend         = 1965000
      plotBedgraph(Sushi_DNaseI.bedgraph,chrom,chromstart,chromend,colorbycol= SushiColors(5))

      Comment


      • #4
        I appreciate your help, but I did try that before I asked the question on this forum. I wonder if there is any other explanation?

        Comment


        • #5
          Post the output of the following command.

          Code:
          sessionInfo()

          Comment


          • #6
            Did what you suggested. Got the same message so a systematic issue here...what is your suggestion:
            > sessioninfo()
            Error: could not find function "sessioninfo"

            Comment


            • #7
              See the capital "I" in sessionInfo that @blancha requested.

              Comment


              • #8
                Sorry, with the right command i get:
                Code:
                > sessionInfo
                function (package = NULL) 
                {
                    z <- list()
                    z$R.version <- R.Version()
                    z$platform <- z$R.version$platform
                    if (nzchar(.Platform$r_arch)) 
                        z$platform <- paste(z$platform, .Platform$r_arch, sep = "/")
                    z$platform <- paste0(z$platform, " (", 8 * .Machine$sizeof.pointer, 
                        "-bit)")
                    z$locale <- Sys.getlocale()
                    if (is.null(package)) {
                        package <- grep("^package:", search(), value = TRUE)
                        keep <- sapply(package, function(x) x == "package:base" || 
                            !is.null(attr(as.environment(x), "path")))
                        package <- sub("^package:", "", package[keep])
                    }
                    pkgDesc <- lapply(package, packageDescription, encoding = NA)
                    if (length(package) == 0) 
                        stop("no valid packages were specified")
                    basePkgs <- sapply(pkgDesc, function(x) !is.null(x$Priority) && 
                        x$Priority == "base")
                    z$basePkgs <- package[basePkgs]
                    if (any(!basePkgs)) {
                        z$otherPkgs <- pkgDesc[!basePkgs]
                        names(z$otherPkgs) <- package[!basePkgs]
                    }
                    loadedOnly <- loadedNamespaces()
                    loadedOnly <- loadedOnly[!(loadedOnly %in% package)]
                    if (length(loadedOnly)) {
                        names(loadedOnly) <- loadedOnly
                        pkgDesc <- c(pkgDesc, lapply(loadedOnly, packageDescription))
                        z$loadedOnly <- pkgDesc[loadedOnly]
                    }
                    class(z) <- "sessionInfo"
                    z
                }
                <bytecode: 0x0000000008e96130>
                <environment: namespace:utils>
                >
                Last edited by GenoMax; 10-15-2015, 10:32 AM. Reason: added CODE tags to improve readability

                Comment


                • #9
                  Make sure you add the parentheses. You executed this:

                  sessionInfo

                  You need to execute this:

                  sessionInfo()
                  Doug
                  www.sharedproteomics.com

                  Comment


                  • #10
                    When you call a function in R, you need to add the parentheses at the end of the call to the function.

                    Code:
                    sessionInfo()
                    Otherwise, you'll just get the code for the function, as you just did.

                    I really think you just haven't loaded the package.
                    It would lead to exactly the error message you are getting.
                    The package works fine.
                    With the package loaded, I am unable to reproduce your error message despite several attempts (older versions of the package, different computers, ...).

                    When you type sessionInfo(), you must see Sushi in your list of attached packages, before making the call to plotBedgraph.
                    If Sushi is not in the output after you type sessionInfo(), you have discovered the problem.
                    If it is in the path, which I doubt, your problem is more complex, and will require further troubleshooting.
                    The output of sessionInfo() will still be useful to the package developer, if there is really a bug in the code and not a user error.
                    Last edited by blancha; 10-15-2015, 12:06 PM.

                    Comment


                    • #11
                      Thank you blancha, makes sense. I did have Sushi running well before and when I came back after a few weeks I got the above error message. Will try and reload. Appreciate your help.

                      Comment


                      • #12
                        Formatting Axes with plotBedgraph

                        Hi,

                        I am using plotBedgraph to a figure that plots SNP allele frequencies across a genome with two separate tracks, using the example in the Sushi vignette. It almost works perfectly but I am wishing that the y axis on the two tracks were the same (both from 0-0.2). Is there a way to change the scale of the axes?

                        It also would be nice if the red track was on the top but when I switch those I can't also get the colors on the legend to switch so that red is on top. I have been trying everything I've seen on here so far and am still unable to get this to work. I really appreciate any help.

                        Here is my code:

                        par(mfrow=c(2,1),mar=c(1,4,1,1))
                        plotBedgraph(bottle,chrom,chromstart,chromend,transparency=.50,
                        color=SushiColors(2)(2)[1])
                        axis(side=2, las=2,tcl=.2)
                        mtext("Allele Freq",side=2,line=3,cex=1,font=1)
                        legend("topright",inset=0.025,legend=c("Lab-only SNPs","Wild-only SNPs"),
                        fill=opaque(SushiColors(2)(2)),border=SushiColors(2)(2),text.font=2,
                        cex=1.0)
                        plotBedgraph(denovo, chrom, chromstart, chromend,
                        transparency=.50, flip=TRUE, color=SushiColors(2)(2)[2])
                        labelgenome(chrom,chromstart,chromend,side=3,n=2,scale="Kb")
                        axis(side=2,las=2,tcl=.2,at=pretty(par("yaxp")[c(1,2)]),
                        labels=-1*pretty(par("yaxp")[c(1,2)]))
                        mtext("Allele Freq",side=2,line=3,cex=1,font=1)
                        Attached Files

                        Comment


                        • #13
                          Sure. This shouldn't be too hard.

                          In order to set the y axis to a specific value just add the argument ymax=0.2 when you call plotBedgraph.

                          In order to switch the colors it is probably easiest just to set the colors manually rather than using SushiColors. Try running the code below (I have not tested it since I don't have your data but I think it should work). Good luck!


                          par(mfrow=c(2,1),mar=c(1,4,1,1))
                          plotBedgraph(bottle,chrom,chromstart,chromend,transparency=.50,
                          color="firebrick2",ymax=0.2)
                          axis(side=2, las=2,tcl=.2)
                          mtext("Allele Freq",side=2,line=3,cex=1,font=1)
                          legend("topright",inset=0.025,legend=c("Lab-only SNPs","Wild-only SNPs"),
                          fill=opaque(c("firebrick2","dodgerblue2")),border=c("firebrick2","dodgerblue2"),text.font=2,
                          cex=1.0)
                          plotBedgraph(denovo, chrom, chromstart, chromend,
                          transparency=.50, flip=TRUE, color="dodgerblue2",ymax=0.2)
                          labelgenome(chrom,chromstart,chromend,side=3,n=2,scale="Kb")
                          axis(side=2,las=2,tcl=.2,at=pretty(par("yaxp")[c(1,2)]),
                          labels=-1*pretty(par("yaxp")[c(1,2)]))
                          mtext("Allele Freq",side=2,line=3,cex=1,font=1)
                          Doug
                          www.sharedproteomics.com

                          Comment


                          • #14
                            Awesome thanks!!! The axes got weird when I tried to flip them, but it works fine if they are parallel. The colors work great too!

                            Comment

                            Latest Articles

                            Collapse

                            • 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
                            • seqadmin
                              Techniques and Challenges in Conservation Genomics
                              by seqadmin



                              The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

                              Avian Conservation
                              Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
                              03-08-2024, 10:41 AM

                            ad_right_rmr

                            Collapse

                            News

                            Collapse

                            Topics Statistics Last Post
                            Started by seqadmin, Yesterday, 06:37 PM
                            0 responses
                            11 views
                            0 likes
                            Last Post seqadmin  
                            Started by seqadmin, Yesterday, 06:07 PM
                            0 responses
                            10 views
                            0 likes
                            Last Post seqadmin  
                            Started by seqadmin, 03-22-2024, 10:03 AM
                            0 responses
                            51 views
                            0 likes
                            Last Post seqadmin  
                            Started by seqadmin, 03-21-2024, 07:32 AM
                            0 responses
                            68 views
                            0 likes
                            Last Post seqadmin  
                            Working...
                            X