Hello
I am trying to use RNA-MATE in a computer cluster with an SGE queue manager. In RNA-MATE v1.1 user guide, the user is instructed to change a couple of things in the RNA-mapping.pm perl script.
But I can't understand what I am supposed to change.
citing the user guide:
But what does this mean exactly in terms of changing the script?
Where should one include the “#$/bin/sh” line? Before the 325 line? And what is the right syntax, what should one write in the script to include “#$/bin/sh”?
I am posting also part of the script (from line 296 to 338)
Thank you for your help!
I don't know much about perl, so please remmember this when replying to me...
I am trying to use RNA-MATE in a computer cluster with an SGE queue manager. In RNA-MATE v1.1 user guide, the user is instructed to change a couple of things in the RNA-mapping.pm perl script.
But I can't understand what I am supposed to change.
citing the user guide:
line 325 which reads:
should be changed to include the “#$/bin/sh” line, and a newline after the actual command needs
to be inserted.
Code:
print OUT $comm;
to be inserted.
Where should one include the “#$/bin/sh” line? Before the 325 line? And what is the right syntax, what should one write in the script to include “#$/bin/sh”?
I am posting also part of the script (from line 296 to 338)
Code:
sub mapping{
my ($argv, $tag_file_name,$map_para, $f_genome) = @_;
#check the log file before run mapping
if( $toolobj->check_died() < 0 ){ return -1 }
my $str = substr($f_genome,rindex($f_genome,'/')+1);
my ($lib_name,$str1) = split(/\./,$str);
# check input file,if input file is zero size, we jump over the mapping process and create an zero size output file.
my $tag_file = $argv->{'outdir'} . $tag_file_name;
if( !(-e $tag_file) ){ $toolobj->Log_DIED("file: $tag_file, is not exist! \n"); return -1 }
my $output = $argv->{outdir}. "$lib_name.$tag_file_name.ma.$map_para->[0].$map_para->[1]";
if($map_para->[2] == 1) { $output .= ".adj_valid" }
elsif($map_para->[2] == 2) {$output .= ".adj_all" }
if( -z $tag_file ){
$toolobj->Log_WARNING("no tag for genome mapping in $tag_file!\n");
#create empty files
open(IN, ">$output");
close(IN);
return 1;
}
#call mapread program
my $mymask = substr($argv->{mask},0,$map_para->[0]);
my $comm = "$argv->{f2m} -program $argv->{mapreads} -g $f_genome ";
$comm .= "-r $tag_file -d $argv->{outdir} -t $map_para->[0] ";
$comm .= "-e $map_para->[1] -z $argv->{max_hits} -p $mymask -a $map_para->[2] ";
my $mysh = "$output.sh";
open(OUT,">$mysh") or $toolobj->Log_DIED("can't open file $mysh");
print OUT $comm;
close(OUT);
my $success_file = "$output.success";
#debug
#$comm = "sh $mysh";
$comm = "qsub -l walltime=48:00:00 -o $mysh.out -e $mysh.err $mysh > $mysh.id ";
my $rc = system($comm);
my %hash = ($success_file => $rc);
return %hash;
}
I don't know much about perl, so please remmember this when replying to me...
Comment