Class: NugenTemplate
- Inherits:
-
Object
- Object
- NugenTemplate
- Defined in:
- lib/nugen_barcode_splitter/nugen_template.rb
Instance Method Summary collapse
- #fill(lane, number, lane_dir, barcodes, read, is_fwd) ⇒ Object
-
#initialize(fastq_multx, options) ⇒ NugenTemplate
constructor
A new instance of NugenTemplate.
- #to_s ⇒ Object
Constructor Details
#initialize(fastq_multx, options) ⇒ NugenTemplate
Returns a new instance of NugenTemplate.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/nugen_barcode_splitter/nugen_template.rb', line 5 def initialize(fastq_multx, ) @template ="gunzip -c <%= @read %> | \#{fastq_multx} \\\\\n--bcfile <%= @barcodes %> \#{options} <%= @options %> \\\\\n--prefix <%= @lane_dir %>/<%= @direction %> \\\\\n--suffix \".fq\"\n" # @template =<<EOF ##{fastq_multx} #{options} <%= @barcodes %> \\ # <(gunzip -c <%= @read %>) \\ # -o <%= @lane_dir %>/<%= @direction %>.%.fq \\ # >> <%= @lane_dir %>/nugen_demultiplexing_fastq_multx.log #EOF end |
Instance Method Details
#fill(lane, number, lane_dir, barcodes, read, is_fwd) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/nugen_barcode_splitter/nugen_template.rb', line 20 def fill(lane, number, lane_dir, , read, is_fwd) if is_fwd direction = "R1_#{number}." = "--bol" else direction = "R2_#{number}." = "--eol" end context = { :lane => lane, :number => number, :lane_dir => lane_dir, :barcodes => , :read => read, :direction => direction, :options => } eruby = Erubis::Eruby.new(@template) eruby.evaluate(context) end |
#to_s ⇒ Object
42 43 44 |
# File 'lib/nugen_barcode_splitter/nugen_template.rb', line 42 def to_s template = "#{@template.chomp()}" end |