diff --git a/tags/drap-v1.91/bin/AsmUtils.pm b/tags/drap-v1.91/bin/AsmUtils.pm index f0d5cf3e8d98b22fb43e843236a3f8555fc7b3ba..1391c1905ef3e21f71ce9014794458277970fe42 100644 --- a/tags/drap-v1.91/bin/AsmUtils.pm +++ b/tags/drap-v1.91/bin/AsmUtils.pm @@ -177,7 +177,7 @@ sub print_msg { delete $opt->{failed}; } print " failed\n"; - $opt->{display} = 0 unless ($opt->{step} eq 'reference'); # no need to print further msg if a step failed + $opt->{display} = 0 unless ($opt->{step} =~ /reference/); # no need to print further msg if a step failed } } @@ -492,6 +492,8 @@ sub rmbt_editing_complete { foreach my $alignR1 (keys %{$opt->{rmbt_status}->{$opt->{rmbt_ref}->{"editing_$pass"}}}) { $valid_rmbt++ if ($opt->{rmbt_status}->{$opt->{rmbt_ref}->{"editing_$pass"}}->{$alignR1}->{status} == 1); } + return [0, 'empty', "$passes->{$pass}->[0]"] unless (-e "$passes->{$pass}->[0]"); + return [0, 'empty', "$passes->{$pass}->[1]"] unless (-e "$passes->{$pass}->[1]"); my $nb_contigs_pre = count_inside_file($passes->{$pass}->[0], '^>'); my $nb_contigs_post = count_inside_file($passes->{$pass}->[1], '^>'); return [0, 1, $pass] unless ($valid_rmbt == scalar(@{$opt->{alignR1}})); @@ -547,8 +549,8 @@ sub reference_complete { my $log = get_more_recent_file("$opt->{outdir}/err_log", 'j10-*.o*'); my $err = get_more_recent_file("$opt->{outdir}/err_log", 'j10-*.e*'); my $run_dir = $opt->{tool} eq 'exonerate' ? 6 : 7; - my $run_cmd = get_more_recent_file("$opt->{dir_list}->[$run_dir]", "$opt->{tool}.*.sh"); - return [0, 1, $run_cmd] if (-e $run_cmd); # runBlat and runExonerate clean sh, log and err files when all tasks ended successfully + my $tmp_dir = get_more_recent_dir("$opt->{dir_list}->[$run_dir]", "tmp_*"); + return [0, 1, $tmp_dir] if (-e $tmp_dir); # runBlat and runExonerate cleans tmp dir when all tasks ended successfully my $out_file = get_more_recent_file("$opt->{dir_list}->[$run_dir]", "*.$opt->{tool}.best.tsv"); return [0, 'empty', $out_file] unless (-e $out_file); unless ($opt->{local}) { @@ -673,8 +675,8 @@ sub meta_reference_complete { my $log = get_more_recent_file("$opt->{outdir}/err_log", 'j10-*.o*'); my $err = get_more_recent_file("$opt->{outdir}/err_log", 'j10-*.e*'); my $run_dir = $opt->{tool} eq 'exonerate' ? 4 : 5; - my $run_cmd = get_more_recent_file("$opt->{dir_list}->[$run_dir]", "$opt->{tool}.*.sh"); - return [0, 1, $run_cmd] if (-e $run_cmd); # runBlat and runExonerate clean sh, log and err files when all tasks ended successfully + my $tmp_dir = get_more_recent_dir("$opt->{dir_list}->[$run_dir]", "tmp_*"); + return [0, 1, $tmp_dir] if (-e $tmp_dir); # runBlat and runExonerate cleans tmp dir when all tasks ended successfully my $out_file = get_more_recent_file("$opt->{dir_list}->[$run_dir]", "*.$opt->{tool}.best.tsv"); return [0, 'empty', $out_file] unless (-e $out_file); unless ($opt->{local}) { diff --git a/tags/drap-v1.91/bin/LocalScheduler.pm b/tags/drap-v1.91/bin/LocalScheduler.pm index 1ebc96d7b5c9735133c16bc1206510ad6ce5a123..781c73960f105f45b2b3b27d05899fc623a31fcc 100644 --- a/tags/drap-v1.91/bin/LocalScheduler.pm +++ b/tags/drap-v1.91/bin/LocalScheduler.pm @@ -100,7 +100,7 @@ sub parallel_submit { $parallel_task = $available_cpu; } else { if ( $available_cpu < $cmdSet_max_cpu ){ - $parallel_task = $available_cpu / ($cmdSet_max_cpu / scalar(@commands)); + $parallel_task = int($available_cpu / ($cmdSet_max_cpu / scalar(@commands))); if ( $parallel_task < 1 ) { $parallel_task = 1; } } else { diff --git a/tags/drap-v1.91/bin/check_assembly.pl b/tags/drap-v1.91/bin/check_assembly.pl index de8162615876ee5f6139b2db64bfd6bdc18e70a0..c9a59d531539814003e6bb572a625001ef66973e 100755 --- a/tags/drap-v1.91/bin/check_assembly.pl +++ b/tags/drap-v1.91/bin/check_assembly.pl @@ -73,7 +73,7 @@ my $msg = { 3 => "Can't find string 'COMPLETED: Processed .* mapped fragments...' inside SRC file", }, 'reference' => { - 1 => "File SRC exists. All tasks did not ended successfully. Check err and log files inside reference directory", + 1 => "Temporary directory SRC exists. All tasks did not ended successfully. Check err and log files inside reference directory", }, 'meta_rmbt' => { 1 => "The number of valid BAM files produced at the meta_rmbt step is not consistent with input data", @@ -127,6 +127,7 @@ unless ($opt->{optimize}) { } } print "Checking complete\n"; +set_drap_config($opt->{outdir}, $opt); exit 0; sub err_exit { @@ -137,6 +138,7 @@ sub err_exit { open(ERR, ">$err_file") or croak "Can't open file $err_file"; print ERR "$err_msg\n"; close ERR; + set_drap_config($opt->{outdir}, $opt); exit 1; } diff --git a/tags/drap-v1.91/bin/submitBlat.pl b/tags/drap-v1.91/bin/submitBlat.pl index a7a2223591dabe6d4aa9c8fcc7f65c1f3c7f78c2..1e4e9321990e8583fcc5d5baf54adc4108e26946 100755 --- a/tags/drap-v1.91/bin/submitBlat.pl +++ b/tags/drap-v1.91/bin/submitBlat.pl @@ -312,7 +312,7 @@ MAIN: my @out_files = scatter( \@in_files, "blat $target ##input## ".join(' ',@params).' ##output##', $scheduler, $mem, $vmem ); gather( \@out_files, $output ); `cat $output | blat_parser.pl > $best` if ($best); - exit; + # Remove temmporary files and folder for( my $idx = 0 ; $idx < scalar(@in_files) ; $idx++ ){ unlink $in_files[$idx] ; diff --git a/tags/drap-v1.91/bin/submitExonerate.pl b/tags/drap-v1.91/bin/submitExonerate.pl index 898bb3d71ae2acc058dd9544158547501b55c6f0..80537432b506afd7c9d676d6c66fb47c141afaa0 100755 --- a/tags/drap-v1.91/bin/submitExonerate.pl +++ b/tags/drap-v1.91/bin/submitExonerate.pl @@ -134,8 +134,11 @@ sub gather { } foreach my $current_file ( @{$in_files} ){ open( my $FH_input, "cat $current_file | sort -k1,1 -k2,2rg |" ) or die "Cannot open ".$current_file ; + my @content = <$FH_input>; + close( $FH_input ); my $previous_id = ""; - while( my @line = split(/\t/, <$FH_input>) ){ + foreach ( @content ){ + my @line = split(/\t/, $_); $line[2] += 1; if ($line[12] eq "-") { my $tmp = $line[11]; diff --git a/tags/drap-v1.91/bin/write_jobs_files.pl b/tags/drap-v1.91/bin/write_jobs_files.pl index a723d4c767ebd32b56bfadb83bcbdb5f9d52535e..843ce4293a84fb494ccf3e130ef87bad9e6c2428 100755 --- a/tags/drap-v1.91/bin/write_jobs_files.pl +++ b/tags/drap-v1.91/bin/write_jobs_files.pl @@ -68,6 +68,7 @@ unless (step_complete($opt)) { my $local_restart = $opt->{restart}; if ($opt->{restart}) { $clean_msg .= clean_directories($opt, 0); + $opt->{kmer_status} = map { $_, 0 } @{$opt->{kmers}} if (ref($opt->{kmer_status}) eq 'HASH'); $opt->{restart} = 0; $resubmit = $opt->{step}; } @@ -616,9 +617,11 @@ unless (-f "$opt->{dir_list}->[4]/all_contigs.second_pass.fa" && step_complete($ ."echo \$pending\nset pending_out = `eval \$pending`\necho \$pending_out\n" } $opt->{cmd} .= "samtools faidx $opt->{dir_list}->[3]/all_contigs.fa\n" - ."set all_bams = `find $opt->{dir_list}->[4] -name \\*all_contigs.\\[0-9\\]\\*.bam`\nif (\"\$all_bams\" == '') exit\n" - ."$opt->{binpath}/submitSamCorrectVar.pl --max-sub 70 --fasta $opt->{dir_list}->[3]/all_contigs.fa --bam \$all_bams --log $opt->{dir_list}->[4]/all_contigs.first_pass.raw.fa.samCorrectVariation.log --output $opt->{dir_list}->[4]/all_contigs.first_pass.raw.fa\n" - ."cd-hit-est -i $opt->{dir_list}->[4]/all_contigs.first_pass.raw.fa -o $opt->{dir_list}->[4]/all_contigs.first_pass.fa -M 0 -d 0 -c 0.98 -T $opt->{env}->{n_cpu} > $opt->{dir_list}->[4]/all_contigs.first_pass.fa.cd-hit.log\n" + ."set all_bams = `find $opt->{dir_list}->[4] -name \\*all_contigs.\\[0-9\\]\\*.bam`\nif (\"\$all_bams\" == '') exit\n"; + $opt->{cmd} .= sprintf("%s/submitSamCorrectVar.pl --max-sub 70 --fasta %s/all_contigs.fa --bam \$all_bams --log %s/all_contigs.first_pass.raw.fa.samCorrectVariation.log --output %s/all_contigs.first_pass.raw.fa%s\n", + $opt->{binpath}, $opt->{dir_list}->[3], $opt->{dir_list}->[4], $opt->{dir_list}->[4], $opt->{local} ? ' --local' : '' + ); + $opt->{cmd} .= "cd-hit-est -i $opt->{dir_list}->[4]/all_contigs.first_pass.raw.fa -o $opt->{dir_list}->[4]/all_contigs.first_pass.fa -M 0 -d 0 -c 0.98 -T $opt->{env}->{n_cpu} > $opt->{dir_list}->[4]/all_contigs.first_pass.fa.cd-hit.log\n" ."cat $opt->{dir_list}->[4]/all_contigs.first_pass.fa.clstr | ".q(perl -le '$/="\n>";map{s/^\d+.+>(\S+)\.\.\. \*$//m;$centroid=$1;print "$centroid\t$centroid";while(s/^\d+.+>(\S+)\.\.\..+//m){print "$1\t$centroid"}}<STDIN>')." > $opt->{dir_list}->[4]/all_contigs.first_pass.fa.cd-hit.history.log\n"; my $correctRef_metrics_file = $report_db_folder."/".$aln_edit_analysis->get_or_create_step('Correct consensus - first pass', 'Correct insertions, deletions and substitutions on contigs. It follow the majority vote at each position of the alignment.')->get_or_create_metrics_filename('correctVariationLog'); $opt->{cmd} .= "$opt->{binpath}/samCorrectVarMetrics2json.pl $opt->{dir_list}->[4]/all_contigs.first_pass.raw.fa.samCorrectVariation.log > $correctRef_metrics_file\n"; @@ -662,9 +665,11 @@ unless (-f "$opt->{dir_list}->[4]/all_contigs.second_pass.fa" && step_complete($ ."echo \$pending\nset pending_out = `eval \$pending`\necho \$pending_out\n" } $opt->{cmd} .= "samtools faidx $opt->{dir_list}->[4]/all_contigs.first_pass.fa\n" - ."set all_bams = `find $opt->{dir_list}->[4] -name \\*all_contigs.first_pass.\\[0-9\\]\\*.bam`\nif (\"\$all_bams\" == '') exit\n" - ."$opt->{binpath}/submitSamCorrectVar.pl --max-sub 70 --fasta $opt->{dir_list}->[4]/all_contigs.first_pass.fa --bam \$all_bams --log $opt->{dir_list}->[4]/all_contigs.second_pass.raw.fa.samCorrectVariation.log --output $opt->{dir_list}->[4]/all_contigs.second_pass.raw.fa\n" - ."cd-hit-est -i $opt->{dir_list}->[4]/all_contigs.second_pass.raw.fa -o $opt->{dir_list}->[4]/all_contigs.second_pass.fa -M 0 -d 0 -c 0.98 -T $opt->{env}->{n_cpu} > $opt->{dir_list}->[4]/all_contigs.second_pass.fa.cd-hit.log\n" + ."set all_bams = `find $opt->{dir_list}->[4] -name \\*all_contigs.first_pass.\\[0-9\\]\\*.bam`\nif (\"\$all_bams\" == '') exit\n"; + $opt->{cmd} .= sprintf("%s/submitSamCorrectVar.pl --max-sub 70 --fasta %s/all_contigs.first_pass.fa --bam \$all_bams --log %s/all_contigs.second_pass.raw.fa.samCorrectVariation.log --output %s/all_contigs.second_pass.raw.fa%s\n", + $opt->{binpath}, $opt->{dir_list}->[4], $opt->{dir_list}->[4], $opt->{dir_list}->[4], $opt->{local} ? ' --local' : '' + ); + $opt->{cmd} .= "cd-hit-est -i $opt->{dir_list}->[4]/all_contigs.second_pass.raw.fa -o $opt->{dir_list}->[4]/all_contigs.second_pass.fa -M 0 -d 0 -c 0.98 -T $opt->{env}->{n_cpu} > $opt->{dir_list}->[4]/all_contigs.second_pass.fa.cd-hit.log\n" ."cat $opt->{dir_list}->[4]/all_contigs.second_pass.fa.clstr | ".q(perl -le '$/="\n>";map{s/^\d+.+>(\S+)\.\.\. \*$//m;$centroid=$1;print "$centroid\t$centroid";while(s/^\d+.+>(\S+)\.\.\..+//m){print "$1\t$centroid"}}<STDIN>')." > $opt->{dir_list}->[4]/all_contigs.second_pass.fa.cd-hit.history.log\n"; my $correctRef_metrics_file = $report_db_folder."/".$aln_edit_analysis->get_or_create_step('Correct consensus - second pass', 'Correct insertions, deletions and substitutions on contigs. It follow the majority vote at each position of the alignment.')->get_or_create_metrics_filename('correctVariationLog'); $opt->{cmd} .= "$opt->{binpath}/samCorrectVarMetrics2json.pl $opt->{dir_list}->[4]/all_contigs.second_pass.raw.fa.samCorrectVariation.log > $correctRef_metrics_file\n"; diff --git a/tags/drap-v1.91/doc/install.html b/tags/drap-v1.91/doc/install.html index 66ae863a8f56c0c5c1098c9fc8b957a0e7c68b2a..95ebb9391456df844feb287157362e05e8b10c01 100644 --- a/tags/drap-v1.91/doc/install.html +++ b/tags/drap-v1.91/doc/install.html @@ -63,7 +63,7 @@ <pre class="prettyprint">docker create --name drap --privileged -v /mnt/scratch:/docker/scratch -i -t docker.io/sigenae/drap /bin/bash</pre> <p>Start the Docker container and get bash into the running container.</p> <pre class="prettyprint">docker start drap<br>docker exec -i -t drap /bin/bash</pre> - <p>The Docker container is configured to run with 120G of RAM and 8 CPU's.</p> + <p>The Docker container is configured to run with 120G of RAM and 6 CPU's.</p> <p>DRAP is installed in the Docker container at '/usr/local/src/drap-v1.91'. Use that path as the INSTALL_FOLDER in the DRAP documentation.</p> <div class="page-header"> <h1>Local install</h1> @@ -86,6 +86,7 @@ <li>Bio::SeqIO</li> <li>Bio::Tools::Run::StandAloneBlast</li> <li>IPC::Run</li> + <li>List::Util</li> <li>JSON</li> <li>Term::ANSIColor</li> </ul> diff --git a/tags/drap-v1.91/doc/lib/src/Dockerfile b/tags/drap-v1.91/doc/lib/src/Dockerfile index 55481cb16030189454a984341214b0fbe03a73cb..ed8f2dc746f87a53123f3a8a71633f4c5ac849ed 100644 --- a/tags/drap-v1.91/doc/lib/src/Dockerfile +++ b/tags/drap-v1.91/doc/lib/src/Dockerfile @@ -26,10 +26,10 @@ RUN apt-get update && apt-get install -y \ libgetopt-long-descriptive-perl \ libipc-run-perl \ libjson-perl \ - liblist-allutils-perl \ libncurses5-dev \ libpod2-base-perl \ libterm-extendedcolor-perl \ + cpanminus \ make \ nano \ ncbi-blast+ \ @@ -39,16 +39,20 @@ RUN apt-get update && apt-get install -y \ python-biopython \ python-cutadapt \ python-scipy \ + r-base \ + r-cran-ggplot2 \ rna-star \ rssh \ ruby-dev \ - samtools \ subversion \ transdecoder \ wget \ zlib1g-dev \ && rm -rf /var/lib/apt/lists/* +## -- Last version of List::Util Perl module -- ## +RUN cpanm List::Util + ## -- create links -- ## RUN cd /usr/bin \ && ln -s $PWD/usr/bin/env /bin/env \ @@ -94,7 +98,7 @@ RUN cd /usr/local/src \ && curl -SL http://busco.ezlab.org/v2/datasets/arthropoda_odb9.tar.gz | tar -xz \ && curl -SL http://busco.ezlab.org/v2/datasets/fungi_odb9.tar.gz | tar -xz \ && curl -SL http://busco.ezlab.org/v2/datasets/bacteria_odb9.tar.gz | tar -xz \ - && chmod +x BUSCO.py \ + && chmod +x BUSCO.py BUSCO_plot.py \ && ln -s $PWD/BUSCO.py /usr/local/bin/BUSCO.py \ && ln -s $PWD/BUSCO_plot.py /usr/local/bin/BUSCO_plot.py @@ -129,12 +133,13 @@ ENV PERL5LIB /usr/local/src/tgicl_linux:$PERL5LIB ## -- install trinity -- ## RUN cd /usr/local/src \ - && curl -SL https://github.com/trinityrnaseq/trinityrnaseq/archive/Trinity-v2.3.2.tar.gz | tar -xz \ - && cd trinityrnaseq-Trinity-v2.3.2 \ + && curl -SL https://github.com/trinityrnaseq/trinityrnaseq/archive/Trinity-v2.4.0.tar.gz | tar -xz \ + && cd trinityrnaseq-Trinity-v2.4.0 \ && make && make plugins \ && ln -s $PWD/Trinity /usr/local/bin/Trinity \ && ln -s $PWD/util/insilico_read_normalization.pl /usr/local/bin/insilico_read_normalization.pl \ && rm -rf $PWD/sample_data +ENV PATH /usr/local/src/trinityrnaseq-Trinity-v2.4.0/trinity-plugins/BIN:$PATH ## -- install transRate -- ## RUN cd /usr/local/src \ @@ -171,6 +176,6 @@ RUN cd /usr/local/src/drap-v1.91 \ && sed -i -e 's|/path/to/contam_in_euks.fa|/usr/local/src/banks/contam_in_euks.fa|' cfg/drap.cfg \ && sed -i -e 's|/path/to/mito.nt|/usr/local/src/banks/mito.nt|' cfg/drap.cfg \ && sed -i -e 's|/path/to/busco_directory|/usr/local/src/busco|' cfg/drap.cfg \ + && sed -i -e 's|type = sge|type = local|' cfg/drap.cfg \ # correcting tgicl conflict version - && sed -i -e 's/tgicl -F/tgicl/' bin/runAssembly.sh \ - && sed -i -e 's/s|TGICL_CPU|$opt->{env}->{n_cpu}|/s|TGICL_CPU|$opt->{env}->{n_cpu}-2|e/' bin/write_jobs_files.pl + && sed -i -e 's/tgicl -F/tgicl/' bin/runAssembly.sh diff --git a/tags/drap-v1.91/doc/quick_start.html b/tags/drap-v1.91/doc/quick_start.html index 41e2dbf9c471d2e11ad5c4f43259ece09c30d50c..cf936b452cefa96bc923cc0733959d239444d40e 100644 --- a/tags/drap-v1.91/doc/quick_start.html +++ b/tags/drap-v1.91/doc/quick_start.html @@ -51,7 +51,7 @@ </div> <div class="content container theme-showcase" role="main"> - <p>The following examples used two samples stored in <b>INSTALL_FOLDER</b>/test/data. SampleA and sampleB are two RNA-seq samples of fish embryos at different stages of development.</p> + <p>The following examples used two samples stored in <b>$INSTALL_FOLDER</b>/test/data. SampleA and sampleB are two RNA-seq samples of fish embryos at different stages of development.</p> <div class="page-header"> <h1>RunDrap</h1> @@ -59,20 +59,20 @@ <div> <p>This workflow is used to produce an assembly from one sample/tissue/development stage. In our example we need to launch runDrap on sampleA then on sampleB.</p> <pre class="prettyprint"> -<b>INSTALL_FOLDER</b>/runDrap \ - --R1 <b>INSTALL_FOLDER</b>/test/data/sampleA_R1.fastq.gz \ - --R2 <b>INSTALL_FOLDER</b>/test/data/sampleA_R2.fastq.gz \ - --ref <b>INSTALL_FOLDER</b>/test/data/Danio_rerio.pep.fasta \ +<b>$INSTALL_FOLDER</b>/runDrap \ + --R1 <b>$INSTALL_FOLDER</b>/test/data/sampleA_R1.fastq.gz \ + --R2 <b>$INSTALL_FOLDER</b>/test/data/sampleA_R2.fastq.gz \ + --ref <b>$INSTALL_FOLDER</b>/test/data/Danio_rerio.pep.fasta \ --dbg oases -kmer 25,31,37,43,49 \ - --outdir <b>OUT_FOLDER</b>/oases_splA \ + --outdir <b>$OUT_FOLDER</b>/oases_splA \ --dbg-mem 16 --norm-mem 16 -<b>INSTALL_FOLDER</b>/runDrap \ - --R1 <b>INSTALL_FOLDER</b>/test/data/sampleB_R1.fastq.gz \ - --R2 <b>INSTALL_FOLDER</b>/test/data/sampleB_R2.fastq.gz \ - --ref <b>INSTALL_FOLDER</b>/test/data/Danio_rerio.pep.fasta \ +<b>$INSTALL_FOLDER</b>/runDrap \ + --R1 <b>$INSTALL_FOLDER</b>/test/data/sampleB_R1.fastq.gz \ + --R2 <b>$INSTALL_FOLDER</b>/test/data/sampleB_R2.fastq.gz \ + --ref <b>$INSTALL_FOLDER</b>/test/data/Danio_rerio.pep.fasta \ --dbg oases --kmer 25,31,37,43,49 \ - --outdir <b>OUT_FOLDER</b>/oases_splB \ + --outdir <b>$OUT_FOLDER</b>/oases_splB \ --dbg-mem 16 --norm-mem 16 </pre> <p>Options <b>--dbg-mem</b> and <b>--norm-mem</b> are not required for execution on cluster with SGE as scheduler (see <a href="install.html#configuration_file">drap.cfg</a>). @@ -84,10 +84,10 @@ <div> <p>This workflow is used to produce merge assemblies on several samples/tissues/development stages in one assembly without redundancy. In our example we merge information from two development stages.</p> <pre class="prettyprint"> -<b>INSTALL_FOLDER</b>/runMeta \ - --drap-dirs <b>OUT_FOLDER</b>/oases_splA,<b>OUT_FOLDER</b>/oases_splB \ - --ref <b>INSTALL_FOLDER</b>/test/data/Danio_rerio.pep.fasta \ - --outdir <b>OUT_FOLDER</b>/meta_oases +<b>$INSTALL_FOLDER</b>/runMeta \ + --drap-dirs <b>$OUT_FOLDER</b>/oases_splA,<b>$OUT_FOLDER</b>/oases_splB \ + --ref <b>$INSTALL_FOLDER</b>/test/data/Danio_rerio.pep.fasta \ + --outdir <b>$OUT_FOLDER</b>/meta_oases </pre> </div> @@ -99,44 +99,44 @@ <h3>RunDrap and runMeta with trinity</h3> <pre class="prettyprint"> # RunDrap with trinity on first development stage -<b>INSTALL_FOLDER</b>/runDrap \ - --R1 <b>INSTALL_FOLDER</b>/test/data/sampleA_R1.fastq.gz \ - --R2 <b>INSTALL_FOLDER</b>/test/data/sampleA_R2.fastq.gz \ - --ref <b>INSTALL_FOLDER</b>/test/data/Danio_rerio.pep.fasta \ +<b>$INSTALL_FOLDER</b>/runDrap \ + --R1 <b>$INSTALL_FOLDER</b>/test/data/sampleA_R1.fastq.gz \ + --R2 <b>$INSTALL_FOLDER</b>/test/data/sampleA_R2.fastq.gz \ + --ref <b>$INSTALL_FOLDER</b>/test/data/Danio_rerio.pep.fasta \ --dbg trinity \ - --outdir <b>OUT_FOLDER</b>/trinity_splA \ + --outdir <b>$OUT_FOLDER</b>/trinity_splA \ --dbg-mem 16 --norm-mem 16 # RunDrap with trinity on second development stage -<b>INSTALL_FOLDER</b>/runDrap \ - --R1 <b>INSTALL_FOLDER</b>/test/data/sampleB_R1.fastq.gz \ - --R2 <b>INSTALL_FOLDER</b>/test/data/sampleB_R2.fastq.gz \ - --ref <b>INSTALL_FOLDER</b>/test/data/Danio_rerio.pep.fasta \ +<b>$INSTALL_FOLDER</b>/runDrap \ + --R1 <b>$INSTALL_FOLDER</b>/test/data/sampleB_R1.fastq.gz \ + --R2 <b>$INSTALL_FOLDER</b>/test/data/sampleB_R2.fastq.gz \ + --ref <b>$INSTALL_FOLDER</b>/test/data/Danio_rerio.pep.fasta \ --dbg trinity \ - --outdir <b>OUT_FOLDER</b>/trinity_splB \ + --outdir <b>$OUT_FOLDER</b>/trinity_splB \ --dbg-mem 16 --norm-mem 16 </pre> <p>Wait the end of the execution then launch runMeta.</p> <pre class="prettyprint"> # RunMeta to merge DRAP trinity results -<b>INSTALL_FOLDER</b>/runMeta \ - --drap-dirs <b>OUT_FOLDER</b>/trinity_splA,<b>OUT_FOLDER</b>/trinity_splB \ - --ref <b>INSTALL_FOLDER</b>/test/data/Danio_rerio.pep.fasta \ - --outdir <b>OUT_FOLDER</b>/meta_trinity +<b>$INSTALL_FOLDER</b>/runMeta \ + --drap-dirs <b>$OUT_FOLDER</b>/trinity_splA,<b>$OUT_FOLDER</b>/trinity_splB \ + --ref <b>$INSTALL_FOLDER</b>/test/data/Danio_rerio.pep.fasta \ + --outdir <b>$OUT_FOLDER</b>/meta_trinity </pre> <h3>Comparison between assemblies</h3> <pre class="prettyprint"> # Rename assemblies -ln -s transcripts_fpkm_1.fa <b>OUT_FOLDER</b>/meta_oases/oases_fpkm_1.fa -ln -s transcripts_fpkm_1.fa <b>OUT_FOLDER</b>/meta_trinity/trinity_fpkm_1.fa +ln -s transcripts_fpkm_1.fa <b>$OUT_FOLDER</b>/meta_oases/oases_fpkm_1.fa +ln -s transcripts_fpkm_1.fa <b>$OUT_FOLDER</b>/meta_trinity/trinity_fpkm_1.fa # Launch assessment -<b>INSTALL_FOLDER</b>/runAssessment \ - --assemblies <b>OUT_FOLDER</b>/meta_oases/oases_fpkm_1.fa,<b>OUT_FOLDER</b>/meta_trinity/trinity_fpkm_1.fa \ - --R1 <b>INSTALL_FOLDER</b>/test/data/sampleA_R1.fastq.gz,<b>INSTALL_FOLDER</b>/test/data/sampleB_R1.fastq.gz \ - --R2 <b>INSTALL_FOLDER</b>/test/data/sampleA_R2.fastq.gz,<b>INSTALL_FOLDER</b>/test/data/sampleB_R2.fastq.gz \ - --protein-db <b>INSTALL_FOLDER</b>/test/data/Danio_rerio.pep.fasta \ - --outdir <b>OUT_FOLDER</b>/assessment +<b>$INSTALL_FOLDER</b>/runAssessment \ + --assemblies <b>$OUT_FOLDER</b>/meta_oases/oases_fpkm_1.fa,<b>$OUT_FOLDER</b>/meta_trinity/trinity_fpkm_1.fa \ + --R1 <b>$INSTALL_FOLDER</b>/test/data/sampleA_R1.fastq.gz,<b>$INSTALL_FOLDER</b>/test/data/sampleB_R1.fastq.gz \ + --R2 <b>$INSTALL_FOLDER</b>/test/data/sampleA_R2.fastq.gz,<b>$INSTALL_FOLDER</b>/test/data/sampleB_R2.fastq.gz \ + --protein-db <b>$INSTALL_FOLDER</b>/test/data/Danio_rerio.pep.fasta \ + --outdir <b>$OUT_FOLDER</b>/assessment </pre> </div> diff --git a/tags/drap-v1.91/runDrap b/tags/drap-v1.91/runDrap index cb2c4839e95f6838e47ee559af9c39667f583194..5b2c5f24a464e70736b191354df6c89c1cf482bb 100755 --- a/tags/drap-v1.91/runDrap +++ b/tags/drap-v1.91/runDrap @@ -6,6 +6,7 @@ use Getopt::Long; use FindBin; use File::Basename; use File::Spec; +use List::Util qw(uniq); use POSIX qw(ceil); use lib("$FindBin::RealBin/bin"); use AsmUtils; @@ -101,10 +102,10 @@ $opt->{cfgpath} = "$FindBin::RealBin/cfg"; $opt->{reportpath} = "$FindBin::RealBin/report"; ## allowing comma-separated lists of values as well as multiple occurrences of the options -@{$opt->{R1}} = split(/,/, join(',', @{$opt->{R1}})); +@{$opt->{R1}} = uniq(split(/,/, join(',', @{$opt->{R1}}))); $opt->{pool} = scalar(@{$opt->{R1}}); if (@{$opt->{R2}}) { - @{$opt->{R2}} = split(/,/, join(',', @{$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}})); } @@ -173,7 +174,7 @@ if (@{$opt->{alignR1}}) { printOutMessage("OPTIONS alignR1 AND alignTrim ARE MUTUALLY EXCLUSIVE'") if (defined($opt->{alignTrim}) && !$retrieve_conf); printOutMessage("OPTIONS alignR1 AND alignNorm ARE MUTUALLY EXCLUSIVE'") if (defined($opt->{alignNorm}) && !$retrieve_conf); printOutMessage("PLEASE GIVE alignR1 FASTQ FILE TO ALIGN") if ($opt->{alignR1} eq ""); - @{$opt->{alignR1}} = split(/,/, join(',', @{$opt->{alignR1}})); + @{$opt->{alignR1}} = uniq(split(/,/, join(',', @{$opt->{alignR1}}))); map { printOutMessage("NO SUCH FASTA FILE : $_") unless (-f $_) } @{$opt->{alignR1}}; } @@ -181,7 +182,7 @@ if (@{$opt->{alignR2}}) { printOutMessage("OPTIONS alignR2 AND alignTrim ARE MUTUALLY EXCLUSIVE'") if (defined($opt->{alignTrim}) && !$retrieve_conf); printOutMessage("OPTIONS alignR2 AND alignNorm ARE MUTUALLY EXCLUSIVE'") if (defined($opt->{alignNorm}) && !$retrieve_conf); printOutMessage("PLEASE GIVE alignR2 FASTQ FILE TO ALIGN") if ($opt->{alignR2} eq ""); - @{$opt->{alignR2}} = split(/,/, join(',', @{$opt->{alignR2}})); + @{$opt->{alignR2}} = uniq(split(/,/, join(',', @{$opt->{alignR2}}))); map { printOutMessage("NO SUCH FASTA FILE : $_") unless (-f $_) } @{$opt->{alignR2}}; printOutMessage("NUMBER of alignR1 and alignR2 FASTQ FILES DIFFERS") unless (scalar(@{$opt->{alignR1}}) == scalar(@{$opt->{alignR2}})); } diff --git a/trunk/bin/LocalScheduler.pm b/trunk/bin/LocalScheduler.pm index 1ebc96d7b5c9735133c16bc1206510ad6ce5a123..781c73960f105f45b2b3b27d05899fc623a31fcc 100644 --- a/trunk/bin/LocalScheduler.pm +++ b/trunk/bin/LocalScheduler.pm @@ -100,7 +100,7 @@ sub parallel_submit { $parallel_task = $available_cpu; } else { if ( $available_cpu < $cmdSet_max_cpu ){ - $parallel_task = $available_cpu / ($cmdSet_max_cpu / scalar(@commands)); + $parallel_task = int($available_cpu / ($cmdSet_max_cpu / scalar(@commands))); if ( $parallel_task < 1 ) { $parallel_task = 1; } } else {