From 62ebbd4be6e041eb1299013f27772d833fbbebfd Mon Sep 17 00:00:00 2001 From: Cedric Cabau <cedric.cabau@inra.fr> Date: Fri, 23 Mar 2018 09:20:16 +0000 Subject: [PATCH] Embed custom version of transrate --- trunk/cfg/drap.cfg | 2 -- trunk/runAssessment | 19 +++++++++++++------ trunk/runDrap | 16 ++++++++++------ 3 files changed, 23 insertions(+), 14 deletions(-) diff --git a/trunk/cfg/drap.cfg b/trunk/cfg/drap.cfg index aa40621..03bfe45 100644 --- a/trunk/cfg/drap.cfg +++ b/trunk/cfg/drap.cfg @@ -33,7 +33,6 @@ STAR tgicl TransDecoder.LongOrfs TransDecoder.Predict -transrate trim_galore Trinity vecscreen @@ -49,7 +48,6 @@ velvetg /usr/local/bioinfo/src/khmer/khmer2.0/khmerEnv/bin /usr/local/bioinfo/src/NCBI_Blast+/current/bin /usr/local/bioinfo/src/NCBI_tools/current/bin -/usr/local/bioinfo/src/Transrate/current /usr/local/bioinfo/src/bwa/bwa-0.7.15 [ENV] # Commands to execute to set the environnement (i.e. module load) diff --git a/trunk/runAssessment b/trunk/runAssessment index 4a991dd..9ee4ad0 100755 --- a/trunk/runAssessment +++ b/trunk/runAssessment @@ -145,8 +145,9 @@ MAIN: 'busco_lineage' => "vertebrata_odb9", 'out_dir' => "", 'binpath' => $FindBin::RealBin."/bin", + 'pluginspath' => $FindBin::RealBin."/plugins", 'no_rate' => 0, - 'cfgfile' => undef + 'cfg-file' => undef }; # Manage parameters @@ -236,12 +237,14 @@ MAIN: die "All your reads must be paired to use the scoring." ; } } - $opt->{out_dir} = File::Spec->rel2abs($opt->{out_dir}); - $opt->{binpath} = File::Spec->rel2abs($opt->{binpath}); + $opt->{out_dir} = File::Spec->rel2abs($opt->{out_dir}); + $opt->{binpath} = File::Spec->rel2abs($opt->{binpath}); + $opt->{pluginspath} = File::Spec->rel2abs($opt->{pluginspath}); # Set softwares path set_extended_path($config_file); - $ENV{PATH} = $FindBin::Bin."/bin:$ENV{PATH}" ; + $ENV{PATH} = join(':', glob("$opt->{pluginspath}/*")).":".$ENV{PATH}; + $ENV{PATH} = $opt->{binpath}.":".$ENV{PATH} ; # Set local mode if ( defined($local) ){ @@ -271,7 +274,11 @@ sub process { unless ($opt->{restart}) { make_path($opt->{out_dir}); } - + # Write run command + open(LOG, ">>$opt->{out_dir}/workflow_cmd") or die "Can't open file $opt->{out_dir}/workflow_cmd\n"; + print LOG $opt->{cmd}."\n"; + close LOG; + # Init report my $orig_report_folder = $opt->{binpath}."/../report" ; my $report_folder = $opt->{out_dir}."/report" ; @@ -470,7 +477,7 @@ sub get_ORF_analysis { ( new Cmd( "cd ##STEP_DIR##" ), new Cmd( "TransDecoder.LongOrfs -t ".$assembly ), - new Cmd( "TransDecoder.Predict -t ".$assembly ), + new Cmd( "TransDecoder.Predict --no_refine_starts -t ".$assembly ), new Cmd( "cd -" ) ) ); diff --git a/trunk/runDrap b/trunk/runDrap index 5b2c5f2..d3ccb76 100755 --- a/trunk/runDrap +++ b/trunk/runDrap @@ -57,7 +57,8 @@ my @getOptions = ( ['cfg-file','s',undef,0], # Allow user to define his own configuration file ['local',undef,undef,0], # Execute jobs on local machine ['debug',undef,undef,0], # run in debug mode - ['no-qacct',undef,undef,0] # no qacct request during assembly checking + ['no-qacct',undef,undef,0], # no qacct request during assembly checking + ['no-check',undef,undef,0] # no assembly checking ); # defaults values @@ -97,16 +98,17 @@ map { pod2usage("$_ is required") if ($required->{$_} && ! defined($opt->{$_})) map { my $key = $_; s/.+\|//; s/-/_/g; $opt->{$_} = delete($opt->{$key}) } keys %$opt; # initialize drap path -$opt->{binpath} = "$FindBin::RealBin/bin"; -$opt->{cfgpath} = "$FindBin::RealBin/cfg"; -$opt->{reportpath} = "$FindBin::RealBin/report"; +$opt->{binpath} = "$FindBin::RealBin/bin"; +$opt->{cfgpath} = "$FindBin::RealBin/cfg"; +$opt->{pluginspath} = "$FindBin::RealBin/plugins"; +$opt->{reportpath} = "$FindBin::RealBin/report"; ## allowing comma-separated lists of values as well as multiple occurrences of the options @{$opt->{R1}} = uniq(split(/,/, join(',', @{$opt->{R1}}))); $opt->{pool} = scalar(@{$opt->{R1}}); if (@{$opt->{R2}}) { @{$opt->{R2}} = uniq(split(/,/, join(',', @{$opt->{R2}}))); - printOutMessage("NUMBER of R1 and R2 FASTQ FILES DIFFERS") unless (scalar(@{$opt->{R1}}) == scalar(@{$opt->{R2}})); + printOutMessage("NUMBER of UNIQ R1 and R2 FASTQ FILES DIFFERS") unless (scalar(@{$opt->{R1}}) == scalar(@{$opt->{R2}})); } #------------------ @@ -217,6 +219,7 @@ if ($opt->{filter}) { } # create output directory +$opt->{outdir} =~ s|/$||; mkdir($opt->{outdir}) or die "Can't create directory $opt->{outdir}\n" unless (-d $opt->{outdir}); # add config params in %$opt @@ -297,6 +300,7 @@ if (! $opt->{no_norm} && $opt->{norm_src} eq 'trinity' && (($opt->{norm} && $opt } # expand PATH and ENV variables +$ENV{PATH} = join(':', glob("$opt->{pluginspath}/*")).":".$ENV{PATH}; $ENV{PATH} = $opt->{binpath}.":".$ENV{PATH} ; set_extended_path($opt->{cfg_file}); set_env_variables($opt->{cfg_file}, $opt); @@ -424,7 +428,7 @@ Do not normalize reads before assembly. =item B<--norm-mem> INTEGER -The maximum memory used for the normalization step in Gb of RAM. DRAP normalizes in two step if R1 (and R2) +The maximum memory used for the normalization step in Gb of RAM. DRAP normalizes in two steps if R1 (and R2) parameter(s) are lists of fastq files: 1) DRAP normalizes each fastq file or pair of fastq files separately. 2) DRAP merges normalized fastq files and performs another normalization on the merged fastq files or pairs of fastq files. -- GitLab