Sha256: b0cd4a3f717ccaf156d1648658666de3850f5c4930370ac878bf5bc293ba42b4
Contents?: true
Size: 868 Bytes
Versions: 4
Compression:
Stored size: 868 Bytes
Contents
module ViralSeq module R # check if R is installed. if R is installed, return the version number of R. def self.check_R begin r_version = `R --version`.split("\n")[0] rescue Errno::ENOENT abort '"R" is not installed. Install R at https://www.r-project.org/' + "\n`tcs_sdrm` pipeline aborted." end end # end check_R # check if required R packages is installed. def self.check_R_packages if system "Rscript #{File.join( ViralSeq.root, "viral_seq", "util", "check_env.r")}" return 0 else raise "Non-zero exit code. Error happens when checking required R packages." end end # end check_R_packages. # read sdrm rscript as a string. def self.get_sdrm_rscript File.read(File.join(ViralSeq.root, "viral_seq", "util", "sdrm_r.r")) end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
viral_seq-1.9.1 | lib/viral_seq/R.rb |
viral_seq-1.9.0 | lib/viral_seq/R.rb |
viral_seq-1.8.1.1 | lib/viral_seq/R.rb |
viral_seq-1.8.1 | lib/viral_seq/R.rb |