Download the latest Picard release at https://github.com/broadinstitute/picard/releases.
GATK version 4.beta.5 is out. See the GATK4 beta page for download and details.

install gsalib

Hello,

I followed the instructions on the following page to install gsalib:

http://gatkforums.broadinstitute.org/discussion/1244/what-is-a-gatkreport

It is a very detail one. However, after I git clone the repository "gate-protected" (the source-code under download page point to this git repository) and type "ant gsalib" inside,it gives error information:

Buildfile: /Users/yingsh/home/github/gatk-protected/build.xml
[taskdef] Could not load definitions from resource cloverlib.xml. It could not be found.

gsalib:
[exec] * installing to library ‘/Users/yingsh/home/github/gatk-protected/public/R/src/org/broadinstitute/sting/utils/R/gsalib’
[exec] * installing source package ‘gsalib’ ...
[exec] ERROR: a 'NAMESPACE' file is required
[exec] * removing ‘/Users/yingsh/home/github/gatk-protected/public/R/src/org/broadinstitute/sting/utils/R/gsalib/gsalib’

BUILD FAILED
/Users/yingsh/home/github/gatk-protected/build.xml:1052: exec returned: 1

Total time: 4 seconds

Could you help me to fix this?

Thanks

Ying

Best Answers

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie
    Accepted Answer

    Oh I'm sorry, I meant you need to do R CMD INSTALL public/R/src/org/broadinstitute/sting/utils/R/gsalib. This way you leave the destination library directory blank, and so R will install the library where appropriate for your environment automatically. From the R ?INSTALL help page:

    If used as R CMD INSTALL pkgs without explicitly specifying lib, packages are installed into the library tree rooted at the first directory in the library path which would be used by R run in the current environment.

