The red text at the bottom represents the three lines I want to address.
I'm dynamically creating a bsub with a perl script and would like to create the
fasta_16S
variable in a single line....not three. I'm having difficulty in getting the syntax correct. Obviously, there is some confusion because I'm creating a script in a script.
#!/usr/bin/perl -w
use strict;
use File::Slurp;
use Data::Dumper;
my ($dir,$plugin,$MIN_READ_LENGTH_16S) = @ARGV;
my $microbiome_sample_id_list = $dir . "/sample_ids_of_microbiome_samples.csv";
my $DB="/mnt/Lab/Data/IonTorrent/plugins/" . $plugin . "/db/MB_DB.udb";
my @file = read_file($microbiome_sample_id_list);
my $sample_num = scalar @file;
my $path = "/mnt/Lab/Data/IonTorrent/$server/$run";
open BSUB,">$dir/MB.bsub" || die $!;
print BSUB "\#!/bin/bash\n
\#BSUB -J MBSAMPLE\[1-$sample_num\]
\#BSUB -o $path/MBSAMPLE.out
\#BSUB -e $path/MBSAMPLE.err\n
id=(`sed -n \"\$LSB_JOBINDEX\"p $path/sample_ids_of_microbiome_samples.csv`)
fasta_16S=$path/\${id}/\${id}_bacterial_minreadlen
fasta_16S+=$MIN_READ_LENGTH_16S
fasta_16S+=.fasta
";
close(BSUB);