Permalink
Browse files

Merge branch 'master' of github.com:Tmana/OrangeWidgets

  • Loading branch information...
2 parents 95cd6a2 + 8586c28 commit 80b38d69a79b439847aa3ba8dc4eab99a73e7da9 @Tmana committed May 9, 2012
Showing with 2 additions and 47 deletions.
  1. +1 −46 BioinformaticFileWidget/BF.py
  2. +1 −1 README
@@ -148,49 +148,4 @@ def makeCSVDataFile(newFileName,dataDict,label):
fh.close
-
-
-
-def concat(flist, column_overlap=0, transpose=False):
- """
- A concatonate function that returns a large data table of
- the files in flist.
-
- Assumes that all files are properly aligned. Will terminate
- in error if file lengths do not line up appropriately.
-
- column_overlap specifies the number of repeat columns
- in the files. Ignores these columns from concatonation.
-
- Transpose calls the transpose function before returning the
- data file matrix.
-
- returns a numpy array of all file constituents.
- """
-
- data = [] #Container for all file data desired
-
- for num, fil in enumerate(flist):
- f = open(fil, 'r')
- reader = csv.reader(f, delimiter='\t') #init csv reader on each file in list
-
- line_i = reader.next()
- i = 0 #counter to make sure which line we are on.
- if num < 1: #if it is the first file, add straight to data
- while line_i:
- data.append(line_i) #add to data as new list
- try:
- line_i = reader.next()
- except:
- break #exit loop gracefully.
- else: # all other files after first...
- while line_i:
- data[i].extend(line_i[column_overlap:]) # .. extend the i-th list in data
- try:
- line_i = reader.next()
- i += 1 #update the counter
- except:
- break #end gracefully
-
- return data #may addd as numpy array later, if desired.
-
+
View
2 README
@@ -1,4 +1,4 @@
-Jack Rogers, Tanner Robart, Jonathan Niles
+Jack Rogers, Tanner Robart
April 2012
New College of Florida

0 comments on commit 80b38d6

Please sign in to comment.