Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions bin/createModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
volumes = []

# Create/write compartments
compartment_sheet = np.array([np.array(line.strip().split("\t")) for line in open('Compartments.txt')])
compartment_sheet = np.array([np.array(line.strip().split("\t")) for line in open('Compartments.txt')], dtype=object)

#read in each line minus the header row
for row in compartment_sheet[1:]:
Expand All @@ -65,7 +65,7 @@
fileModel.write("\n")

# Write species and assign compartments
species_sheet = np.array([np.array(line.strip().split("\t")) for line in open('Species.txt', encoding='latin-1')])
species_sheet = np.array([np.array(line.strip().split("\t")) for line in open('Species.txt', encoding='latin-1')], dtype=object)

species_compartments = []
for row in species_sheet[1:]:
Expand All @@ -84,16 +84,16 @@
fileModel.write("\n\n # Reactions:\n")

#reads in file from excel and gets rid of first row and column (they're data labels)
stoic_sheet = np.array([np.array(line.strip().split("\t")) for line in open('StoicMat.txt')])
stoic_sheet = np.array([np.array(line.strip().split("\t")) for line in open('StoicMat.txt')], dtype=object)

#gets first column minus blank space at the beginning
stoic_columnnames = stoic_sheet[0]
stoic_rownames = [line[0] for line in stoic_sheet[1:]]
stoic_data = np.array([line[1:] for line in stoic_sheet[1:]])


ratelaw_sheet = np.array([np.array(line.strip().split("\t")) for line in open('Ratelaws.txt')])
ratelaw_data = np.array([line[1:] for line in ratelaw_sheet[1:]])
ratelaw_sheet = np.array([np.array(line.strip().split("\t")) for line in open('Ratelaws.txt')], dtype=object)
ratelaw_data = np.array([line[1:] for line in ratelaw_sheet[1:]], dtype=object)

paramnames = []
paramvals = []
Expand Down
2 changes: 1 addition & 1 deletion bin/modules/RunSPARCED.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def RunSPARCED(flagD,th,spdata,genedata,sbml_file,model):
splist = list(model.getStateIds())
if len(spdata)==0: # if no initial condition values are supplied, use the input file information
spdata0 = pd.read_csv('Species.txt',header=0,index_col=0,sep="\t")
spdata = np.float(spdata0.values[:,1])
spdata = np.float64(spdata0.values[:,1])

# calculate
genedata, GenePositionMatrix, AllGenesVec, kTCmaxs, kTCleak, kGin_1, kGac_1, kTCd, TARs0, tcnas, tcnrs, tck50as, tck50rs, spIDs = RunPrep(flagD,Vn,model)
Expand Down