farseer-nmr / farseer-nmr Goto Github PK
View Code? Open in Web Editor NEWA software suite for automatic treatment, analysis and plotting of large and multivariable datasets of bioNMR peaklists.
License: GNU General Public License v3.0
A software suite for automatic treatment, analysis and plotting of large and multivariable datasets of bioNMR peaklists.
License: GNU General Public License v3.0
At present there is no check to make sure that all exp conditions along an axis are unique. If there are not an error would be raised in drawing the tree
I have rearranged variable names in defaul_config.json regarding PRE representation in the plots. Variable names were misleading and were placed in the wrong dictionaries.
These should be updated on the GUI.
May be I can deal with it tomorrow with your help :-)
See changes in the following commit.
Remove the usage of farseer_user_variables.py file.
farseermain.py should load directly from .json file and only one file containing all the variables should exist, so that adding a new variable or variable group (dictionary) can be done by editing a single file.
In default_config.json, changing the flag:
"applyFASTA": true
or
"expand_lost_yy": true,
actually activates by default the corresponding flags in the GUI.
Doing the same for do_cond1-3 does not activate the corresponding flag. Mismatch in variable names?
incorrect and inconsistent keys appearing in config when tree created and saved.
When Run Farseer button and settings were not saved, settings should be saved as user_config.json.
I tried to run the main.py from another directory and it crashed.
How should he handle this? Correct it? Is there a way to simulate running from script folder with a shortcut/link file?
Traceback (most recent call last):
File "/home/joao/Dropbox/labo-documents/Projects/Programming/FarSeer/git/main.py", line 800, in <module>
gui_settings, stylesheet = gui_utils.deliver_settings(screen_resolution)
File "/home/joao/Dropbox/labo-documents/Projects/Programming/FarSeer/git/gui/gui_utils.py", line 65, in deliver_settings
stylesheet = open('gui/stylesheet_1k.qss').read()
FileNotFoundError: [Errno 2] No such file or directory: 'gui/stylesheet_1k.qss'
15:11 1D]
After configuring Settings options,
Save Configuration button actually saves a .json file but with the default values and not with the values configured in the GUI.
PRE Analysis should not be active unless Height or Volume are active.
PRE plots should not be active unless PRE Analysis is.
Directly Run without pre configuring the spectra
Traceback (most recent call last):
File "../../FarSeer-NMR/main.py", line 579, in run_farseer_calculation
self.parent().parent().parent().run_farseer_calculation()
File "../../FarSeer-NMR/main.py", line 131, in run_farseer_calculation
run_msg = create_directory_structure(output_path, self.variables, peakLists)
File "/home/fbssps/joao/FarSeer-NMR/current/setup_farseer_calculation.py", line 17, in create_directory_structure
if variables["fasta_files"][y_key]:
KeyError: '0'
Aborted (core dumped)
[fbssps@fbscpcu234 GUI_1D]$
Can we block the user from running in case spectra have not loaded as you did if the spectra/ already existed?
Traceback (most recent call last):
File "FarSeer-NMR/main.py", line 657, in show_popup
p = popup(self, variables=self.variables)
File "/home/joao/Git/FarSeer-NMR/gui/popups/CSPExceptionsPopup.py", line 44, in __init__
self.get_values()
File "/home/joao/Git/FarSeer-NMR/gui/popups/CSPExceptionsPopup.py", line 64, in get_values
if aal3tol1[key] in self.variables.keys():
AttributeError: 'str' object has no attribute 'keys'
Aborted (core dumped)
so that we can directly give users hyperlinks to the error messages.
Most likely this is due to the changes in the variable files. Some menus are broken:
when we are together you have too teach me some more about how are the variables configured so I can help you out on this :-)
If user loads the peaklists by drag&drop to the left area in PeakList Selection tab,
What is the meaning of the Spectrum Path in the Settings tabs?
Should the parsed peaklists (and folder tree) be placed in the Calculation Output Folder? 👍
we have changed this couple of times and I got lost :-P
When Drag&Drop hierarchic folders to the left Peaklist area:
Traceback (most recent call last):
File "/home/joao/Dropbox/labo-documents/Projects/Programming/FarSeer/git/gui/components/Sidebar.py", line 37, in dropEvent
self.load_from_path(filePath)
File "/home/joao/Dropbox/labo-documents/Projects/Programming/FarSeer/git/gui/components/Sidebar.py", line 45, in load_from_path
self.load_peaklist(path)
File "/home/joao/Dropbox/labo-documents/Projects/Programming/FarSeer/git/gui/components/Sidebar.py", line 70, in load_peaklist
number = int(self.peakLists.keys()[-1].split('_')[1])+1
TypeError: 'odict_keys' object does not support indexing
Aborted (core dumped)
I do not mean this is a bug. To discuss what should be the behaviour of the left area panel. If some options should be blocked, therefore a WET message should popup to inform the user and avoid core dump failures.
in main.py it reads
from current.farseermain import read_user_variables, run_farseer
fsuv, cwd = read_user_variables(spectrum_path)
run_farseer('{}/spectra'.format(cwd), fsuv)
run_farseer() from farseermain.py now takes only one argument, fsuv, as returned from read_user_variables() that takes only the path argument
Started GUI
created a tree
saved config
restarted gui
load config.
<gui.components.Sidebar.SideBar object at 0x7fe8b67a3708>
Traceback (most recent call last):
File "../../FarSeer-NMR/main.py", line 489, in load_config
self.load_variables()
File "../../FarSeer-NMR/main.py", line 603, in load_variables
sself.output_path.field.setText(general["output_path"])
NameError: name 'sself' is not defined
Aborted (core dumped)
[fbssps@fbscpcu234 GUI_1D]$
there is a typo error in the main gui at the bottlon left.
where it reads Arbescu should read Arbesú.
I created the tree drag&dropping from left panel after Spectrum Path.
Save the config file. Close and re-open the program.
Load config file.
crashed
Traceback (most recent call last):
File "../../FarSeer-NMR/main.py", line 487, in load_config
self.variables = self.parent().parent().parent().load_config()
File "../../FarSeer-NMR/main.py", line 104, in load_config
self.interface.peakListArea.updateTree(variables)
File "/home/fbssps/joao/FarSeer-NMR/gui/components/PeakListArea.py", line 136, in updateTree
self.sideBar().removeItem(pl_name)
File "/home/fbssps/joao/FarSeer-NMR/gui/components/Sidebar.py", line 100, in removeItem
sip.delete(result[0])
IndexError: list index out of range
Aborted (core dumped)
[fbssps@fbscpcu234 GUI_1D]$
in the default_conf.json the font type and weight values are strings configure to such as 'Arial' or 'normal'.
I see that that does not relate to the configuration appear in the menus.
I remember before you had numbers in the default_config.json and I changed it to the string values some commits ago. My fault.
I can revert the font weight to numbers so that they fit the indexes in gui.utils.py line 54. But, where is the font list so I can set 'Arial' correctly.
Tried to create conda env from the env.yml but anaconda complains.
Could you check in a spec file created from conda list --explicit > spec-file.txt?
The GUI should load a .fasta file for each Y data point.
In the final spectra/ folder (the one used for in terminal runs) the .fasta files are placed in the last folder, together with the peaklists .csv files. And there should be one for each folder. .fastas do not need to be named the same along Y folders, but they should along Z.
bug in calls for parameters
When saving the configuration file nothing happens. No file is saved an no message is printed in the Terminal.
I have deleted the file in examples/artificial_dataset_generator.
The updated farseer_user_variables files should only be that in current.
I guess the versions we are using are not compatible. Specially when generating default_config.json. How do you generate that file? So that I can update it according to the latest farseer_user_variable.py
Exporting CS Scatter series if only CSP is calculated, with PosF1 and PosF2 calc flags False do no export the data used and can not be retrieved. Data should any way be exported into the CS Scatter folder.
If a .fasta file that should start at residue 30 is configured with 1 with 'FASTA start' variable, the last residues of the peaklist will be probably truncated by 30 residues because on FarseerCube.seq_expand() peaklist index is reindexed based on the fasta
Farseer-NMR should identify that the last residue of the fasta is prior to the last residue of the protein and output and error/warning message. Message should be listed in WET list.
Having loaded a config file the user should be able to repopulate the experimental tree without loosing the other configuration settings.
Same if the user loads a configuration without information on the peaklists, he/she should be able to populate the peaklist tree maintaining the configuration.
Saving settings by Save Setting button works correctly.
user_config.json saved when hitting Run Analysis button do not store the actual user settings.
I had deactivated the FASTA flag and still it remained true when hit the Run started.
},
"fasta_settings": {
"FASTAstart": 1,
"applyFASTA": true
If a user wants to substitute a peaklist in the tree he/she should «Delete» it and then drag&drop the new one.
If FASTA Flag is Checked and not fasta files are selected GUI should warns the user.
This is already implemented in the main farseer code, so, anyway, the run won't crash.
Farseer calculations depend on spectra/ folder which requires a very curated structure. Performing a run from the GUI adds the new defined peaklists to the spectra/ folder without removing existent files. This should stay like that but an issue should rise warning the user that a spectra/ folder already exists and this is not compatible with FarseerNMR.
two issues in one:
When clicking Alpha by residue window crashes. I guess is a question on how the dictionary is written in the default_config.* files. You are more familar with the .json format, could you check this?
Can the default values that appear for each residue for every residue be filled with the value in variable csp_res4alpha ? I think this won't affect the calculation is a question to show the user that is going to be used.
If possible,
Farseer-NMR should be delivered with its own miniconda distribution so that user does not have to install anaconda or python libraries in the system.
Apart from the issues already posted, there are two main development major issues to deal with, and that we should do it together:
Another thing, as you well said, we need to share our code architecture so that both can work on every part of the code :-) That would be perfect for next week also. At the end, we are going to have a beer together tomorrow :-D
After that, I guess we are really close make a full run.
Regarding the publication,
I didn't have time to start drafting. But I did almost complete the Documentation Wiki. I still need to change one thing that I could do even today and than we need to add documentation on the GUI. I think we should finished everything before starting the publication writting. I really care about your feedback on the documentation. This is the first time I write docs. I tried to make them as short as possible and as explanatory as possible. I guess the words there can alse serve a publication means; specially the pictures.
What is your feeling?
for the future.
to discuss
stylesheet needs fixing for interface top and axis labels.
Selecting a folder that contains all the peaklists inside BUT also contains other files like a blank new file or a .fasta file or anything is not a .csv file crashed the GUI with the following.
Invalid file: /home/fbssps/joao/debugging_farseer/GUI_1D/spec-load/4000.csv
Traceback (most recent call last):
File "../../FarSeer-NMR/main.py", line 477, in set_spectrum_path
self.set_spectrum_path_text(path)
File "../../FarSeer-NMR/main.py", line 469, in set_spectrum_path_text
self.parent().parent().parent().load_peak_lists(path)
File "../../FarSeer-NMR/main.py", line 111, in load_peak_lists
self.interface.sideBar.load_from_path(path)
File "/home/fbssps/joao/FarSeer-NMR/gui/components/Sidebar.py", line 55, in load_from_path
name, path = self.load_peaklist(path)
TypeError: 'NoneType' object is not iterable
Aborted (core dumped)
Suggestion/Correction:
Spectrum Path browser should parse only .csv files to the left side bar in PeakList Tab.
Conditions variable full of zeros after config loaded and calculation executed
Drag and dropping a folder to the left area in the Peaklist Selection tab prints to the terminal
Invalid file: /home/joao/Desktop/git_trials/farseer_dev_desktop/templates_dev/debugging_farseer/1D_GUI_spectra/spectra/dia/L1/0500.csv
Invalid file: /home/joao/Desktop/git_trials/farseer_dev_desktop/templates_dev/debugging_farseer/1D_GUI_spectra/spectra/dia/L1/0125.csv
Invalid file: /home/joao/Desktop/git_trials/farseer_dev_desktop/templates_dev/debugging_farseer/1D_GUI_spectra/spectra/dia/L1/0000.csv
Invalid file: /home/joao/Desktop/git_trials/farseer_dev_desktop/templates_dev/debugging_farseer/1D_GUI_spectra/spectra/dia/L1/0250.csv
Starting from a blank folder, and Loading a config.json file from a previous run, should populated spectra/ folder and all parameters and perfectly reproduce the run.
Original peaklists should be in original absolute file path, that's should be up to the user.
for example, all Y axis scales in Restraint Calculation menu or Bar Plot - Bar Alpha.
Additional, all colour alpha should be topped to 1.00, wich are:
Bar Plot - Bar Alpha
Bar Plot - Stdv Threeshold Alpha
Titration Plot Settings - Y Grid Alpha
Residue Evolution Plot - Shade transparency
or not calculated or not plotted.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.