Answers

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie

    Hi Ying,

    I think this is due to a bug in our build script. Can you please try doing a full build by running ant clean dist instead and let me know if that works?

  • This seems working well (says "BUILD SUCCESSFUL" at the end). Although there are some warnings:

    .......
    gatk.compile.external.source:

    gatk.compile.source:

    gatk.contracts:

    gatk.compile:

    init.extracthelp:
    [loadfile] /Users/yingsh/home/github/gatk-protected/build/java/classes/StingText.properties doesn't exist

    extracthelp:
    [javadoc] Generating Javadoc
    [javadoc] Javadoc execution
    [javadoc] 0 [main] WARN org.broadinstitute.sting.utils.Utils - ********************************************************************************
    [javadoc] 1 [main] WARN org.broadinstitute.sting.utils.Utils - * WARNING:
    [javadoc] 1 [main] WARN org.broadinstitute.sting.utils.Utils - *
    [javadoc] 1 [main] WARN org.broadinstitute.sting.utils.Utils - * The following walkers are currently undocumented:
    [javadoc] 1 [main] WARN org.broadinstitute.sting.utils.Utils - * FindCoveredIntervals RecalibrationPerformance
    [javadoc] 1 [main] WARN org.broadinstitute.sting.utils.Utils - ********************************************************************************

    init.queue-extensions.generate:

    queue-extensions.generate:
    [mkdir] Created dir: /Users/yingsh/home/github/gatk-protected/build/queue-extensions/src
    [echo] Generating Queue GATK extensions...

    init.scala.compile:
    ......

    BUILD SUCCESSFUL
    Total time: 1 minute 24 seconds

    And when I check the gsalib dir, it has the following folders:

    ls public/R/src/org/broadinstitute/sting/utils/R/gsalib/
    DESCRIPTION Read-and-delete-me man
    R data

    I still can not find this library in R, even I include this path (/Users/yingsh/home/github/gatk-protected/public/R/src/org/broadinstitute/sting/utils/R/) in .Rprofile.

    Could you check this, Thanks,

    Ying

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie

    Hi Ying,

    You still need to manually install the gsalib package into R. See the link below for some instructions; follow "Method 1: Install from source"

    http://math.usask.ca/~longhai/software/installrpkg.html

    In the upcoming future we will add the gsalib to the CRAN repo to make installation easier.

  • Thanks! Could you tell me which path I need to provide after:
    R CMD INSTALL gsalib -l

    Thanks.

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie

    From the directory where you ran the ant dist command, you can use public/R/src/org/broadinstitute/sting/utils/R/ as path.

  • Thanks, however, I ran this, but got:

    R CMD INSTALL gsalib -l public/R/src/org/broadinstitute/sting/utils/R/
    Warning: invalid package ‘gsalib’
    Error: ERROR: no packages specified

    I do:
    ls public/R/src/org/broadinstitute/sting/utils/R/
    gsalib

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie
    Accepted Answer

    Oh I'm sorry, I meant you need to do R CMD INSTALL public/R/src/org/broadinstitute/sting/utils/R/gsalib. This way you leave the destination library directory blank, and so R will install the library where appropriate for your environment automatically. From the R ?INSTALL help page:

    If used as R CMD INSTALL pkgs without explicitly specifying lib, packages are installed into the library tree rooted at the first directory in the library path which would be used by R run in the current environment.

  • Thanks, it works now : )

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie

    Thanks for reporting your solution, @ying_sheng_1. This is going to be very useful for other people with the same problem.

  • Could @ying_sheng_1 kindly provide what is the words in NAMESPACE file exactly? Much thanks!

  • I'm sorry,@ying_sheng_1,I found it: exportPattern("^[^\.]")

  • And in square brackets, there are two backslashes!!!

  • kanghm, you are right. I don't know what was happened during copy and paste. Anyway, here is the original source I got this information:

    http://stackoverflow.com/questions/8012596/error-with-asreml-d-package-in-r-2-14-0/8014357#8014357

  • splaisansplaisan Leuven / Gent (Belgium)Member

    I also seem to have a late problem during reporting.
    I installed gsalib manually and it loads well but the end of the run dies with

    
    ...
    * DONE (gsalib)
    Loading required package: gtools
    Loading required package: gdata
    gdata: read.xls support for 'XLS' (Excel 97-2004) files ENABLED.
    
    gdata: read.xls support for 'XLSX' (Excel 2007+) files ENABLED.
    
    Attaching package: ‘gdata’
    
    The following object(s) are masked from ‘package:utils’:
    
        object.size
    
    The following object(s) are masked from ‘package:stats’:
    
        nobs
    
    Loading required package: caTools
    Loading required package: grid
    Loading required package: KernSmooth
    KernSmooth 2.23 loaded
    Copyright M. P. Wand 1997-2009
    Loading required package: MASS
    
    Attaching package: ‘gplots’
    
    The following object(s) are masked from ‘package:stats’:
    
        lowess
    
    Loading required package: plyr
    
    Attaching package: ‘reshape’
    
    The following object(s) are masked from ‘package:plyr’:
    
        rename, round_any
    
    [1] "Report"
    [1] "Project          : /home/splaisan/Desktop/GATK_out/ExampleCountReads.jobreport.txt"
    Error in order(allJobs$analysisName, allJobs$startTime, decreasing = T) : 
      argument 1 is not a vector
    Calls: source ... withVisible -> eval -> eval -> plotJobsGantt -> order
    Execution halted
    DEBUG 16:51:29,501 RScriptExecutor - Result: 1 
    WARN  16:51:29,502 RScriptExecutor - RScript exited with 1 
    INFO  16:51:29,509 QCommandLine - Script completed successfully with 1 total jobs 
    DEBUG 16:51:29,515 IOUtils - Deleted /home/splaisan/Desktop/GATK_out/tmp/Q-Classes-5466328457640253208
    
    

    I did the 'ant clean dist' which worked, then reinstalled with 'R CMD INSTALL public/R/src/org/broadinstitute/sting/utils/R/gsalib', then even changed NAMESPACE from exportPattern(".") to exportPattern("^[^.]").
    I still get the error

    [1] "Project          : /home/splaisan/Desktop/GATK_out/ExampleCountReads.jobreport.txt"
    Error in order(allJobs$analysisName, allJobs$startTime, decreasing = T) :
      argument 1 is not a vector
    Calls: source ... withVisible -> eval -> eval -> plotJobsGantt -> order
    
    

    Any idea of what I can do next! (I run R version 2.15.2 (2012-10-26) -- "Trick or Treat" on this RHEL6 64bit server)

    Thanks
    Stephane

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie

    Hi Stephane,

    I'm not sure what is wrong there -- the code that generates the job report is part of the Queue package, and it hasn't been updated in a while. It might be a version compatibility issue. Unfortunately we're currently not able to provide support for that kind of issue with Queue, sorry.

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie

    Hi Stephane,

    We have a user report in another thread indicating that the problem may be due to an outdated version of ggplot2, which you can resolve by upgrading your installed version.

    http://gatkforums.broadinstitute.org/discussion/comment/5803#Comment_5803

  • splaisansplaisan Leuven / Gent (Belgium)Member

    Hi Geraldine,
    You were right, I did a clean install of R and RStudio and I can now run gsalib with the small inline example provided elsewhere here. I had to adapt few steps from posts found here (especially from Ying Sheng (thanks!)

    # I put it into one wofkflow, hope this helps
    
    # go to a write accessed place and type
    git clone git://github.com/broadgsa/gatk.git
    cd gatk
    
    # from upper posts, make sure the gatk source is up-todate
    ant clean dist
    
    # build the lib
    ant gsalib
    
    # add the missing NAMESPACE file to the package
    # to do so, move to the package forlder 
    cd public/R/src/org/broadinstitute/sting/utils/R/gsalib/
    nano NAMESPACE
    # type in (with two back slashes!)
    exportPattern("^[^\\.]")
    # save return to the root of gatk
    
    # decide of the place where you want the package installed 
    # for instance I added a 'R_LIBS_USER=/path/to/my/libs' to which I have write rights in my ~/.Renviron file and exported the variable
    # finally type (you can provide the R_LIBS_USER path instead
    R CMD INSTALL public/R/src/org/broadinstitute/sting/utils/R/gsalib -l $R_LIBS_USER
    
    #### this did it for me after a lot of searching and is loading under R 3.0
    
  • @splaisan said:
    Hi Geraldine,
    You were right, I did a clean install of R and RStudio and I can now run gsalib with the small inline example provided elsewhere here. I had to adapt few steps from posts found here (especially from Ying Sheng (thanks!)

    # I put it into one wofkflow, hope this helps
    
    # go to a write accessed place and type
    git clone git://github.com/broadgsa/gatk.git
    cd gatk
    
    # from upper posts, make sure the gatk source is up-todate
    ant clean dist
    
    # build the lib
    ant gsalib
    
    # add the missing NAMESPACE file to the package
    # to do so, move to the package forlder 
    cd public/R/src/org/broadinstitute/sting/utils/R/gsalib/
    nano NAMESPACE
    # type in (with two back slashes!)
    exportPattern("^[^\\.]")
    # save return to the root of gatk
    
    # decide of the place where you want the package installed 
    # for instance I added a 'R_LIBS_USER=/path/to/my/libs' to which I have write rights in my ~/.Renviron file and exported the variable
    # finally type (you can provide the R_LIBS_USER path instead
    R CMD INSTALL public/R/src/org/broadinstitute/sting/utils/R/gsalib -l $R_LIBS_USER
    
    #### this did it for me after a lot of searching and is loading under R 3.0
    

    Many thanks to you. splaisan
    I install gsalib as you said,but when I confirm gsalib in R ,I type
    library(gsalib) ## seems no error
    d=gsa.read.gatkreport("DataProcessing-gatk.grp") Error: could not find function "gsa.read.gatkreport"

    I use 'R CMD INSTALL public/R/src/org/broadinstitute/sting/utils/R/gsalib -l R-libs',
    when I see 'R-libs' , it contain "data DESCRIPTION help html INDEX Meta NAMESPACE R",but in R,it just contain "gsalib gsalib.rdb gsalib.rdx", is it right?,it does not contain gsa.read.gatkreport.R, I do not know why? Many thanks.

  • Hi, may I ask anyone to provide an updated instruction for the current GATK version 3. The directory .../R/src/... cannot be found anymore in the current github or gatk-master... downloads. Is there a way for the Broad team to provide gsalib as a gz-package to be installed directly via the "install.package" script within R? Thanks for your help.

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie

    You can get gsalib directly from CRAN now.

Sign In or Register to comment.