]> git.donarmstrong.com Git - biopieces.git/commitdiff
added bed2fixedstep.c as backend to calc_fixedstep
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Fri, 5 Dec 2008 02:52:08 +0000 (02:52 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Fri, 5 Dec 2008 02:52:08 +0000 (02:52 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@330 74ccb610-7750-0410-82ae-013aeee3265d

code_perl/Maasha/Biopieces.pm

index 5f6dd076395ab401a85fb3e62ce8e206812162df..59b7df7015af6eba949292b748edb5dd3506a1ff 100644 (file)
@@ -457,13 +457,6 @@ sub get_options
             percent|p
         );
     }
             percent|p
         );
     }
-    elsif ( $script eq "calc_fixedstep" )
-    {
-        @options = qw(
-            score|S
-            log10|L
-        );
-    }
     elsif ( $script eq "transliterate_seq" )
     {
         @options = qw(
     elsif ( $script eq "transliterate_seq" )
     {
         @options = qw(
@@ -2680,7 +2673,10 @@ sub script_calc_fixedstep
 
     foreach $chr ( sort keys %{ $file_hash } )
     {
 
     foreach $chr ( sort keys %{ $file_hash } )
     {
-        $fixedstep_file = Maasha::UCSC::Wiggle::fixedstep_calc( $file_hash->{ $chr }, $chr, $options->{ 'score' }, $options->{ 'log10' } );
+        $bed_file       = $file_hash->{ $chr };
+        $fixedstep_file = "$bed_file.fixedstep";
+        
+        Maasha::Common::run( "bed2fixedstep", "< $bed_file > $fixedstep_file" );
 
         $fh_in = Maasha::Filesys::file_read_open( $fixedstep_file );
 
 
         $fh_in = Maasha::Filesys::file_read_open( $fixedstep_file );
 
@@ -2693,8 +2689,8 @@ sub script_calc_fixedstep
 
         close $fh_in;
 
 
         close $fh_in;
 
-        unlink $file_hash->{ $chr };
         unlink $bed_file;
         unlink $bed_file;
+        unlink $fixedstep_file;
     }
 }
 
     }
 }