1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/b208d252a194/ changeset: b208d252a194 user: an...@client-75-102-65-120.mobility-up.psu.edu date: 2011-06-08 23:17:11 summary: Patch from Peter Cock (bug534) for cut tool to ignore commented lines. affected #: 1 file (382 bytes) --- a/tools/filters/cutWrapper.pl Wed Jun 08 16:30:59 2011 -0400 +++ b/tools/filters/cutWrapper.pl Wed Jun 08 17:17:11 2011 -0400 @@ -39,19 +39,38 @@ open (OUT, ">$ARGV[3]") or die "Cannot create $ARGV[2]:$!\n"; open (IN, "<$ARGV[0]") or die "Cannot open $ARGV[0]:$!\n"; -while (<IN>) { - chop; - @in = split /$del/; - foreach $field (@columns) { - if (defined($in[$field-1])) { - push(@out, $in[$field-1]); - } else { - push(@out, "."); - } - } - print OUT join("\t",@out), "\n"; - @out = (); + +while (my $line=<IN>) { + if ($line =~ /^#/) { + #Ignore comment lines + } else { + chop($line); + @in = split(/$del/, $line); + foreach $field (@columns) { + if (defined($in[$field-1])) { + push(@out, $in[$field-1]); + } else { + push(@out, "."); + } + } + print OUT join("\t",@out), "\n"; + @out = (); + } } + +#while (<IN>) { +# chop; +# @in = split /$del/; +# foreach $field (@columns) { +# if (defined($in[$field-1])) { +# push(@out, $in[$field-1]); +# } else { +# push(@out, "."); +# } +# } +# print OUT join("\t",@out), "\n"; +# @out = (); +#} close IN; close OUT; Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.