Hello!

To see the file structure, click on "tree".

Note that updates take place every 10 minutes, commits may not be seen immediately.
pair/singleton script update
authorathreyab <athreyab@localhost>
Tue, 1 May 2012 02:36:13 +0000 (02:36 +0000)
committerathreyab <athreyab@localhost>
Tue, 1 May 2012 02:36:13 +0000 (02:36 +0000)
svn path=/; revision=327

Personnel/athreyab/illumina_parse/create_pairs

index 8626f035aa52045304e5d033ec87aa508500ab3a..e2fa2b40884ef0514d5e2829d3d6e161074d6b5b 100755 (executable)
@@ -1,10 +1,17 @@
 #!/bin/bash
 
-function process_file{
-       array=("$@")
-       for i in "${array[@]}"
+function process_file(){
+       file_name="$1"
+       index=0
+       i=0
+        while read line ; do
+                array[$index]="$line"
+                index=$(($index+1))
+       done < "$file_name"
+       
+       while [ $i -lt $index ]
        do      
-               echo "processing file ${array[i]}"
+               echo "processing file ${array[$i]}"
                while read line ; do
                        if [ $line_index == 0 ]
                        then
@@ -42,7 +49,7 @@ function process_file{
                        then            
                                line_index=0
                        fi
-               done < "${array[i]}"
+               done < "${array[$i]}"
        done
 }
 
@@ -101,17 +108,18 @@ else
 
        # delete temp files as we dont' need them anymore. We already
        # have that information in array1 and array2
-       rm -f array1.txt
-       rm -f array2.txt
-
        i=0
        line_index=0
        out=""
        remove_entry=0
        
        # loop through each files in array1, filter them and put in a file
-       process_file "${array1[@]}"
-       process_file "${array2[@]}"
+       process_file "array1.txt"
+       process_file "array2.txt"
+       rm -f array1.txt
+       rm -f array2.txt
+
+
 fi