# HG changeset patch # User edward-kirton # Date 1307483432 14400 # Node ID f036c7107601f5baf299287ae12b2cb3e8c4ca24 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository 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 @@ -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. 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 @@ -0,0 +1,215 @@ + +De novo assembly of Roche/454 reads using Newbler +runAssembly_wrapper.pl +$newbler_metrics.extra_files_path +$newbler_metrics +$read_status +$trimmed_reads_fasta +$trimmed_reads_qual +$alignment_info +$all_contigs_fasta +$all_contigs_qual +$contigs_ace +$contigs_consed_ace +$contig_graph +$pair_align +$pair_status +$scaffolds_fasta +$scaffolds_qual +$scaffolds_agp +$tag_pair_align +$trim_status +$large_contigs_fasta +$large_contigs_qual +$newbler_exe -o $newbler_metrics.extra_files_path +-cpu 8 +$rip +-e $e +-mi $mi +-ml $ml +-minlen $minlen +$large +$pair +$info +$notrim +$tr +$ace +$no +$qo +$nor +$ud +-ss $ss +-sl $sl +-sc $sc +-ais $ais +-a $a +-mcf $mcf +-vs $vs +-vt $vt +-fi $fi +-fe $fe +-l $l +#for $i in $sff_paired_inputs +-p ${i.sff_paired_input} +#end for +#for $i in $sanger_paired_inputs +-p ${i.sanger_paired_input} +#end for +#for $i in $sff_inputs +${i.sff_input} +#end for +#for $i in $sanger_inputs +${i.sanger_input} +#end for + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + tr == '-tr' + + + tr == '-tr' + + + + no != '-no' + + + no != '-no' + + + no != '-no' + + + ace == '-ace' and no != '-no' + + + ace == '-ace -consed' and no != '-no' + + + + + no != '-no' + + + no != '-no' + + + pair == '-pair' and no != '-no' + + + paired_reads == 'true' and no != '-no' + + + paired_reads == 'true' and no != '-no' + + + paired_reads == 'true' and no != '-no' + + + paired_reads == 'true' and no != '-no' + + + pair == '-pair' and paired_reads == 'true' and no != '-no' + + + + + + +**What it does** + +Assemble (Roche/454) reads using Newbler. + +Download the manual here: http://galaxy.jgi-psf.org/static/manuals/GSFLXSystemSoftwareManual_PartC_Assembler-Mapper-SFFTools.pdf + +.. class:: warningmark + +**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. + + + 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 @@ -0,0 +1,235 @@ + +De novo assembly of Roche/454 cDNA reads using Newbler +runAssembly_cDNA_wrapper.pl +$newbler_metrics.extra_files_path +$newbler_metrics +$read_status +$trimmed_reads_fasta +$trimmed_reads_qual +$alignment_info +$all_contigs_fasta +$all_contigs_qual +$contigs_ace +$contigs_consed_ace +$contig_graph +$pair_align +$pair_status +$scaffolds_fasta +$scaffolds_qual +$scaffolds_agp +$tag_pair_align +$trim_status +$isotigs_ace +$isotigs_fasta +$isotigs_qual +$isotigs_agp +$isotigs_layout +$newbler_exe -o $newbler_metrics.extra_files_path +-cpu 8 +$rip +-e $e +-mi $mi +-ml $ml +-minlen $minlen +$large +$pair +$info +$notrim +$tr +$ace +$no +$qo +$nor +$ud +-ss $ss +-sl $sl +-sc $sc +-ais $ais +-a $a +-mcf $mcf +-vs $vs +-vt $vt +-fi $fi +-fe $fe +-cdna +-ig $ig +-it $it +-icc $icc +-icl $icl +#for $i in $sff_paired_inputs +-p ${i.sff_paired_input} +#end for +#for $i in $sanger_paired_inputs +-p ${i.sanger_paired_input} +#end for +#for $i in $sff_inputs +${i.sff_input} +#end for +#for $i in $sanger_inputs +${i.sanger_input} +#end for + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + tr == '-tr' + + + tr == '-tr' + + + + no != '-no' + + + no != '-no' + + + no != '-no' + + + ace == '-ace' and no != '-no' + + + ace == '-ace -consed' and no != '-no' + + + + + pair == '-pair' and no != '-no' + + + paired_reads == 'true' and no != '-no' + + + paired_reads == 'true' and no != '-no' + + + paired_reads == 'true' and no != '-no' + + + paired_reads == 'true' and no != '-no' + + + pair == '-pair' and paired_reads == 'true' and no != '-no' + + + + + ace != '' and no != '-no' + + + no != '-no' + + + no != '-no' + + + no != '-no' + + + no != '-no' + + + + + +**What it does** + +Assemble (Roche/454) reads using Newbler. + +Download the manual here: http://galaxy.jgi-psf.org/static/manuals/GSFLXSystemSoftwareManual_PartC_Assembler-Mapper-SFFTools.pdf + +.. class:: warningmark + +**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. + + + 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 @@ -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__ 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 @@ -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__ 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 @@ -0,0 +1,240 @@ + +Map Roche/454 reads to a reference using Newbler +runMapping_wrapper.pl +$newbler_metrics.extra_files_path +$alignment_info +$all_contigs_fasta +$all_contigs_qual +$all_diffs +$all_struct_vars +$hc_diff +$hc_struct_vars +$mapping_qc +$newbler_metrics +$pair_align +$read_status +$ref_status +$tag_pair_align +$trim_status +$trimmed_reads_fasta +$trimmed_reads_qual +$contigs_ace +$large_contigs_fasta +$large_contigs_qual +$gene_status +$newbler_exe -o $newbler_metrics.extra_files_path +-cpu 8 +-a $a +-e $e +-mi $mi +-ml $ml +-minlen $minlen +$pair +$info +$notrim +$tr +$ace +$no +$qo +$nor +$ud +-ss $ss +-sl $sl +-sc $sc +-ais $ais +-rst $rst +-hsl $hsl +-mcf $mcf +-vs $vs +-vt $vt +-fi $fi +-fe $fe +-l $l +$ref_type +-ref +#for $i in $ref_inputs +${i.ref_input} +#end for +-read +#for $i in $sff_paired_inputs +-p ${i.sff_paired_input} +#end for +#for $i in $sanger_paired_inputs +-p ${i.sanger_paired_input} +#end for +#for $i in $sff_inputs +${i.sff_input} +#end for +#for $i in $sanger_inputs +${i.sanger_input} +#end for + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + tr == '-tr' + + + tr == '-tr' + + + + + no != '-no' + + + no != '-no' + + + ace == '-ace' and no != '-no' + + + no != '-no' + + + no != '-no' + + + pair == '-pair' and no != '-no' + + + paired_reads == 'true' and no != '-no' + + + paired_reads == 'true' and no != '-no' + + + paired_reads == 'true' and no != '-no' + + + paired_reads == 'true' and no != '-no' + + + pair == '-pair' and paired_reads == 'true' and no != '-no' + + + + + + + + + + + + + + + +**What it does** + +Map (Roche/454) reads to a reference using Newbler. + +Download the manual here: http://galaxy.jgi-psf.org/static/manuals/GSFLXSystemSoftwareManual_PartC_Assembler-Mapper-SFFTools.pdf + +.. class:: warningmark + +**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. + + + 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 @@ -0,0 +1,261 @@ + +Map Roche/454 reads to a reference using Newbler +runMapping_cDNA_wrapper.pl +$newbler_metrics.extra_files_path +$alignment_info +$all_contigs_fasta +$all_contigs_qual +$all_diffs +$all_struct_vars +$hc_diff +$hc_struct_vars +$mapping_qc +$newbler_metrics +$pair_align +$read_status +$ref_status +$tag_pair_align +$trim_status +$trimmed_reads_fasta +$trimmed_reads_qual +$contigs_ace +$gene_status +$isotigs_ace +$isotigs_fasta +$isotigs_qual +$isotigs_agp +$isotigs_layout +$newbler_exe -o $newbler_metrics.extra_files_path +-cpu 8 +-a $a +-e $e +-mi $mi +-ml $ml +-minlen $minlen +$pair +$info +$notrim +$tr +$ace +$no +$qo +$nor +$ud +-ss $ss +-sl $sl +-sc $sc +-ais $ais +-rst $rst +-hsl $hsl +-mcf $mcf +-vs $vs +-vt $vt +-fi $fi +-fe $fe +-cdna +$srv +-ig $ig +-it $it +-icc $icc +-icl $icl +$ref_type +-ref +#for $i in $ref_inputs +${i.ref_input} +#end for +-read +#for $i in $sff_paired_inputs +-p ${i.sff_paired_input} +#end for +#for $i in $sanger_paired_inputs +-p ${i.sanger_paired_input} +#end for +#for $i in $sff_inputs +${i.sff_input} +#end for +#for $i in $sanger_inputs +${i.sanger_input} +#end for + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + tr == '-tr' + + + tr == '-tr' + + + + + no != '-no' + + + no != '-no' + + + ace == '-ace' and no != '-no' + + + pair == '-pair' and no != '-no' + + + paired_reads == 'true' and no != '-no' + + + paired_reads == 'true' and no != '-no' + + + paired_reads == 'true' and no != '-no' + + + paired_reads == 'true' and no != '-no' + + + pair == '-pair' and paired_reads == 'true' and no != '-no' + + + + + + + + + + + + + + + ace != '' and no != '-no' + + + no != '-no' + + + no != '-no' + + + no != '-no' + + + no != '-no' + + + + + +**What it does** + +Map (Roche/454) reads to a reference using Newbler. + +Download the manual here: http://galaxy.jgi-psf.org/static/manuals/GSFLXSystemSoftwareManual_PartC_Assembler-Mapper-SFFTools.pdf + +.. class:: warningmark + +**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. + + + 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 @@ -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__ 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 @@ -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__ 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 @@ -0,0 +1,11 @@ + + Convert SFF to Fastq + sff_to_fastq_converter.pl $input $output.extra_files_path $output + + + + + + + Convert Sff to Fastq + 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 @@ -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; 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 @@ -0,0 +1,29 @@ + +Select reads to include or exclude from one or more input Sff files +sfffile -$include_or_exclude $list_file -o $output +#for $i in $inputs +${i.input} +#end for + + + + + + + + + + + + + + + + + + +**What it does** + +This tool creates an Sff file, either including or excluding named reads. + + 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 @@ -0,0 +1,21 @@ + + This suite contains Roche/454's Newbler and sff-fastq converter + + Assemble 454 gDNA reads + + + Assemble 454 cDNA reads + + + Map 454 cDNA reads to reference + + + Map 454 cDNA reads to reference + + + Convert SFF to Fastq + + + Utility to make Sff files + +