Beispiel #1
0
#!/usr/bin/python3
import argparse
import os
import re
import sys
import state
import timedStates
import score
import globalVariables
import pprint
import csv
import upper
import pickle

# Convert to UpperCase
upper.toUpper(globalVariables.inputcsv)
# Replace T with U
os.system('sed -i s/T/U/g '+globalVariables.inputcsv)

def main():
    count=1
    outputList=[]

    globalVariables.rawScoreMatrix = pickle.load(open(globalVariables.scoreMatrixFile,"rb"))
    globalVariables.states = pickle.load(open(globalVariables.statesFile,"rb"))
    globalVariables.timedStates = pickle.load(open(globalVariables.timedStatesFile,"rb"))
    # print(globalVariables.rawScoreMatrix)
    # print(globalVariables.states)
    # print(globalVariables.timedStates)
    with open(globalVariables.inputcsv, 'r') as csvfile:
        reader = csv.DictReader(csvfile)
Beispiel #2
0
#!/usr/bin/python3
import argparse
import os
import re
import sys
import state
import timedStates
import score
import globalVariables
import pprint
import csv
import upper
import pickle

# Convert to UpperCase
upper.toUpper(globalVariables.csvFile)
# Replace T with U
os.system('sed -i s/T/U/g ' + globalVariables.csvFile)


def main():
    # for later looping
    score.initRawScoreMatrix()
    with open(globalVariables.csvFile, 'r') as csvfile:
        reader = csv.DictReader(csvfile)
        names = reader.fieldnames
        for row in reader:
            # Assuming that the sequences will be in the first two rows
            # Compute probabilities with sequence 1 and reverse of sequence 2
            doStuff(row[names[0]], row[names[1]][::-1])
    globalVariables.timedStates = timedStates.initTimedStates(
Beispiel #3
0
#!/usr/bin/python3
import argparse
import os
import re
import sys
import state
import timedStates
import score
import globalVariables
import pprint
import csv
import upper
import pickle

# Convert to UpperCase
upper.toUpper(globalVariables.inputcsv)
# Replace T with U
os.system('sed -i s/T/U/g ' + globalVariables.inputcsv)


def main():
    count = 1
    outputList = []

    globalVariables.rawScoreMatrix = pickle.load(
        open(globalVariables.scoreMatrixFile, "rb"))
    globalVariables.states = pickle.load(open(globalVariables.statesFile,
                                              "rb"))
    globalVariables.timedStates = pickle.load(
        open(globalVariables.timedStatesFile, "rb"))
    # print(globalVariables.rawScoreMatrix)
Beispiel #4
0
#!/usr/bin/python3
import argparse
import os
import re
import sys
import state
import timedStates
import score
import globalVariables
import pprint
import csv
import upper
import pickle

# Convert to UpperCase
upper.toUpper(globalVariables.csvFile)
# Replace T with U
os.system('sed -i s/T/U/g '+globalVariables.csvFile)

def main():
    # for later looping
    score.initRawScoreMatrix()
    with open(globalVariables.csvFile, 'r') as csvfile:
        reader = csv.DictReader(csvfile)
        names=reader.fieldnames
        for row in reader:
            # Assuming that the sequences will be in the first two rows
            # Compute probabilities with sequence 1 and reverse of sequence 2
            doStuff(row[names[0]],row[names[1]][::-1])
    globalVariables.timedStates=timedStates.initTimedStates(globalVariables.states)
    pickle.dump(globalVariables.states,open(globalVariables.statesFile,"wb"))