From d2e57ddd065f9e303c0c9a333c8c21e646c9e50d Mon Sep 17 00:00:00 2001 From: martinahansen Date: Fri, 5 Dec 2008 01:14:50 +0000 Subject: [PATCH] fixed bed2fixedstep.c git-svn-id: http://biopieces.googlecode.com/svn/trunk@329 74ccb610-7750-0410-82ae-013aeee3265d --- bp_doc/dotplot.svg | 1359 +++++++++++++++++++++++++++++ code_c/Maasha/src/bed2fixedstep.c | 16 +- 2 files changed, 1368 insertions(+), 7 deletions(-) create mode 100644 bp_doc/dotplot.svg diff --git a/bp_doc/dotplot.svg b/bp_doc/dotplot.svg new file mode 100644 index 0000000..682a4fe --- /dev/null +++ b/bp_doc/dotplot.svg @@ -0,0 +1,1359 @@ + + + +Produced by GNUPLOT 4.2 patchlevel 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + 200000 + + + + + + + + + 400000 + + + + + + + + + 600000 + + + + + + + + + 800000 + + + + + + + + + 1e+06 + + + + + + + + + 1.2e+06 + + + + + + + + + 1.4e+06 + + + + + + + + + 1.6e+06 + + + + + + + + + 0 + + + + + + + + + 200000 + + + + + + + + + 400000 + + + + + + + + + 600000 + + + + + + + + + 800000 + + + + + + + + + 1e+06 + + + + + + + + + 1.2e+06 + + + + + + + + + 1.4e+06 + + + + + + + + + 1.6e+06 + + + + Helicobacter_pylori_26695 + + + Helicobacter_pylori_J99 + + + plot_matches + + + + + + + + + + + + + + + diff --git a/code_c/Maasha/src/bed2fixedstep.c b/code_c/Maasha/src/bed2fixedstep.c index 0463641..3b797ea 100644 --- a/code_c/Maasha/src/bed2fixedstep.c +++ b/code_c/Maasha/src/bed2fixedstep.c @@ -9,20 +9,22 @@ #define HASH_SIZE 8 #define BARRAY_SIZE ( 1 << 16 ) + static void usage() { fprintf( stderr, - "\n" - "bed2fixedstep - collapse overlapping BED entries using a score\n" - "based on the last number following a _ in the 'name' column.\n" - "if no such number is found 1 is used.\n" - "\n" - "Usage: bed2fixedstep < > \n\n" + "\n" + "bed2fixedstep - collapse overlapping BED entries using a score\n" + "based on the last number following a _ in the 'name' column.\n" + "if no such number is found 1 is used.\n" + "\n" + "Usage: bed2fixedstep < > \n\n" ); exit( EXIT_FAILURE ); } + long get_score( char *str ) { /* Martin A. Hansen, December 2008. */ @@ -59,7 +61,7 @@ int main( int argc, char *argv[] ) entry = bed_entry_new( BED_COLS ); chr_hash = hash_new( HASH_SIZE ); - if ( ! stdin ) { + if ( isatty( fileno( stdin ) ) ) { usage(); } -- 2.39.5