From b9062acce5ccd2ca2ebb89bec03615748c1cf20a Mon Sep 17 00:00:00 2001 From: martinahansen Date: Sun, 24 Jan 2010 16:54:44 +0000 Subject: [PATCH] cleanup BGB stuff git-svn-id: http://biopieces.googlecode.com/svn/trunk@845 74ccb610-7750-0410-82ae-013aeee3265d --- bp_bin/BGB_intersect | 2 +- bp_bin/BGB_upload | 2 +- bp_bin/assemble_contigs | 4 ++-- bp_bin/create_blast_index | 2 +- code_perl/Maasha/KISS.pm | 7 +++++++ 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/bp_bin/BGB_intersect b/bp_bin/BGB_intersect index 7561872..b6a5bfe 100755 --- a/bp_bin/BGB_intersect +++ b/bp_bin/BGB_intersect @@ -21,7 +21,7 @@ # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> DESCRIPTION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -# List all tracks availible in a local installation of the Biopieces Genome Browser. +# Intersects two tracks in the Biopieces Genome Browser. # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< diff --git a/bp_bin/BGB_upload b/bp_bin/BGB_upload index 611f604..a88576c 100755 --- a/bp_bin/BGB_upload +++ b/bp_bin/BGB_upload @@ -21,7 +21,7 @@ # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> DESCRIPTION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -# Write Biopiece records to the KISS Genome browser. +# Write Biopiece records to the Biopieces Genome browser. # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< diff --git a/bp_bin/assemble_contigs b/bp_bin/assemble_contigs index 3e73a76..8976cc8 100755 --- a/bp_bin/assemble_contigs +++ b/bp_bin/assemble_contigs @@ -106,9 +106,9 @@ foreach $s_id ( keys %{ $contig_hash } ) $new_record->{ 'S_ID' } = $s_id; $new_record->{ 'STRAND' } = $strand; + $new_record->{ 'S_BEG' } = $beg; + $new_record->{ 'S_END' } = $end; $new_record->{ 'CONTIG_ID' } = $contig; - $new_record->{ 'CONTIG_BEG' } = $beg; - $new_record->{ 'CONTIG_END' } = $end; $new_record->{ 'CONTIG_LEN' } = $end - $beg + 1; $new_record->{ 'CONTIG_MIN' } = $min; $new_record->{ 'CONTIG_MAX' } = $max; diff --git a/bp_bin/create_blast_index b/bp_bin/create_blast_index index 6cbd2bf..9c04c04 100755 --- a/bp_bin/create_blast_index +++ b/bp_bin/create_blast_index @@ -88,7 +88,7 @@ else Maasha::Common::run( "formatdb", "$arg -l /dev/null" ); } -Maasha::Filesys::dir_create( $options->{ 'directory' } ); +Maasha::Filesys::dir_create_if_not_exists( $options->{ 'directory' } ); unlink $file_tmp; diff --git a/code_perl/Maasha/KISS.pm b/code_perl/Maasha/KISS.pm index 85a8105..539e501 100644 --- a/code_perl/Maasha/KISS.pm +++ b/code_perl/Maasha/KISS.pm @@ -592,6 +592,13 @@ sub biopiece2kiss # Returns a hashref + if ( not defined $record->{ 'S_ID' } and + not defined $record->{ 'S_BEG' } and + not defined $record->{ 'S_END' } ) + { + return undef; + } + $record->{ 'SCORE' } ||= $record->{ 'E_VAL' } || "."; $record->{ 'HITS' } ||= "."; $record->{ 'BLOCK_COUNT' } ||= "."; -- 2.39.5