]> git.donarmstrong.com Git - biopieces.git/blobdiff - code_perl/Maasha/BioRun.pm
bleh blah
[biopieces.git] / code_perl / Maasha / BioRun.pm
index 3f4fb1c6fe86823eea734d79b7798bca51227e08..16b6df9caa2b5db685215f59505f837d0f0ae92c 100644 (file)
@@ -112,8 +112,6 @@ sub run_script
 
     if    ( $script eq "print_usage" )              { script_print_usage(               $in, $out, $options ) }
     elsif ( $script eq "read_stockholm" )           { script_read_stockholm(            $in, $out, $options ) }
-    elsif ( $script eq "read_phastcons" )           { script_read_phastcons(            $in, $out, $options ) }
-    elsif ( $script eq "read_mysql" )               { script_read_mysql(                $in, $out, $options ) }
     elsif ( $script eq "uppercase_seq" )            { script_uppercase_seq(             $in, $out, $options ) }
     elsif ( $script eq "complexity_seq" )           { script_complexity_seq(            $in, $out, $options ) }
     elsif ( $script eq "get_genome_align" )         { script_get_genome_align(          $in, $out, $options ) }
@@ -158,26 +156,6 @@ sub get_options
             num|n=s
         );
     }
-    elsif ( $script eq "read_phastcons" )
-    {
-        @options = qw(
-            data_in|i=s
-            num|n=s
-            min|m=s
-            dist|d=s
-            threshold|t=f
-            gap|g=s
-        );
-    }
-    elsif ( $script eq "read_mysql" )
-    {
-        @options = qw(
-            database|d=s
-            query|q=s
-            user|u=s
-            password|p=s
-        );
-    }
     elsif ( $script eq "get_genome_align" )
     {
         @options = qw(
@@ -467,94 +445,6 @@ sub script_read_stockholm
 }
 
 
-sub script_read_phastcons
-{
-    # Martin A. Hansen, December 2007.
-
-    # Read PhastCons format.
-
-    my ( $in,        # handle to in stream
-         $out,       # handle to out stream
-         $options,   # options hash
-       ) = @_;
-
-    # Returns nothing.
-
-    my ( $data_in, $file, $num, $entry, @records, $record );
-
-    $options->{ "min" }       ||= 10;
-    $options->{ "dist" }      ||= 25;
-    $options->{ "threshold" } ||= 0.8;
-    $options->{ "gap" }       ||= 5;
-
-    while ( $record = Maasha::Biopieces::get_record( $in ) ) {
-        Maasha::Biopieces::put_record( $record, $out );
-    }
-
-    $num = 1;
-
-    foreach $file ( @{ $options->{ "files" } } )
-    {
-        $data_in = Maasha::Common::read_open( $file );
-
-        while ( $entry = Maasha::UCSC::fixedstep_get_entry( $data_in ) ) 
-        {
-            @records = Maasha::UCSC::phastcons_parse_entry( $entry, $options );
-
-            foreach $record ( @records )
-            {
-                $record->{ "REC_TYPE" } = "BED";
-                $record->{ "BED_LEN" }  = $record->{ "CHR_END" } - $record->{ "CHR_BEG" } + 1;
-
-                Maasha::Biopieces::put_record( $record, $out );
-
-                goto NUM if $options->{ "num" } and $num == $options->{ "num" };
-
-                $num++;
-            }
-        }
-
-        close $data_in;
-    }
-
-    NUM:
-
-    close $data_in if $data_in;
-}
-
-
-sub script_read_mysql
-{
-    # Martin A. Hansen, May 2008.
-
-    # Read a MySQL query into stream.
-
-    my ( $in,        # handle to in stream
-         $out,       # handle to out stream
-         $options,   # options hash
-       ) = @_;
-
-    # Returns nothing.
-
-    my ( $record, $dbh, $results );
-
-    $options->{ "user" }     ||= Maasha::UCSC::ucsc_get_user();
-    $options->{ "password" } ||= Maasha::UCSC::ucsc_get_password();
-
-    while ( $record = Maasha::Biopieces::get_record( $in ) ) {
-        Maasha::Biopieces::put_record( $record, $out );
-    }
-
-    $dbh = Maasha::SQL::connect( $options->{ "database" }, $options->{ "user" }, $options->{ "password" } );
-
-    $results = Maasha::SQL::query_hashref_list( $dbh, $options->{ "query" } );
-
-    Maasha::SQL::disconnect( $dbh );
-
-    map { Maasha::Biopieces::put_record( $_ ) } @{ $results };
-}
-
-
 sub script_complexity_seq
 {
     # Martin A. Hansen, May 2008.