From bafaec7841da0e6fafbde45af04bda165beaf318 Mon Sep 17 00:00:00 2001 From: martinahansen Date: Mon, 14 Jul 2008 06:48:15 +0000 Subject: [PATCH] removed create_fixedstep_index git-svn-id: http://biopieces.googlecode.com/svn/trunk@148 74ccb610-7750-0410-82ae-013aeee3265d --- bp_bin/create_fixedstep_index | 6 ---- code_perl/Maasha/Biopieces.pm | 53 +---------------------------------- 2 files changed, 1 insertion(+), 58 deletions(-) delete mode 100755 bp_bin/create_fixedstep_index diff --git a/bp_bin/create_fixedstep_index b/bp_bin/create_fixedstep_index deleted file mode 100755 index 4cd1d44..0000000 --- a/bp_bin/create_fixedstep_index +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env perl - -use warnings; -use strict; - -use Maasha::Biopieces; diff --git a/code_perl/Maasha/Biopieces.pm b/code_perl/Maasha/Biopieces.pm index 8a5737a..d4ccc17 100644 --- a/code_perl/Maasha/Biopieces.pm +++ b/code_perl/Maasha/Biopieces.pm @@ -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. -- 2.39.5