Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Genomeview merge debugging #1966

Open
wants to merge 948 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
948 commits
Select commit Hold shift + click to select a range
91fb468
hook in hide modal, glow gene functionality
matthewlawrenceklein Apr 20, 2022
05d4bee
keyboard shortcuts for query, mouseover panes
matthewlawrenceklein Apr 28, 2022
658be5c
remove boilerplate
matthewlawrenceklein Apr 28, 2022
02bc562
why did I format this like a psychopath
matthewlawrenceklein Apr 28, 2022
e837c3a
you too buddy
matthewlawrenceklein Apr 28, 2022
1ed0f80
more formatting
matthewlawrenceklein Apr 28, 2022
24aec13
cleanup
matthewlawrenceklein Apr 28, 2022
4e3a176
migrate ephemeral tt to mouse panel
matthewlawrenceklein Apr 28, 2022
eed1ddd
deprecated event listener
matthewlawrenceklein Apr 28, 2022
3a65efe
convert deepdive tooltip to modal
matthewlawrenceklein Apr 28, 2022
3f30f34
frame out modal html structure
matthewlawrenceklein Apr 28, 2022
5b103fd
clean
matthewlawrenceklein Apr 28, 2022
403e41a
formatting
matthewlawrenceklein Apr 28, 2022
037eeaf
fix
matthewlawrenceklein Apr 28, 2022
91d7b85
styling
matthewlawrenceklein Apr 28, 2022
2e41883
tabular modal multiselect section
matthewlawrenceklein Apr 28, 2022
f38048d
hook in multiselect method
matthewlawrenceklein Apr 28, 2022
b744fac
multiselect functionality
matthewlawrenceklein Apr 28, 2022
e1bb340
deprecated (thank goodness!)
matthewlawrenceklein Apr 28, 2022
1feb2a6
remove glow functionality from individual rows
matthewlawrenceklein Apr 28, 2022
2a54d67
framework for functional annotations in tabular modal
matthewlawrenceklein Apr 28, 2022
d356eee
pass gene/genome identifier to deepdive btn
matthewlawrenceklein Apr 28, 2022
28298ca
generate gene data obj for deepdive, transition over
matthewlawrenceklein Apr 28, 2022
57df52f
trying out dropdown functionality in tabular modal
matthewlawrenceklein Apr 29, 2022
ccc7736
refactor to match updated processed state obj
matthewlawrenceklein May 20, 2022
03a16ba
update serialized state obj
matthewlawrenceklein May 27, 2022
b2dd014
clean
matthewlawrenceklein May 27, 2022
5d5863e
case agnostic annotation querying
matthewlawrenceklein May 27, 2022
26ffeb9
clean
matthewlawrenceklein May 27, 2022
5fb9ed4
new obj for distinct query hits
matthewlawrenceklein May 27, 2022
1c3143c
don't lowercase stored match val
matthewlawrenceklein May 27, 2022
2a0cb87
don't lowercase these either
matthewlawrenceklein May 27, 2022
060aea7
span for select dropdown to live
matthewlawrenceklein May 27, 2022
2565854
generate select dropdown
matthewlawrenceklein May 27, 2022
d1601c4
dynamically populate match select
matthewlawrenceklein May 27, 2022
c661e9d
capture select onchange event/value
matthewlawrenceklein May 27, 2022
0f8c409
empty select span before each query
matthewlawrenceklein May 27, 2022
93ade3c
clarify
matthewlawrenceklein May 27, 2022
559afd9
encapsulate renderAllGenes, build out filtered render
matthewlawrenceklein May 27, 2022
59e3ccb
tame unruly select name values
matthewlawrenceklein May 27, 2022
ae1cc76
don't need safety checks if we've gotten here
matthewlawrenceklein May 27, 2022
b28bf3d
clean
matthewlawrenceklein May 27, 2022
6ca9bd7
provide 10k buffer or max allowable on zoom out
matthewlawrenceklein Jun 15, 2022
e0a94d4
refactor lasso menu html
matthewlawrenceklein Jun 15, 2022
698984a
refactor lasso menu to modal
matthewlawrenceklein Jun 15, 2022
151c8d1
new annotation source div for checkboxes
matthewlawrenceklein Jun 20, 2022
94b3246
setup annotation checkbox select functionality
matthewlawrenceklein Jun 20, 2022
a0ee0e9
make it all work
matthewlawrenceklein Jun 20, 2022
3914d21
empty checkbox divs between renders
matthewlawrenceklein Jun 21, 2022
9559e68
show/hide genes, all in one big ol commit
matthewlawrenceklein Jul 1, 2022
dedfef6
whole number step
matthewlawrenceklein Jul 1, 2022
d74581c
export tabular modal to csv
matthewlawrenceklein Jul 13, 2022
cc22727
clean
matthewlawrenceklein Jul 13, 2022
8adda9b
two due
matthewlawrenceklein Jul 13, 2022
b078f35
hidden status for genes in tabular modal
matthewlawrenceklein Jul 13, 2022
8fc2c4d
hook annotation colors into state
isaacfink21 Jul 14, 2022
339f9b5
annotations color pickers update state
isaacfink21 Jul 14, 2022
2c1b284
add time delay to fix glow genes issue
isaacfink21 Jul 18, 2022
c8895da
stub sequence rendering
matthewlawrenceklein Jul 18, 2022
78987fd
Merge branch 'genomeview-backend' of https://github.com/merenlab/anvi…
matthewlawrenceklein Jul 18, 2022
39399b6
add sequence data to gene arrow obj
matthewlawrenceklein Jul 18, 2022
1def999
show/hide sequence in tabular modal
matthewlawrenceklein Jul 18, 2022
4a24658
show/hide individual gene logic
matthewlawrenceklein Jul 18, 2022
7e40ffe
re-render show/hide genes after click
matthewlawrenceklein Jul 18, 2022
b9d2eae
generate header content + blast string for aa, dna
matthewlawrenceklein Jul 18, 2022
0a6463e
add parameters for timed/indefinite gene glow
isaacfink21 Jul 22, 2022
55dcc24
I guess we want people to be able to read this stuff huh
matthewlawrenceklein Jul 22, 2022
33eb008
safety padding under state modal, opacity
matthewlawrenceklein Jul 22, 2022
16fd211
mouse > mouseover
matthewlawrenceklein Jul 22, 2022
66fe867
more
matthewlawrenceklein Jul 22, 2022
de09d05
tabular modal color pickers in
matthewlawrenceklein Jul 22, 2022
40d53d9
annotation sourcing fix
matthewlawrenceklein Jul 22, 2022
ece4928
fix for fix
matthewlawrenceklein Jul 22, 2022
87d4a49
remove chaining
matthewlawrenceklein Jul 22, 2022
ae854e6
make indefinite gene glow static; add black border
isaacfink21 Jul 24, 2022
2e8e470
cleanup
isaacfink21 Jul 24, 2022
31a4c8e
fix
isaacfink21 Jul 24, 2022
609ae7c
no indefinite gene glow for tabular modal
isaacfink21 Jul 24, 2022
de592b1
fix
isaacfink21 Jul 24, 2022
a3fe79c
add glow effect for "go to gene" buttons
isaacfink21 Jul 24, 2022
1dc1d1f
fix!
isaacfink21 Jul 24, 2022
fd405b2
weird file truncate fix
matthewlawrenceklein Jul 25, 2022
ba57d5c
remove UI columns from TSV export
matthewlawrenceklein Jul 25, 2022
0d439cd
case agnostic metadata query
matthewlawrenceklein Jul 25, 2022
80cf789
fix group background opacity bug
isaacfink21 Jul 26, 2022
a0f8977
Merge branch 'genomeview-backend' of https://github.com/merenlab/anvi…
isaacfink21 Jul 26, 2022
45c1f3c
Merge branch 'master' into genomeview-backend
isaacfink21 Jul 26, 2022
3f292e6
revert latest merge
isaacfink21 Aug 1, 2022
66faa50
issue template
isaacfink21 Aug 1, 2022
577e378
restore more files
isaacfink21 Aug 1, 2022
dead912
workflow change
isaacfink21 Aug 4, 2022
d7a4c25
purge files removed from master
isaacfink21 Aug 4, 2022
448425c
one more
isaacfink21 Aug 4, 2022
1f3e35a
not the whole thing
isaacfink21 Aug 4, 2022
9b432ca
only include changes relevant to genome view in external files
isaacfink21 Aug 7, 2022
60fd597
Merge branch 'master' into genomeview-merge-debugging
meren Aug 9, 2022
bdf5db1
redundant file
meren Aug 9, 2022
8c32160
make component test for GW run again
meren Aug 9, 2022
fb4aabc
genome-view db version in tables/__init__
meren Aug 9, 2022
fa7548c
-= rogue param
meren Aug 9, 2022
8717c2f
remove regressions in folder
isaacfink21 Aug 12, 2022
66647d0
more
isaacfink21 Aug 12, 2022
3c0c506
reintroduce COG and KEGG constants
isaacfink21 Aug 12, 2022
18297e7
show the amino acids properly for reverse genes
meren Dec 28, 2021
0711bbf
fix-y-scale unchecked by default
matthewlawrenceklein Oct 19, 2021
01ab0ba
load just-saved state into current session, update UI on processState…
matthewlawrenceklein Oct 19, 2021
a5fbe16
very annoying bug in the inspect page
meren Nov 8, 2021
23d1e79
remove framework for batch coloring on inspect page
isaacfink21 Aug 14, 2022
3d81abe
get_GC_content_for_sequence_as_an_array was accidentally removed
isaacfink21 Aug 23, 2022
cbc9c56
genomeview.js is deprecated
isaacfink21 Aug 26, 2022
e946518
merge master
isaacfink21 Aug 26, 2022
4e5686b
fix batch coloring and label pickers
isaacfink21 Aug 29, 2022
4a5e47c
Merge branch 'master' into genomeview-merge-debugging
isaacfink21 Sep 29, 2022
dcbfb19
undo last commit
isaacfink21 Sep 29, 2022
3268e80
Merge branch 'genomeview-backend' of https://github.com/merenlab/anvi…
isaacfink21 Sep 29, 2022
db2248c
issue template
isaacfink21 Aug 1, 2022
552a2cb
restore more files
isaacfink21 Aug 1, 2022
e288db2
purge files removed from master
isaacfink21 Aug 4, 2022
f2a8a08
one more
isaacfink21 Aug 4, 2022
f44182b
not the whole thing
isaacfink21 Aug 4, 2022
d001199
only include changes relevant to genome view in external files
isaacfink21 Aug 7, 2022
cb4b65d
set up arguments
semiller10 Feb 21, 2022
3276a18
references for CUB metrics
semiller10 Feb 21, 2022
f81bb78
typo
semiller10 Feb 22, 2022
7c285f6
list ribosomal protein KOfams
semiller10 Feb 22, 2022
6fdfb59
codon counts for CUB
semiller10 Feb 22, 2022
2bd2c6a
fix codon count
semiller10 Feb 22, 2022
553af72
wording
semiller10 Feb 22, 2022
92f5eca
find synonymous codon freq, impose min codon count
semiller10 Feb 22, 2022
1d38f03
implement CAI and delta with ribosomal ref set
semiller10 Feb 22, 2022
f826cb8
implement CAI and delta with reciprocal ref set ("omnibias" mode)
semiller10 Feb 22, 2022
1549a6f
debug
semiller10 Feb 22, 2022
e44b156
handle missing amino acids in reference codon set
semiller10 Feb 22, 2022
33356c9
produce CUB output tables
semiller10 Feb 22, 2022
2afdeab
debug
semiller10 Feb 22, 2022
f5680dd
debug
semiller10 Feb 22, 2022
3345102
typos
semiller10 Feb 23, 2022
9607570
debug
semiller10 Feb 23, 2022
322d782
debug
semiller10 Feb 23, 2022
a8ac46e
account for missing codons/AAs in min codon count
semiller10 Feb 23, 2022
2234d5a
debug
semiller10 Feb 23, 2022
6f65209
variable rename
semiller10 Feb 23, 2022
975e115
debug
semiller10 Feb 23, 2022
10ca3d9
correct reporting of dropped "short" codon sets
semiller10 Feb 24, 2022
5ae9780
typo
semiller10 Feb 24, 2022
f9b310a
handle unknown nts
semiller10 Feb 27, 2022
c3242f5
better reporting of missing amino acids
semiller10 Feb 28, 2022
0c66353
sort modules order in output table
semiller10 Mar 1, 2022
7b17105
codon/amino acid frequency interface
semiller10 May 17, 2022
ae8151c
reworked backend for codon frequency statistics
semiller10 Jun 14, 2022
ddb0b86
major updates to anvi-get-codon-frequencies
semiller10 Jun 21, 2022
fe33046
improvements to multigenome codon usage and fixes
semiller10 Jun 22, 2022
c4ee4a6
systematic checks finished
semiller10 Jun 25, 2022
8de6dbf
Add program to calculate codon usage bias and edit codon frequency ca…
semiller10 Jul 5, 2022
c01ffb1
major update includes CUB program
semiller10 Aug 5, 2022
1925a6d
clarify `--sequence-min-amino-acids` help msg
semiller10 Aug 5, 2022
061f26a
fix `--min-codon-filter` help msg
semiller10 Aug 5, 2022
f6591f2
fix parameter passing
semiller10 Aug 5, 2022
3e655d0
remove leftover comment
semiller10 Aug 5, 2022
e95f2e3
do not drop output rows when all reported values have been removed du…
semiller10 Aug 5, 2022
3d340c1
correct msg of discarded query-ref comparisons
semiller10 Aug 6, 2022
07024ae
update `--pansequence/sequence-min-amino-acids` documentation
semiller10 Aug 6, 2022
35240ab
finished a working copy of CUB documentation
semiller10 Aug 6, 2022
e25443a
change to correct arg parser method
mschecht Jul 14, 2022
77a8839
updating coverage parameter names
mschecht Jul 14, 2022
13a5b58
gene and model coverage sanity checks
mschecht Jul 14, 2022
0bce8b2
use arg parser that handles ad hoc flags
mschecht Aug 3, 2022
aca4753
update component test
mschecht Aug 3, 2022
e08f497
proper pairs
meren Aug 8, 2022
fd34f94
fixy fixes. CC: @semiller10.
meren Aug 8, 2022
367279e
avoid a long radio silence for big data
meren Aug 8, 2022
0d606d4
prettier
meren Aug 8, 2022
99c8fb6
fixy fixes
meren Aug 8, 2022
6b160b6
redundant file
meren Aug 9, 2022
a7acdd8
make component test for GW run again
meren Aug 9, 2022
7a90305
genome-view db version in tables/__init__
meren Aug 9, 2022
6ea65d6
-= rogue param
meren Aug 9, 2022
25b9b25
remove regressions in folder
isaacfink21 Aug 12, 2022
c421831
more
isaacfink21 Aug 12, 2022
6868d88
reintroduce COG and KEGG constants
isaacfink21 Aug 12, 2022
08bc84e
show the amino acids properly for reverse genes
meren Dec 28, 2021
9b1b833
fix-y-scale unchecked by default
matthewlawrenceklein Oct 19, 2021
b08f7e8
load just-saved state into current session, update UI on processState…
matthewlawrenceklein Oct 19, 2021
0882b0d
very annoying bug in the inspect page
meren Nov 8, 2021
b4f321d
remove framework for batch coloring on inspect page
isaacfink21 Aug 14, 2022
ded07d1
get_GC_content_for_sequence_as_an_array was accidentally removed
isaacfink21 Aug 23, 2022
63ad100
genomeview.js is deprecated
isaacfink21 Aug 26, 2022
a5c542c
Should we stay or should we go
meren Aug 9, 2022
cc37a9b
Adding Robert Murphy
Rob-murphys Aug 9, 2022
8b24e8d
Added missing info for Rob Murphy
Rob-murphys Aug 9, 2022
dc6bb6f
Adding picture for Rob Murphy
Rob-murphys Aug 9, 2022
1130f68
Adding pic for rob murphy
Rob-murphys Aug 9, 2022
54778e8
`--merens-codon-normalization` has been lost to the sands of time
semiller10 Aug 10, 2022
cac69c0
don't list 'hypothetical protein' as function
meren Aug 12, 2022
44a1632
change the data structure
meren Aug 12, 2022
170e9d0
report GeneBank locus tag when asked.
meren Aug 12, 2022
481d7c6
+= --include-locus-tags-as-functions
meren Aug 12, 2022
8a05429
update the help docs.
meren Aug 12, 2022
498982d
also write the heder line :/
meren Aug 12, 2022
3acc054
fix batch coloring and label pickers
isaacfink21 Aug 29, 2022
96dd2bd
factorize input file
mschecht Aug 6, 2022
6846215
anvi-run-hmm threads fix for only genomes
mschecht Jun 20, 2022
b834dda
create hmm_hits_record.txt
mschecht Jun 20, 2022
ecf7114
Conditionally run rules based on hmm_hits_records.txt
mschecht Jun 22, 2022
6eb89c4
update ecophylo test
mschecht Jun 22, 2022
116fa0a
Always get codon frequencies
mschecht Jun 22, 2022
4207a1b
linking in model coverage filtering
mschecht Jul 20, 2022
1c3e6d3
improve EcoPhylo interface state
mschecht Jul 21, 2022
e47e026
get external-genomes and metagenomes the anvio way
mschecht Jul 22, 2022
7f9ffff
fix
mschecht Jul 25, 2022
f213dd7
still need variable
mschecht Aug 6, 2022
3944bb6
need some contigDBs as input
mschecht Aug 8, 2022
2d182bf
fix
mschecht Aug 9, 2022
4b78763
needs an hmm_list sanity check
mschecht Aug 9, 2022
24cc4f5
unneeded libraries
mschecht Aug 9, 2022
b5d9bfc
remove unneeded layers
mschecht Aug 9, 2022
584bed8
fix
mschecht Aug 10, 2022
7f5e694
more efficient default threads values
mschecht Aug 10, 2022
6cbb4a3
fix
mschecht Aug 10, 2022
241302c
EcoPhylo will only work with one HMM at a time
mschecht Aug 11, 2022
5d91564
init rules dependent on hmm_hits
mschecht Aug 11, 2022
34b2875
exit workflow if no hmm_hits
mschecht Aug 12, 2022
21ddac7
init amino acid alignments in tree-mode
mschecht Aug 13, 2022
1ea025f
fix
mschecht Aug 15, 2022
82ba07c
use unaligned fasta
mschecht Aug 15, 2022
e07bfa9
FIXME: conditional threads does not impact whole rule
mschecht Aug 15, 2022
e8436ef
fix
mschecht Aug 15, 2022
f8b50d0
add logging
mschecht Aug 17, 2022
e21de26
edge case: external-genomes files with multiple gene-callers will bre…
mschecht Aug 24, 2022
f6464ae
document functions
mschecht Aug 24, 2022
916ff1e
improve rule documentation
mschecht Aug 24, 2022
7a8d7ac
fix
mschecht Aug 24, 2022
4c02244
wooooops
mschecht Aug 24, 2022
8fbd9fd
init conditional threads attempt 2
mschecht Aug 24, 2022
7b442c6
fix
mschecht Aug 24, 2022
4e19349
fix dynamic threads
mschecht Aug 25, 2022
22caa13
user defined gene-caller
mschecht Aug 25, 2022
1ec8162
lower case variables
mschecht Aug 25, 2022
326906d
fix
mschecht Aug 25, 2022
e3e2f4a
fixy fix for #1970. if the contig has no cov, cont
meren Aug 22, 2022
d802ec6
more #1970 fix. if contig has too low cov, cont
watsonar Aug 22, 2022
d70aef6
cont only if contig stretches long enough #1970
watsonar Aug 22, 2022
49cc265
fixy fix. Thanks, Luke McKay for catching this.
meren Aug 23, 2022
22ecef3
if there are no item orders, return none
meren Aug 25, 2022
249a68a
function documentation
mschecht Aug 25, 2022
620af43
fix
mschecht Aug 25, 2022
3579d22
adding small note about control of appending to files
ivagljiva Aug 25, 2022
eddd530
Re-implement --only-complete flag for matrix format output. Thanks to…
ivagljiva Aug 25, 2022
6b0cd16
no full init
mschecht Aug 26, 2022
069b3fc
Merge branch 'genomeview-merge-debugging' of https://github.com/meren…
isaacfink21 Sep 29, 2022
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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@
[submodule "anvio/data/interactive/lib/JavaScript-MD5"]
path = anvio/data/interactive/lib/JavaScript-MD5
url = https://github.com/blueimp/JavaScript-MD5.git
[submodule "anvio/data/interactive/lib/fabric.js"]
path = anvio/data/interactive/lib/fabric
url = https://github.com/fabricjs/fabric.js.git
18 changes: 14 additions & 4 deletions anvio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,12 @@ def TABULATE(table, header, numalign="right", max_width=0):
'required': True,
'help': "Anvi'o structure database."}
),
'genome-view-db': (
['-E', '--genome-view-db'],
{'metavar': "GENOME_VIEW_DB",
'required': True,
'help': "Anvi'o genome view database."}
),
'only-if-structure': (
['--only-if-structure'],
{'default': False,
Expand Down Expand Up @@ -3563,7 +3569,8 @@ def set_version():
t.genomes_storage_vesion, \
t.structure_db_version, \
t.metabolic_modules_db_version, \
t.trnaseq_db_version
t.trnaseq_db_version, \
t.genome_view_db_version


def get_version_tuples():
Expand All @@ -3576,7 +3583,8 @@ def get_version_tuples():
("Genome data storage version", __genomes_storage_version__),
("Structure DB version", __structure__version__),
("KEGG Modules DB version", __kegg_modules_version__),
("tRNA-seq DB version", __trnaseq__version__)]
("tRNA-seq DB version", __trnaseq__version__),
("Genome view DB version", __genome_view_db__version__)]


