Sha256: 01ab5bd3b38bf90a96cbced4f95e55b37e1da4ff448fc15e62610ec4edcb7f80

Contents?: true

Size: 1.68 KB

Versions: 11

Compression:

Stored size: 1.68 KB

Contents

require File.join(File.expand_path(File.dirname(__FILE__)), '../..', 'test_helper.rb')
require 'rbbt/hpc/batch'
require 'rbbt/workflow'

Workflow.require_workflow "Sample"
Workflow.require_workflow "HTS"
class TestSLURM < Test::Unit::TestCase

  def test_batch_options
    job = Sample.job(:mutect2, "small", :reference => "hg38")

    TmpFile.with_file do |batch_dir|

      options = HPC::BATCH.batch_options(job, :batch_dir => batch_dir, :batch_modules => 'java')

      iii options
    end
  end

  def test_template
    job = Sample.job(:mutect2, "small", :reference => "hg38")

    TmpFile.with_file do |batch_dir|

      template = HPC::BATCH.job_template(job, :batch_dir => batch_dir, :batch_modules => 'java')
      ppp template

    end
  end

  def test_template_singularity
    job = Sample.job(:mutect2, "small", :reference => "hg38")

    TmpFile.with_file do |batch_dir|

      template = HPC::BATCH.job_template(job, :batch_dir => batch_dir, :batch_modules => 'java', :singularity => true)
      ppp template

    end
  end

  def test_template_contain
    job = Sample.job(:mutect2, "small", :reference => "hg38")

    TmpFile.with_file do |batch_dir|

      template = HPC::BATCH.job_template(job, :batch_dir => batch_dir, :batch_modules => 'java', :contain_and_sync => true, :wipe_container => 'force')
      ppp template

    end
  end
  
  def test_template_singularity_contain
    job = Sample.job(:mutect2, "small", :reference => "hg38")

    TmpFile.with_file do |batch_dir|

      template = HPC::BATCH.job_template(job, :batch_dir => batch_dir, :batch_modules => 'java', :contain_and_sync => true, :wipe_container => 'force', :singularity => true)
      ppp template

    end
  end
  
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
rbbt-util-5.37.8 test/rbbt/hpc/test_batch.rb
rbbt-util-5.37.6 test/rbbt/hpc/test_batch.rb
rbbt-util-5.37.4 test/rbbt/hpc/test_batch.rb
rbbt-util-5.37.3 test/rbbt/hpc/test_batch.rb
rbbt-util-5.37.1 test/rbbt/hpc/test_batch.rb
rbbt-util-5.37.0 test/rbbt/hpc/test_batch.rb
rbbt-util-5.36.0 test/rbbt/hpc/test_batch.rb
rbbt-util-5.35.4 test/rbbt/hpc/test_batch.rb
rbbt-util-5.35.3 test/rbbt/hpc/test_batch.rb
rbbt-util-5.35.2 test/rbbt/hpc/test_batch.rb
rbbt-util-5.35.1 test/rbbt/hpc/test_batch.rb