]> git.donarmstrong.com Git - biopieces.git/commitdiff
removed create_fixedstep_index
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Mon, 14 Jul 2008 06:48:15 +0000 (06:48 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Mon, 14 Jul 2008 06:48:15 +0000 (06:48 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@148 74ccb610-7750-0410-82ae-013aeee3265d

bp_bin/create_fixedstep_index [deleted file]
code_perl/Maasha/Biopieces.pm

diff --git a/bp_bin/create_fixedstep_index b/bp_bin/create_fixedstep_index
deleted file mode 100755 (executable)
index 4cd1d44..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/env perl
-
-use warnings;
-use strict;
-
-use Maasha::Biopieces;
index 8a5737afb1ac989513dba76264897c5a84a7f2f1..d4ccc17fc2f098bd466ae86186f791e45d1794e1 100644 (file)
@@ -214,7 +214,6 @@ sub run_script
     elsif ( $script eq "blat_seq" )                 { script_blat_seq(                  $in, $out, $options ) }
     elsif ( $script eq "match_seq" )                { script_match_seq(                 $in, $out, $options ) }
     elsif ( $script eq "create_vmatch_index" )      { script_create_vmatch_index(       $in, $out, $options ) }
-    elsif ( $script eq "create_fixedstep_index" )   { script_create_fixedstep_index(    $in, $out, $options ) }
     elsif ( $script eq "vmatch_seq" )               { script_vmatch_seq(                $in, $out, $options ) }
     elsif ( $script eq "write_fasta" )              { script_write_fasta(               $in, $out, $options ) }
     elsif ( $script eq "write_align" )              { script_write_align(               $in, $out, $options ) }
@@ -581,13 +580,6 @@ sub get_options
             no_stream|x
         );
     }
-    elsif ( $script eq "create_fixedstep_index" )
-    {
-        @options = qw(
-            index_name|i=s
-            no_stream|x
-        );
-    }
     elsif ( $script eq "vmatch_seq" )
     {
         @options = qw(
@@ -1007,7 +999,7 @@ sub get_options
     }
 
     Maasha::Common::error( qq(no --database specified) )                if $script eq "create_blast_db"     and not $options{ "database" };
-    Maasha::Common::error( qq(no --index_name specified) )              if $script =~ /create_vmatch_index|create_fixedstep_index/ and not $options{ "index_name" };
+    Maasha::Common::error( qq(no --index_name specified) )              if $script =~ /create_vmatch_index/ and not $options{ "index_name" };
     Maasha::Common::error( qq(no --database or --genome specified) )    if $script eq "blast_seq" and not $options{ "genome" } and not $options{ "database" };
     Maasha::Common::error( qq(both --database and --genome specified) ) if $script eq "blast_seq" and $options{ "genome" } and $options{ "database" };
     Maasha::Common::error( qq(no --index_name or --genome specified) )  if $script eq "vmatch_seq" and not $options{ "genome" } and not $options{ "index_name" };
@@ -3635,49 +3627,6 @@ sub script_create_vmatch_index
 }
 
 
-sub script_create_fixedstep_index
-{
-    # Martin A. Hansen, January 2008.
-
-    # Create a fixedStep index from records in the stream.
-
-    my ( $in,        # handle to in stream
-         $out,       # handle to out stream
-         $options,   # options hash
-       ) = @_;
-
-    # Returns nothing.
-
-    my ( $record, $file_tmp, $fh_tmp, $vals, $index );
-
-    $file_tmp = "$BP_TMP/fixedstep.tmp";
-
-    $fh_tmp   = Maasha::Common::write_open( $file_tmp );
-
-    while ( $record = get_record( $in ) ) 
-    {
-        if ( $record->{ "CHR" } and $record->{ "CHR_BEG" } and $record->{ "STEP" } and $record->{ "VALS" } )
-        {
-            print $fh_tmp "fixedStep chrom=$record->{ 'CHR' } start=$record->{ 'CHR_BEG' } step=$record->{ 'STEP' }\n";
-
-            $vals = $record->{ 'VALS' };
-
-            $vals =~ tr/,/\n/;
-
-            print $fh_tmp "$vals\n";
-        }
-    }
-
-    close $fh_tmp;
-
-    $index = Maasha::UCSC::fixedstep_index_create( $file_tmp );
-
-    unlink $file_tmp;
-
-    Maasha::UCSC::fixedstep_index_store( $options->{ 'index_name' }, $index );
-}
-
-
 sub script_vmatch_seq
 {
     # Martin A. Hansen, August 2007.