def print_version():
Expand All @@ -3588,7 +3596,8 @@ def print_version():
run.info("Auxiliary data storage", __auxiliary_data_version__)
run.info("Structure database", __structure__version__)
run.info("Metabolic modules database", __kegg_modules_version__)
run.info("tRNA-seq database", __trnaseq__version__, nl_after=1)
run.info("tRNA-seq database", __trnaseq__version__)
run.info("Genome view database", __genome_view_db__version__, nl_after=1)


__version__, \
Expand All @@ -3601,7 +3610,8 @@ def print_version():
__genomes_storage_version__ , \
__structure__version__, \
__kegg_modules_version__, \
__trnaseq__version__ = set_version()
__trnaseq__version__, \
__genome_view_db__version__ = set_version()


if '-v' in sys.argv or '--version' in sys.argv:
Expand Down
28 changes: 27 additions & 1 deletion anvio/bottleroutes.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ def register_routes(self):
self.route('/data/reroot_tree', callback=self.reroot_tree, method='POST')
self.route('/data/save_tree', callback=self.save_tree, method='POST')
self.route('/data/check_homogeneity_info', callback=self.check_homogeneity_info, method='POST')
self.route('/data/get_genome_view_data', callback=self.get_genome_view_data, method='POST')
self.route('/data/get_genome_view_adl', callback=self.get_genome_view_continuous_data_layers, method='POST')
self.route('/data/search_items', callback=self.search_items_by_name, method='POST')
self.route('/data/get_taxonomy', callback=self.get_taxonomy, method='POST')
self.route('/data/get_functions_for_gene_clusters', callback=self.get_functions_for_gene_clusters, method='POST')
Expand Down Expand Up @@ -264,6 +266,8 @@ def redirect_to_app(self):
homepage = 'metabolism.html'
elif self.interactive.mode == 'inspect':
redirect('/app/charts.html?id=%s&show_snvs=true&rand=%s' % (self.interactive.inspect_split_name, self.random_hash(8)))
elif self.interactive.mode == 'genome-view':
homepage = 'genomeview.html'

