Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dphansti
    Member
    • May 2011
    • 28

    #1

    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
  • Soumitra Ghosh
    Junior Member
    • Oct 2015
    • 5

    #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

    • blancha
      Senior Member
      • May 2013
      • 367

      #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

      • Soumitra Ghosh
        Junior Member
        • Oct 2015
        • 5

        #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

        • blancha
          Senior Member
          • May 2013
          • 367

          #5
          Post the output of the following command.

          Code:
          sessionInfo()

          Comment

          • Soumitra Ghosh
            Junior Member
            • Oct 2015
            • 5

            #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

            • GenoMax
              Senior Member
              • Feb 2008
              • 7142

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

              Comment

              • Soumitra Ghosh
                Junior Member
                • Oct 2015
                • 5

                #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

                • dphansti
                  Member
                  • May 2011
                  • 28

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

                  sessionInfo

                  You need to execute this:

                  sessionInfo()
                  Doug
                  www.sharedproteomics.com

                  Comment

                  • blancha
                    Senior Member
                    • May 2013
                    • 367

                    #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

                    • Soumitra Ghosh
                      Junior Member
                      • Oct 2015
                      • 5

                      #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

                      • JPreston
                        Member
                        • Jun 2013
                        • 17

                        #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

                        • dphansti
                          Member
                          • May 2011
                          • 28

                          #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

                          • JPreston
                            Member
                            • Jun 2013
                            • 17

                            #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

                            • SEQadmin2
                              Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
                              by SEQadmin2



                              Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

                              Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
                              ...
                              10-14-2026, 09:55 AM
                            • SEQadmin2
                              New Genomics Technologies Take Aim at Long-Standing Limits
                              by SEQadmin2


                              Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

                              We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
                              ...
                              09-28-2026, 10:25 AM

                            ad_right_rmr

                            Collapse

                            News

                            Collapse

                            Topics Statistics Last Post
                            Started by SEQadmin2, Yesterday, 11:13 AM
                            0 responses
                            18 views
                            0 reactions
                            Last Post SEQadmin2  
                            Started by SEQadmin2, Yesterday, 10:48 AM
                            0 responses
                            18 views
                            0 reactions
                            Last Post SEQadmin2  
                            Started by SEQadmin2, 10-15-2026, 10:52 AM
                            0 responses
                            36 views
                            0 reactions
                            Last Post SEQadmin2  
                            Started by SEQadmin2, 10-14-2026, 05:39 AM
                            0 responses
                            42 views
                            0 reactions
                            Last Post SEQadmin2  
                            Working...