Skip to content

Commit

Permalink
updated fasta dict on removal of y_cond. removed some extraneous prin…
Browse files Browse the repository at this point in the history
…t statements
  • Loading branch information
skinnersp committed Apr 5, 2018
1 parent 474b4d6 commit 01f8b3e
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 12 deletions.
4 changes: 2 additions & 2 deletions core/parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def parse_ccpn_peaklist(peaklist_file):
if v in row[5]:
a2 = row[5].strip().split(v)[-1]
atoms.append(a2)

peak = Peak(
peak_number=row[1],
positions=[row[2], row[3]],
Expand All @@ -391,7 +391,7 @@ def parse_ccpn_peaklist(peaklist_file):
details=row[11],
format='ccpn'
)

peakList.append(peak)

fin.close()
Expand Down
4 changes: 1 addition & 3 deletions core/setup_farseer_calculation.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,7 @@ def add_residue_information(peak_list, fasta_file, fasta_start):
fasta_dict = \
{ii + fasta_start: aal1tol3.get(residue)
for ii, residue in enumerate(fasta)}

import pprint


for peak in peak_list:
if all(ass is None for ass in peak.assignments) and \
not '' in peak.assignments:
Expand Down
6 changes: 5 additions & 1 deletion gui/components/PeakListArea.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ def update_tree(self):
num_y = len(y_conds)
num_z = len(z_conds)
total_x = num_x*num_y*num_z
keys_to_remove = [k for k in self.variables['fasta_files'].keys() if k not in y_conds]
for k in keys_to_remove:
del self.variables['fasta_files'][k]


if total_x > 10:
self.scrollContents.setSceneRect(0, 0, width, total_x * 22)
Expand Down Expand Up @@ -305,7 +309,7 @@ def update_tree(self):

for x_marker in y_markers:
self.add_connecting_line(zz, x_marker)

self.updateClicks += 1
self.variables["experimental_dataset"] = self.peak_list_dict

Expand Down
4 changes: 0 additions & 4 deletions gui/gui_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,22 +126,18 @@ def deliver_settings(resolution):

if (resolution.height(), resolution.width()) == (1440, 2560):
stylesheet = open(os.path.join(GUI_DIR, 'stylesheet_2k.qss')).read()
print('2k')
return settings_2k, stylesheet
elif (resolution.height(), resolution.width()) == (1080, 1920) or \
1040 < resolution.height() < 1440:
print('1k')
stylesheet = open(os.path.join(GUI_DIR, 'stylesheet_1k.qss')).read()
return settings_1k, stylesheet
elif (resolution.height(), resolution.width()) == (800, 1280):
print('1280x800')
msg = " @@@@@@@@@@@@@@@@@@@@@@ \nATTENTION YOU WILL BE USING A PROTOTYPE GUI DEVELOPED ONLY TO BE FUNCTIONAL IN 1280X800 SCREENS. IT IS NOT SUPPOSED TO HAVE A GOOD LOOK.\n@@@@@@@@@@@@@@@@@@@@@@"
print(msg)
stylesheet = open(os.path.join(GUI_DIR,
'stylesheet_1280x800.qss')).read()
return settings_1280x800, stylesheet
else:
print('720p')
stylesheet = open(os.path.join(GUI_DIR, 'stylesheet_720p.qss')).read()
return settings_720p, stylesheet

Expand Down
1 change: 0 additions & 1 deletion gui/popups/FastaSelectionPopup.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ def __init__(self, parent=None, **kw):
self.layout().addWidget(self.buttonBox)

def get_values(self):
print(self.fasta_files)
if self.fasta_files:
for cond_name, fasta_path in self.fasta_files.items():
self.add_field(cond_name, fasta_path)
Expand Down
2 changes: 1 addition & 1 deletion gui/tabs/peaklist_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def update_condition_boxes(self, row, dim, value):
layout = self.widget2.layout()
colCount = layout.columnCount()
valuesDict = self.variables["conditions"]

for m in range(3, colCount):
item = layout.itemAtPosition(row, m)

Expand Down

0 comments on commit 01f8b3e

Please sign in to comment.