Next changeset 1:368a6ebebdde (2011-06-07) |
Commit message:
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository |
added:
roche454/README roche454/runAssembly.xml roche454/runAssembly_cDNA.xml roche454/runAssembly_cDNA_wrapper.pl roche454/runAssembly_wrapper.pl roche454/runMapping.xml roche454/runMapping_cDNA.xml roche454/runMapping_cDNA_wrapper.pl roche454/runMapping_wrapper.pl roche454/sff_to_fastq.xml roche454/sff_to_fastq_converter.pl roche454/sfffile.xml roche454/suite_config.xml |
b |
diff -r 000000000000 -r f036c7107601 roche454/README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/roche454/README Tue Jun 07 17:50:32 2011 -0400 |
b |
@@ -0,0 +1,6 @@ +- Newbler requires a license and the executables are not included here +- the Newbler tool config files include options to support multiple versions of Newbler; you'll need to add the paths to +the XML file if you wish to use this feature. Or, just remove this parameter entirely. Note the wrapper is expecting the +executable as the first argument. +- the SFF->Fastq converter requires the executable "fasta_qual_to_fastq" is installed; replace with whatever converter +you have installed in the perl script. |
b |
diff -r 000000000000 -r f036c7107601 roche454/runAssembly.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/roche454/runAssembly.xml Tue Jun 07 17:50:32 2011 -0400 |
[ |
b'@@ -0,0 +1,215 @@\n+<tool id="runAssembly" name="runAssembly" version="1.0.0" force_history_refresh=\'True\'>\n+<description>De novo assembly of Roche/454 reads using Newbler</description>\n+<command interpreter=\'perl\'>runAssembly_wrapper.pl\n+$newbler_metrics.extra_files_path\n+$newbler_metrics\n+$read_status\n+$trimmed_reads_fasta\n+$trimmed_reads_qual\n+$alignment_info\n+$all_contigs_fasta\n+$all_contigs_qual\n+$contigs_ace\n+$contigs_consed_ace\n+$contig_graph\n+$pair_align\n+$pair_status\n+$scaffolds_fasta\n+$scaffolds_qual\n+$scaffolds_agp\n+$tag_pair_align\n+$trim_status\n+$large_contigs_fasta\n+$large_contigs_qual\n+$newbler_exe -o $newbler_metrics.extra_files_path\n+-cpu 8 \n+$rip \n+-e $e \n+-mi $mi \n+-ml $ml \n+-minlen $minlen \n+$large \n+$pair \n+$info \n+$notrim \n+$tr \n+$ace \n+$no \n+$qo \n+$nor \n+$ud \n+-ss $ss \n+-sl $sl \n+-sc $sc \n+-ais $ais \n+-a $a\n+-mcf $mcf\n+-vs $vs\n+-vt $vt\n+-fi $fi\n+-fe $fe\n+-l $l \n+#for $i in $sff_paired_inputs\n+-p ${i.sff_paired_input}\n+#end for\n+#for $i in $sanger_paired_inputs\n+-p ${i.sanger_paired_input}\n+#end for\n+#for $i in $sff_inputs\n+${i.sff_input}\n+#end for\n+#for $i in $sanger_inputs\n+${i.sanger_input}\n+#end for\n+</command>\n+<inputs>\n+ <!-- NEWBLER VERSION -->\n+ <param name=\'newbler_exe\' type=\'select\' display=\'radio\' label=\'Newbler version\'>\n+ <option value=\'runAssembly\' selected=\'true\'>default</option>\n+\t\t<!-- OTHER VERSIONS MAY BE INCLUDED HERE; OR SIMPLY EDIT TO REMOVE THIS ENTIRE SECTION\n+ <option value=\'/jgi/tools/454/rig-DataProcessing_2.3/bin/runAssembly\'>2.3</option>\n+ <option value=\'/jgi/tools/454/rig-DataProcessing_2.4pre-20091204/bin/runAssembly\'>2.4</option>\n+ <option value=\'/home/copeland/local/x86_64/newbler/v2.5p1-internal-10Jun23-1/runAssembly\'>2.5</option>\n+\t\t-->\n+ </param>\n+\n+ <!-- READSEQ INFILES -->\n+ <repeat name="sff_inputs" title="Unpaired Reads Sff Files">\n+ <param name="sff_input" type="data" format="sff" label="SE Sff file"/>\n+ </repeat>\n+ <repeat name="sanger_inputs" title="Unpaired Reads Fasta Files">\n+ <param name="sanger_input" type="data" format="fasta" label="SE Fasta file"/>\n+ </repeat>\n+ <repeat name="sff_paired_inputs" title="Paired Reads Sff Files">\n+ <param name="sff_paired_input" type="data" format="sff" label="PE Sff file"/>\n+ </repeat>\n+ <repeat name="sanger_paired_inputs" title="Paired Reads Fasta Files">\n+ <param name="sanger_paired_input" type="data" format="fasta" label="PE Fasta file"/>\n+ </repeat>\n+ <param name=\'paired_reads\' type=\'select\' display=\'radio\' label=\'[-paired_reads] If supplying paired reads (above), do you want paired-read info?\'>\n+ <option value=\'false\'>no</option>\n+ <option value=\'true\'>[-paired_reads] yes</option>\n+ </param>\n+ <param name=\'pair\' type=\'select\' display=\'radio\' label=\'[-pair] Output pairwise overlaps\'>\n+ <option value=\'\'>no</option>\n+ <option value=\'-pair\'>[-pair] yes</option>\n+ </param>\n+ \n+ <param name=\'l\' type="integer" value=\'500\' label="[-l] This option sets the minimum length for a contig to appear in the 454LargeContigs.fna file"/>\n+\n+ <!-- OPTIONAL ARGUMENTS -->\n+ <param name=\'mcf\' type=\'data\' format=\'tabular\' optional=\'true\' label=\'[-mcf] Specify non-default MID config file\' />\n+ <param name=\'fi\' type=\'data\' format=\'txt\' optional=\'true\' label=\'[-fi] Include filter file to be specified\' />\n+ <param name=\'fe\' type=\'data\' format=\'txt\' optional=\'true\' label=\'[-fe] Exclude filter file to be specified\' />\n+ <param name=\'vt\' type=\'data\' format=\'fasta\' optional=\'true\' label="[-vt] This option specifies a vector trimming database, or FASTA file of sequences to be used to trim the ends of input reads (for cloning vectors, primers, adapters or other end sequences)" />\n+ <param name=\'vs\' type=\'data\' format=\'fasta\' optional=\'true\' label="[-vs] This option specifies a vector screening database, or FASTA file of sequences to be used to screen the input reads for contaminants. Reads that comple'..b'tion>\n+ </param>\n+ <param name=\'qo\' type=\'boolean\' truevalue=\'\' falsevalue=\'-qo\' checked=\'false\' label=\'[-qo] Generate quick output for mapping and assembly. Disables signal distribution computation for calling consensus sequences and can decrease accuracy\'/>\n+ <param name=\'a\' type="integer" value=\'100\' label="[-a] This option sets the minimum length for a contig to appear in the 454AllContigs.fna file."/>\n+ <param name=\'rip\' type=\'boolean\' truevalue=\'\' falsevalue=\'-rip\' checked=\'false\' label=\'[-rip] Output each read in only one contig\'/>\n+ <param name=\'info\' type=\'select\' display=\'radio\' label=\'Output Alignment Info\'>\n+ <option value=\'-info\'>[-info] yes</option>\n+ <option value=\'-infoall\'>[-infoall] yes, including 0-coverage positions</option>\n+ </param>\n+ <param name=\'ace\' type=\'select\' display=\'radio\' label=\'Produce Ace assembly file\'>\n+ <option value=\'\'>no</option>\n+ <option value=\'-ace\'>[-ace] yes</option>\n+ <option value=\'-ace -consed\'>[-consed] yes, in consed dir</option>\n+ </param>\n+</inputs>\n+\n+<outputs>\n+ <data name=\'newbler_metrics\' format=\'txt\' />\n+ <data name=\'read_status\' format=\'tabular\' label=\'Read Status\'/>\n+ <data name=\'trimmed_reads_fasta\' format=\'fasta\' label=\'Trimmed Reads (Fasta)\'>\n+ <filter>tr == \'-tr\'</filter>\n+ </data>\n+ <data name=\'trimmed_reads_qual\' format=\'qual454\' label=\'Trimmed Reads (Qual)\'>\n+ <filter>tr == \'-tr\'</filter>\n+ </data>\n+ <!-- the following produced only if no != \'-no\' -->\n+ <data name=\'alignment_info\' format=\'tabular\' label=\'Alignment Info\'>\n+ <filter>no != \'-no\'</filter>\n+ </data>\n+ <data name=\'all_contigs_fasta\' format=\'fasta\' label=\'All Contigs (Fasta)\'>\n+ <filter>no != \'-no\'</filter>\n+ </data>\n+ <data name=\'all_contigs_qual\' format=\'qual454\' label=\'All Contigs (Qual454)\'>\n+ <filter>no != \'-no\'</filter>\n+ </data>\n+ <data name=\'contigs_ace\' format=\'ace\' label=\'Contigs (Ace)\'>\n+ <filter>ace == \'-ace\' and no != \'-no\'</filter>\n+ </data>\n+ <data name=\'contigs_consed_ace\' format=\'ace\' label=\'Contigs (Consed/Ace)\'>\n+ <filter>ace == \'-ace -consed\' and no != \'-no\'</filter>\n+ </data>\n+\n+ <data name=\'contig_graph\' format=\'txt\' label=\'Contig Graph\'/>\n+ <data name=\'large_contigs_fasta\' format=\'fasta\' label=\'Large Contigs (Fasta)\'>\n+ <filter>no != \'-no\'</filter>\n+ </data>\n+ <data name=\'large_contigs_qual\' format=\'qual454\' label=\'Large Contigs (Qual454)\'>\n+ <filter>no != \'-no\'</filter>\n+ </data>\n+ <data name=\'pair_align\' format=\'txt\' label=\'Pairwise Alignments\'>\n+ <filter>pair == \'-pair\' and no != \'-no\'</filter>\n+ </data>\n+ <data name=\'pair_status\' format=\'tabular\' label=\'Paired-End Read Status\'>\n+ <filter>paired_reads == \'true\' and no != \'-no\'</filter>\n+ </data>\n+ <data name=\'scaffolds_fasta\' format=\'fasta\' label=\'Scaffolds (Fasta)\'>\n+ <filter>paired_reads == \'true\' and no != \'-no\'</filter>\n+ </data>\n+ <data name=\'scaffolds_qual\' format=\'qual454\' label=\'Scaffolds (Qual454)\'>\n+ <filter>paired_reads == \'true\' and no != \'-no\'</filter>\n+ </data>\n+ <data name=\'scaffolds_agp\' format=\'tabular\' label=\'Scaffolds (Agp)\'>\n+ <filter>paired_reads == \'true\' and no != \'-no\'</filter>\n+ </data>\n+ <data name=\'tag_pair_align\' format=\'txt\' label=\'Tag Pair Alignments\'>\n+ <filter>pair == \'-pair\' and paired_reads == \'true\' and no != \'-no\'</filter>\n+ </data>\n+ <data name=\'trim_status\' format=\'tabular\' label=\'Trim Status\'/>\n+\n+</outputs>\n+<help>\n+\n+**What it does**\n+\n+Assemble (Roche/454) reads using Newbler.\n+\n+Download the manual here: http://galaxy.jgi-psf.org/static/manuals/GSFLXSystemSoftwareManual_PartC_Assembler-Mapper-SFFTools.pdf\n+\n+.. class:: warningmark\n+\n+**Fasta Header Format** Fasta input must provide any pairing information in the header using the expected key=value format. Use the \'Sanger tab to Newbler Fasta\' tool.\n+\n+</help>\n+</tool>\n' |
b |
diff -r 000000000000 -r f036c7107601 roche454/runAssembly_cDNA.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/roche454/runAssembly_cDNA.xml Tue Jun 07 17:50:32 2011 -0400 |
[ |
b'@@ -0,0 +1,235 @@\n+<tool id="runAssembly_cDNA" name="runAssembly cDNA" version="1.0.0" force_history_refresh=\'True\'>\n+<description>De novo assembly of Roche/454 cDNA reads using Newbler</description>\n+<command interpreter=\'perl\'>runAssembly_cDNA_wrapper.pl\n+$newbler_metrics.extra_files_path\n+$newbler_metrics\n+$read_status\n+$trimmed_reads_fasta\n+$trimmed_reads_qual\n+$alignment_info\n+$all_contigs_fasta\n+$all_contigs_qual\n+$contigs_ace\n+$contigs_consed_ace\n+$contig_graph\n+$pair_align\n+$pair_status\n+$scaffolds_fasta\n+$scaffolds_qual\n+$scaffolds_agp\n+$tag_pair_align\n+$trim_status\n+$isotigs_ace\n+$isotigs_fasta\n+$isotigs_qual\n+$isotigs_agp\n+$isotigs_layout\n+$newbler_exe -o $newbler_metrics.extra_files_path\n+-cpu 8 \n+$rip \n+-e $e \n+-mi $mi \n+-ml $ml \n+-minlen $minlen \n+$large \n+$pair \n+$info \n+$notrim \n+$tr \n+$ace \n+$no \n+$qo \n+$nor \n+$ud \n+-ss $ss \n+-sl $sl \n+-sc $sc \n+-ais $ais \n+-a $a\n+-mcf $mcf\n+-vs $vs\n+-vt $vt\n+-fi $fi\n+-fe $fe\n+-cdna\n+-ig $ig\n+-it $it\n+-icc $icc\n+-icl $icl\n+#for $i in $sff_paired_inputs\n+-p ${i.sff_paired_input}\n+#end for\n+#for $i in $sanger_paired_inputs\n+-p ${i.sanger_paired_input}\n+#end for\n+#for $i in $sff_inputs\n+${i.sff_input}\n+#end for\n+#for $i in $sanger_inputs\n+${i.sanger_input}\n+#end for\n+</command>\n+<inputs>\n+ <!-- NEWBLER VERSION -->\n+ <param name=\'newbler_exe\' type=\'select\' display=\'radio\' label=\'Newbler version\'>\n+ <option value=\'runAssembly\' selected=\'true\'>default</option>\n+\t\t<!-- OTHER VERSIONS MAY BE INCLUDED HERE; OR SIMPLY EDIT TO REMOVE THIS ENTIRE SECTION\n+ <option value=\'/jgi/tools/454/rig-DataProcessing_2.3/bin/runAssembly\'>2.3</option>\n+ <option value=\'/jgi/tools/454/rig-DataProcessing_2.4pre-20091204/bin/runAssembly\'>2.4</option>\n+ <option value=\'/home/copeland/local/x86_64/newbler/v2.5p1-internal-10Jun23-1/runAssembly\'>2.5</option>\n+\t\t-->\n+ </param>\n+\n+ <!-- READSEQ INFILES -->\n+ <repeat name="sff_inputs" title="Unpaired Reads Sff Files">\n+ <param name="sff_input" type="data" format="sff" label="SE Sff file"/>\n+ </repeat>\n+ <repeat name="sanger_inputs" title="Unpaired Reads Fasta Files">\n+ <param name="sanger_input" type="data" format="fasta" label="SE Fasta file"/>\n+ </repeat>\n+ <repeat name="sff_paired_inputs" title="Paired Reads Sff Files">\n+ <param name="sff_paired_input" type="data" format="sff" label="PE Sff file"/>\n+ </repeat>\n+ <repeat name="sanger_paired_inputs" title="Paired Reads Fasta Files">\n+ <param name="sanger_paired_input" type="data" format="fasta" label="PE Fasta file"/>\n+ </repeat>\n+ <param name=\'paired_reads\' type=\'select\' display=\'radio\' label=\'[-paired_reads] If supplying paired reads (above), do you want paired-read info?\'>\n+ <option value=\'false\'>no</option>\n+ <option value=\'true\'>[-paired_reads] yes</option>\n+ </param>\n+ <param name=\'pair\' type=\'select\' display=\'radio\' label=\'[-pair] Output pairwise overlaps\'>\n+ <option value=\'\'>no</option>\n+ <option value=\'-pair\'>[-pair] yes</option>\n+ </param>\n+ \n+ <param name=\'it\' type=\'integer\' value=\'100\' label=\'[-it] Specify the maximum number of isotigs in an isogroup. Maximum is 10,000.\'/>\n+ <param name=\'ig\' type=\'integer\' value=\'500\' label=\'[-ig] Specify the maximum number of contigs in an isogroup.\'/>\n+ <param name=\'icc\' type=\'integer\' value=\'100\' label=\'[-icc] Specify the maximum number of contigs in an isotig. Maximum is 200 and corresponds to the recursion depth during graph traversal\'/>\n+ <param name=\'icl\' type=\'integer\' value=\'3\' label=\'[-icl] Specify the minimum length a contig must be to be part of an isotig. Minimum is 3bp.\'/>\n+\n+ <!-- OPTIONAL ARGUMENTS -->\n+ <param name=\'mcf\' type=\'data\' format=\'tabular\' optional=\'true\' label=\'[-mcf] Specify non-default MID config file\' />\n+ <param name=\'fi\' type=\'data\' format=\'txt\' optional=\'true\' label=\'[-fi] Include filter file to be specified\' />\n+ <param name=\'fe\' type=\'data\' format=\'txt\' optional=\'true\' label=\''..b'imum length for a contig to appear in the 454AllContigs.fna file."/>\n+ <param name=\'rip\' type=\'boolean\' truevalue=\'\' falsevalue=\'-rip\' checked=\'false\' label=\'[-rip] Output each read in only one contig\'/>\n+ <param name=\'info\' type=\'select\' display=\'radio\' label=\'Output Alignment Info\'>\n+ <option value=\'-info\'>[-info] yes</option>\n+ <option value=\'-infoall\'>[-infoall] yes, including 0-coverage positions</option>\n+ </param>\n+ <param name=\'ace\' type=\'select\' display=\'radio\' label=\'Produce Ace assembly file\'>\n+ <option value=\'\'>no</option>\n+ <option value=\'-ace\'>[-ace] yes</option>\n+ <option value=\'-ace -consed\'>[-consed] yes, in consed dir</option>\n+ </param>\n+</inputs>\n+\n+<outputs>\n+ <data name=\'newbler_metrics\' format=\'txt\' />\n+ <data name=\'read_status\' format=\'tabular\' label=\'Read Status\'/>\n+ <data name=\'trimmed_reads_fasta\' format=\'fasta\' label=\'Trimmed Reads (Fasta)\'>\n+ <filter>tr == \'-tr\'</filter>\n+ </data>\n+ <data name=\'trimmed_reads_qual\' format=\'qual454\' label=\'Trimmed Reads (Qual)\'>\n+ <filter>tr == \'-tr\'</filter>\n+ </data>\n+ <!-- the following produced only if no != \'-no\' -->\n+ <data name=\'alignment_info\' format=\'tabular\' label=\'Alignment Info\'>\n+ <filter>no != \'-no\'</filter>\n+ </data>\n+ <data name=\'all_contigs_fasta\' format=\'fasta\' label=\'All Contigs (Fasta)\'>\n+ <filter>no != \'-no\'</filter>\n+ </data>\n+ <data name=\'all_contigs_qual\' format=\'qual454\' label=\'All Contigs (Qual454)\'>\n+ <filter>no != \'-no\'</filter>\n+ </data>\n+ <data name=\'contigs_ace\' format=\'ace\' label=\'Contigs (Ace)\'>\n+ <filter>ace == \'-ace\' and no != \'-no\'</filter>\n+ </data>\n+ <data name=\'contigs_consed_ace\' format=\'ace\' label=\'Contigs (Consed/Ace)\'>\n+ <filter>ace == \'-ace -consed\' and no != \'-no\'</filter>\n+ </data>\n+\n+ <data name=\'contig_graph\' format=\'txt\' label=\'Contig Graph\'/>\n+ <data name=\'pair_align\' format=\'txt\' label=\'Pairwise Alignments\'>\n+ <filter>pair == \'-pair\' and no != \'-no\'</filter>\n+ </data>\n+ <data name=\'pair_status\' format=\'tabular\' label=\'Paired-End Read Status\'>\n+ <filter>paired_reads == \'true\' and no != \'-no\'</filter>\n+ </data>\n+ <data name=\'scaffolds_fasta\' format=\'fasta\' label=\'Scaffolds (Fasta)\'>\n+ <filter>paired_reads == \'true\' and no != \'-no\'</filter>\n+ </data>\n+ <data name=\'scaffolds_qual\' format=\'qual454\' label=\'Scaffolds (Qual454)\'>\n+ <filter>paired_reads == \'true\' and no != \'-no\'</filter>\n+ </data>\n+ <data name=\'scaffolds_agp\' format=\'tabular\' label=\'Scaffolds (Agp)\'>\n+ <filter>paired_reads == \'true\' and no != \'-no\'</filter>\n+ </data>\n+ <data name=\'tag_pair_align\' format=\'txt\' label=\'Tag Pair Alignments\'>\n+ <filter>pair == \'-pair\' and paired_reads == \'true\' and no != \'-no\'</filter>\n+ </data>\n+ <data name=\'trim_status\' format=\'tabular\' label=\'Trim Status\'/>\n+\n+ <data name=\'isotigs_ace\' format=\'ace\' label=\'Isotigs (Ace)\'>\n+ <filter>ace != \'\' and no != \'-no\'</filter>\n+ </data>\n+ <data name=\'isotigs_fasta\' format=\'fasta\' label=\'Isotigs (Fasta)\'>\n+ <filter>no != \'-no\'</filter>\n+ </data>\n+ <data name=\'isotigs_qual\' format=\'qual454\' label=\'Isotigs (Qual454)\'>\n+ <filter>no != \'-no\'</filter>\n+ </data>\n+ <data name=\'isotigs_agp\' format=\'tabular\' label=\'Isotigs (Agp)\'>\n+ <filter>no != \'-no\'</filter>\n+ </data>\n+ <data name=\'isotigs_layout\' format=\'txt\' label=\'Isotig Layout\'>\n+ <filter>no != \'-no\'</filter>\n+ </data>\n+\n+</outputs>\n+<help>\n+\n+**What it does**\n+\n+Assemble (Roche/454) reads using Newbler.\n+\n+Download the manual here: http://galaxy.jgi-psf.org/static/manuals/GSFLXSystemSoftwareManual_PartC_Assembler-Mapper-SFFTools.pdf\n+\n+.. class:: warningmark\n+\n+**Fasta Header Format** Fasta input must provide any pairing information in the header using the expected key=value format. Use the \'Sanger tab to Newbler Fasta\' tool.\n+\n+</help>\n+</tool>\n' |
b |
diff -r 000000000000 -r f036c7107601 roche454/runAssembly_cDNA_wrapper.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/roche454/runAssembly_cDNA_wrapper.pl Tue Jun 07 17:50:32 2011 -0400 |
b |
@@ -0,0 +1,94 @@ +#!/usr/bin/env perl + +use warnings; +use strict; +use File::Copy; + +# EXPECT 23 FILE HANDLES, SOME OF WHICH MAY BE 'None' +my $outdir=shift @ARGV; +my $newbler_metrics=shift @ARGV; +my $read_status=shift @ARGV; +my $trimmed_reads_fasta=shift @ARGV; +my $trimmed_reads_qual=shift @ARGV; +my $alignment_info=shift @ARGV; +my $all_contigs_fasta=shift @ARGV; +my $all_contigs_qual=shift @ARGV; +my $contigs_ace=shift @ARGV; +my $contigs_consed_ace=shift @ARGV; +my $contig_graph=shift @ARGV; +my $pair_align=shift @ARGV; +my $pair_status=shift @ARGV; +my $scaffolds_fasta=shift @ARGV; +my $scaffolds_qual=shift @ARGV; +my $scaffolds_agp=shift @ARGV; +my $tag_pair_align=shift @ARGV; +my $trim_status=shift @ARGV; +my $isotigs_ace=shift @ARGV; +my $isotigs_fasta=shift @ARGV; +my $isotigs_qual=shift @ARGV; +my $isotigs_agp=shift @ARGV; +my $isotigs_layout=shift @ARGV; + +# REMOVE PARAMETERS FOR OPTIONAL FILES WHICH WERE NOT PROVIDED + +my @cmd=removeUnusedOptions(@ARGV); + +# RUN COMMAND +# NOTE: FIRST ARG EXPECTED TO BE EXECUTABLE +my $stderr; +eval { $stderr=`@cmd 2>&1`; }; +if ( $@ ) { + print STDERR "Newbler ERROR: $stderr\n"; + `cat $outdir/assembly/454NewblerProgress.txt 1>&2`; + die($@); +} + +get_outfile("$outdir/454NewblerMetrics.txt", $newbler_metrics); +get_outfile("$outdir/454ReadStatus.txt", $read_status); +get_outfile("$outdir/454TrimmedReads.fna", $trimmed_reads_fasta); +get_outfile("$outdir/454TrimmedReads.qual", $trimmed_reads_qual); +get_outfile("$outdir/454AlignmentInfo.tsv", $alignment_info); +get_outfile("$outdir/454AllContigs.fna", $all_contigs_fasta); +get_outfile("$outdir/454AllContigs.qual", $all_contigs_qual); +get_outfile("$outdir/454Contigs.ace", $contigs_ace); +get_outfile("$outdir/consed/edit_dir/454Contigs.ace.1", $contigs_consed_ace); +get_outfile("$outdir/454ContigGraph.txt", $contig_graph); +get_outfile("$outdir/454PairAlign.txt", $pair_align); +get_outfile("$outdir/454PairStatus.txt", $pair_status); +get_outfile("$outdir/454Scaffolds.fna", $scaffolds_fasta); +get_outfile("$outdir/454Scaffolds.qual", $scaffolds_qual); +get_outfile("$outdir/454Scaffolds.txt", $scaffolds_agp); +get_outfile("$outdir/454TagPairAlign.txt", $tag_pair_align); +get_outfile("$outdir/454TrimStatus.txt", $trim_status); +get_outfile("$outdir/454Isotigs.ace", $isotigs_ace); +get_outfile("$outdir/454Isotigs.fna", $isotigs_fasta); +get_outfile("$outdir/454Isotigs.qual", $isotigs_qual); +get_outfile("$outdir/454Isotigs.txt", $isotigs_agp); +get_outfile("$outdir/454IsotigsLayout.txt", $isotigs_layout); +exit; + +# EVERY 'None' ARG AND IT'S PRECEEDING OPTION TAG ARE DISCARDED +sub removeUnusedOptions { + my @cmd=(); + my $prev; + foreach (@_) { + unless ($_ eq 'None') { + push @cmd, $prev if defined($prev); + $prev=$_; + } else { + $prev=undef; + } + } + push @cmd, $prev if defined($prev); + return @cmd; +} + +sub get_outfile { + my ($src, $dest)=@_; + # make sure dest defined and src exist; skip if dest is 'None' + if ( $dest and $dest ne 'None' and $src and -f $src ) { + move($src,$dest); + } +} + +__END__ |
b |
diff -r 000000000000 -r f036c7107601 roche454/runAssembly_wrapper.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/roche454/runAssembly_wrapper.pl Tue Jun 07 17:50:32 2011 -0400 |
b |
@@ -0,0 +1,88 @@ +#!/usr/bin/env perl + +use warnings; +use strict; +use File::Copy; + +# EXPECT 20 FILE HANDLES, SOME OF WHICH MAY BE 'None' +my $outdir=shift @ARGV; +my $newbler_metrics=shift @ARGV; +my $read_status=shift @ARGV; +my $trimmed_reads_fasta=shift @ARGV; +my $trimmed_reads_qual=shift @ARGV; +my $alignment_info=shift @ARGV; +my $all_contigs_fasta=shift @ARGV; +my $all_contigs_qual=shift @ARGV; +my $contigs_ace=shift @ARGV; +my $contigs_consed_ace=shift @ARGV; +my $contig_graph=shift @ARGV; +my $pair_align=shift @ARGV; +my $pair_status=shift @ARGV; +my $scaffolds_fasta=shift @ARGV; +my $scaffolds_qual=shift @ARGV; +my $scaffolds_agp=shift @ARGV; +my $tag_pair_align=shift @ARGV; +my $trim_status=shift @ARGV; +my $large_contigs_fasta=shift @ARGV; +my $large_contigs_qual=shift @ARGV; + +# REMOVE PARAMETERS FOR OPTIONAL FILES WHICH WERE NOT PROVIDED + +my @cmd=removeUnusedOptions(@ARGV); + +# RUN COMMAND +# NOTE: FIRST ARG EXPECTED TO BE EXECUTABLE +my $stderr; +eval { $stderr=`@cmd 2>&1`; }; +if ( $@ ) { + print STDERR "Newbler ERROR: $stderr\n"; + `cat $outdir/assembly/454NewblerProgress.txt 1>&2`; + die($@); +} + +get_outfile("$outdir/454NewblerMetrics.txt", $newbler_metrics); +get_outfile("$outdir/454ReadStatus.txt", $read_status); +get_outfile("$outdir/454TrimmedReads.fna", $trimmed_reads_fasta); +get_outfile("$outdir/454TrimmedReads.qual", $trimmed_reads_qual); +get_outfile("$outdir/454AlignmentInfo.tsv", $alignment_info); +get_outfile("$outdir/454AllContigs.fna", $all_contigs_fasta); +get_outfile("$outdir/454AllContigs.qual", $all_contigs_qual); +get_outfile("$outdir/454Contigs.ace", $contigs_ace); +get_outfile("$outdir/consed/edit_dir/454Contigs.ace.1", $contigs_consed_ace); +get_outfile("$outdir/454ContigGraph.txt", $contig_graph); +get_outfile("$outdir/454PairAlign.txt", $pair_align); +get_outfile("$outdir/454PairStatus.txt", $pair_status); +get_outfile("$outdir/454Scaffolds.fna", $scaffolds_fasta); +get_outfile("$outdir/454Scaffolds.qual", $scaffolds_qual); +get_outfile("$outdir/454Scaffolds.txt", $scaffolds_agp); +get_outfile("$outdir/454TagPairAlign.txt", $tag_pair_align); +get_outfile("$outdir/454TrimStatus.txt", $trim_status); +get_outfile("$outdir/454LargeContigs.fna", $large_contigs_fasta); +get_outfile("$outdir/454LargeContigs.qual", $large_contigs_qual); +exit; + +# EVERY 'None' ARG AND IT'S PRECEEDING OPTION TAG ARE DISCARDED +sub removeUnusedOptions { + my @cmd=(); + my $prev; + foreach (@_) { + unless ($_ eq 'None') { + push @cmd, $prev if defined($prev); + $prev=$_; + } else { + $prev=undef; + } + } + push @cmd, $prev if defined($prev); + return @cmd; +} + +sub get_outfile { + my ($src, $dest)=@_; + # make sure dest defined and src exist; skip if dest is 'None' + if ( $dest and $dest ne 'None' and $src and -f $src ) { + move($src,$dest); + } +} + +__END__ |
b |
diff -r 000000000000 -r f036c7107601 roche454/runMapping.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/roche454/runMapping.xml Tue Jun 07 17:50:32 2011 -0400 |
[ |
b'@@ -0,0 +1,240 @@\n+<tool id="runMapping" name="runMapping" version="1.0.0">\n+<description>Map Roche/454 reads to a reference using Newbler</description>\n+<command interpreter=\'perl\'>runMapping_wrapper.pl\n+$newbler_metrics.extra_files_path\n+$alignment_info\n+$all_contigs_fasta\n+$all_contigs_qual\n+$all_diffs\n+$all_struct_vars\n+$hc_diff\n+$hc_struct_vars\n+$mapping_qc\n+$newbler_metrics\n+$pair_align\n+$read_status\n+$ref_status\n+$tag_pair_align\n+$trim_status\n+$trimmed_reads_fasta\n+$trimmed_reads_qual\n+$contigs_ace\n+$large_contigs_fasta\n+$large_contigs_qual\n+$gene_status\n+$newbler_exe -o $newbler_metrics.extra_files_path\n+-cpu 8 \n+-a $a\n+-e $e \n+-mi $mi \n+-ml $ml \n+-minlen $minlen \n+$pair \n+$info \n+$notrim \n+$tr \n+$ace \n+$no \n+$qo \n+$nor \n+$ud \n+-ss $ss \n+-sl $sl \n+-sc $sc \n+-ais $ais \n+-rst $rst\n+-hsl $hsl\n+-mcf $mcf\n+-vs $vs\n+-vt $vt\n+-fi $fi\n+-fe $fe\n+-l $l \n+$ref_type\n+-ref\n+#for $i in $ref_inputs\n+${i.ref_input}\n+#end for\n+-read\n+#for $i in $sff_paired_inputs\n+-p ${i.sff_paired_input}\n+#end for\n+#for $i in $sanger_paired_inputs\n+-p ${i.sanger_paired_input}\n+#end for\n+#for $i in $sff_inputs\n+${i.sff_input}\n+#end for\n+#for $i in $sanger_inputs\n+${i.sanger_input}\n+#end for\n+</command>\n+<inputs>\n+ <!-- NEWBLER VERSION -->\n+ <param name=\'newbler_exe\' type=\'select\' display=\'radio\' label=\'Newbler version\'>\n+ <option value=\'runMapping\' selected=\'true\'>default</option>\n+\t\t<!-- OTHER VERSIONS MAY BE INCLUDED HERE; OR SIMPLY EDIT TO REMOVE THIS ENTIRE SECTION\n+ <option value=\'/jgi/tools/454/rig-DataProcessing_2.3/bin/runMapping\'>2.3</option>\n+ <option value=\'/jgi/tools/454/rig-DataProcessing_2.4pre-20091204/bin/runMapping\'>2.4</option>\n+ <option value=\'/home/copeland/local/x86_64/newbler/v2.5p1-internal-10Jun23-1/runMapping\'>2.5</option>\n+\t\t-->\n+ </param>\n+\n+ <!-- READSEQ INFILES -->\n+ <repeat name="sff_inputs" title="Unpaired Reads Sff Files">\n+ <param name="sff_input" type="data" format="sff" label="SE Sff file"/>\n+ </repeat>\n+ <repeat name="sanger_inputs" title="Unpaired Reads Fasta Files">\n+ <param name="sanger_input" type="data" format="fasta" label="SE Fasta file"/>\n+ </repeat>\n+ <repeat name="sff_paired_inputs" title="Paired Reads Sff Files">\n+ <param name="sff_paired_input" type="data" format="sff" label="PE Sff file"/>\n+ </repeat>\n+ <repeat name="sanger_paired_inputs" title="Paired Reads Fasta Files">\n+ <param name="sanger_paired_input" type="data" format="fasta" label="PE Fasta file"/>\n+ </repeat>\n+ <param name=\'paired_reads\' type=\'select\' display=\'radio\' label=\'[-paired_reads] If supplying paired reads (above), do you want paired-read info?\'>\n+ <option value=\'false\'>no</option>\n+ <option value=\'true\'>[-paired_reads] yes</option>\n+ </param>\n+ <param name=\'pair\' type=\'select\' display=\'radio\' label=\'[-pair] Output pairwise overlaps\'>\n+ <option value=\'\'>no</option>\n+ <option value=\'-pair\'>[-pair] yes</option>\n+ </param>\n+ \n+ <!-- SOURCE DNA TYPE -->\n+ <param name=\'l\' type="integer" value=\'500\' label="[-l] This option sets the minimum length for a contig to appear in the 454LargeContigs.fna file"/>\n+\n+ <!-- INPUTS SPECIFIC TO MAPPING -->\n+ <repeat name=\'ref_inputs\' title=\'Reference Sequence\'>\n+ <param name=\'ref_input\' type=\'data\' format=\'fasta\' label=\'Fasta file\'/>\n+ </repeat>\n+ <param name=\'ref_type\' type=\'select\' display=\'radio\' label=\'Reference type\'>\n+ <option value=\'-gref\'>[-gref] Genomic reference sequence</option>\n+ <option value=\'-cref\'>[-cref] cDNA reference sequence</option>\n+ </param>\n+ <param name=\'rst\' type=\'integer\' value=\'12\' label=\'[-rst] Repeat score threshold parameter. Allowed values: 0 or greater\'/>\n+ <param name=\'hsl\' type=\'integer\' value=\'70\' label=\'[-hsl] Hit-per-seed limit parameter\'/>\n+ <param name=\'srv\' type=\'boolean\' truevalue=\'-srv\' falsevalue=\'\' checked=\'false\' label=\'[-srv] Single read variant output\'/>\n+\n+ <!-- OPTIONAL ARG'..b' assembly. Disables signal distribution computation for calling consensus sequences and can decrease accuracy\'/>\n+ <param name=\'a\' type="integer" value=\'100\' label="[-a] This option sets the minimum length for a contig to appear in the 454AllContigs.fna file."/>\n+ <param name=\'info\' type=\'select\' display=\'radio\' label=\'Output Alignment Info\'>\n+ <option value=\'-info\'>[-info] yes</option>\n+ <option value=\'-infoall\'>[-infoall] yes, including 0-coverage positions</option>\n+ </param>\n+ <param name=\'ace\' type=\'select\' display=\'radio\' label=\'Produce Ace assembly file\'>\n+ <option value=\'\'>no</option>\n+ <option value=\'-ace\'>[-ace] yes</option>\n+ </param>\n+</inputs>\n+\n+<outputs>\n+ <!-- the following are common to runMapping and runAssembly -->\n+ <data name=\'newbler_metrics\' format=\'txt\' />\n+ <data name=\'read_status\' format=\'tabular\' label=\'Read Status\'/>\n+ <data name=\'trimmed_reads_fasta\' format=\'fasta\' label=\'Trimmed Reads (Fasta)\'>\n+ <filter>tr == \'-tr\'</filter>\n+ </data>\n+ <data name=\'trimmed_reads_qual\' format=\'qual454\' label=\'Trimmed Reads (Qual)\'>\n+ <filter>tr == \'-tr\'</filter>\n+ </data>\n+ <!-- the following produced only if no != \'-no\' -->\n+ <data name=\'alignment_info\' format=\'tabular\' label=\'Alignment Info\'/>\n+ <data name=\'all_contigs_fasta\' format=\'fasta\' label=\'All Contigs (Fasta)\'>\n+ <filter>no != \'-no\'</filter>\n+ </data>\n+ <data name=\'all_contigs_qual\' format=\'qual454\' label=\'All Contigs (Qual454)\'>\n+ <filter>no != \'-no\'</filter>\n+ </data>\n+ <data name=\'contigs_ace\' format=\'ace\' label=\'Contigs (Ace)\'>\n+ <filter>ace == \'-ace\' and no != \'-no\'</filter>\n+ </data>\n+ <data name=\'large_contigs_fasta\' format=\'fasta\' label=\'Large Contigs (Fasta)\'>\n+ <filter>no != \'-no\'</filter>\n+ </data>\n+ <data name=\'large_contigs_qual\' format=\'qual454\' label=\'Large Contigs (Qual454)\'>\n+ <filter>no != \'-no\'</filter>\n+ </data>\n+ <data name=\'pair_align\' format=\'txt\' label=\'Pairwise Alignments\'>\n+ <filter>pair == \'-pair\' and no != \'-no\'</filter>\n+ </data>\n+ <data name=\'pair_status\' format=\'tabular\' label=\'Paired-End Read Status\'>\n+ <filter>paired_reads == \'true\' and no != \'-no\'</filter>\n+ </data>\n+ <data name=\'scaffolds_fasta\' format=\'fasta\' label=\'Scaffolds (Fasta)\'>\n+ <filter>paired_reads == \'true\' and no != \'-no\'</filter>\n+ </data>\n+ <data name=\'scaffolds_qual\' format=\'qual454\' label=\'Scaffolds (Qual454)\'>\n+ <filter>paired_reads == \'true\' and no != \'-no\'</filter>\n+ </data>\n+ <data name=\'scaffolds_agp\' format=\'tabular\' label=\'Scaffolds (Agp)\'>\n+ <filter>paired_reads == \'true\' and no != \'-no\'</filter>\n+ </data>\n+ <data name=\'tag_pair_align\' format=\'txt\' label=\'Tag Pair Alignments\'>\n+ <filter>pair == \'-pair\' and paired_reads == \'true\' and no != \'-no\'</filter>\n+ </data>\n+ <data name=\'trim_status\' format=\'tabular\' label=\'Trim Status\'/>\n+\n+ <!-- THE FOLLOWING ARE LIMITED TO MAPPING -->\n+ <data name=\'all_diffs\' format=\'tabular\' label=\'All Diffs\'/>\n+ <data name=\'all_struct_vars\' format=\'tabular\' label=\'All Struct Vars\'/>\n+ <data name=\'hc_diff\' format=\'tabular\' label=\'High Confidence Diff\'/>\n+ <data name=\'hc_struct_vars\' format=\'tabular\' label=\'High Confidence Struct Vars\'/>\n+ <data name=\'gene_status\' format=\'tabular\' label=\'Gene Status\'/>\n+ <data name=\'mapping_qc\' format=\'xls\' label=\'Mapping QC (Excel)\'/>\n+ <data name=\'ref_status\' format=\'tabular\' label=\'Ref Status\'/>\n+\n+</outputs>\n+<help>\n+\n+**What it does**\n+\n+Map (Roche/454) reads to a reference using Newbler.\n+\n+Download the manual here: http://galaxy.jgi-psf.org/static/manuals/GSFLXSystemSoftwareManual_PartC_Assembler-Mapper-SFFTools.pdf\n+\n+.. class:: warningmark\n+\n+**Fasta Header Format** Fasta input must provide any pairing information in the header using the expected key=value format. Use the \'Sanger tab to Newbler Fasta\' tool.\n+\n+</help>\n+</tool>\n' |
b |
diff -r 000000000000 -r f036c7107601 roche454/runMapping_cDNA.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/roche454/runMapping_cDNA.xml Tue Jun 07 17:50:32 2011 -0400 |
[ |
b'@@ -0,0 +1,261 @@\n+<tool id="runMapping_cDNA" name="runMapping cDNA" version="1.0.0">\n+<description>Map Roche/454 reads to a reference using Newbler</description>\n+<command interpreter=\'perl\'>runMapping_cDNA_wrapper.pl\n+$newbler_metrics.extra_files_path\n+$alignment_info\n+$all_contigs_fasta\n+$all_contigs_qual\n+$all_diffs\n+$all_struct_vars\n+$hc_diff\n+$hc_struct_vars\n+$mapping_qc\n+$newbler_metrics\n+$pair_align\n+$read_status\n+$ref_status\n+$tag_pair_align\n+$trim_status\n+$trimmed_reads_fasta\n+$trimmed_reads_qual\n+$contigs_ace\n+$gene_status\n+$isotigs_ace\n+$isotigs_fasta\n+$isotigs_qual\n+$isotigs_agp\n+$isotigs_layout\n+$newbler_exe -o $newbler_metrics.extra_files_path\n+-cpu 8 \n+-a $a\n+-e $e \n+-mi $mi \n+-ml $ml \n+-minlen $minlen \n+$pair \n+$info \n+$notrim \n+$tr \n+$ace \n+$no \n+$qo \n+$nor \n+$ud \n+-ss $ss \n+-sl $sl \n+-sc $sc \n+-ais $ais \n+-rst $rst\n+-hsl $hsl\n+-mcf $mcf\n+-vs $vs\n+-vt $vt\n+-fi $fi\n+-fe $fe\n+-cdna\n+$srv\n+-ig $ig\n+-it $it\n+-icc $icc\n+-icl $icl\n+$ref_type\n+-ref\n+#for $i in $ref_inputs\n+${i.ref_input}\n+#end for\n+-read\n+#for $i in $sff_paired_inputs\n+-p ${i.sff_paired_input}\n+#end for\n+#for $i in $sanger_paired_inputs\n+-p ${i.sanger_paired_input}\n+#end for\n+#for $i in $sff_inputs\n+${i.sff_input}\n+#end for\n+#for $i in $sanger_inputs\n+${i.sanger_input}\n+#end for\n+</command>\n+<inputs>\n+ <!-- NEWBLER VERSION -->\n+ <param name=\'newbler_exe\' type=\'select\' display=\'radio\' label=\'Newbler version\'>\n+ <option value=\'runMapping\' selected=\'true\'>default</option>\n+\t\t<!-- OTHER VERSIONS MAY BE INCLUDED HERE; OR SIMPLY EDIT TO REMOVE THIS ENTIRE SECTION\n+ <option value=\'/jgi/tools/454/rig-DataProcessing_2.3/bin/runMapping\'>2.3</option>\n+ <option value=\'/jgi/tools/454/rig-DataProcessing_2.4pre-20091204/bin/runMapping\'>2.4</option>\n+ <option value=\'/home/copeland/local/x86_64/newbler/v2.5p1-internal-10Jun23-1/runMapping\'>2.5</option>\n+\t\t-->\n+ </param>\n+\n+ <!-- READSEQ INFILES -->\n+ <repeat name="sff_inputs" title="Unpaired Reads Sff Files">\n+ <param name="sff_input" type="data" format="sff" label="SE Sff file"/>\n+ </repeat>\n+ <repeat name="sanger_inputs" title="Unpaired Reads Fasta Files">\n+ <param name="sanger_input" type="data" format="fasta" label="SE Fasta file"/>\n+ </repeat>\n+ <repeat name="sff_paired_inputs" title="Paired Reads Sff Files">\n+ <param name="sff_paired_input" type="data" format="sff" label="PE Sff file"/>\n+ </repeat>\n+ <repeat name="sanger_paired_inputs" title="Paired Reads Fasta Files">\n+ <param name="sanger_paired_input" type="data" format="fasta" label="PE Fasta file"/>\n+ </repeat>\n+ <param name=\'paired_reads\' type=\'select\' display=\'radio\' label=\'[-paired_reads] If supplying paired reads (above), do you want paired-read info?\'>\n+ <option value=\'false\'>no</option>\n+ <option value=\'true\'>[-paired_reads] yes</option>\n+ </param>\n+ <param name=\'pair\' type=\'select\' display=\'radio\' label=\'[-pair] Output pairwise overlaps\'>\n+ <option value=\'\'>no</option>\n+ <option value=\'-pair\'>[-pair] yes</option>\n+ </param>\n+ \n+ <!-- SOURCE DNA TYPE -->\n+ <param name=\'it\' type=\'integer\' value=\'100\' label=\'[-it] Specify the maximum number of isotigs in an isogroup. Maximum is 10,000.\'/>\n+ <param name=\'ig\' type=\'integer\' value=\'500\' label=\'[-ig] Specify the maximum number of contigs in an isogroup.\'/>\n+ <param name=\'icc\' type=\'integer\' value=\'100\' label=\'[-icc] Specify the maximum number of contigs in an isotig. Maximum is 200 and corresponds to the recursion depth during graph traversal\'/>\n+ <param name=\'icl\' type=\'integer\' value=\'3\' label=\'[-icl] Specify the minimum length a contig must be to be part of an isotig. Minimum is 3bp.\'/>\n+\n+ <!-- INPUTS SPECIFIC TO MAPPING -->\n+ <repeat name=\'ref_inputs\' title=\'Reference Sequence\'>\n+ <param name=\'ref_input\' type=\'data\' format=\'fasta\' label=\'Fasta file\'/>\n+ </repeat>\n+ <param name=\'ref_type\' type=\'select\' display=\'radio\' label=\'Reference ty'..b"e='-info'>[-info] yes</option>\n+ <option value='-infoall'>[-infoall] yes, including 0-coverage positions</option>\n+ </param>\n+ <param name='ace' type='select' display='radio' label='Produce Ace assembly file'>\n+ <option value=''>no</option>\n+ <option value='-ace'>[-ace] yes</option>\n+ </param>\n+</inputs>\n+\n+<outputs>\n+ <!-- the following are common to runMapping and runAssembly -->\n+ <data name='newbler_metrics' format='txt' />\n+ <data name='read_status' format='tabular' label='Read Status'/>\n+ <data name='trimmed_reads_fasta' format='fasta' label='Trimmed Reads (Fasta)'>\n+ <filter>tr == '-tr'</filter>\n+ </data>\n+ <data name='trimmed_reads_qual' format='qual454' label='Trimmed Reads (Qual)'>\n+ <filter>tr == '-tr'</filter>\n+ </data>\n+ <!-- the following produced only if no != '-no' -->\n+ <data name='alignment_info' format='tabular' label='Alignment Info'/>\n+ <data name='all_contigs_fasta' format='fasta' label='All Contigs (Fasta)'>\n+ <filter>no != '-no'</filter>\n+ </data>\n+ <data name='all_contigs_qual' format='qual454' label='All Contigs (Qual454)'>\n+ <filter>no != '-no'</filter>\n+ </data>\n+ <data name='contigs_ace' format='ace' label='Contigs (Ace)'>\n+ <filter>ace == '-ace' and no != '-no'</filter>\n+ </data>\n+ <data name='pair_align' format='txt' label='Pairwise Alignments'>\n+ <filter>pair == '-pair' and no != '-no'</filter>\n+ </data>\n+ <data name='pair_status' format='tabular' label='Paired-End Read Status'>\n+ <filter>paired_reads == 'true' and no != '-no'</filter>\n+ </data>\n+ <data name='scaffolds_fasta' format='fasta' label='Scaffolds (Fasta)'>\n+ <filter>paired_reads == 'true' and no != '-no'</filter>\n+ </data>\n+ <data name='scaffolds_qual' format='qual454' label='Scaffolds (Qual454)'>\n+ <filter>paired_reads == 'true' and no != '-no'</filter>\n+ </data>\n+ <data name='scaffolds_agp' format='tabular' label='Scaffolds (Agp)'>\n+ <filter>paired_reads == 'true' and no != '-no'</filter>\n+ </data>\n+ <data name='tag_pair_align' format='txt' label='Tag Pair Alignments'>\n+ <filter>pair == '-pair' and paired_reads == 'true' and no != '-no'</filter>\n+ </data>\n+ <data name='trim_status' format='tabular' label='Trim Status'/>\n+\n+ <!-- THE FOLLOWING ARE LIMITED TO MAPPING -->\n+ <data name='all_diffs' format='tabular' label='All Diffs'/>\n+ <data name='all_struct_vars' format='tabular' label='All Struct Vars'/>\n+ <data name='hc_diff' format='tabular' label='High Confidence Diff'/>\n+ <data name='hc_struct_vars' format='tabular' label='High Confidence Struct Vars'/>\n+ <data name='gene_status' format='tabular' label='Gene Status'/>\n+ <data name='mapping_qc' format='xls' label='Mapping QC (Excel)'/>\n+ <data name='ref_status' format='tabular' label='Ref Status'/>\n+\n+ <!-- ISOTIGS -->\n+ <data name='isotigs_ace' format='ace' label='Isotigs (Ace)'>\n+ <filter>ace != '' and no != '-no'</filter>\n+ </data>\n+ <data name='isotigs_fasta' format='fasta' label='Isotigs (Fasta)'>\n+ <filter>no != '-no'</filter>\n+ </data>\n+ <data name='isotigs_qual' format='qual454' label='Isotigs (Qual454)'>\n+ <filter>no != '-no'</filter>\n+ </data>\n+ <data name='isotigs_agp' format='tabular' label='Isotigs (Agp)'>\n+ <filter>no != '-no'</filter>\n+ </data>\n+ <data name='isotigs_layout' format='txt' label='Isotig Layout'>\n+ <filter>no != '-no'</filter>\n+ </data>\n+\n+</outputs>\n+<help>\n+\n+**What it does**\n+\n+Map (Roche/454) reads to a reference using Newbler.\n+\n+Download the manual here: http://galaxy.jgi-psf.org/static/manuals/GSFLXSystemSoftwareManual_PartC_Assembler-Mapper-SFFTools.pdf\n+\n+.. class:: warningmark\n+\n+**Fasta Header Format** Fasta input must provide any pairing information in the header using the expected key=value format. Use the 'Sanger tab to Newbler Fasta' tool.\n+\n+</help>\n+</tool>\n" |
b |
diff -r 000000000000 -r f036c7107601 roche454/runMapping_cDNA_wrapper.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/roche454/runMapping_cDNA_wrapper.pl Tue Jun 07 17:50:32 2011 -0400 |
b |
@@ -0,0 +1,96 @@ +#!/usr/bin/env/perl + +use warnings; +use strict; +use File::Copy; + +# EXPECT 21 FILE HANDLES, SOME OF WHICH MAY BE 'None' +my $outdir=shift @ARGV; +my $alignment_info=shift @ARGV; +my $all_contigs_fasta=shift @ARGV; +my $all_contigs_qual=shift @ARGV; +my $all_diffs=shift @ARGV +my $all_struct_vars=shift @ARGV +my $hc_diff=shift @ARGV +my $hc_struct_vars=shift @ARGV +my $mapping_qc=shift @ARGV +my $newbler_metrics=shift @ARGV; +my $pair_align=shift @ARGV; +my $read_status=shift @ARGV; +my $ref_status=shift @ARGV; +my $tag_pair_align=shift @ARGV; +my $trim_status=shift @ARGV; +my $trimmed_reads_fasta=shift @ARGV; +my $trimmed_reads_qual=shift @ARGV; +my $contigs_ace=shift @ARGV; +my $gene_status=shift @ARGV; +my $isotigs_ace=shift @ARGV; +my $isotigs_fasta=shift @ARGV; +my $isotigs_qual=shift @ARGV; +my $isotigs_agp=shift @ARGV; +my $isotigs_layout=shift @ARGV; + +# REMOVE PARAMETERS FOR OPTIONAL FILES WHICH WERE NOT PROVIDED + +my @cmd=removeUnusedOptions(@ARGV); + +# RUN COMMAND +# NOTE: FIRST ARG EXPECTED TO BE EXECUTABLE +my $stderr; +eval { $stderr=`@cmd 2>&1`; }; +if ( $@ ) { + print STDERR "Newbler ERROR: $stderr\n"; + `cat $outdir/assembly/454NewblerProgress.txt 1>&2`; + die($@); +} + +get_outfile("$outdir/454AlignmentInfo.tsv", $alignment_info); +get_outfile("$outdir/454AllContigs.fna", $all_contigs_fasta); +get_outfile("$outdir/454AllContigs.qual", $all_contigs_qual); +get_outfile("$outdir/454AllDiffs.txt", $all_diffs); +get_outfile("$outdir/454AllStructVars.txt", $all_struct_vars); +get_outfile("$outdir/454HCDiff.txt", $hc_diff); +get_outfile("$outdir/454HCStructVars.txt", $hc_struct_vars); +get_outfile("$outdir/454MappingQC.xls", $mapping_qc); +get_outfile("$outdir/454NewblerMetrics.txt", $newbler_metrics); +get_outfile("$outdir/454PairAlign.txt", $pair_align); +get_outfile("$outdir/454ReadStatus.txt", $read_status); +get_outfile("$outdir/454RefStatus.txt", $ref_status); +get_outfile("$outdir/454TagPairAlign.txt", $tag_pair_align); +get_outfile("$outdir/454TrimStatus.txt", $trim_status); +get_outfile("$outdir/454TrimmedReads.fna", $trimmed_reads_fasta); +get_outfile("$outdir/454TrimmedReads.qual", $trimmed_reads_qual); +get_outfile("$outdir/454Contigs.ace", $contigs_ace); +get_outfile("$outdir/454GeneStatus.txt", $gene_status); +get_outfile("$outdir/454Isotigs.ace", $isotigs_ace); +get_outfile("$outdir/454Isotigs.fna", $isotigs_fasta); +get_outfile("$outdir/454Isotigs.qual", $isotigs_qual); +get_outfile("$outdir/454Isotigs.txt", $isotigs_agp); +get_outfile("$outdir/454IsotigsLayout.txt", $isotigs_layout); +exit; + +# EVERY 'None' ARG AND IT'S PRECEEDING OPTION TAG ARE DISCARDED +sub removeUnusedOptions { + my @cmd=(); + my $prev; + foreach (@_) { + unless ($_ eq 'None') { + push @cmd, $prev if defined($prev); + $prev=$_; + } else { + $prev=undef; + } + } + push @cmd, $prev if defined($prev); + return @cmd; +} + +sub get_outfile { + my ($src, $dest)=@_; + # make sure dest defined and src exist; skip if dest is 'None' + if ( $dest and $dest ne 'None' and $src and -f $src ) { + move($src,$dest); + } +} + +__END__ |
b |
diff -r 000000000000 -r f036c7107601 roche454/runMapping_wrapper.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/roche454/runMapping_wrapper.pl Tue Jun 07 17:50:32 2011 -0400 |
b |
@@ -0,0 +1,89 @@ +#!/jgi/tools/bin/perl -w + +use strict; +use File::Copy; + +# EXPECT 21 FILE HANDLES, SOME OF WHICH MAY BE 'None' +my $outdir=shift @ARGV; +my $alignment_info=shift @ARGV; +my $all_contigs_fasta=shift @ARGV; +my $all_contigs_qual=shift @ARGV; +my $all_diffs=shift @ARGV +my $all_struct_vars=shift @ARGV +my $hc_diff=shift @ARGV +my $hc_struct_vars=shift @ARGV +my $mapping_qc=shift @ARGV +my $newbler_metrics=shift @ARGV; +my $pair_align=shift @ARGV; +my $read_status=shift @ARGV; +my $ref_status=shift @ARGV; +my $tag_pair_align=shift @ARGV; +my $trim_status=shift @ARGV; +my $trimmed_reads_fasta=shift @ARGV; +my $trimmed_reads_qual=shift @ARGV; +my $contigs_ace=shift @ARGV; +my $large_contigs_fasta=shift @ARGV; +my $large_contigs_qual=shift @ARGV; +my $gene_status=shift @ARGV; + +# REMOVE PARAMETERS FOR OPTIONAL FILES WHICH WERE NOT PROVIDED + +my @cmd=removeUnusedOptions(@ARGV); + +# RUN COMMAND +# NOTE: FIRST ARG EXPECTED TO BE EXECUTABLE +my $stderr; +eval { $stderr=`@cmd 2>&1`; }; +if ( $@ ) { + print STDERR "Newbler ERROR: $stderr\n"; + `cat $outdir/assembly/454NewblerProgress.txt 1>&2`; + die($@); +} + +get_outfile("$outdir/454AlignmentInfo.tsv", $alignment_info); +get_outfile("$outdir/454AllContigs.fna", $all_contigs_fasta); +get_outfile("$outdir/454AllContigs.qual", $all_contigs_qual); +get_outfile("$outdir/454AllDiffs.txt", $all_diffs); +get_outfile("$outdir/454AllStructVars.txt", $all_struct_vars); +get_outfile("$outdir/454HCDiff.txt", $hc_diff); +get_outfile("$outdir/454HCStructVars.txt", $hc_struct_vars); +get_outfile("$outdir/454MappingQC.xls", $mapping_qc); +get_outfile("$outdir/454NewblerMetrics.txt", $newbler_metrics); +get_outfile("$outdir/454PairAlign.txt", $pair_align); +get_outfile("$outdir/454ReadStatus.txt", $read_status); +get_outfile("$outdir/454RefStatus.txt", $ref_status); +get_outfile("$outdir/454TagPairAlign.txt", $tag_pair_align); +get_outfile("$outdir/454TrimStatus.txt", $trim_status); +get_outfile("$outdir/454TrimmedReads.fna", $trimmed_reads_fasta); +get_outfile("$outdir/454TrimmedReads.qual", $trimmed_reads_qual); +get_outfile("$outdir/454Contigs.ace", $contigs_ace); +get_outfile("$outdir/454LargeContigs.fna", $large_contigs_fasta); +get_outfile("$outdir/454LargeContigs.qual", $large_contigs_qual); +get_outfile("$outdir/454GeneStatus.txt", $gene_status); +exit; + +# EVERY 'None' ARG AND IT'S PRECEEDING OPTION TAG ARE DISCARDED +sub removeUnusedOptions { + my @cmd=(); + my $prev; + foreach (@_) { + unless ($_ eq 'None') { + push @cmd, $prev if defined($prev); + $prev=$_; + } else { + $prev=undef; + } + } + push @cmd, $prev if defined($prev); + return @cmd; +} + +sub get_outfile { + my ($src, $dest)=@_; + # make sure dest defined and src exist; skip if dest is 'None' + if ( $dest and $dest ne 'None' and $src and -f $src ) { + move($src,$dest); + } +} + +__END__ |
b |
diff -r 000000000000 -r f036c7107601 roche454/sff_to_fastq.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/roche454/sff_to_fastq.xml Tue Jun 07 17:50:32 2011 -0400 |
b |
@@ -0,0 +1,11 @@ +<tool id="sff_to_fastq" name="Sff to Fastq Converter" version="1.0.0"> + <description>Convert SFF to Fastq</description> + <command interpreter='perl'>sff_to_fastq_converter.pl $input $output.extra_files_path $output</command> + <inputs> + <param name="input" type="data" format="sff" label="Roche/454 Sff"/> + </inputs> + <outputs> + <data name="output" format="fastq"/> + </outputs> + <help>Convert Sff to Fastq</help> +</tool> |
b |
diff -r 000000000000 -r f036c7107601 roche454/sff_to_fastq_converter.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/roche454/sff_to_fastq_converter.pl Tue Jun 07 17:50:32 2011 -0400 |
b |
@@ -0,0 +1,31 @@ +#!/usr/bin/env perl + +use warnings; +use strict; +use Getopt::Long; +use File::Basename; + +# VALIDATE INPUT +die("Expected 3 args") unless @ARGV == 3; +my ($sff, $extra_files_path, $fastq) = @ARGV; + +# DEFINE PATHS +mkdir($extra_files_path) unless -d $extra_files_path; +my $base = basename($sff); +my $fasta = "$extra_files_path/$base.fasta"; +my $qual = "$extra_files_path/$base.qual"; + +# GENERATE FASTA, QUAL, FASTQ +my $outf; +my $out; +eval { $out=`sffinfo -seq $sff > $fasta` }; +die("ERROR: $out") if $@; +print $out; +eval { $out=`sffinfo -qual $sff > $qual` }; +die("ERROR: $out") if $@; +print $out; +eval { $out=`fasta_qual_to_fastq $fasta $qual $fastq` }; +die("ERROR: $out") if $@; +print $out; +unlink($fasta, $qual); +exit 0; |
b |
diff -r 000000000000 -r f036c7107601 roche454/sfffile.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/roche454/sfffile.xml Tue Jun 07 17:50:32 2011 -0400 |
b |
@@ -0,0 +1,29 @@ +<tool id="sfffile" name="Sff File" version="1.0.0"> +<description>Select reads to include or exclude from one or more input Sff files</description> +<command>sfffile -$include_or_exclude $list_file -o $output +#for $i in $inputs +${i.input} +#end for +</command> +<inputs> + <repeat name="inputs" title="Input Files"> + <param name="input" type="data" format="sff" label="Sff file"/> + </repeat> + <param name="list_file" type="data" format="text" label="List of read IDs"/> + <param name="include_or_exclude" type="select" label="Include or exclude the named reads?"> + <option value='i' selected='true'>include</option> + <option value='e'>exclude</option> + </param> +</inputs> + +<outputs> + <data name="output" format="sff"/> +</outputs> + +<help> + +**What it does** + +This tool creates an Sff file, either including or excluding named reads. +</help> +</tool> |
b |
diff -r 000000000000 -r f036c7107601 roche454/suite_config.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/roche454/suite_config.xml Tue Jun 07 17:50:32 2011 -0400 |
b |
@@ -0,0 +1,21 @@ +<suite id="roche454_toolsuite" name="Suite of Newbler tools" version="1.0.0"> + <description>This suite contains Roche/454's Newbler and sff-fastq converter</description> + <tool id="runAssembly" name="runAssembly" version="1.0.0"> + <description>Assemble 454 gDNA reads</description> + </tool> + <tool id="runAssembly_cDNA" name="runAssembly cDNA" version="1.0.0"> + <description>Assemble 454 cDNA reads</description> + </tool> + <tool id="runMapping" name="runMapping" version="1.0.0"> + <description>Map 454 cDNA reads to reference</description> + </tool> + <tool id="runMapping_cDNA" name="runMapping cDNA" version="1.0.0"> + <description>Map 454 cDNA reads to reference</description> + </tool> + <tool id="sff_to_fastq" name="Sff to Fastq Converter" version="1.0.0"> + <description>Convert SFF to Fastq</description> + </tool> + <tool id="sfffile" name="Sff File" version="1.0.0"> + <description>Utility to make Sff files</description> + </tool> +</suite> |