]> git.donarmstrong.com Git - biopieces.git/commitdiff
migrated trans family
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Wed, 27 May 2009 05:34:40 +0000 (05:34 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Wed, 27 May 2009 05:34:40 +0000 (05:34 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@430 74ccb610-7750-0410-82ae-013aeee3265d

bp_bin/merge_vals
bp_bin/translate_seq
bp_bin/transliterate_seq
bp_bin/transliterate_vals
code_perl/Maasha/BioRun.pm

index fdf5bd287f78613d2aea83bb9b15f855cad57e77..f53d99abbf586b022a2625a94d37bbdc7fc4c0fa 100755 (executable)
@@ -1,6 +1,91 @@
-#!/usr/bin/env perl
+#!/usr/bin/env perl -w
+
+# Copyright (C) 2007-2009 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
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# http://www.gnu.org/copyleft/gpl.html
+
+
+# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> DESCRIPTION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+# Merge values of keys in a record.
+
+# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
 
-use warnings;
 use strict;
+use Maasha::Biopieces;
+
+
+# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+
+my ( $run_time_beg, $run_time_end, $options, $in, $out, $record, @join, $i );
+
+$options = Maasha::Biopieces::parse_options(
+    [
+        { long => 'keys',    short => 'k', type => 'list',   mandatory => 'yes', default => undef, allowed => undef, disallowed => undef },
+        { long => 'delimit', short => 'd', type => 'string', mandatory => 'no',  default => '_',   allowed => undef, disallowed => undef },
+    ]   
+);
+
+$in  = Maasha::Biopieces::read_stream( $options->{ "stream_in" } );
+$out = Maasha::Biopieces::write_stream( $options->{ "stream_out" } );
+
+while ( $record = Maasha::Biopieces::get_record( $in ) ) 
+{
+    if ( exists $record->{ $options->{ "keys" }->[ 0 ] } )
+    {
+        @join = $record->{ $options->{ "keys" }->[ 0 ] };
+        
+        for ( $i = 1; $i < @{ $options->{ "keys" } }; $i++ ) {
+            push @join, $record->{ $options->{ "keys" }->[ $i ] } if exists $record->{ $options->{ "keys" }->[ $i ] };
+        }
+
+        $record->{ $options->{ "keys" }->[ 0 ] } = join $options->{ "delimit" }, @join;
+    }
+
+    Maasha::Biopieces::put_record( $record, $out );
+}
+
+
+# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+
+BEGIN
+{
+    $run_time_beg = Maasha::Biopieces::run_time();
+
+    Maasha::Biopieces::log_biopiece();
+}
+
+
+END
+{
+    Maasha::Biopieces::close_stream( $in );
+    Maasha::Biopieces::close_stream( $out );
+
+    $run_time_end = Maasha::Biopieces::run_time();
+
+    Maasha::Biopieces::run_time_print( $run_time_beg, $run_time_end, $options );
+}
+
+
+# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+
+__END__
 
-use Maasha::BioRun;
index fdf5bd287f78613d2aea83bb9b15f855cad57e77..445d5457ed893aaf83063b54df064389e29c561b 100755 (executable)
@@ -1,6 +1,99 @@
-#!/usr/bin/env perl
+#!/usr/bin/env perl -w
+
+# Copyright (C) 2007-2009 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
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# http://www.gnu.org/copyleft/gpl.html
+
+
+# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> DESCRIPTION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+# Translate peptide sequences in the stream.
+
+# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
 
-use warnings;
 use strict;
+use Maasha::Biopieces;
+use Maasha::Seq;
+
+
+# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+
+my ( $run_time_beg, $run_time_end, $options, $in, $out, $record, $frame, %new_record );
+
+$options = Maasha::Biopieces::parse_options(
+    [
+        { long => 'frames', short => 'f', type => 'list', mandatory => 'no', default => '1,2,3,-1,-2,-3', allowed => '1,2,3,-1,-2,-3', disallowed => undef },
+    ]   
+);
+
+$in  = Maasha::Biopieces::read_stream( $options->{ "stream_in" } );
+$out = Maasha::Biopieces::write_stream( $options->{ "stream_out" } );
+
+while ( $record = Maasha::Biopieces::get_record( $in ) ) 
+{
+    if ( $record->{ "SEQ" } )
+    {
+        if ( Maasha::Seq::seq_guess_type( $record->{ "SEQ" } ) eq "dna" )
+        {
+            foreach $frame ( @{ $options->{ "frames" } } )
+            {
+                %new_record = %{ $record };
+
+                $new_record{ "SEQ" }     = Maasha::Seq::translate( $record->{ "SEQ" }, $frame );
+                $new_record{ "SEQ_LEN" } = length $new_record{ "SEQ" };
+                $new_record{ "FRAME" }   = $frame;
+
+                Maasha::Biopieces::put_record( \%new_record, $out );
+            }
+        }
+    }
+    else
+    {
+        Maasha::Biopieces::put_record( $record, $out );
+    }
+}
+
+
+# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+
+BEGIN
+{
+    $run_time_beg = Maasha::Biopieces::run_time();
+
+    Maasha::Biopieces::log_biopiece();
+}
+
+
+END
+{
+    Maasha::Biopieces::close_stream( $in );
+    Maasha::Biopieces::close_stream( $out );
+
+    $run_time_end = Maasha::Biopieces::run_time();
+
+    Maasha::Biopieces::run_time_print( $run_time_beg, $run_time_end, $options );
+}
+
+
+# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+
+__END__
 
-use Maasha::BioRun;
index fdf5bd287f78613d2aea83bb9b15f855cad57e77..9e10b65cd783bd5e7d7349915a1631fbd8dfb690 100755 (executable)
@@ -1,6 +1,94 @@
-#!/usr/bin/env perl
+#!/usr/bin/env perl -w
+
+# Copyright (C) 2007-2009 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
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# http://www.gnu.org/copyleft/gpl.html
+
+
+# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> DESCRIPTION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+# Transliterate chars from sequences in stream.
+
+# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
 
-use warnings;
 use strict;
+use Maasha::Biopieces;
+
+
+# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+
+my ( $run_time_beg, $run_time_end, $options, $in, $out, $record, $search, $replace, $delete );
+
+$options = Maasha::Biopieces::parse_options(
+    [
+        { long => 'search',  short => 's', type => 'string', mandatory => 'no', default => undef, allowed => undef, disallowed => undef },
+        { long => 'replace', short => 'r', type => 'string', mandatory => 'no', default => undef, allowed => undef, disallowed => undef },
+        { long => 'delete',  short => 'd', type => 'string', mandatory => 'no', default => undef, allowed => undef, disallowed => undef },
+    ]   
+);
+
+$in  = Maasha::Biopieces::read_stream( $options->{ "stream_in" } );
+$out = Maasha::Biopieces::write_stream( $options->{ "stream_out" } );
+
+$search  = $options->{ "search" }  || "";
+$replace = $options->{ "replace" } || "";
+$delete  = $options->{ "delete" }  || "";
+
+while ( $record = Maasha::Biopieces::get_record( $in ) ) 
+{
+    if ( $record->{ "SEQ" } )
+    {
+        if ( $search and $replace ) {
+            eval "\$record->{ 'SEQ' } =~ tr/$search/$replace/";
+        } elsif ( $delete ) {
+            eval "\$record->{ 'SEQ' } =~ tr/$delete//d";
+        }
+    }
+
+    Maasha::Biopieces::put_record( $record, $out );
+}
+
+
+# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+
+BEGIN
+{
+    $run_time_beg = Maasha::Biopieces::run_time();
+
+    Maasha::Biopieces::log_biopiece();
+}
+
+
+END
+{
+    Maasha::Biopieces::close_stream( $in );
+    Maasha::Biopieces::close_stream( $out );
+
+    $run_time_end = Maasha::Biopieces::run_time();
+
+    Maasha::Biopieces::run_time_print( $run_time_beg, $run_time_end, $options );
+}
+
+
+# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+
+__END__
 
-use Maasha::BioRun;
index fdf5bd287f78613d2aea83bb9b15f855cad57e77..94312394f3b4b1dee80a9f28b96b1006e694d95c 100755 (executable)
@@ -1,6 +1,98 @@
-#!/usr/bin/env perl
+#!/usr/bin/env perl -w
+
+# Copyright (C) 2007-2009 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
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# http://www.gnu.org/copyleft/gpl.html
+
+
+# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> DESCRIPTION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+# Transliterate chars from values in stream.
+
+# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
 
-use warnings;
 use strict;
+use Maasha::Biopieces;
+
+
+# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+
+my ( $run_time_beg, $run_time_end, $options, $in, $out, $record, $search, $replace, $delete, $key );
+
+$options = Maasha::Biopieces::parse_options(
+    [
+        { long => 'keys',    short => 'k', type => 'list',   mandatory => 'no', default => undef, allowed => undef, disallowed => undef },
+        { long => 'search',  short => 's', type => 'string', mandatory => 'no', default => undef, allowed => undef, disallowed => undef },
+        { long => 'replace', short => 'r', type => 'string', mandatory => 'no', default => undef, allowed => undef, disallowed => undef },
+        { long => 'delete',  short => 'd', type => 'string', mandatory => 'no', default => undef, allowed => undef, disallowed => undef },
+    ]   
+);
+
+$in  = Maasha::Biopieces::read_stream( $options->{ "stream_in" } );
+$out = Maasha::Biopieces::write_stream( $options->{ "stream_out" } );
+
+$search  = $options->{ "search" }  || "";
+$replace = $options->{ "replace" } || "";
+$delete  = $options->{ "delete" }  || "";
+
+while ( $record = Maasha::Biopieces::get_record( $in ) ) 
+{
+    foreach $key ( @{ $options->{ "keys" } } )
+    {
+        if ( exists $record->{ $key } )
+        {
+            if ( $search and $replace ) {
+                eval "\$record->{ $key } =~ tr/$search/$replace/";
+            } elsif ( $delete ) {
+                eval "\$record->{ $key } =~ tr/$delete//d";
+            }
+        }
+    }
+
+    Maasha::Biopieces::put_record( $record, $out );
+}
+
+
+# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+
+BEGIN
+{
+    $run_time_beg = Maasha::Biopieces::run_time();
+
+    Maasha::Biopieces::log_biopiece();
+}
+
+
+END
+{
+    Maasha::Biopieces::close_stream( $in );
+    Maasha::Biopieces::close_stream( $out );
+
+    $run_time_end = Maasha::Biopieces::run_time();
+
+    Maasha::Biopieces::run_time_print( $run_time_beg, $run_time_end, $options );
+}
+
+
+# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+
+__END__
 
-use Maasha::BioRun;
index 73c7aa699653418e3c48f1b514f7439d74baccc7..2c26f6390fe37d29d769bfdcad871b55f3ac2212 100644 (file)
@@ -134,9 +134,6 @@ sub run_script
     elsif ( $script eq "complexity_seq" )           { script_complexity_seq(            $in, $out, $options ) }
     elsif ( $script eq "oligo_freq" )               { script_oligo_freq(                $in, $out, $options ) }
     elsif ( $script eq "remove_indels" )            { script_remove_indels(             $in, $out, $options ) }
-    elsif ( $script eq "transliterate_seq" )        { script_transliterate_seq(         $in, $out, $options ) }
-    elsif ( $script eq "transliterate_vals" )       { script_transliterate_vals(        $in, $out, $options ) }
-    elsif ( $script eq "translate_seq" )            { script_translate_seq(             $in, $out, $options ) }
     elsif ( $script eq "get_genome_align" )         { script_get_genome_align(          $in, $out, $options ) }
     elsif ( $script eq "get_genome_phastcons" )     { script_get_genome_phastcons(      $in, $out, $options ) }
     elsif ( $script eq "tile_seq" )                 { script_tile_seq(                  $in, $out, $options ) }
@@ -154,7 +151,6 @@ sub run_script
     elsif ( $script eq "remove_ucsc_tracks" )       { script_remove_ucsc_tracks(        $in, $out, $options ) }
     elsif ( $script eq "rename_keys" )              { script_rename_keys(               $in, $out, $options ) }
     elsif ( $script eq "uniq_vals" )                { script_uniq_vals(                 $in, $out, $options ) }
-    elsif ( $script eq "merge_vals" )               { script_merge_vals(                $in, $out, $options ) }
     elsif ( $script eq "sort_records" )             { script_sort_records(              $in, $out, $options ) }
     elsif ( $script eq "plot_histogram" )           { script_plot_histogram(            $in, $out, $options ) }
     elsif ( $script eq "plot_lendist" )             { script_plot_lendist(              $in, $out, $options ) }
@@ -315,29 +311,6 @@ sub get_options
             all|a
         );
     }
