# HG changeset patch # User iuc # Date 1488400406 18000 # Node ID 909c315b656de2b75ed44c72f6cb61bed31b6336 # Parent 35cb17bd8bf9fa59c2a40f8e0477235e3ce3591b planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/spades commit 9d484642914b581ce35f254466b849d3c4c2c06c-dirty diff -r 35cb17bd8bf9 -r 909c315b656d CHANGE --- a/CHANGE Mon Aug 08 15:56:56 2016 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -1.4 -=== - - Supports SPAdes 3.9 - - CHANGE : Several minor bugs. -1.3 -=== - - Supports SPAdes 3.8 - - CHANGE: Improved running time and RAM consumption. - -1.2 -=== - - Supports SPades 3.6.2 - -1.1 -=== - - Supports SPades 3.6.1 - -1.0 -=== -- Supports SPAdes 3.5.0 -- New MismatchCorrector module. -- Support for Oxford Nanopore long reads. -- Support for Lucigen NxMate mate-pair libraries. -- Possibility to specify coverage cutoff: automatic and manual. -- CHANGE: Better running time. -- CHANGE: Improved RAM consumption. -- CHANGE: High-quality mate-pairs are now assumed to have forward-revers orientation (same as paired-end). - -FIX: Fixed FASTG format. -0.9 -=== -- Supports SPAdes 3.1.1 -- Supports Mate-pair only assembly with high-quality libraries -- Added support for List Paired Collection for files in a library. -- Renaming of contig names in scaffolds and contig files if List Paired Collection given - -0.7 -=== -(thanks to Nicola Soranzo for fixing these bugs) -- spades.pl doesn't die when NODE number is 0 -- removed the --rectangles option (will be deprecated in SPAdes 2.6), because it uses a different seqid format -- switched the --threads parameter to $GALAXY_SLOTS -- a few minor improvements - -0.6 -=== -- Supports SPAdes 2.5.1 -- Disables gzipped output for corrected reads -- Removes the hack that was necessary to accept .dat files (thanks to SPAdes - new input format -- Adds licensing information - -(started at version 0.6) diff -r 35cb17bd8bf9 -r 909c315b656d spades.pl --- a/spades.pl Mon Aug 08 15:56:56 2016 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,124 +0,0 @@ -#!/usr/bin/env perl -## A wrapper script to call spades.py and collect its output -use strict; -use warnings; -use File::Temp qw/ tempfile tempdir /; -use File::Copy; -use Getopt::Long; - -# Parse arguments -my ($out_contigs_file, - $out_contigs_stats, - $out_scaffolds_file, - $out_scaffolds_stats, - $out_log_file, - $new_name, - @sysargs) = @ARGV; - - -my $output_dir = 'output_dir'; - -# Create log handle -open my $log, '>', $out_log_file or die "Cannot write to $out_log_file: $?\n"; - -# Run program -runSpades(@sysargs); -collectOutput($new_name); -extractCoverageLength($out_contigs_file, $out_contigs_stats); -extractCoverageLength($out_scaffolds_file, $out_scaffolds_stats); -print $log "Done\n"; -close $log; -exit 0; - -# Run spades -sub runSpades { - my $cmd = join(" ", @_) . " -o $output_dir"; - my $return_code = system($cmd); - if ($return_code) { - print $log "Failed with code $return_code\nCommand $cmd\nMessage: $?\n"; - die "Failed with code $return_code\nCommand $cmd\nMessage: $?\n"; - } - return 0; -} - -# Collect output -sub collectOutput{ - my ($new_name) = @_; - - # To do: check that the files are there - # Collects output - if ( not -e "$output_dir/contigs.fasta") { - die "Could not find contigs.fasta file\n"; - } - if ( not -e "$output_dir/scaffolds.fasta") { - die "Could not find scaffolds.fasta file\n"; - } - - #if a new name is given for the contigs and scaffolds, change them before moving them - if ( $new_name ne 'NODE') { - renameContigs($new_name); - } - else { - move "$output_dir/contigs.fasta", $out_contigs_file; - move "$output_dir/scaffolds.fasta", $out_scaffolds_file; - } - - - - open LOG, '<', "$output_dir/spades.log" - or die "Cannot open log file $output_dir/spades.log: $?"; - print $log $_ while (); - return 0; -} - -#Change name in contig and scaffolds file -sub renameContigs{ - my ($name) = @_; - - open my $in, '<',"$output_dir/contigs.fasta" or die $!; - open my $out,'>', $out_contigs_file; - - while ( my $line = <$in>) { - #remove the NODE_ so we can rebuilt the display_id with our contig name with the contig number. - #also move the remainder of the length - if ( $line =~ />NODE_(\d+)_(.+)/) { - $line = ">$name" . "_$1 $2\n"; - } - print $out $line; - } - close $in; - close $out; - - - open $in, '<',"$output_dir/scaffolds.fasta" or die $!; - open $out,'>', $out_scaffolds_file; - - while ( my $line = <$in>) { - #remove the NODE_ so we can rebuilt the display_id with our contig name with the contig number. - #also move the remainder of the length - if ( $line =~ />NODE_(\d+)_(.+)/) { - $line = ">$name" . "_$1 $2\n"; - } - print $out $line; - } - close $in; - close $out; - -} - - -# Extract -sub extractCoverageLength{ - my ($in, $out) = @_; - open FASTA, '<', $in or die $!; - open TAB, '>', $out or die $!; - print TAB "#name\tlength\tcoverage\n"; - while (){ - next unless /^>/; - chomp; - die "Not all elements found in $_\n" if (! m/^>(NODE|\S+)_(\d+)(?:_|\s)length_(\d+)_cov_(\d+\.*\d*)/); - my ($name,$n, $l, $cov) = ($1,$2, $3, $4); - print TAB "$name" . "_$n\t$l\t$cov\n"; - } - close TAB; -} diff -r 35cb17bd8bf9 -r 909c315b656d spades.xml --- a/spades.xml Mon Aug 08 15:56:56 2016 -0400 +++ b/spades.xml Wed Mar 01 15:33:26 2017 -0500 @@ -1,255 +1,187 @@ - - SPAdes genome assembler for regular and single-cell projects - - spades - - spades.pl - $out_contigs - $out_contig_stats - $out_scaffolds - $out_scaffold_stats - $out_log - - ## if the first library file is a paired-collection, use the key as the name - #if $libraries[0].files[0].file_type.type == "paired-collection": - $libraries[0].files[0].file_type.fastq_collection.name - #else: - NODE - #end if + + genome assembler for regular and single-cell projects + + spades + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + 10.1089/cmb.2012.0021 diff -r 35cb17bd8bf9 -r 909c315b656d tool_dependencies.xml --- a/tool_dependencies.xml Mon Aug 08 15:56:56 2016 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ - - - - - -