From eb0dc52969e6c8b65c5926ae274eaab33b382e87 Mon Sep 17 00:00:00 2001 From: martinahansen Date: Tue, 11 May 2010 07:48:16 +0000 Subject: [PATCH] fixed bug in write_fixedstep git-svn-id: http://biopieces.googlecode.com/svn/trunk@951 74ccb610-7750-0410-82ae-013aeee3265d --- bp_bin/calc_fixedstep | 2 +- bp_bin/write_fixedstep | 1 + code_perl/Maasha/UCSC/Wiggle.pm | 8 ++++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/bp_bin/calc_fixedstep b/bp_bin/calc_fixedstep index f39fd20..e98b63a 100755 --- a/bp_bin/calc_fixedstep +++ b/bp_bin/calc_fixedstep @@ -1,6 +1,6 @@ #!/usr/bin/env perl -# Copyright (C) 2007-2009 Martin A. Hansen. +# Copyright (C) 2007-2010 Martin A. Hansen. # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License diff --git a/bp_bin/write_fixedstep b/bp_bin/write_fixedstep index f79873d..a80bf0f 100755 --- a/bp_bin/write_fixedstep +++ b/bp_bin/write_fixedstep @@ -28,6 +28,7 @@ use warnings; use strict; +use Data::Dumper; use Maasha::Biopieces; use Maasha::UCSC::Wiggle; diff --git a/code_perl/Maasha/UCSC/Wiggle.pm b/code_perl/Maasha/UCSC/Wiggle.pm index 374f9f2..fbd7542 100644 --- a/code_perl/Maasha/UCSC/Wiggle.pm +++ b/code_perl/Maasha/UCSC/Wiggle.pm @@ -1,6 +1,6 @@ package Maasha::UCSC::Wiggle; -# Copyright (C) 2007-2008 Martin A. Hansen. +# Copyright (C) 2007-2010 Martin A. Hansen. # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -184,7 +184,11 @@ sub biopiece2fixedstep } } - return wantarray ? @entry : \@entry; + unless ( @entry ) { + return + } else { + return wantarray ? @entry : \@entry; + } } -- 2.39.5