redirect('/app/%s?rand=%s' % (homepage, self.random_hash(8)))

Expand Down Expand Up @@ -469,9 +473,13 @@ def save_state(self, state_name):

def get_state(self, state_name):
if state_name in self.interactive.states_table.states:

state = self.interactive.states_table.states[state_name]
state_dict = json.loads(state['content'])

if self.interactive.mode == 'genome-view':
return json.dumps({'content' : state_dict})

if self.interactive.mode == 'structure':
return json.dumps({'content': state['content']})
else:
Expand Down Expand Up @@ -1357,6 +1365,24 @@ def get_initial_data(self):
return json.dumps(self.interactive.get_initial_data())


def get_genome_view_data(self):
try:
return json.dumps({'genomes': self.interactive.genomes,
'gene_associations': self.interactive.gene_associations})
except Exception as e:
return json.dumps({'error': f"Something went wrong at the backend :( Here is the error message: '{e}'"})


def get_genome_view_continuous_data_layers(self):
"""populate continuous data layers, and send them back to the frontend"""

try:
self.interactive.populate_genome_continuous_data_layers()
return json.dumps(self.interactive.continuous_data_layers)
except Exception as e:
return json.dumps({'error': f"Something went wrong at the backend :( Here is the error message: '{e}'"})


def get_column_info(self):
gene_callers_id = int(request.forms.get('gene_callers_id'))
engine = request.forms.get('engine')
Expand Down Expand Up @@ -1477,7 +1503,7 @@ def get_functions_for_gene_clusters(self):
message = (f"At least one of the gene clusters in your list (e.g., {gene_cluster_name}) is missing in "
f"the functions summary dict :/")
return json.dumps({'status': 1, 'message': message})

d[gene_cluster_name] = self.interactive.gene_clusters_functions_summary_dict[gene_cluster_name]

return json.dumps({'functions': d, 'sources': list(self.interactive.gene_clusters_function_sources)})
Loading