-    elsif ( $script eq "transliterate_seq" )
-    {
-        @options = qw(
-            search|s=s
-            replace|r=s
-            delete|d=s
-        );
-    }
-    elsif ( $script eq "transliterate_vals" )
-    {
-        @options = qw(
-            keys|k=s
-            search|s=s
-            replace|r=s
-            delete|d=s
-        );
-    }
-    elsif ( $script eq "translate_seq" )
-    {
-        @options = qw(
-            frames|f=s
-        );
-    }
     elsif ( $script eq "get_genome_align" )
     {
         @options = qw(
@@ -513,13 +486,6 @@ sub get_options
             invert|i
         );
     }
-    elsif ( $script eq "merge_vals" )
-    {
-        @options = qw(
-            keys|k=s
-            delimit|d=s
-        );
-    }
     elsif ( $script eq "sort_records" )
     {
         @options = qw(
@@ -1638,122 +1604,6 @@ sub script_remove_indels
 }
 
 
-sub script_transliterate_seq
-{
-    # Martin A. Hansen, August 2007.
-
-    # Transliterate chars from sequence in record.
-
-    my ( $in,        # handle to in stream
-         $out,       # handle to out stream
-         $options,   # options hash
-       ) = @_;
-
-    # Returns nothing.
-
-    my ( $record, $search, $replace, $delete );
-
-    $search  = $options->{ "search" }  || "";
-    $replace = $options->{ "replace" } || "";
-    $delete  = $options->{ "delete" }  || "";
-
-    while ( $record = Maasha::Biopieces::get_record( $in ) ) 
-    {
-        if ( $record->{ "SEQ" } )
-        {
-            if ( $search and $replace ) {
-                eval "\$record->{ 'SEQ' } =~ tr/$search/$replace/";
-            } elsif ( $delete ) {
-                eval "\$record->{ 'SEQ' } =~ tr/$delete//d";
-            }
-        }
-
-        Maasha::Biopieces::put_record( $record, $out );
-    }
-}
-
-
-sub script_transliterate_vals
-{
-    # Martin A. Hansen, April 2008.
-
-    # Transliterate chars from values in record.
-
-    my ( $in,        # handle to in stream
-         $out,       # handle to out stream
-         $options,   # options hash
-       ) = @_;
-
-    # Returns nothing.
-
-    my ( $record, $search, $replace, $delete, $key );
-
-    $search  = $options->{ "search" }  || "";
-    $replace = $options->{ "replace" } || "";
-    $delete  = $options->{ "delete" }  || "";
-
-    while ( $record = Maasha::Biopieces::get_record( $in ) ) 
-    {
-        foreach $key ( @{ $options->{ "keys" } } )
-        {
-            if ( exists $record->{ $key } )
-            {
-                if ( $search and $replace ) {
-                    eval "\$record->{ $key } =~ tr/$search/$replace/";
-                } elsif ( $delete ) {
-                    eval "\$record->{ $key } =~ tr/$delete//d";
-                }
-            }
-        }
-
-        Maasha::Biopieces::put_record( $record, $out );
-    }
-}
-
-
-sub script_translate_seq
-{
-    # Martin A. Hansen, February 2008.
-
-    # Translate DNA sequence into protein sequence.
-
-    my ( $in,        # handle to in stream
-         $out,       # handle to out stream
-         $options,   # options hash
-       ) = @_;
-
-    # Returns nothing.
-
-    my ( $record, $frame, %new_record );
-
-    $options->{ "frames" } ||= [ 1, 2, 3, -1, -2, -3 ];
-
-    while ( $record = Maasha::Biopieces::get_record( $in ) ) 
-    {
-        if ( $record->{ "SEQ" } )
-        {
-            if ( Maasha::Seq::seq_guess_type( $record->{ "SEQ" } ) eq "dna" )
-            {
-                foreach $frame ( @{ $options->{ "frames" } } )
-                {
-                    %new_record = %{ $record };
-
-                    $new_record{ "SEQ" }     = Maasha::Seq::translate( $record->{ "SEQ" }, $frame );
-                    $new_record{ "SEQ_LEN" } = length $new_record{ "SEQ" };
-                    $new_record{ "FRAME" }   = $frame;
-
-                    Maasha::Biopieces::put_record( \%new_record, $out );
-                }
-            }
-        }
-        else
-        {
-            Maasha::Biopieces::put_record( $record, $out );
-        }
-    }
-}
-
-
 sub script_get_genome_align
 {
     # Martin A. Hansen, April 2008.
@@ -2731,41 +2581,6 @@ sub script_uniq_vals
 }
 
 
-sub script_merge_vals
-{
-    # Martin A. Hansen, August 2007.
-
-    # Rename keys in stream.
-
-    my ( $in,        # handle to in stream
-         $out,       # handle to out stream
-         $options,   # options hash
-       ) = @_;
-
-    # Returns nothing.
-
-    my ( $record, @join, $i );
-
-    $options->{ "delimit" } ||= '_';
-
-    while ( $record = Maasha::Biopieces::get_record( $in ) ) 
-    {
-        if ( exists $record->{ $options->{ "keys" }->[ 0 ] } )
-        {
-            @join = $record->{ $options->{ "keys" }->[ 0 ] };
-            
-            for ( $i = 1; $i < @{ $options->{ "keys" } }; $i++ ) {
-                push @join, $record->{ $options->{ "keys" }->[ $i ] } if exists $record->{ $options->{ "keys" }->[ $i ] };
-            }
-
-            $record->{ $options->{ "keys" }->[ 0 ] } = join $options->{ "delimit" }, @join;
-        }
-
-        Maasha::Biopieces::put_record( $record, $out );
-    }
-}
-
-
 sub script_sort_records
 {
     # Martin A. Hansen, August 2007.