]> git.donarmstrong.com Git - biopieces.git/commitdiff
changed wib dir from BP_DATA to ~/ucsc
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Mon, 21 Jul 2008 03:50:48 +0000 (03:50 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Mon, 21 Jul 2008 03:50:48 +0000 (03:50 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@178 74ccb610-7750-0410-82ae-013aeee3265d

code_c/Maasha/src/gmon.out
code_c/Maasha/src/repeat-O-matic.c
code_c/Maasha/src/test.c
code_c/Maasha/src/test_fasta.c
code_perl/Maasha/Biopieces.pm

index efb143af24b4df9b23725fa8d184e6abb8d05381..0459c2d5876f181f6cec9a2ab4b5582f0afd1d15 100644 (file)
Binary files a/code_c/Maasha/src/gmon.out and b/code_c/Maasha/src/gmon.out differ
index 905d298138cca57a1e198c3c315131ce8e7b7d69..8ce9232011f8624bc1982d7c877160141d00c4ab 100644 (file)
     complete the human genome in roughly 30 minutes.
 */
 
-
-
-
-#include <stdio.h>
-#include <string.h>
 #include "common.h"
 #include "filesys.h"
 #include "fasta.h"
 
-#define OLIGO_SIZE 15
+// #define OLIGO_SIZE 15
+#define OLIGO_SIZE 5
 #define SIZE ( 1 << ( OLIGO_SIZE * 2 ) )
 
 #define UINT_BITS 32
 #define C    1                            /* 01 on the rightmost two bits of bin. */
 #define G    2                            /* 10 on the rightmost two bits of bin. */
 
-uint  mask_create( int oligo_size );
 uint *oligo_count( char *path );
+uint  mask_create( int oligo_size );
 void  oligo_count_output( char *path, uint *array );
 void  fixedstep_put_entry( char *chr, int beg, int step_size, uint *block_array, int block_size );
 
 int main( int argc, char *argv[] )
 {
-    char *path;
-    uint *array;
+    char *path  = NULL;
+    uint *array = NULL;
 
-    path = argv[ 1 ];
+    path  = argv[ 1 ];
 
     array = oligo_count( path );
 
@@ -48,46 +44,24 @@ int main( int argc, char *argv[] )
 }
 
 
-uint mask_create( int oligo_size )
-{
-    /* Martin A. Hansen, June 2008 */
-
-    /* Create a bit mask for binary encode oligos less than sizeof( uint ). */
-
-    uint i;
-    uint mask;
-
-    mask = 0;
-
-    for ( i = 0; i < oligo_size; i++ )
-    {
-        mask <<= 2;
-
-        mask |= 3;
-    }
-
-    return mask;
-}
-
-
 uint *oligo_count( char *path )
 {
     /* Martin A. Hansen, June 2008 */
 
     /* Count the occurence of all oligos of a fixed size in a FASTA file. */
 
-    uint             *array;
-    uint              i;
-    uint              mask;
-    uint              bin;
-    uint              bin_rc1;
-    uint              bin_rc2;
-    uint              j;
-    uint              A_rc = ( 3 << ( UINT_BITS - 2 ) );   /* 11 on the leftmost two bits an uint. */
-    uint              G_rc = ( 2 << ( UINT_BITS - 2 ) );   /* 10 on the leftmost two bits an uint. */
-    uint              C_rc = ( 1 << ( UINT_BITS - 2 ) );   /* 01 on the leftmost two bits an uint. */
-    struct seq_entry *entry;
-    FILE             *fp;
+    uint             *array   = NULL;
+    uint              i       = 0;
+    uint              mask    = 0;
+    uint              bin     = 0;
+    uint              bin_rc1 = 0;
+    uint              bin_rc2 = 0;
+    uint              j       = 0;
+    uint              A_rc    = ( 3 << ( UINT_BITS - 2 ) );   /* 11 on the leftmost two bits an uint. */
+    uint              G_rc    = ( 2 << ( UINT_BITS - 2 ) );   /* 10 on the leftmost two bits an uint. */
+    uint              C_rc    = ( 1 << ( UINT_BITS - 2 ) );   /* 01 on the leftmost two bits an uint. */
+    struct seq_entry *entry   = NULL;
+    FILE             *fp      = NULL;
 
     array = mem_get_zero( sizeof( uint ) * SIZE );
 
@@ -150,6 +124,28 @@ uint *oligo_count( char *path )
 }
 
 
+uint mask_create( int oligo_size )
+{
+    /* Martin A. Hansen, June 2008 */
+
+    /* Create a bit mask for binary encode oligos less than sizeof( uint ). */
+
+    uint i;
+    uint mask;
+
+    mask = 0;
+
+    for ( i = 0; i < oligo_size; i++ )
+    {
+        mask <<= 2;
+
+        mask |= 3;
+    }
+
+    return mask;
+}
+
+
 void oligo_count_output( char *path, uint *array )
 {
     /* Martin A. Hansen, June 2008 */
index f7ed89e9be078b0704bdd7c0c52e1d0866bdd1d8..6a89d408781eecc889d741eae794a34ac9debdce 100644 (file)
@@ -16,7 +16,7 @@ int main( int argc, char *argv[] )
 
     fscanf( "%s\t%d\t%d", fp, chr, chr_beg, chr_end );
 
-    print ( "CHR: %s  CHR_BEG: %d   CHR_END: %d\n", chr, chr_beg, chr_end );
+    printf( "CHR: %s  CHR_BEG: %d   CHR_END: %d\n", chr, chr_beg, chr_end );
 
     close_stream( fp );
 
index 86a469852ca71c70cef4c25446378110f9d3e386..f9667645dce8d8a25b16de7daddf1c3657cff882 100644 (file)
@@ -3,6 +3,28 @@
 #include "list.h"
 #include "fasta.h"
 
+int main()
+{
+    char *file              = NULL;
+    FILE *fp                = NULL;
+    struct seq_entry *entry = NULL;
+
+    file = "/Users/m.hansen/test.fna";
+
+    fp = read_open( file );
+
+    while ( ( fasta_get_entry( fp, entry ) != NULL ) )
+    {
+        printf( "seq_name: %s   seq: %s   seq_len: %i\n", entry->seq_name, entry->seq, entry->seq_len );
+    }
+
+    close_stream( fp );
+
+    return 0;
+}
+
+/*
+
 int main()
 {
     char *file = "/Users/m.hansen/test.fna";
@@ -20,3 +42,4 @@ int main()
     return 0;
 }
 
+*/
index 06d4b3d8a02e9db84e287b9a92dcf71ecb23830e..e883884605ffa8ac53c0dff60dbe9f9425d6734d 100644 (file)
@@ -5609,7 +5609,7 @@ sub script_upload_to_ucsc
         $wig_file = "$options->{ 'table' }.wig";
         $wib_file = "$options->{ 'table' }.wib";
 
-        $wib_dir  = "$ENV{ 'BP_DATA' }/genomes/$options->{ 'database' }/wib";
+        $wib_dir  = "$ENV{ 'HOME' }/ucsc/wib";
 
         Maasha::Common::dir_create_if_not_exists( $wib_dir );