diff --git a/.gitignore b/.gitignore index 620e53c..7795d3f 100755 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,8 @@ yarn-error.log* cypress/screenshots cypress/videos + +*.db +test-results/ +downloads +databases/ \ No newline at end of file diff --git a/cypress/fixtures/dbs.json b/cypress/fixtures/dbs.json index 208a832..57c984a 100644 --- a/cypress/fixtures/dbs.json +++ b/cypress/fixtures/dbs.json @@ -2,11 +2,15 @@ { "id": 1, "xxh64": -2550112168598887000, - "filename": "pfam24.dcp" + "file": { + "name": "pfam24.dcp" + } }, { "id": 2, "xxh64": 7603259662449547000, - "filename": "Pfam-A.quarter.dcp" + "file": { + "name": "Pfam-A.quarter.dcp" + } } ] \ No newline at end of file diff --git a/cypress/fixtures/job_done.json b/cypress/fixtures/job_done.json index ec44de0..15f8fff 100644 --- a/cypress/fixtures/job_done.json +++ b/cypress/fixtures/job_done.json @@ -1,10 +1,10 @@ { "id": 99, - "type": 0, + "type": "scan", "state": "done", "progress": 100, "error": "", - "submission": 0, - "exec_started": 0, - "exec_ended": 0 + "submission": "2023-12-08T15:59:42.046396", + "exec_started": "2023-12-08T15:59:52.046396", + "exec_ended": "2023-12-08T15:59:56.046396" } \ No newline at end of file diff --git a/cypress/fixtures/job_next_pend.json b/cypress/fixtures/job_next_pend.json deleted file mode 100644 index 5b7deb1..0000000 --- a/cypress/fixtures/job_next_pend.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "id": 90, - "db_id": 0, - "multi_hits": false, - "hmmer3_compat": false, - "state": "pend", - "error": "", - "submission": 0, - "exec_started": 0, - "exec_ended": 0 -} \ No newline at end of file diff --git a/cypress/fixtures/job_pending.json b/cypress/fixtures/job_pending.json index ae8d7bd..d567660 100644 --- a/cypress/fixtures/job_pending.json +++ b/cypress/fixtures/job_pending.json @@ -1,6 +1,6 @@ { "id": 100, - "type": 0, + "type": "scan", "state": "pend", "progress": 0, "error": "", diff --git a/cypress/fixtures/jobs_list.json b/cypress/fixtures/jobs_list.json new file mode 100644 index 0000000..18d4739 --- /dev/null +++ b/cypress/fixtures/jobs_list.json @@ -0,0 +1,18 @@ +[ + { + "id": 1, + "state": "done" + }, + { + "id": 90, + "state": "done" + }, + { + "id": 90, + "state": "pend" + }, + { + "id": 100, + "state": "pend" + } +] \ No newline at end of file diff --git a/cypress/fixtures/prod_alignments.txt b/cypress/fixtures/prod_alignments.txt new file mode 100644 index 0000000..ea7bf49 --- /dev/null +++ b/cypress/fixtures/prod_alignments.txt @@ -0,0 +1,23 @@ +Alignments for each domain: +== domain 1 score: 247.9 bits; conditional E-value: 2.9e-78 + HHHHHHTCTTSEEEEEEEE--HHHHHHHHHHHCHTT-HHHHHHHHHHTTSS-SSTHHHHTTHHHHHHHHHHHHHHCTTT--GGGSEE--STTS-HH CS +PF00742.20 3 ISTLKESLIGDRITRIEGILNGTMNYILTEMEEEGASFSEALKEAQQLGYAEADPTDDVEGLDAARKLAILARLAFGLEVELEDVEVEAIEKLTAE 98 + istlkesl gdritriegilngt+nyiltemeeegasfsealkeaq+lGyaEaDptdDveGlDaarKlailarlafgleveledveve iekltae + 1 ISTLKESLIGDRITRIEGILNGTMNYILTEMEEEGASFSEALKEAQQLGYAEADPTDDVEGLDAARKLAILARLAFGLEVELEDVEVEAIEKLTAE 96 + example 1 ATACAGTCAGGCAACAGGATAGCTATACAGAGGGGGTTTGGCAGGCCTGTGGGGCAGGGGGCGGGAACGACGATGTGTGGGTGGGGGGGAGACAGG 284 + TCCTAACTTGAGTCGTAGTTAGCGAATTCATAAAGCCTCACTAACAATGACACACCAATAGTACCGATCTTCGTCTGTATATAATATACTAATCCA + TGGCGGGGATCTTTACAGAACC..TCTCTGGGAGGTACTGGGGGAGAGCCGAGTTGCTGAGATTTAGGATACAGATGAGCGGGCAGGAATAGGTCA + ................................................................................................ + ................................................................................................ + 79********************************************************************************************** PP + + HHHHHHCTTEEEEEEEEECEEEEEEEEEETTSGGGHSSST.EEEEEEESSSEE..EEEEES-SSHHHHHHHH CS +PF00742.20 99 DIEKIKEEGKVLKLVASAVEARVKPELVPKSHPLASVKGSDNAVAVETERHSVgeLVVQGPGAGEEPTASAV 170 + die+ keegkvlklvasavearvkpelvpkshplasvkgsdnavaveter++ lvvqGpgaG+epTAsav + 97 DIEKIKEEGKVLKLVASAVEARVKPELVPKSHPLASVKGSDNAVAVETERHSVGELVVQGPGAGEEPTASAV 168 + example 287 GAGAAAGGGAGTACGGAGGGGAGACGCGCATCCTGTGAGTGAGGGGGAGCCTGGGCGGCGCGGGGGCAGTGG 501 + ATAATAAAGATTATTCGCTACGTACATTCACACTCCTAGCAACTCTACAGACGGATTTAGCGCGAACCCCCT + TTAAAGAGTATAAAGACCCACGCGTGGATGATAACGAACTCCCGTAAGAATTTCACAGGAAGTCAGACACTA + ....................................................A................... + ........................................................................ + *************************************************987667***************** PP diff --git a/cypress/fixtures/prod_amino.txt b/cypress/fixtures/prod_amino.txt index 70f8020..3a670d0 100644 --- a/cypress/fixtures/prod_amino.txt +++ b/cypress/fixtures/prod_amino.txt @@ -1,14 +1,4 @@ ->1 Homoserine_dh-consensus -PIISTLKESLTGDRITRIEGILNGTLNYILTEMEEEGASFSEALKEAQELGYAEADPTDD -VEGLDAARKLAILARLAFGLEVELEDVEVEGIEKLTAEDIEEAKEEGKVLKLVASAVEAR -VKPELVPKSHPLASVKGSDNAVAVETERVGELVVQGPGAGAEPTASAVLADLL ->2 AA_kinase-consensus -KRVVVKLGGSSLTDKEEASLRRLAEQIAALKESGNKLVVVHGGGSFTDGLLALKSGLSSG -ELAAGLRSTLEEAGEVATRDALASLGERLVAALLAAGLPAVGLSAAALDATEAGRDEGSD -GNVESVDAEAIEELLEAGVVPVLTGFIGLDEEGELGRGSSDTIAALLAEALGADKLIILT -DVDGVYDADPKKVPDARLLPEISVDEAEESASELATGGMKVKHPAALAAARRGGIPVVIT -N ->3 23ISL-consensus -QGLDNANRSLVRATKAESSDIRKEVTNGIAKGLKLDSLETAAESKNCSSAQKGGSLAWAT -NSQPQPLRESKLEPLEDSPRKALKTPVLQKTSSTITLQAVKVQPEPRAPVSGALSPSGEE -RKRPAASAPATLPTRQSGLGSQEVVSKVATRKIPMESQREST \ No newline at end of file +>19 +ISTLKESLIGDRITRIEGILNGTMNYILTEMEEEGASFSEALKEAQQLGYAEADPTDDVE +GLDAARKLAILARLAFGLEVELEDVEVEAIEKLTAEDIEKIKEEGKVLKLVASAVEARVK +PELVPKSHPLASVKGSDNAVAVETERHSVGELVVQGPGAGEEPTASAVLA diff --git a/cypress/fixtures/prod_codon.txt b/cypress/fixtures/prod_codon.txt index 13bf57d..80a94a0 100644 --- a/cypress/fixtures/prod_codon.txt +++ b/cypress/fixtures/prod_codon.txt @@ -1,34 +1,10 @@ ->1 Homoserine_dh-consensus -CCTATCATTTCGACGCTCAAGGAGTCGCTGACAGGTGACCGTATTACTCGAATCGAAGGG -ATATTAAACGGCACCCTGAATTACATTCTCACTGAGATGGAGGAAGAGGGGGCTTCATTC -TCTGAGGCGCTGAAGGAGGCACAGGAATTGGGCTACGCGGAAGCGGATCCTACGGACGAT -GTGGAAGGGCTAGATGCTGCTAGAAAGCTGGCAATTCTAGCCAGATTGGCATTTGGGTTA -GAGGTCGAGTTGGAGGACGTAGAGGTGGAAGGAATTGAAAAGCTGACTGCCGAAGATATT -GAAGAAGCGAAGGAAGAGGGTAAAGTTTTAAAACTAGTGGCAAGCGCCGTCGAAGCCAGG -GTCAAGCCTGAGCTGGTACCTAAGTCACATCCATTAGCCTCGGTAAAAGGCTCTGACAAC -GCCGTGGCTGTAGAAACGGAACGGGTAGGCGAACTCGTAGTGCAGGGACCAGGGGCTGGC -GCAGAGCCAACCGCATCCGCTGTACTCGCTGACCTTCTC ->2 AA_kinase-consensus -AAACGTGTAGTTGTAAAGCTTGGGGGTAGTTCTCTGACAGATAAGGAAGAGGCATCACTC -AGGCGTTTAGCTGAGCAGATTGCAGCATTAAAAGAGAGTGGCAATAAACTAGTGGTCGTG -CATGGAGGCGGCAGCTTCACTGATGGTCTGCTGGCATTGAAAAGTGGCCTGAGCTCGGGC -GAATTAGCTGCGGGGTTGAGGAGCACGTTAGAAGAGGCCGGAGAAGTAGCGACGAGGGAC -GCCCTAGCTAGCTTAGGGGAACGGCTTGTTGCAGCGCTGCTGGCGGCGGGTCTCCCTGCT -GTAGGACTCAGCGCCGCTGCGTTAGATGCGACGGAGGCGGGCCGGGATGAAGGCAGCGAC -GGGAACGTCGAGTCCGTGGACGCAGAAGCAATTGAGGAGTTGCTTGAGGCCGGGGTGGTC -CCCGTCCTAACAGGATTTATCGGCTTAGACGAAGAAGGGGAACTGGGAAGGGGATCTTCT -GACACCATCGCTGCGTTACTCGCTGAAGCTTTAGGCGCGGACAAACTCATAATACTGACC -GACGTAGACGGCGTTTACGATGCCGACCCTAAAAAGGTCCCAGACGCGAGGCTCTTGCCA -GAGATAAGTGTGGACGAGGCCGAGGAAAGCGCCTCCGAATTAGCGACCGGTGGGATGAAG -GTCAAACATCCAGCGGCTCTTGCTGCAGCTAGACGGGGGGGTATTCCGGTCGTGATAACG -AAT ->3 23ISL-consensus -CAGGGTCTGGATAACGCTAATCGTTCGCTAGTTCGCGCTACAAAAGCAGAAAGTTCAGAT -ATACGGAAAGAGGTGACTAACGGCATCGCTAAAGGGCTGAAGCTAGACAGTCTGGAAACA -GCTGCAGAGTCGAAGAACTGCTCAAGCGCACAGAAAGGCGGATCGCTAGCTTGGGCAACC -AACTCCCAACCACAGCCTCTCCGTGAAAGTAAGCTTGAGCCATTGGAAGACTCCCCACGT -AAGGCTTTAAAAACACCTGTGTTGCAAAAGACATCCAGTACCATAACTTTACAAGCAGTC -AAGGTTCAACCTGAACCCCGCGCTCCCGTCTCCGGGGCGCTGTCCCCGAGCGGGGAGGAA -CGCAAGCGCCCAGCTGCGTCTGCTCCCGCTACCTTACCGACACGACAGAGTGGTCTAGGT -TCTCAGGAAGTCGTTTCGAAGGTGGCGACTCGCAAAATTCCAATGGAGTCACAACGCGAG -TCGACT \ No newline at end of file +>19 +ATTTCGACGCTCAAGGAGTCGCTGATAGGTGACCGTATTACTCGAATCGAAGGGATATTA +AACGGCACCATGAATTACATTCTCACTGAGATGGAGGAAGAGGGGGCTTCATTCTCTGAG +GCGCTGAAGGAGGCACAGCAATTGGGCTACGCGGAAGCGGATCCTACGGACGATGTGGAA +GGGCTAGATGCTGCTAGAAAGCTGGCAATTCTAGCCAGATTGGCATTTGGGTTAGAGGTC +GAGTTGGAGGACGTAGAGGTGGAAGCAATTGAAAAGCTGACTGCCGAAGATATTGAAAAA +ATAAAGGAAGAGGGTAAAGTTTTAAAACTAGTGGCAAGCGCCGTCGAAGCCAGGGTCAAG +CCTGAGCTGGTACCTAAGTCACATCCATTAGCCTCGGTAAAAGGCTCTGACAACGCCGTG +GCTGTAGAAACGGAACGACATTCTGTAGGCGAACTCGTAGTGCAGGGACCAGGGGCTGGC +GAAGAGCCAACCGCATCCGCTGTACTCGCT diff --git a/cypress/fixtures/prod_frag.txt b/cypress/fixtures/prod_frag.txt deleted file mode 100644 index 13bf57d..0000000 --- a/cypress/fixtures/prod_frag.txt +++ /dev/null @@ -1,34 +0,0 @@ ->1 Homoserine_dh-consensus -CCTATCATTTCGACGCTCAAGGAGTCGCTGACAGGTGACCGTATTACTCGAATCGAAGGG -ATATTAAACGGCACCCTGAATTACATTCTCACTGAGATGGAGGAAGAGGGGGCTTCATTC -TCTGAGGCGCTGAAGGAGGCACAGGAATTGGGCTACGCGGAAGCGGATCCTACGGACGAT -GTGGAAGGGCTAGATGCTGCTAGAAAGCTGGCAATTCTAGCCAGATTGGCATTTGGGTTA -GAGGTCGAGTTGGAGGACGTAGAGGTGGAAGGAATTGAAAAGCTGACTGCCGAAGATATT -GAAGAAGCGAAGGAAGAGGGTAAAGTTTTAAAACTAGTGGCAAGCGCCGTCGAAGCCAGG -GTCAAGCCTGAGCTGGTACCTAAGTCACATCCATTAGCCTCGGTAAAAGGCTCTGACAAC -GCCGTGGCTGTAGAAACGGAACGGGTAGGCGAACTCGTAGTGCAGGGACCAGGGGCTGGC -GCAGAGCCAACCGCATCCGCTGTACTCGCTGACCTTCTC ->2 AA_kinase-consensus -AAACGTGTAGTTGTAAAGCTTGGGGGTAGTTCTCTGACAGATAAGGAAGAGGCATCACTC -AGGCGTTTAGCTGAGCAGATTGCAGCATTAAAAGAGAGTGGCAATAAACTAGTGGTCGTG -CATGGAGGCGGCAGCTTCACTGATGGTCTGCTGGCATTGAAAAGTGGCCTGAGCTCGGGC -GAATTAGCTGCGGGGTTGAGGAGCACGTTAGAAGAGGCCGGAGAAGTAGCGACGAGGGAC -GCCCTAGCTAGCTTAGGGGAACGGCTTGTTGCAGCGCTGCTGGCGGCGGGTCTCCCTGCT -GTAGGACTCAGCGCCGCTGCGTTAGATGCGACGGAGGCGGGCCGGGATGAAGGCAGCGAC -GGGAACGTCGAGTCCGTGGACGCAGAAGCAATTGAGGAGTTGCTTGAGGCCGGGGTGGTC -CCCGTCCTAACAGGATTTATCGGCTTAGACGAAGAAGGGGAACTGGGAAGGGGATCTTCT -GACACCATCGCTGCGTTACTCGCTGAAGCTTTAGGCGCGGACAAACTCATAATACTGACC -GACGTAGACGGCGTTTACGATGCCGACCCTAAAAAGGTCCCAGACGCGAGGCTCTTGCCA -GAGATAAGTGTGGACGAGGCCGAGGAAAGCGCCTCCGAATTAGCGACCGGTGGGATGAAG -GTCAAACATCCAGCGGCTCTTGCTGCAGCTAGACGGGGGGGTATTCCGGTCGTGATAACG -AAT ->3 23ISL-consensus -CAGGGTCTGGATAACGCTAATCGTTCGCTAGTTCGCGCTACAAAAGCAGAAAGTTCAGAT -ATACGGAAAGAGGTGACTAACGGCATCGCTAAAGGGCTGAAGCTAGACAGTCTGGAAACA -GCTGCAGAGTCGAAGAACTGCTCAAGCGCACAGAAAGGCGGATCGCTAGCTTGGGCAACC -AACTCCCAACCACAGCCTCTCCGTGAAAGTAAGCTTGAGCCATTGGAAGACTCCCCACGT -AAGGCTTTAAAAACACCTGTGTTGCAAAAGACATCCAGTACCATAACTTTACAAGCAGTC -AAGGTTCAACCTGAACCCCGCGCTCCCGTCTCCGGGGCGCTGTCCCCGAGCGGGGAGGAA -CGCAAGCGCCCAGCTGCGTCTGCTCCCGCTACCTTACCGACACGACAGAGTGGTCTAGGT -TCTCAGGAAGTCGTTTCGAAGGTGGCGACTCGCAAAATTCCAATGGAGTCACAACGCGAG -TCGACT \ No newline at end of file diff --git a/cypress/fixtures/prod_gff.txt b/cypress/fixtures/prod_gff.txt index e33dedd..7f9be84 100644 --- a/cypress/fixtures/prod_gff.txt +++ b/cypress/fixtures/prod_gff.txt @@ -1,7 +1,2 @@ ##gff-version 3 -##sequence-region Homoserine_dh-consensus 1 519 -Homoserine_dh-consensus deciphon:0.1.0 CDS 1 519 285.981201171875 . 0 Epsilon=0.01;ID=1;Profile_acc=PF00742.20;Target_alph=dna -##sequence-region AA_kinase-consensus 1 723 -AA_kinase-consensus deciphon:0.1.0 CDS 1 723 343.647705078125 . 0 Epsilon=0.01;ID=2;Profile_acc=PF00696.29;Target_alph=dna -##sequence-region 23ISL-consensus 1 486 -23ISL-consensus deciphon:0.1.0 CDS 1 486 354.7095947265625 . 0 Epsilon=0.01;ID=3;Profile_acc=PF16620.6;Target_alph=dna \ No newline at end of file +19 deciphon CDS 1 509 0 + 0 Profile=PF00742.20;Alphabet=dna;ID=1 diff --git a/cypress/fixtures/prod_hmm.txt b/cypress/fixtures/prod_hmm.txt new file mode 100644 index 0000000..0e4c037 --- /dev/null +++ b/cypress/fixtures/prod_hmm.txt @@ -0,0 +1,11 @@ +>19 +SBM3M4M5M6M7M8M9M10M11M12M13M14M15M16M17M18M19M20M21M22M23M2 +4M25M26M27M28M29M30M31M32M33M34M35M36M37M38M39M40M41M42M43M4 +4M45M46M47M48M49M50M51M52M53M54M55M56M57M58M59M60M61M62M63M6 +4M65M66M67M68M69M70M71M72M73M74M75M76M77M78M79M80M81M82M83M8 +4M85M86M87M88M89M90M91M92M93M94M95M96M97M98M99M100M101M102M1 +03M104M105M106M107M108M109M110M111M112M113M114M115M116M117M1 +18M119M120M121M122M123M124M125M126M127M128M129M130M131M132M1 +33M134M135M136M137M138M139M140M141M142M143M144M145M146M147M1 +48M149M150M151I151I151M152M153M154M155M156M157M158M159M160M1 +61M162M163M164M165M166M167M168M169M170ET diff --git a/cypress/fixtures/prod_path.txt b/cypress/fixtures/prod_path.txt deleted file mode 100644 index d784ffb..0000000 --- a/cypress/fixtures/prod_path.txt +++ /dev/null @@ -1,14 +0,0 @@ ->1 Homoserine_dh-consensus -MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM ->2 AA_kinase-consensus -MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -M ->3 23ISL-consensus -MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM -MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM \ No newline at end of file diff --git a/cypress/fixtures/prod_queries.txt b/cypress/fixtures/prod_queries.txt new file mode 100644 index 0000000..adb9656 --- /dev/null +++ b/cypress/fixtures/prod_queries.txt @@ -0,0 +1,10 @@ +>19 +ATTTCGACGCTCAAGGAGTCGCTGATAGGTGACCGTATTACTCGAATCGAAGGGATATTA +AACGGCCCTGAATTACATTCTCACTGAGATGGAGGAAGAGGGGGCTTCATTCTCTGAGGC +GCTGAAGGAGGCACAGCAATTGGGCTACGCGGAAGCGGATCCTACGGACGATGTGGAAGG +GCTAGATGCTGCTAGAAAGCTGGCAATTCTAGCCAGATTGGCATTTGGGTTAGAGGTCGA +GTTGGAGGACGTAGAGGTGGAAGCAATTGAAAAGCTGACTGCCGAAGATATTGAAAAAAT +AAAGGAAGAGGGTAAAGTTTTAAAACTAGTGGCAAGCGCCGTCGAAGCCAGGGTCAAGCC +TGAGCTGGTACCTAAGTCACATCCATTAGCCTCGGTAAAAGGCTCTGACAACGCCGTGGC +TGTAGAAACGGAACGACATTCTGGTAGGCGAACTCGTAGTGCAGGGACCAGGGGCTGGCG +AAGAGCCAACCGCATCCGCTGTACTCGCT diff --git a/cypress/fixtures/scan_done.json b/cypress/fixtures/scan_done.json index f2b9919..aa94500 100644 --- a/cypress/fixtures/scan_done.json +++ b/cypress/fixtures/scan_done.json @@ -1 +1 @@ -{"id":9,"db_id":1,"multi_hits":true,"hmmer3_compat":false,"job_id":99} \ No newline at end of file +[{"id":9,"db_id":1,"multi_hits":true,"hmmer3_compat":false,"job_id":99}] \ No newline at end of file diff --git a/cypress/fixtures/scan_failed.json b/cypress/fixtures/scan_failed.json index 52edce8..34f0d92 100644 --- a/cypress/fixtures/scan_failed.json +++ b/cypress/fixtures/scan_failed.json @@ -1 +1 @@ -{"id":13,"db_id":1,"multi_hits":true,"hmmer3_compat":false,"job_id":103} \ No newline at end of file +[{"id":13,"db_id":1,"multi_hits":true,"hmmer3_compat":false,"job_id":103}] \ No newline at end of file diff --git a/cypress/fixtures/scan_new.json b/cypress/fixtures/scan_new.json index 8435588..1e9cad5 100644 --- a/cypress/fixtures/scan_new.json +++ b/cypress/fixtures/scan_new.json @@ -1,11 +1,13 @@ { "id": 100, - "db_id": 0, "multi_hits": false, "hmmer3_compat": false, - "state": "done", - "error": "", - "submission": 0, - "exec_started": 0, - "exec_ended": 0 + "job": { + "state": "done", + "error": "", + "submission": 0, + "exec_started": 0, + "exec_ended": 0, + "id": 100 + } } \ No newline at end of file diff --git a/cypress/fixtures/scan_pending.json b/cypress/fixtures/scan_pending.json index a4179a2..3980891 100644 --- a/cypress/fixtures/scan_pending.json +++ b/cypress/fixtures/scan_pending.json @@ -1 +1 @@ -{"id":10,"db_id":1,"multi_hits":true,"hmmer3_compat":false,"job_id":100} \ No newline at end of file +[{"id":10,"db_id":1,"multi_hits":true,"hmmer3_compat":false,"job_id":100}] \ No newline at end of file diff --git a/cypress/fixtures/scan_running.json b/cypress/fixtures/scan_running.json index cd476a0..62a7803 100644 --- a/cypress/fixtures/scan_running.json +++ b/cypress/fixtures/scan_running.json @@ -1 +1 @@ -{"id":11,"db_id":1,"multi_hits":true,"hmmer3_compat":false,"job_id":101} \ No newline at end of file +[{"id":11,"db_id":1,"multi_hits":true,"hmmer3_compat":false,"job_id":101}] \ No newline at end of file diff --git a/cypress/integration/deciphon.test.js b/cypress/integration/deciphon.test.js index 8a5bee5..a1571a1 100755 --- a/cypress/integration/deciphon.test.js +++ b/cypress/integration/deciphon.test.js @@ -1,44 +1,42 @@ describe("Deciphon website tests", () => { beforeEach(() => { - cy.intercept("GET", "**/dbs", { fixture: "dbs.json" }); - - cy.intercept("GET", "**/jobs/99", { fixture: "job_done.json" }); - cy.intercept("GET", "**/jobs/100", { fixture: "job_pending.json" }); - cy.intercept("GET", "**/jobs/101", { fixture: "job_running.json" }); - cy.intercept("GET", "**/jobs/103", { fixture: "job_failed.json" }); - - cy.intercept("GET", "**/scans/9", { fixture: "scan_done.json" }); - cy.intercept("GET", "**/scans/10", { fixture: "scan_pending.json" }); - cy.intercept("GET", "**/scans/11", { fixture: "scan_running.json" }); - cy.intercept("GET", "**/scans/13", { fixture: "scan_failed.json" }); - - cy.intercept("GET", "**/jobs/99/scan", { fixture: "scan_done.json" }); - cy.intercept("GET", "**/jobs/100/scan", { fixture: "scan_pending.json" }); - cy.intercept("GET", "**/jobs/101/scan", { fixture: "scan_running.json" }); - cy.intercept("GET", "**/jobs/103/scan", { fixture: "scan_failed.json" }); - - cy.intercept("GET", "**/scans/*/prods/gff", { fixture: "prod_gff.txt" }).as( - "gff" - ); - cy.intercept("GET", "**/scans/*/prods/fragment", { - fixture: "prod_frag.txt", - }).as("frag"); - cy.intercept("GET", "**/scans/*/prods/amino", { + cy.intercept("GET", "http://api/dbs", { fixture: "dbs.json" }); + + cy.intercept("GET", "http://api/jobs/99", { fixture: "job_done.json" }); + cy.intercept("GET", "http://api/jobs/100", { fixture: "job_pending.json" }); + cy.intercept("GET", "http://api/jobs/101", { fixture: "job_running.json" }); + cy.intercept("GET", "http://api/jobs/103", { fixture: "job_failed.json" }); + + cy.intercept("GET", "http://api/scans?job_id=99", { fixture: "scan_done.json" }); + cy.intercept("GET", "http://api/scans?job_id=100", { fixture: "scan_pending.json" }); + cy.intercept("GET", "http://api/scans?job_id=101", { fixture: "scan_running.json" }); + cy.intercept("GET", "http://api/scans?job_id=103", { fixture: "scan_failed.json" }); + + cy.intercept("GET", "http://api/scans/*/snap.dcs/view", { + fixture: "prod_alignments.txt", + }).as("alignments"); + cy.intercept("GET", "http://api/scans/*/snap.dcs/gff", { + fixture: "prod_gff.txt" } + ).as("gff"); + cy.intercept("GET", "http://api/scans/*/snap.dcs/queries", { + fixture: "prod_queries.txt" } + ).as("queries"); + cy.intercept("GET", "http://api/scans/*/snap.dcs/aminos", { fixture: "prod_amino.txt", - }).as("amino"); - cy.intercept("GET", "**/scans/*/prods/codon", { + }).as("aminos"); + cy.intercept("GET", "http://api/scans/*/snap.dcs/codons", { fixture: "prod_codon.txt", - }).as("codon"); - cy.intercept("GET", "**/scans/*/prods/path", { - fixture: "prod_path.txt", - }).as("path"); - cy.intercept("GET", "**/scans/*/prods", { + }).as("codons"); + cy.intercept("GET", "http://api/scans/*/snap.dcs/states", { + fixture: "prod_hmm.txt", + }).as("states"); + cy.intercept("GET", "http://api/scans/*/snap.dcs/prods", { fixture: "prod_all.json", }); - cy.intercept("GET", "**/jobs/next_pend", { fixture: "job_next_pend.json" }); + cy.intercept("GET", "http://api/jobs", { fixture: "jobs_list.json" }); - cy.intercept("POST", "**/scans", { + cy.intercept("POST", "http://api/scans", { fixture: "scan_new.json", }); @@ -84,7 +82,7 @@ describe("Deciphon website tests", () => { it("loads example query", () => { cy.visit("http://localhost:3000"); cy.contains("Load an example query").click(); - cy.get(".ql-editor").should("contain.text", "Homoserine_dh-consensus"); + cy.get(".ql-editor").should("contain.text", "example"); cy.contains("Check and autofix queries").click(); @@ -122,28 +120,28 @@ describe("Deciphon website tests", () => { it("shows jobs for successful query", () => { cy.visit("http://localhost:3000/jobs/99"); cy.contains("Job complete").should("be.visible"); - cy.contains("3").should("be.visible"); + cy.contains("3 matches found").should("be.visible"); cy.contains("Finished at:").should("be.visible"); - cy.contains("1970").should("be.visible"); - cy.contains("Downloads").should("be.visible"); + cy.contains("08/12/2023").should("be.visible"); + cy.contains("Results files from your search").should("be.visible"); const titleToProds = { - "Download GFF": { clip: "##gff-version", alias: "gff" }, - "Download Fragment": { - clip: "CCTATCATTTCGACGCTCAAGGAGTCGCTGAC", - alias: "frag", + "GFF": { clip: "##gff-version", alias: "gff" }, + "Original Query": { + clip: "ATTTCGACGCTCAAGGAGTCGCTGA", + alias: "queries", }, - "Download Amino acids": { - clip: "PIISTLKESLTGDRITRIEGILNGTLNYILTEMEEEGASFSEALKEAQELGYAEADPTDD", + "Protein sequence matches": { + clip: "ISTLKESLIGDRITRIEGILNGTMNYILTEMEEEGASFSEALKEAQQLGYAEADPTDDVE", alias: "amino", }, - "Download Codons": { - clip: "CCTATCATTTCGACGCTCAAGGAGTCGCTGAC", + "DNA of protein sequences": { + clip: "ATTTCGACGCTCAAGGAGTCGCTGATAGGTGACCGTATTACTCGAATCGAAGGGATATTA", alias: "codon", }, - "Download HMM Path": { - clip: "MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM", - alias: "path", + "HMM Path": { + clip: "SBM3M4M5M6M7M8M9M10M11M12M13M14M15M16M17M18M19M20M21M22M23M2", + alias: "states", }, }; @@ -173,7 +171,7 @@ describe("Deciphon website tests", () => { cy.contains("Submit query").click(); cy.visit("http://localhost:3000"); cy.contains("Previously submitted jobs"); - cy.contains("Homoserine_dh-consensus"); + cy.contains("example"); cy.get("a[href*='jobs']").should("contain.text", "Job"); cy.contains("Clear history").click(); cy.contains("Previously submitted jobs").should("not.exist"); diff --git a/package-lock.json b/package-lock.json index 1016be3..94ab742 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "@testing-library/user-event": "^13.5.0", "axios": "^0.25.0", "istanbul-lib-coverage": "^3.2.0", + "lodash": "^4.17.21", "nyc": "^15.1.0", "react": "^17.0.2", "react-dom": "^17.0.2", diff --git a/package.json b/package.json index 1ec483f..6c66041 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "@testing-library/user-event": "^13.5.0", "axios": "^0.25.0", "istanbul-lib-coverage": "^3.2.0", + "lodash": "^4.17.21", "nyc": "^15.1.0", "react": "^17.0.2", "react-dom": "^17.0.2", diff --git a/public/index.html b/public/index.html index 78fb997..322c804 100644 --- a/public/index.html +++ b/public/index.html @@ -44,7 +44,7 @@
EMBL-EBI | Deciphon
alpha
From nanopore reads to protein annotations
+From long reads to protein annotations
Query DNA or RNA sequences against large protein family databases.
@@ -53,7 +53,43 @@