From 579a1ccd3b70f6223476d3a703315b3cc17cdf4b Mon Sep 17 00:00:00 2001 From: Carlo Kroll Date: Fri, 3 Jun 2022 12:10:56 +0100 Subject: [PATCH 01/38] Reformatted download of HSP alignments --- public/js/alignment_exporter.js | 9 +- public/js/hit.js | 1 + public/js/sidebar.js | 2 + .../job.yaml | 94 +++++ .../query.fa | 6 + .../stderr | 0 .../stdout | 148 ++++++++ .../job.yaml | 78 ++++ .../query.fa | 6 + .../stderr | 0 .../stdout | 359 ++++++++++++++++++ .../job.yaml | 40 ++ .../query.fa | 6 + .../stderr | 0 .../stdout | 144 +++++++ .../job.yaml | 78 ++++ .../query.fa | 6 + .../stderr | 0 .../stdout | 359 ++++++++++++++++++ .../job.yaml | 42 ++ .../query.fa | 6 + .../stderr | 0 .../stdout | 284 ++++++++++++++ .../job.yaml | 42 ++ .../query.fa | 6 + .../stderr | 0 .../stdout | 284 ++++++++++++++ .../job.yaml | 94 +++++ .../query.fa | 6 + .../stderr | 0 .../stdout | 148 ++++++++ .../job.yaml | 40 ++ .../query.fa | 6 + .../stderr | 0 .../stdout | 144 +++++++ spec/sequences/Query_1_SI2_2_0_06267.txt | 7 +- spec/sequences/alignment-2_hits.txt | 14 +- 37 files changed, 2446 insertions(+), 13 deletions(-) create mode 100644 spec/dotdir/0edebfc5-022a-4606-9f0e-d732c18f8fc4/job.yaml create mode 100644 spec/dotdir/0edebfc5-022a-4606-9f0e-d732c18f8fc4/query.fa create mode 100644 spec/dotdir/0edebfc5-022a-4606-9f0e-d732c18f8fc4/stderr create mode 100644 spec/dotdir/0edebfc5-022a-4606-9f0e-d732c18f8fc4/stdout create mode 100644 spec/dotdir/285929c2-d8cb-40bc-b9f3-b2f39a3a734b/job.yaml create mode 100644 spec/dotdir/285929c2-d8cb-40bc-b9f3-b2f39a3a734b/query.fa create mode 100644 spec/dotdir/285929c2-d8cb-40bc-b9f3-b2f39a3a734b/stderr create mode 100644 spec/dotdir/285929c2-d8cb-40bc-b9f3-b2f39a3a734b/stdout create mode 100644 spec/dotdir/63fbc4fa-e907-4e36-8084-1bdecb83d111/job.yaml create mode 100644 spec/dotdir/63fbc4fa-e907-4e36-8084-1bdecb83d111/query.fa create mode 100644 spec/dotdir/63fbc4fa-e907-4e36-8084-1bdecb83d111/stderr create mode 100644 spec/dotdir/63fbc4fa-e907-4e36-8084-1bdecb83d111/stdout create mode 100644 spec/dotdir/82299932-3c06-4fe3-a9c2-48f881ec7c31/job.yaml create mode 100644 spec/dotdir/82299932-3c06-4fe3-a9c2-48f881ec7c31/query.fa create mode 100644 spec/dotdir/82299932-3c06-4fe3-a9c2-48f881ec7c31/stderr create mode 100644 spec/dotdir/82299932-3c06-4fe3-a9c2-48f881ec7c31/stdout create mode 100644 spec/dotdir/aedbd8ce-def2-425a-9ac2-d860b885d85a/job.yaml create mode 100644 spec/dotdir/aedbd8ce-def2-425a-9ac2-d860b885d85a/query.fa create mode 100644 spec/dotdir/aedbd8ce-def2-425a-9ac2-d860b885d85a/stderr create mode 100644 spec/dotdir/aedbd8ce-def2-425a-9ac2-d860b885d85a/stdout create mode 100644 spec/dotdir/ca6267c5-bd73-4a99-b2a4-4ea44568b25e/job.yaml create mode 100644 spec/dotdir/ca6267c5-bd73-4a99-b2a4-4ea44568b25e/query.fa create mode 100644 spec/dotdir/ca6267c5-bd73-4a99-b2a4-4ea44568b25e/stderr create mode 100644 spec/dotdir/ca6267c5-bd73-4a99-b2a4-4ea44568b25e/stdout create mode 100644 spec/dotdir/e5d0fb5e-6496-416a-8a51-07bacd1c9b4c/job.yaml create mode 100644 spec/dotdir/e5d0fb5e-6496-416a-8a51-07bacd1c9b4c/query.fa create mode 100644 spec/dotdir/e5d0fb5e-6496-416a-8a51-07bacd1c9b4c/stderr create mode 100644 spec/dotdir/e5d0fb5e-6496-416a-8a51-07bacd1c9b4c/stdout create mode 100644 spec/dotdir/e9f40618-7502-4101-aa75-aec8c358bc71/job.yaml create mode 100644 spec/dotdir/e9f40618-7502-4101-aa75-aec8c358bc71/query.fa create mode 100644 spec/dotdir/e9f40618-7502-4101-aa75-aec8c358bc71/stderr create mode 100644 spec/dotdir/e9f40618-7502-4101-aa75-aec8c358bc71/stdout diff --git a/public/js/alignment_exporter.js b/public/js/alignment_exporter.js index 7bdd2dbbe..7c1926b14 100644 --- a/public/js/alignment_exporter.js +++ b/public/js/alignment_exporter.js @@ -23,12 +23,13 @@ export default class AlignmentExporter { var fasta = ''; _.each(hsps, _.bind(function (hsp) { - fasta += '>'+hsp.query_id+':'+hsp.qstart+'-'+hsp.qend+'\n'; + fasta += '>'+hsp.query_id+':'+hsp.qstart+'-'+hsp.qend+'_hit_'+hsp.hit_number+'_hsp_'+toLetters(hsp.number)+'\n'; fasta += hsp.qseq+'\n'; - fasta += '>'+hsp.query_id+':'+hsp.qstart+'-'+hsp.qend+'_alignment_'+hsp.hit_id+':'+hsp.sstart+'-'+hsp.send+'\n'; + fasta += '>'+hsp.query_id+':'+hsp.qstart+'-'+hsp.qend+'_hit_'+hsp.hit_number+'_hsp_'+toLetters(hsp.number)+ + '_alignment_'+hsp.hit_id+':'+hsp.sstart+'-'+hsp.send+'\n'; fasta += hsp.midline+'\n'; - fasta += '>'+hsp.hit_id+':'+hsp.sstart+'-'+hsp.send+'\n'; - fasta += hsp.sseq+'\n'; + fasta += '>'+hsp.hit_id+':'+hsp.sstart+'-'+hsp.send+'_hit_'+hsp.hit_number+'_hsp_'+toLetters(hsp.number)+'\n'; + fasta += hsp.sseq+'\n\n'; }, this)); return fasta; } diff --git a/public/js/hit.js b/public/js/hit.js index bf2e42a4e..a9a8863ab 100644 --- a/public/js/hit.js +++ b/public/js/hit.js @@ -89,6 +89,7 @@ export default class extends Component { var hsps = _.map(this.props.hit.hsps, _.bind(function (hsp) { hsp.query_id = this.props.query.id; hsp.hit_id = this.props.hit.id; + hsp.hit_number = this.props.hit.number; return hsp; }, this)); diff --git a/public/js/sidebar.js b/public/js/sidebar.js index 066a89d05..17eec293e 100644 --- a/public/js/sidebar.js +++ b/public/js/sidebar.js @@ -66,6 +66,7 @@ export default class extends Component { hit.hsps.forEach((hsp) => { hsp.query_id = query.id; hsp.hit_id = hit.id; + hsp.hit_number = hit.number; hsps_arr.push(hsp); }); } @@ -91,6 +92,7 @@ export default class extends Component { _.each(hit.hsps, function (hsp) { hsp.hit_id = hit.id; hsp.query_id = query.id; + hsp.hit_number = hit.number; hsps_arr.push(hsp); }); } diff --git a/spec/dotdir/0edebfc5-022a-4606-9f0e-d732c18f8fc4/job.yaml b/spec/dotdir/0edebfc5-022a-4606-9f0e-d732c18f8fc4/job.yaml new file mode 100644 index 000000000..6b3dd14f3 --- /dev/null +++ b/spec/dotdir/0edebfc5-022a-4606-9f0e-d732c18f8fc4/job.yaml @@ -0,0 +1,94 @@ +--- !ruby/object:SequenceServer::BLAST::Job +id: 0edebfc5-022a-4606-9f0e-d732c18f8fc4 +submitted_at: 2022-06-03 12:08:30.681169000 +01:00 +databases: +- !ruby/struct:SequenceServer::Database + name: "/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/funky_ids/funky_ids.fa" + title: funky ids (v5) + type: nucleotide + nsequences: '8' + ncharacters: '312' + updated_on: Aug 13, 2020 11:23 AM + format: '5' + categories: + - v5 + - funky_ids + id: d3a2b237ee195f745a4d1ce68cb25c3b + extensions: + - ndb + - nhd + - nhi + - nhr + - nin + - nog + - nos + - not + - nsq + - ntf + - nto +- !ruby/struct:SequenceServer::Database + name: "/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/sample/genome/Solenopsis_invicta/Solenopsis_invicta_gnG_subset.fasta" + title: Solenopsis invicta gnG subset + type: nucleotide + nsequences: '8' + ncharacters: '39185542' + updated_on: Jun 17, 2020 4:51 PM + format: '5' + categories: + - v5 + - sample + - genome + - Solenopsis_invicta + id: 38b84655b16b2b43fc21ff9a414d59c6 + extensions: + - ndb + - nhd + - nhi + - nhr + - nin + - nog + - nos + - not + - nsq + - ntf + - nto +- !ruby/struct:SequenceServer::Database + name: "/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/sample/transcripts/Solenopsis_invicta/Sinvicta2-2-3.cdna.subset.fasta" + title: Sinvicta 2-2-3 cdna subset + type: nucleotide + nsequences: '473' + ncharacters: '287752' + updated_on: Jun 17, 2020 4:52 PM + format: '5' + categories: + - v5 + - sample + - transcripts + - Solenopsis_invicta + id: 3c900b509011e8919ff05e20dd703714 + extensions: + - ndb + - nhd + - nhi + - nhr + - nin + - nog + - nos + - not + - nsq + - ntf + - nto +completed_at: 2022-06-03 12:08:31.760135000 +01:00 +exitstatus: 0 +method: blastn +qfile: "/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/dotdir/0edebfc5-022a-4606-9f0e-d732c18f8fc4/query.fa" +advanced: '' +options: " -outfmt '11 qcovs qcovhsp' -num_threads 1" +num_threads: 1 +query_length: 60 +databases_ncharacters_total: 39473606 +command: blastn -db '/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/funky_ids/funky_ids.fa + /Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/sample/genome/Solenopsis_invicta/Solenopsis_invicta_gnG_subset.fasta + /Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/sample/transcripts/Solenopsis_invicta/Sinvicta2-2-3.cdna.subset.fasta' + -query '/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/dotdir/0edebfc5-022a-4606-9f0e-d732c18f8fc4/query.fa' -outfmt + '11 qcovs qcovhsp' -num_threads 1 diff --git a/spec/dotdir/0edebfc5-022a-4606-9f0e-d732c18f8fc4/query.fa b/spec/dotdir/0edebfc5-022a-4606-9f0e-d732c18f8fc4/query.fa new file mode 100644 index 000000000..b12d574e0 --- /dev/null +++ b/spec/dotdir/0edebfc5-022a-4606-9f0e-d732c18f8fc4/query.fa @@ -0,0 +1,6 @@ +> SI2.2.0_11917 Si_gnF.scaffold05747[1091012..1091951].pep_1 + AATT CCGG TCTCTCTCTC AC AC AC AC AC GACGT AGTC G +>gnl|dmel|ID + G A G A C G C G G C +>abcdef##$%^&*(funky_header)! + AATCT CTC TTAT diff --git a/spec/dotdir/0edebfc5-022a-4606-9f0e-d732c18f8fc4/stderr b/spec/dotdir/0edebfc5-022a-4606-9f0e-d732c18f8fc4/stderr new file mode 100644 index 000000000..e69de29bb diff --git a/spec/dotdir/0edebfc5-022a-4606-9f0e-d732c18f8fc4/stdout b/spec/dotdir/0edebfc5-022a-4606-9f0e-d732c18f8fc4/stdout new file mode 100644 index 000000000..208baf2ea --- /dev/null +++ b/spec/dotdir/0edebfc5-022a-4606-9f0e-d732c18f8fc4/stdout @@ -0,0 +1,148 @@ +Blast4-archive ::= { + request { + ident "2.12.0+", + body queue-search { + program "blastn", + service "megablast", + queries bioseq-set { + seq-set { + seq { + id { + local str "Query_1" + }, + descr { + user { + type str "CFastaReader", + data { + { + label str "DefLine", + data str "> SI2.2.0_11917 + Si_gnF.scaffold05747[1091012..1091951].pep_1" + } + } + }, + title "SI2.2.0_11917 Si_gnF.scaffold05747[1091012..1091951].pep_1" + }, + inst { + repr raw, + mol na, + length 38, + seq-data ncbi2na '0F5ADDDDD1111186CB60'H + } + }, + seq { + id { + local str "Query_2" + }, + descr { + user { + type str "CFastaReader", + data { + { + label str "DefLine", + data str ">gnl|dmel|ID " + } + } + }, + title "gnl|dmel|ID" + }, + inst { + repr raw, + mol na, + length 10, + seq-data ncbi2na '886690'H + } + }, + seq { + id { + local str "Query_3" + }, + descr { + user { + type str "CFastaReader", + data { + { + label str "DefLine", + data str ">abcdef##$%^&*(funky_header)! " + } + } + }, + title "abcdef##$%^&*(funky_header)!" + }, + inst { + repr raw, + mol na, + length 12, + seq-data ncbi2na '0DDDF3'H + } + } + } + }, + subject database "/Users/carlo/Documents/branches/hsp-alignment-reformat +/sequenceserver/spec/database/v5/funky_ids/funky_ids.fa + /Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/da +tabase/v5/sample/genome/Solenopsis_invicta/Solenopsis_invicta_gnG_subset.fasta + /Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/da +tabase/v5/sample/transcripts/Solenopsis_invicta/Sinvicta2-2-3.cdna.subset.fasta", + algorithm-options { + { + name "EvalueThreshold", + value cutoff e-value { 1, 10, 1 } + }, + { + name "MaskAtHash", + value boolean TRUE + }, + { + name "DustFilteringLevel", + value integer 20 + }, + { + name "DustFilteringWindow", + value integer 64 + }, + { + name "DustFilteringLinker", + value integer 1 + }, + { + name "UngappedMode", + value boolean FALSE + }, + { + name "HitlistSize", + value integer 500 + }, + { + name "EffectiveSearchSpace", + value big-integer 710348868 + } + } + } + }, + results { + alignments { + }, + masks { + }, + ka-blocks { + { + lambda { 133270576282382, 10, -14 }, + k { 620991117264206, 10, -15 }, + h { 112409184650114, 10, -14 }, + gapped FALSE + }, + { + lambda { 128, 10, -2 }, + k { 46, 10, -2 }, + h { 85, 10, -2 }, + gapped TRUE + } + }, + search-stats { + "Effective search space: 710348868", + "Effective search space used: 710348868", + "Length adjustment: 20" + } + } +} diff --git a/spec/dotdir/285929c2-d8cb-40bc-b9f3-b2f39a3a734b/job.yaml b/spec/dotdir/285929c2-d8cb-40bc-b9f3-b2f39a3a734b/job.yaml new file mode 100644 index 000000000..223c150b5 --- /dev/null +++ b/spec/dotdir/285929c2-d8cb-40bc-b9f3-b2f39a3a734b/job.yaml @@ -0,0 +1,78 @@ +--- !ruby/object:SequenceServer::BLAST::Job +id: 285929c2-d8cb-40bc-b9f3-b2f39a3a734b +submitted_at: 2022-06-03 12:08:19.984573000 +01:00 +databases: +- !ruby/struct:SequenceServer::Database + name: "/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/sample/proteins/Solenopsis_invicta/Sinvicta2-2-3.prot.subset.fasta" + title: Sinvicta 2-2-3 prot subset + type: protein + nsequences: '1189' + ncharacters: '280047' + updated_on: Jun 17, 2020 4:52 PM + format: '5' + categories: + - v5 + - sample + - proteins + - Solenopsis_invicta + id: 7146d58da61021c4a598ad71f4ff5650 + extensions: + - pdb + - phd + - phi + - phr + - pin + - pog + - pos + - pot + - psq + - ptf + - pto +- !ruby/struct:SequenceServer::Database + name: "/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/using_blastdb_aliastool/2020-11-Swiss-Prot_insecta_subset_taxid_102803" + title: 2020-11-Swiss-Prot insecta (subset taxid 102803) + type: protein + nsequences: '1' + ncharacters: '253' + updated_on: Nov 25, 2020 12:45 PM + format: '5' + categories: + - v5 + - using_blastdb_aliastool + id: 96d1b910faa05a72929dc4c556b14691 + extensions: + - pal +- !ruby/struct:SequenceServer::Database + name: "/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/without_parse_seqids/without_parse_seqids.fa" + title: without_parse_seqids.fa + type: protein + nsequences: '2' + ncharacters: '385' + updated_on: Jun 2, 2021 10:37 AM + format: '5' + categories: + - v5 + - without_parse_seqids + id: ad9bef379305b6ea7f5ae5fef87ba1e9 + extensions: + - pdb + - phr + - pin + - pot + - psq + - ptf + - pto +completed_at: 2022-06-03 12:08:21.230115000 +01:00 +exitstatus: 0 +method: blastp +qfile: "/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/dotdir/285929c2-d8cb-40bc-b9f3-b2f39a3a734b/query.fa" +advanced: '' +options: " -outfmt '11 qcovs qcovhsp' -num_threads 1" +num_threads: 1 +query_length: 64 +databases_ncharacters_total: 280685 +command: blastp -db '/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/sample/proteins/Solenopsis_invicta/Sinvicta2-2-3.prot.subset.fasta + /Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/using_blastdb_aliastool/2020-11-Swiss-Prot_insecta_subset_taxid_102803 + /Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/without_parse_seqids/without_parse_seqids.fa' + -query '/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/dotdir/285929c2-d8cb-40bc-b9f3-b2f39a3a734b/query.fa' -outfmt + '11 qcovs qcovhsp' -num_threads 1 diff --git a/spec/dotdir/285929c2-d8cb-40bc-b9f3-b2f39a3a734b/query.fa b/spec/dotdir/285929c2-d8cb-40bc-b9f3-b2f39a3a734b/query.fa new file mode 100644 index 000000000..9bbf19ad1 --- /dev/null +++ b/spec/dotdir/285929c2-d8cb-40bc-b9f3-b2f39a3a734b/query.fa @@ -0,0 +1,6 @@ +>SI2.2.0_1322 locus=Si_gnF.scaffold06207[1925625..1928536].pep_1 quality=100.00 + MSANR LNVLVTLMLAV LSNALQI IC +>SI2.2.0_1426 locus=Si_gnF.scaffold07837[1480027..1480908].pep_1quality=100.00 merge_with=SI2.2.0_80956 + MM KK XX LL PP O R TY +>SI2.2.0_14266 locus=Si_gnF.scaff07837[,funky:,><*()!@#$%&]tag=gw_corrected + YUOP POKJ M NAHAA JJHFGF YERTQ \ No newline at end of file diff --git a/spec/dotdir/285929c2-d8cb-40bc-b9f3-b2f39a3a734b/stderr b/spec/dotdir/285929c2-d8cb-40bc-b9f3-b2f39a3a734b/stderr new file mode 100644 index 000000000..e69de29bb diff --git a/spec/dotdir/285929c2-d8cb-40bc-b9f3-b2f39a3a734b/stdout b/spec/dotdir/285929c2-d8cb-40bc-b9f3-b2f39a3a734b/stdout new file mode 100644 index 000000000..2a3b63034 --- /dev/null +++ b/spec/dotdir/285929c2-d8cb-40bc-b9f3-b2f39a3a734b/stdout @@ -0,0 +1,359 @@ +Blast4-archive ::= { + request { + ident "2.12.0+", + body queue-search { + program "blastp", + service "plain", + queries bioseq-set { + seq-set { + seq { + id { + local str "Query_1" + }, + descr { + user { + type str "CFastaReader", + data { + { + label str "DefLine", + data str ">SI2.2.0_1322 + locus=Si_gnF.scaffold06207[1925625..1928536].pep_1 quality=100.00 " + } + } + }, + title "SI2.2.0_1322 + locus=Si_gnF.scaffold06207[1925625..1928536].pep_1 quality=100.00" + }, + inst { + repr raw, + mol aa, + length 25, + seq-data ncbieaa "MSANRLNVLVTLMLAVLSNALQIIC" + } + }, + seq { + id { + local str "Query_2" + }, + descr { + user { + type str "CFastaReader", + data { + { + label str "DefLine", + data str ">SI2.2.0_1426 + locus=Si_gnF.scaffold07837[1480027..1480908].pep_1quality=100.00 + merge_with=SI2.2.0_80956" + } + } + }, + title "SI2.2.0_1426 + locus=Si_gnF.scaffold07837[1480027..1480908].pep_1quality=100.00 + merge_with=SI2.2.0_80956" + }, + inst { + repr raw, + mol aa, + length 14, + seq-data ncbieaa "MMKKXXLLPPORTY" + } + }, + seq { + id { + local str "Query_3" + }, + descr { + user { + type str "CFastaReader", + data { + { + label str "DefLine", + data str ">SI2.2.0_14266 + locus=Si_gnF.scaff07837[,funky:,><*()!@#$%&]tag=gw_corrected" + } + } + }, + title "SI2.2.0_14266 + locus=Si_gnF.scaff07837[,funky:,><*()!@#$%&]tag=gw_corrected" + }, + inst { + repr raw, + mol aa, + length 25, + seq-data ncbieaa "YUOPPOKJMNAHAAJJHFGFYERTQ" + } + } + } + }, + subject database "/Users/carlo/Documents/branches/hsp-alignment-reformat +/sequenceserver/spec/database/v5/sample/proteins/Solenopsis_invicta/Sinvicta2- +2-3.prot.subset.fasta + /Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/da +tabase/v5/using_blastdb_aliastool/2020-11-Swiss-Prot_insecta_subset_taxid_1028 +03 + /Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/da +tabase/v5/without_parse_seqids/without_parse_seqids.fa", + algorithm-options { + { + name "EvalueThreshold", + value cutoff e-value { 1, 10, 1 } + }, + { + name "MaskAtHash", + value boolean FALSE + }, + { + name "SegFiltering", + value boolean FALSE + }, + { + name "WordThreshold", + value integer 11 + }, + { + name "WindowSize", + value integer 40 + }, + { + name "HitlistSize", + value integer 500 + }, + { + name "UngappedMode", + value boolean FALSE + }, + { + name "CompositionBasedStats", + value integer 2 + }, + { + name "SmithWatermanMode", + value boolean FALSE + }, + { + name "EffectiveSearchSpace", + value big-integer 7017125 + } + } + } + }, + results { + alignments { + { + type partial, + dim 2, + score { + { + id str "score", + value int 78 + }, + { + id str "blast_score", + value int 78 + }, + { + id str "e_value", + value real { 49551943523158, 10, -19 } + }, + { + id str "bit_score", + value real { 346537992015976, 10, -13 } + }, + { + id str "num_ident", + value int 25 + }, + { + id str "comp_adjustment_method", + value int 1 + }, + { + id str "num_positives", + value int 25 + }, + { + id str "hsp_percent_coverage", + value real { 1, 10, 2 } + } + }, + segs denseg { + dim 2, + numseg 3, + ids { + local str "Query_1", + general { + db "BL_ORD_ID", + tag id 10573 + } + }, + starts { + 0, + 0, + -1, + 16, + 16, + 51 + }, + lens { + 16, + 35, + 9 + }, + strands { + unknown, + unknown, + unknown, + unknown, + unknown, + unknown + } + } + }, + { + type partial, + dim 2, + score { + { + id str "score", + value int 78 + }, + { + id str "blast_score", + value int 78 + }, + { + id str "e_value", + value real { 49551943523158, 10, -19 } + }, + { + id str "bit_score", + value real { 346537992015976, 10, -13 } + }, + { + id str "num_ident", + value int 25 + }, + { + id str "comp_adjustment_method", + value int 1 + }, + { + id str "num_positives", + value int 25 + }, + { + id str "hsp_percent_coverage", + value real { 1, 10, 2 } + } + }, + segs denseg { + dim 2, + numseg 3, + ids { + local str "Query_1", + local str "SI2.2.0_13722" + }, + starts { + 0, + 0, + -1, + 16, + 16, + 51 + }, + lens { + 16, + 35, + 9 + }, + strands { + unknown, + unknown, + unknown, + unknown, + unknown, + unknown + } + } + }, + { + type partial, + dim 2, + score { + { + id str "score", + value int 33 + }, + { + id str "blast_score", + value int 33 + }, + { + id str "e_value", + value real { 750931426973456, 10, -14 } + }, + { + id str "bit_score", + value real { 173198182853167, 10, -13 } + }, + { + id str "num_ident", + value int 6 + }, + { + id str "comp_adjustment_method", + value int 1 + }, + { + id str "num_positives", + value int 10 + }, + { + id str "hsp_percent_coverage", + value real { 645, 10, -1 } + } + }, + segs denseg { + dim 2, + numseg 1, + ids { + local str "Query_3", + local str "SI2.2.0_80018" + }, + starts { + 6, + 773 + }, + lens { + 16 + }, + strands { + unknown, + unknown + } + } + } + }, + masks { + }, + ka-blocks { + { + lambda { 33246613200827, 10, -14 }, + k { 135393825761969, 10, -15 }, + h { 353660045012724, 10, -15 }, + gapped FALSE + }, + { + lambda { 267, 10, -3 }, + k { 41, 10, -3 }, + h { 14, 10, -2 }, + gapped TRUE + } + }, + search-stats { + "Effective search space: 7017125", + "Effective search space used: 7017125", + "Length adjustment: 0" + } + } +} diff --git a/spec/dotdir/63fbc4fa-e907-4e36-8084-1bdecb83d111/job.yaml b/spec/dotdir/63fbc4fa-e907-4e36-8084-1bdecb83d111/job.yaml new file mode 100644 index 000000000..729b4695a --- /dev/null +++ b/spec/dotdir/63fbc4fa-e907-4e36-8084-1bdecb83d111/job.yaml @@ -0,0 +1,40 @@ +--- !ruby/object:SequenceServer::BLAST::Job +id: 63fbc4fa-e907-4e36-8084-1bdecb83d111 +submitted_at: 2022-06-03 12:08:27.078478000 +01:00 +databases: +- !ruby/struct:SequenceServer::Database + name: "/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/funky_ids/funky_ids.fa" + title: funky ids (v5) + type: nucleotide + nsequences: '8' + ncharacters: '312' + updated_on: Aug 13, 2020 11:23 AM + format: '5' + categories: + - v5 + - funky_ids + id: d3a2b237ee195f745a4d1ce68cb25c3b + extensions: + - ndb + - nhd + - nhi + - nhr + - nin + - nog + - nos + - not + - nsq + - ntf + - nto +completed_at: 2022-06-03 12:08:28.244411000 +01:00 +exitstatus: 0 +method: blastn +qfile: "/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/dotdir/63fbc4fa-e907-4e36-8084-1bdecb83d111/query.fa" +advanced: '' +options: " -outfmt '11 qcovs qcovhsp' -num_threads 1" +num_threads: 1 +query_length: 60 +databases_ncharacters_total: 312 +command: blastn -db '/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/funky_ids/funky_ids.fa' + -query '/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/dotdir/63fbc4fa-e907-4e36-8084-1bdecb83d111/query.fa' -outfmt + '11 qcovs qcovhsp' -num_threads 1 diff --git a/spec/dotdir/63fbc4fa-e907-4e36-8084-1bdecb83d111/query.fa b/spec/dotdir/63fbc4fa-e907-4e36-8084-1bdecb83d111/query.fa new file mode 100644 index 000000000..b12d574e0 --- /dev/null +++ b/spec/dotdir/63fbc4fa-e907-4e36-8084-1bdecb83d111/query.fa @@ -0,0 +1,6 @@ +> SI2.2.0_11917 Si_gnF.scaffold05747[1091012..1091951].pep_1 + AATT CCGG TCTCTCTCTC AC AC AC AC AC GACGT AGTC G +>gnl|dmel|ID + G A G A C G C G G C +>abcdef##$%^&*(funky_header)! + AATCT CTC TTAT diff --git a/spec/dotdir/63fbc4fa-e907-4e36-8084-1bdecb83d111/stderr b/spec/dotdir/63fbc4fa-e907-4e36-8084-1bdecb83d111/stderr new file mode 100644 index 000000000..e69de29bb diff --git a/spec/dotdir/63fbc4fa-e907-4e36-8084-1bdecb83d111/stdout b/spec/dotdir/63fbc4fa-e907-4e36-8084-1bdecb83d111/stdout new file mode 100644 index 000000000..ddd67f942 --- /dev/null +++ b/spec/dotdir/63fbc4fa-e907-4e36-8084-1bdecb83d111/stdout @@ -0,0 +1,144 @@ +Blast4-archive ::= { + request { + ident "2.12.0+", + body queue-search { + program "blastn", + service "megablast", + queries bioseq-set { + seq-set { + seq { + id { + local str "Query_1" + }, + descr { + user { + type str "CFastaReader", + data { + { + label str "DefLine", + data str "> SI2.2.0_11917 + Si_gnF.scaffold05747[1091012..1091951].pep_1" + } + } + }, + title "SI2.2.0_11917 Si_gnF.scaffold05747[1091012..1091951].pep_1" + }, + inst { + repr raw, + mol na, + length 38, + seq-data ncbi2na '0F5ADDDDD1111186CB60'H + } + }, + seq { + id { + local str "Query_2" + }, + descr { + user { + type str "CFastaReader", + data { + { + label str "DefLine", + data str ">gnl|dmel|ID " + } + } + }, + title "gnl|dmel|ID" + }, + inst { + repr raw, + mol na, + length 10, + seq-data ncbi2na '886690'H + } + }, + seq { + id { + local str "Query_3" + }, + descr { + user { + type str "CFastaReader", + data { + { + label str "DefLine", + data str ">abcdef##$%^&*(funky_header)! " + } + } + }, + title "abcdef##$%^&*(funky_header)!" + }, + inst { + repr raw, + mol na, + length 12, + seq-data ncbi2na '0DDDF3'H + } + } + } + }, + subject database "/Users/carlo/Documents/branches/hsp-alignment-reformat +/sequenceserver/spec/database/v5/funky_ids/funky_ids.fa", + algorithm-options { + { + name "EvalueThreshold", + value cutoff e-value { 1, 10, 1 } + }, + { + name "MaskAtHash", + value boolean TRUE + }, + { + name "DustFilteringLevel", + value integer 20 + }, + { + name "DustFilteringWindow", + value integer 64 + }, + { + name "DustFilteringLinker", + value integer 1 + }, + { + name "UngappedMode", + value boolean FALSE + }, + { + name "HitlistSize", + value integer 500 + }, + { + name "EffectiveSearchSpace", + value big-integer 7936 + } + } + } + }, + results { + alignments { + }, + masks { + }, + ka-blocks { + { + lambda { 133270576282382, 10, -14 }, + k { 620991117264206, 10, -15 }, + h { 112409184650114, 10, -14 }, + gapped FALSE + }, + { + lambda { 128, 10, -2 }, + k { 46, 10, -2 }, + h { 85, 10, -2 }, + gapped TRUE + } + }, + search-stats { + "Effective search space: 7936", + "Effective search space used: 7936", + "Length adjustment: 7" + } + } +} diff --git a/spec/dotdir/82299932-3c06-4fe3-a9c2-48f881ec7c31/job.yaml b/spec/dotdir/82299932-3c06-4fe3-a9c2-48f881ec7c31/job.yaml new file mode 100644 index 000000000..9a831e15a --- /dev/null +++ b/spec/dotdir/82299932-3c06-4fe3-a9c2-48f881ec7c31/job.yaml @@ -0,0 +1,78 @@ +--- !ruby/object:SequenceServer::BLAST::Job +id: 82299932-3c06-4fe3-a9c2-48f881ec7c31 +submitted_at: 2022-06-03 12:08:16.455751000 +01:00 +databases: +- !ruby/struct:SequenceServer::Database + name: "/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/sample/proteins/Solenopsis_invicta/Sinvicta2-2-3.prot.subset.fasta" + title: Sinvicta 2-2-3 prot subset + type: protein + nsequences: '1189' + ncharacters: '280047' + updated_on: Jun 17, 2020 4:52 PM + format: '5' + categories: + - v5 + - sample + - proteins + - Solenopsis_invicta + id: 7146d58da61021c4a598ad71f4ff5650 + extensions: + - pdb + - phd + - phi + - phr + - pin + - pog + - pos + - pot + - psq + - ptf + - pto +- !ruby/struct:SequenceServer::Database + name: "/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/using_blastdb_aliastool/2020-11-Swiss-Prot_insecta_subset_taxid_102803" + title: 2020-11-Swiss-Prot insecta (subset taxid 102803) + type: protein + nsequences: '1' + ncharacters: '253' + updated_on: Nov 25, 2020 12:45 PM + format: '5' + categories: + - v5 + - using_blastdb_aliastool + id: 96d1b910faa05a72929dc4c556b14691 + extensions: + - pal +- !ruby/struct:SequenceServer::Database + name: "/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/without_parse_seqids/without_parse_seqids.fa" + title: without_parse_seqids.fa + type: protein + nsequences: '2' + ncharacters: '385' + updated_on: Jun 2, 2021 10:37 AM + format: '5' + categories: + - v5 + - without_parse_seqids + id: ad9bef379305b6ea7f5ae5fef87ba1e9 + extensions: + - pdb + - phr + - pin + - pot + - psq + - ptf + - pto +completed_at: 2022-06-03 12:08:17.579034000 +01:00 +exitstatus: 0 +method: blastp +qfile: "/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/dotdir/82299932-3c06-4fe3-a9c2-48f881ec7c31/query.fa" +advanced: '' +options: " -outfmt '11 qcovs qcovhsp' -num_threads 1" +num_threads: 1 +query_length: 64 +databases_ncharacters_total: 280685 +command: blastp -db '/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/sample/proteins/Solenopsis_invicta/Sinvicta2-2-3.prot.subset.fasta + /Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/using_blastdb_aliastool/2020-11-Swiss-Prot_insecta_subset_taxid_102803 + /Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/without_parse_seqids/without_parse_seqids.fa' + -query '/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/dotdir/82299932-3c06-4fe3-a9c2-48f881ec7c31/query.fa' -outfmt + '11 qcovs qcovhsp' -num_threads 1 diff --git a/spec/dotdir/82299932-3c06-4fe3-a9c2-48f881ec7c31/query.fa b/spec/dotdir/82299932-3c06-4fe3-a9c2-48f881ec7c31/query.fa new file mode 100644 index 000000000..9bbf19ad1 --- /dev/null +++ b/spec/dotdir/82299932-3c06-4fe3-a9c2-48f881ec7c31/query.fa @@ -0,0 +1,6 @@ +>SI2.2.0_1322 locus=Si_gnF.scaffold06207[1925625..1928536].pep_1 quality=100.00 + MSANR LNVLVTLMLAV LSNALQI IC +>SI2.2.0_1426 locus=Si_gnF.scaffold07837[1480027..1480908].pep_1quality=100.00 merge_with=SI2.2.0_80956 + MM KK XX LL PP O R TY +>SI2.2.0_14266 locus=Si_gnF.scaff07837[,funky:,><*()!@#$%&]tag=gw_corrected + YUOP POKJ M NAHAA JJHFGF YERTQ \ No newline at end of file diff --git a/spec/dotdir/82299932-3c06-4fe3-a9c2-48f881ec7c31/stderr b/spec/dotdir/82299932-3c06-4fe3-a9c2-48f881ec7c31/stderr new file mode 100644 index 000000000..e69de29bb diff --git a/spec/dotdir/82299932-3c06-4fe3-a9c2-48f881ec7c31/stdout b/spec/dotdir/82299932-3c06-4fe3-a9c2-48f881ec7c31/stdout new file mode 100644 index 000000000..2a3b63034 --- /dev/null +++ b/spec/dotdir/82299932-3c06-4fe3-a9c2-48f881ec7c31/stdout @@ -0,0 +1,359 @@ +Blast4-archive ::= { + request { + ident "2.12.0+", + body queue-search { + program "blastp", + service "plain", + queries bioseq-set { + seq-set { + seq { + id { + local str "Query_1" + }, + descr { + user { + type str "CFastaReader", + data { + { + label str "DefLine", + data str ">SI2.2.0_1322 + locus=Si_gnF.scaffold06207[1925625..1928536].pep_1 quality=100.00 " + } + } + }, + title "SI2.2.0_1322 + locus=Si_gnF.scaffold06207[1925625..1928536].pep_1 quality=100.00" + }, + inst { + repr raw, + mol aa, + length 25, + seq-data ncbieaa "MSANRLNVLVTLMLAVLSNALQIIC" + } + }, + seq { + id { + local str "Query_2" + }, + descr { + user { + type str "CFastaReader", + data { + { + label str "DefLine", + data str ">SI2.2.0_1426 + locus=Si_gnF.scaffold07837[1480027..1480908].pep_1quality=100.00 + merge_with=SI2.2.0_80956" + } + } + }, + title "SI2.2.0_1426 + locus=Si_gnF.scaffold07837[1480027..1480908].pep_1quality=100.00 + merge_with=SI2.2.0_80956" + }, + inst { + repr raw, + mol aa, + length 14, + seq-data ncbieaa "MMKKXXLLPPORTY" + } + }, + seq { + id { + local str "Query_3" + }, + descr { + user { + type str "CFastaReader", + data { + { + label str "DefLine", + data str ">SI2.2.0_14266 + locus=Si_gnF.scaff07837[,funky:,><*()!@#$%&]tag=gw_corrected" + } + } + }, + title "SI2.2.0_14266 + locus=Si_gnF.scaff07837[,funky:,><*()!@#$%&]tag=gw_corrected" + }, + inst { + repr raw, + mol aa, + length 25, + seq-data ncbieaa "YUOPPOKJMNAHAAJJHFGFYERTQ" + } + } + } + }, + subject database "/Users/carlo/Documents/branches/hsp-alignment-reformat +/sequenceserver/spec/database/v5/sample/proteins/Solenopsis_invicta/Sinvicta2- +2-3.prot.subset.fasta + /Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/da +tabase/v5/using_blastdb_aliastool/2020-11-Swiss-Prot_insecta_subset_taxid_1028 +03 + /Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/da +tabase/v5/without_parse_seqids/without_parse_seqids.fa", + algorithm-options { + { + name "EvalueThreshold", + value cutoff e-value { 1, 10, 1 } + }, + { + name "MaskAtHash", + value boolean FALSE + }, + { + name "SegFiltering", + value boolean FALSE + }, + { + name "WordThreshold", + value integer 11 + }, + { + name "WindowSize", + value integer 40 + }, + { + name "HitlistSize", + value integer 500 + }, + { + name "UngappedMode", + value boolean FALSE + }, + { + name "CompositionBasedStats", + value integer 2 + }, + { + name "SmithWatermanMode", + value boolean FALSE + }, + { + name "EffectiveSearchSpace", + value big-integer 7017125 + } + } + } + }, + results { + alignments { + { + type partial, + dim 2, + score { + { + id str "score", + value int 78 + }, + { + id str "blast_score", + value int 78 + }, + { + id str "e_value", + value real { 49551943523158, 10, -19 } + }, + { + id str "bit_score", + value real { 346537992015976, 10, -13 } + }, + { + id str "num_ident", + value int 25 + }, + { + id str "comp_adjustment_method", + value int 1 + }, + { + id str "num_positives", + value int 25 + }, + { + id str "hsp_percent_coverage", + value real { 1, 10, 2 } + } + }, + segs denseg { + dim 2, + numseg 3, + ids { + local str "Query_1", + general { + db "BL_ORD_ID", + tag id 10573 + } + }, + starts { + 0, + 0, + -1, + 16, + 16, + 51 + }, + lens { + 16, + 35, + 9 + }, + strands { + unknown, + unknown, + unknown, + unknown, + unknown, + unknown + } + } + }, + { + type partial, + dim 2, + score { + { + id str "score", + value int 78 + }, + { + id str "blast_score", + value int 78 + }, + { + id str "e_value", + value real { 49551943523158, 10, -19 } + }, + { + id str "bit_score", + value real { 346537992015976, 10, -13 } + }, + { + id str "num_ident", + value int 25 + }, + { + id str "comp_adjustment_method", + value int 1 + }, + { + id str "num_positives", + value int 25 + }, + { + id str "hsp_percent_coverage", + value real { 1, 10, 2 } + } + }, + segs denseg { + dim 2, + numseg 3, + ids { + local str "Query_1", + local str "SI2.2.0_13722" + }, + starts { + 0, + 0, + -1, + 16, + 16, + 51 + }, + lens { + 16, + 35, + 9 + }, + strands { + unknown, + unknown, + unknown, + unknown, + unknown, + unknown + } + } + }, + { + type partial, + dim 2, + score { + { + id str "score", + value int 33 + }, + { + id str "blast_score", + value int 33 + }, + { + id str "e_value", + value real { 750931426973456, 10, -14 } + }, + { + id str "bit_score", + value real { 173198182853167, 10, -13 } + }, + { + id str "num_ident", + value int 6 + }, + { + id str "comp_adjustment_method", + value int 1 + }, + { + id str "num_positives", + value int 10 + }, + { + id str "hsp_percent_coverage", + value real { 645, 10, -1 } + } + }, + segs denseg { + dim 2, + numseg 1, + ids { + local str "Query_3", + local str "SI2.2.0_80018" + }, + starts { + 6, + 773 + }, + lens { + 16 + }, + strands { + unknown, + unknown + } + } + } + }, + masks { + }, + ka-blocks { + { + lambda { 33246613200827, 10, -14 }, + k { 135393825761969, 10, -15 }, + h { 353660045012724, 10, -15 }, + gapped FALSE + }, + { + lambda { 267, 10, -3 }, + k { 41, 10, -3 }, + h { 14, 10, -2 }, + gapped TRUE + } + }, + search-stats { + "Effective search space: 7017125", + "Effective search space used: 7017125", + "Length adjustment: 0" + } + } +} diff --git a/spec/dotdir/aedbd8ce-def2-425a-9ac2-d860b885d85a/job.yaml b/spec/dotdir/aedbd8ce-def2-425a-9ac2-d860b885d85a/job.yaml new file mode 100644 index 000000000..d58ab69f4 --- /dev/null +++ b/spec/dotdir/aedbd8ce-def2-425a-9ac2-d860b885d85a/job.yaml @@ -0,0 +1,42 @@ +--- !ruby/object:SequenceServer::BLAST::Job +id: aedbd8ce-def2-425a-9ac2-d860b885d85a +submitted_at: 2022-06-03 12:08:12.974472000 +01:00 +databases: +- !ruby/struct:SequenceServer::Database + name: "/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/sample/proteins/Solenopsis_invicta/Sinvicta2-2-3.prot.subset.fasta" + title: Sinvicta 2-2-3 prot subset + type: protein + nsequences: '1189' + ncharacters: '280047' + updated_on: Jun 17, 2020 4:52 PM + format: '5' + categories: + - v5 + - sample + - proteins + - Solenopsis_invicta + id: 7146d58da61021c4a598ad71f4ff5650 + extensions: + - pdb + - phd + - phi + - phr + - pin + - pog + - pos + - pot + - psq + - ptf + - pto +completed_at: 2022-06-03 12:08:14.174208000 +01:00 +exitstatus: 0 +method: blastp +qfile: "/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/dotdir/aedbd8ce-def2-425a-9ac2-d860b885d85a/query.fa" +advanced: '' +options: " -outfmt '11 qcovs qcovhsp' -num_threads 1" +num_threads: 1 +query_length: 64 +databases_ncharacters_total: 280047 +command: blastp -db '/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/sample/proteins/Solenopsis_invicta/Sinvicta2-2-3.prot.subset.fasta' + -query '/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/dotdir/aedbd8ce-def2-425a-9ac2-d860b885d85a/query.fa' -outfmt + '11 qcovs qcovhsp' -num_threads 1 diff --git a/spec/dotdir/aedbd8ce-def2-425a-9ac2-d860b885d85a/query.fa b/spec/dotdir/aedbd8ce-def2-425a-9ac2-d860b885d85a/query.fa new file mode 100644 index 000000000..9bbf19ad1 --- /dev/null +++ b/spec/dotdir/aedbd8ce-def2-425a-9ac2-d860b885d85a/query.fa @@ -0,0 +1,6 @@ +>SI2.2.0_1322 locus=Si_gnF.scaffold06207[1925625..1928536].pep_1 quality=100.00 + MSANR LNVLVTLMLAV LSNALQI IC +>SI2.2.0_1426 locus=Si_gnF.scaffold07837[1480027..1480908].pep_1quality=100.00 merge_with=SI2.2.0_80956 + MM KK XX LL PP O R TY +>SI2.2.0_14266 locus=Si_gnF.scaff07837[,funky:,><*()!@#$%&]tag=gw_corrected + YUOP POKJ M NAHAA JJHFGF YERTQ \ No newline at end of file diff --git a/spec/dotdir/aedbd8ce-def2-425a-9ac2-d860b885d85a/stderr b/spec/dotdir/aedbd8ce-def2-425a-9ac2-d860b885d85a/stderr new file mode 100644 index 000000000..e69de29bb diff --git a/spec/dotdir/aedbd8ce-def2-425a-9ac2-d860b885d85a/stdout b/spec/dotdir/aedbd8ce-def2-425a-9ac2-d860b885d85a/stdout new file mode 100644 index 000000000..95ac27071 --- /dev/null +++ b/spec/dotdir/aedbd8ce-def2-425a-9ac2-d860b885d85a/stdout @@ -0,0 +1,284 @@ +Blast4-archive ::= { + request { + ident "2.12.0+", + body queue-search { + program "blastp", + service "plain", + queries bioseq-set { + seq-set { + seq { + id { + local str "Query_1" + }, + descr { + user { + type str "CFastaReader", + data { + { + label str "DefLine", + data str ">SI2.2.0_1322 + locus=Si_gnF.scaffold06207[1925625..1928536].pep_1 quality=100.00 " + } + } + }, + title "SI2.2.0_1322 + locus=Si_gnF.scaffold06207[1925625..1928536].pep_1 quality=100.00" + }, + inst { + repr raw, + mol aa, + length 25, + seq-data ncbieaa "MSANRLNVLVTLMLAVLSNALQIIC" + } + }, + seq { + id { + local str "Query_2" + }, + descr { + user { + type str "CFastaReader", + data { + { + label str "DefLine", + data str ">SI2.2.0_1426 + locus=Si_gnF.scaffold07837[1480027..1480908].pep_1quality=100.00 + merge_with=SI2.2.0_80956" + } + } + }, + title "SI2.2.0_1426 + locus=Si_gnF.scaffold07837[1480027..1480908].pep_1quality=100.00 + merge_with=SI2.2.0_80956" + }, + inst { + repr raw, + mol aa, + length 14, + seq-data ncbieaa "MMKKXXLLPPORTY" + } + }, + seq { + id { + local str "Query_3" + }, + descr { + user { + type str "CFastaReader", + data { + { + label str "DefLine", + data str ">SI2.2.0_14266 + locus=Si_gnF.scaff07837[,funky:,><*()!@#$%&]tag=gw_corrected" + } + } + }, + title "SI2.2.0_14266 + locus=Si_gnF.scaff07837[,funky:,><*()!@#$%&]tag=gw_corrected" + }, + inst { + repr raw, + mol aa, + length 25, + seq-data ncbieaa "YUOPPOKJMNAHAAJJHFGFYERTQ" + } + } + } + }, + subject database "/Users/carlo/Documents/branches/hsp-alignment-reformat +/sequenceserver/spec/database/v5/sample/proteins/Solenopsis_invicta/Sinvicta2- +2-3.prot.subset.fasta", + algorithm-options { + { + name "EvalueThreshold", + value cutoff e-value { 1, 10, 1 } + }, + { + name "MaskAtHash", + value boolean FALSE + }, + { + name "SegFiltering", + value boolean FALSE + }, + { + name "WordThreshold", + value integer 11 + }, + { + name "WindowSize", + value integer 40 + }, + { + name "HitlistSize", + value integer 500 + }, + { + name "UngappedMode", + value boolean FALSE + }, + { + name "CompositionBasedStats", + value integer 2 + }, + { + name "SmithWatermanMode", + value boolean FALSE + }, + { + name "EffectiveSearchSpace", + value big-integer 7001175 + } + } + } + }, + results { + alignments { + { + type partial, + dim 2, + score { + { + id str "score", + value int 78 + }, + { + id str "blast_score", + value int 78 + }, + { + id str "e_value", + value real { 494393114267946, 10, -20 } + }, + { + id str "bit_score", + value real { 346537992015976, 10, -13 } + }, + { + id str "num_ident", + value int 25 + }, + { + id str "comp_adjustment_method", + value int 1 + }, + { + id str "num_positives", + value int 25 + }, + { + id str "hsp_percent_coverage", + value real { 1, 10, 2 } + } + }, + segs denseg { + dim 2, + numseg 3, + ids { + local str "Query_1", + local str "SI2.2.0_13722" + }, + starts { + 0, + 0, + -1, + 16, + 16, + 51 + }, + lens { + 16, + 35, + 9 + }, + strands { + unknown, + unknown, + unknown, + unknown, + unknown, + unknown + } + } + }, + { + type partial, + dim 2, + score { + { + id str "score", + value int 33 + }, + { + id str "blast_score", + value int 33 + }, + { + id str "e_value", + value real { 749224551827263, 10, -14 } + }, + { + id str "bit_score", + value real { 173198182853167, 10, -13 } + }, + { + id str "num_ident", + value int 6 + }, + { + id str "comp_adjustment_method", + value int 1 + }, + { + id str "num_positives", + value int 10 + }, + { + id str "hsp_percent_coverage", + value real { 645, 10, -1 } + } + }, + segs denseg { + dim 2, + numseg 1, + ids { + local str "Query_3", + local str "SI2.2.0_80018" + }, + starts { + 6, + 773 + }, + lens { + 16 + }, + strands { + unknown, + unknown + } + } + } + }, + masks { + }, + ka-blocks { + { + lambda { 33246613200827, 10, -14 }, + k { 135393825761969, 10, -15 }, + h { 353660045012724, 10, -15 }, + gapped FALSE + }, + { + lambda { 267, 10, -3 }, + k { 41, 10, -3 }, + h { 14, 10, -2 }, + gapped TRUE + } + }, + search-stats { + "Effective search space: 7001175", + "Effective search space used: 7001175", + "Length adjustment: 0" + } + } +} diff --git a/spec/dotdir/ca6267c5-bd73-4a99-b2a4-4ea44568b25e/job.yaml b/spec/dotdir/ca6267c5-bd73-4a99-b2a4-4ea44568b25e/job.yaml new file mode 100644 index 000000000..40e68dc5f --- /dev/null +++ b/spec/dotdir/ca6267c5-bd73-4a99-b2a4-4ea44568b25e/job.yaml @@ -0,0 +1,42 @@ +--- !ruby/object:SequenceServer::BLAST::Job +id: ca6267c5-bd73-4a99-b2a4-4ea44568b25e +submitted_at: 2022-06-03 12:08:07.376448000 +01:00 +databases: +- !ruby/struct:SequenceServer::Database + name: "/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/sample/proteins/Solenopsis_invicta/Sinvicta2-2-3.prot.subset.fasta" + title: Sinvicta 2-2-3 prot subset + type: protein + nsequences: '1189' + ncharacters: '280047' + updated_on: Jun 17, 2020 4:52 PM + format: '5' + categories: + - v5 + - sample + - proteins + - Solenopsis_invicta + id: 7146d58da61021c4a598ad71f4ff5650 + extensions: + - pdb + - phd + - phi + - phr + - pin + - pog + - pos + - pot + - psq + - ptf + - pto +completed_at: 2022-06-03 12:08:08.798786000 +01:00 +exitstatus: 0 +method: blastp +qfile: "/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/dotdir/ca6267c5-bd73-4a99-b2a4-4ea44568b25e/query.fa" +advanced: '' +options: " -outfmt '11 qcovs qcovhsp' -num_threads 1" +num_threads: 1 +query_length: 64 +databases_ncharacters_total: 280047 +command: blastp -db '/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/sample/proteins/Solenopsis_invicta/Sinvicta2-2-3.prot.subset.fasta' + -query '/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/dotdir/ca6267c5-bd73-4a99-b2a4-4ea44568b25e/query.fa' -outfmt + '11 qcovs qcovhsp' -num_threads 1 diff --git a/spec/dotdir/ca6267c5-bd73-4a99-b2a4-4ea44568b25e/query.fa b/spec/dotdir/ca6267c5-bd73-4a99-b2a4-4ea44568b25e/query.fa new file mode 100644 index 000000000..9bbf19ad1 --- /dev/null +++ b/spec/dotdir/ca6267c5-bd73-4a99-b2a4-4ea44568b25e/query.fa @@ -0,0 +1,6 @@ +>SI2.2.0_1322 locus=Si_gnF.scaffold06207[1925625..1928536].pep_1 quality=100.00 + MSANR LNVLVTLMLAV LSNALQI IC +>SI2.2.0_1426 locus=Si_gnF.scaffold07837[1480027..1480908].pep_1quality=100.00 merge_with=SI2.2.0_80956 + MM KK XX LL PP O R TY +>SI2.2.0_14266 locus=Si_gnF.scaff07837[,funky:,><*()!@#$%&]tag=gw_corrected + YUOP POKJ M NAHAA JJHFGF YERTQ \ No newline at end of file diff --git a/spec/dotdir/ca6267c5-bd73-4a99-b2a4-4ea44568b25e/stderr b/spec/dotdir/ca6267c5-bd73-4a99-b2a4-4ea44568b25e/stderr new file mode 100644 index 000000000..e69de29bb diff --git a/spec/dotdir/ca6267c5-bd73-4a99-b2a4-4ea44568b25e/stdout b/spec/dotdir/ca6267c5-bd73-4a99-b2a4-4ea44568b25e/stdout new file mode 100644 index 000000000..95ac27071 --- /dev/null +++ b/spec/dotdir/ca6267c5-bd73-4a99-b2a4-4ea44568b25e/stdout @@ -0,0 +1,284 @@ +Blast4-archive ::= { + request { + ident "2.12.0+", + body queue-search { + program "blastp", + service "plain", + queries bioseq-set { + seq-set { + seq { + id { + local str "Query_1" + }, + descr { + user { + type str "CFastaReader", + data { + { + label str "DefLine", + data str ">SI2.2.0_1322 + locus=Si_gnF.scaffold06207[1925625..1928536].pep_1 quality=100.00 " + } + } + }, + title "SI2.2.0_1322 + locus=Si_gnF.scaffold06207[1925625..1928536].pep_1 quality=100.00" + }, + inst { + repr raw, + mol aa, + length 25, + seq-data ncbieaa "MSANRLNVLVTLMLAVLSNALQIIC" + } + }, + seq { + id { + local str "Query_2" + }, + descr { + user { + type str "CFastaReader", + data { + { + label str "DefLine", + data str ">SI2.2.0_1426 + locus=Si_gnF.scaffold07837[1480027..1480908].pep_1quality=100.00 + merge_with=SI2.2.0_80956" + } + } + }, + title "SI2.2.0_1426 + locus=Si_gnF.scaffold07837[1480027..1480908].pep_1quality=100.00 + merge_with=SI2.2.0_80956" + }, + inst { + repr raw, + mol aa, + length 14, + seq-data ncbieaa "MMKKXXLLPPORTY" + } + }, + seq { + id { + local str "Query_3" + }, + descr { + user { + type str "CFastaReader", + data { + { + label str "DefLine", + data str ">SI2.2.0_14266 + locus=Si_gnF.scaff07837[,funky:,><*()!@#$%&]tag=gw_corrected" + } + } + }, + title "SI2.2.0_14266 + locus=Si_gnF.scaff07837[,funky:,><*()!@#$%&]tag=gw_corrected" + }, + inst { + repr raw, + mol aa, + length 25, + seq-data ncbieaa "YUOPPOKJMNAHAAJJHFGFYERTQ" + } + } + } + }, + subject database "/Users/carlo/Documents/branches/hsp-alignment-reformat +/sequenceserver/spec/database/v5/sample/proteins/Solenopsis_invicta/Sinvicta2- +2-3.prot.subset.fasta", + algorithm-options { + { + name "EvalueThreshold", + value cutoff e-value { 1, 10, 1 } + }, + { + name "MaskAtHash", + value boolean FALSE + }, + { + name "SegFiltering", + value boolean FALSE + }, + { + name "WordThreshold", + value integer 11 + }, + { + name "WindowSize", + value integer 40 + }, + { + name "HitlistSize", + value integer 500 + }, + { + name "UngappedMode", + value boolean FALSE + }, + { + name "CompositionBasedStats", + value integer 2 + }, + { + name "SmithWatermanMode", + value boolean FALSE + }, + { + name "EffectiveSearchSpace", + value big-integer 7001175 + } + } + } + }, + results { + alignments { + { + type partial, + dim 2, + score { + { + id str "score", + value int 78 + }, + { + id str "blast_score", + value int 78 + }, + { + id str "e_value", + value real { 494393114267946, 10, -20 } + }, + { + id str "bit_score", + value real { 346537992015976, 10, -13 } + }, + { + id str "num_ident", + value int 25 + }, + { + id str "comp_adjustment_method", + value int 1 + }, + { + id str "num_positives", + value int 25 + }, + { + id str "hsp_percent_coverage", + value real { 1, 10, 2 } + } + }, + segs denseg { + dim 2, + numseg 3, + ids { + local str "Query_1", + local str "SI2.2.0_13722" + }, + starts { + 0, + 0, + -1, + 16, + 16, + 51 + }, + lens { + 16, + 35, + 9 + }, + strands { + unknown, + unknown, + unknown, + unknown, + unknown, + unknown + } + } + }, + { + type partial, + dim 2, + score { + { + id str "score", + value int 33 + }, + { + id str "blast_score", + value int 33 + }, + { + id str "e_value", + value real { 749224551827263, 10, -14 } + }, + { + id str "bit_score", + value real { 173198182853167, 10, -13 } + }, + { + id str "num_ident", + value int 6 + }, + { + id str "comp_adjustment_method", + value int 1 + }, + { + id str "num_positives", + value int 10 + }, + { + id str "hsp_percent_coverage", + value real { 645, 10, -1 } + } + }, + segs denseg { + dim 2, + numseg 1, + ids { + local str "Query_3", + local str "SI2.2.0_80018" + }, + starts { + 6, + 773 + }, + lens { + 16 + }, + strands { + unknown, + unknown + } + } + } + }, + masks { + }, + ka-blocks { + { + lambda { 33246613200827, 10, -14 }, + k { 135393825761969, 10, -15 }, + h { 353660045012724, 10, -15 }, + gapped FALSE + }, + { + lambda { 267, 10, -3 }, + k { 41, 10, -3 }, + h { 14, 10, -2 }, + gapped TRUE + } + }, + search-stats { + "Effective search space: 7001175", + "Effective search space used: 7001175", + "Length adjustment: 0" + } + } +} diff --git a/spec/dotdir/e5d0fb5e-6496-416a-8a51-07bacd1c9b4c/job.yaml b/spec/dotdir/e5d0fb5e-6496-416a-8a51-07bacd1c9b4c/job.yaml new file mode 100644 index 000000000..f01510c78 --- /dev/null +++ b/spec/dotdir/e5d0fb5e-6496-416a-8a51-07bacd1c9b4c/job.yaml @@ -0,0 +1,94 @@ +--- !ruby/object:SequenceServer::BLAST::Job +id: e5d0fb5e-6496-416a-8a51-07bacd1c9b4c +submitted_at: 2022-06-03 12:08:34.126682000 +01:00 +databases: +- !ruby/struct:SequenceServer::Database + name: "/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/funky_ids/funky_ids.fa" + title: funky ids (v5) + type: nucleotide + nsequences: '8' + ncharacters: '312' + updated_on: Aug 13, 2020 11:23 AM + format: '5' + categories: + - v5 + - funky_ids + id: d3a2b237ee195f745a4d1ce68cb25c3b + extensions: + - ndb + - nhd + - nhi + - nhr + - nin + - nog + - nos + - not + - nsq + - ntf + - nto +- !ruby/struct:SequenceServer::Database + name: "/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/sample/genome/Solenopsis_invicta/Solenopsis_invicta_gnG_subset.fasta" + title: Solenopsis invicta gnG subset + type: nucleotide + nsequences: '8' + ncharacters: '39185542' + updated_on: Jun 17, 2020 4:51 PM + format: '5' + categories: + - v5 + - sample + - genome + - Solenopsis_invicta + id: 38b84655b16b2b43fc21ff9a414d59c6 + extensions: + - ndb + - nhd + - nhi + - nhr + - nin + - nog + - nos + - not + - nsq + - ntf + - nto +- !ruby/struct:SequenceServer::Database + name: "/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/sample/transcripts/Solenopsis_invicta/Sinvicta2-2-3.cdna.subset.fasta" + title: Sinvicta 2-2-3 cdna subset + type: nucleotide + nsequences: '473' + ncharacters: '287752' + updated_on: Jun 17, 2020 4:52 PM + format: '5' + categories: + - v5 + - sample + - transcripts + - Solenopsis_invicta + id: 3c900b509011e8919ff05e20dd703714 + extensions: + - ndb + - nhd + - nhi + - nhr + - nin + - nog + - nos + - not + - nsq + - ntf + - nto +completed_at: 2022-06-03 12:08:35.232757000 +01:00 +exitstatus: 0 +method: blastn +qfile: "/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/dotdir/e5d0fb5e-6496-416a-8a51-07bacd1c9b4c/query.fa" +advanced: '' +options: " -outfmt '11 qcovs qcovhsp' -num_threads 1" +num_threads: 1 +query_length: 60 +databases_ncharacters_total: 39473606 +command: blastn -db '/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/funky_ids/funky_ids.fa + /Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/sample/genome/Solenopsis_invicta/Solenopsis_invicta_gnG_subset.fasta + /Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/sample/transcripts/Solenopsis_invicta/Sinvicta2-2-3.cdna.subset.fasta' + -query '/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/dotdir/e5d0fb5e-6496-416a-8a51-07bacd1c9b4c/query.fa' -outfmt + '11 qcovs qcovhsp' -num_threads 1 diff --git a/spec/dotdir/e5d0fb5e-6496-416a-8a51-07bacd1c9b4c/query.fa b/spec/dotdir/e5d0fb5e-6496-416a-8a51-07bacd1c9b4c/query.fa new file mode 100644 index 000000000..b12d574e0 --- /dev/null +++ b/spec/dotdir/e5d0fb5e-6496-416a-8a51-07bacd1c9b4c/query.fa @@ -0,0 +1,6 @@ +> SI2.2.0_11917 Si_gnF.scaffold05747[1091012..1091951].pep_1 + AATT CCGG TCTCTCTCTC AC AC AC AC AC GACGT AGTC G +>gnl|dmel|ID + G A G A C G C G G C +>abcdef##$%^&*(funky_header)! + AATCT CTC TTAT diff --git a/spec/dotdir/e5d0fb5e-6496-416a-8a51-07bacd1c9b4c/stderr b/spec/dotdir/e5d0fb5e-6496-416a-8a51-07bacd1c9b4c/stderr new file mode 100644 index 000000000..e69de29bb diff --git a/spec/dotdir/e5d0fb5e-6496-416a-8a51-07bacd1c9b4c/stdout b/spec/dotdir/e5d0fb5e-6496-416a-8a51-07bacd1c9b4c/stdout new file mode 100644 index 000000000..208baf2ea --- /dev/null +++ b/spec/dotdir/e5d0fb5e-6496-416a-8a51-07bacd1c9b4c/stdout @@ -0,0 +1,148 @@ +Blast4-archive ::= { + request { + ident "2.12.0+", + body queue-search { + program "blastn", + service "megablast", + queries bioseq-set { + seq-set { + seq { + id { + local str "Query_1" + }, + descr { + user { + type str "CFastaReader", + data { + { + label str "DefLine", + data str "> SI2.2.0_11917 + Si_gnF.scaffold05747[1091012..1091951].pep_1" + } + } + }, + title "SI2.2.0_11917 Si_gnF.scaffold05747[1091012..1091951].pep_1" + }, + inst { + repr raw, + mol na, + length 38, + seq-data ncbi2na '0F5ADDDDD1111186CB60'H + } + }, + seq { + id { + local str "Query_2" + }, + descr { + user { + type str "CFastaReader", + data { + { + label str "DefLine", + data str ">gnl|dmel|ID " + } + } + }, + title "gnl|dmel|ID" + }, + inst { + repr raw, + mol na, + length 10, + seq-data ncbi2na '886690'H + } + }, + seq { + id { + local str "Query_3" + }, + descr { + user { + type str "CFastaReader", + data { + { + label str "DefLine", + data str ">abcdef##$%^&*(funky_header)! " + } + } + }, + title "abcdef##$%^&*(funky_header)!" + }, + inst { + repr raw, + mol na, + length 12, + seq-data ncbi2na '0DDDF3'H + } + } + } + }, + subject database "/Users/carlo/Documents/branches/hsp-alignment-reformat +/sequenceserver/spec/database/v5/funky_ids/funky_ids.fa + /Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/da +tabase/v5/sample/genome/Solenopsis_invicta/Solenopsis_invicta_gnG_subset.fasta + /Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/da +tabase/v5/sample/transcripts/Solenopsis_invicta/Sinvicta2-2-3.cdna.subset.fasta", + algorithm-options { + { + name "EvalueThreshold", + value cutoff e-value { 1, 10, 1 } + }, + { + name "MaskAtHash", + value boolean TRUE + }, + { + name "DustFilteringLevel", + value integer 20 + }, + { + name "DustFilteringWindow", + value integer 64 + }, + { + name "DustFilteringLinker", + value integer 1 + }, + { + name "UngappedMode", + value boolean FALSE + }, + { + name "HitlistSize", + value integer 500 + }, + { + name "EffectiveSearchSpace", + value big-integer 710348868 + } + } + } + }, + results { + alignments { + }, + masks { + }, + ka-blocks { + { + lambda { 133270576282382, 10, -14 }, + k { 620991117264206, 10, -15 }, + h { 112409184650114, 10, -14 }, + gapped FALSE + }, + { + lambda { 128, 10, -2 }, + k { 46, 10, -2 }, + h { 85, 10, -2 }, + gapped TRUE + } + }, + search-stats { + "Effective search space: 710348868", + "Effective search space used: 710348868", + "Length adjustment: 20" + } + } +} diff --git a/spec/dotdir/e9f40618-7502-4101-aa75-aec8c358bc71/job.yaml b/spec/dotdir/e9f40618-7502-4101-aa75-aec8c358bc71/job.yaml new file mode 100644 index 000000000..6611014e4 --- /dev/null +++ b/spec/dotdir/e9f40618-7502-4101-aa75-aec8c358bc71/job.yaml @@ -0,0 +1,40 @@ +--- !ruby/object:SequenceServer::BLAST::Job +id: e9f40618-7502-4101-aa75-aec8c358bc71 +submitted_at: 2022-06-03 12:08:23.382884000 +01:00 +databases: +- !ruby/struct:SequenceServer::Database + name: "/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/funky_ids/funky_ids.fa" + title: funky ids (v5) + type: nucleotide + nsequences: '8' + ncharacters: '312' + updated_on: Aug 13, 2020 11:23 AM + format: '5' + categories: + - v5 + - funky_ids + id: d3a2b237ee195f745a4d1ce68cb25c3b + extensions: + - ndb + - nhd + - nhi + - nhr + - nin + - nog + - nos + - not + - nsq + - ntf + - nto +completed_at: 2022-06-03 12:08:24.527863000 +01:00 +exitstatus: 0 +method: blastn +qfile: "/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/dotdir/e9f40618-7502-4101-aa75-aec8c358bc71/query.fa" +advanced: '' +options: " -outfmt '11 qcovs qcovhsp' -num_threads 1" +num_threads: 1 +query_length: 60 +databases_ncharacters_total: 312 +command: blastn -db '/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/database/v5/funky_ids/funky_ids.fa' + -query '/Users/carlo/Documents/branches/hsp-alignment-reformat/sequenceserver/spec/dotdir/e9f40618-7502-4101-aa75-aec8c358bc71/query.fa' -outfmt + '11 qcovs qcovhsp' -num_threads 1 diff --git a/spec/dotdir/e9f40618-7502-4101-aa75-aec8c358bc71/query.fa b/spec/dotdir/e9f40618-7502-4101-aa75-aec8c358bc71/query.fa new file mode 100644 index 000000000..b12d574e0 --- /dev/null +++ b/spec/dotdir/e9f40618-7502-4101-aa75-aec8c358bc71/query.fa @@ -0,0 +1,6 @@ +> SI2.2.0_11917 Si_gnF.scaffold05747[1091012..1091951].pep_1 + AATT CCGG TCTCTCTCTC AC AC AC AC AC GACGT AGTC G +>gnl|dmel|ID + G A G A C G C G G C +>abcdef##$%^&*(funky_header)! + AATCT CTC TTAT diff --git a/spec/dotdir/e9f40618-7502-4101-aa75-aec8c358bc71/stderr b/spec/dotdir/e9f40618-7502-4101-aa75-aec8c358bc71/stderr new file mode 100644 index 000000000..e69de29bb diff --git a/spec/dotdir/e9f40618-7502-4101-aa75-aec8c358bc71/stdout b/spec/dotdir/e9f40618-7502-4101-aa75-aec8c358bc71/stdout new file mode 100644 index 000000000..ddd67f942 --- /dev/null +++ b/spec/dotdir/e9f40618-7502-4101-aa75-aec8c358bc71/stdout @@ -0,0 +1,144 @@ +Blast4-archive ::= { + request { + ident "2.12.0+", + body queue-search { + program "blastn", + service "megablast", + queries bioseq-set { + seq-set { + seq { + id { + local str "Query_1" + }, + descr { + user { + type str "CFastaReader", + data { + { + label str "DefLine", + data str "> SI2.2.0_11917 + Si_gnF.scaffold05747[1091012..1091951].pep_1" + } + } + }, + title "SI2.2.0_11917 Si_gnF.scaffold05747[1091012..1091951].pep_1" + }, + inst { + repr raw, + mol na, + length 38, + seq-data ncbi2na '0F5ADDDDD1111186CB60'H + } + }, + seq { + id { + local str "Query_2" + }, + descr { + user { + type str "CFastaReader", + data { + { + label str "DefLine", + data str ">gnl|dmel|ID " + } + } + }, + title "gnl|dmel|ID" + }, + inst { + repr raw, + mol na, + length 10, + seq-data ncbi2na '886690'H + } + }, + seq { + id { + local str "Query_3" + }, + descr { + user { + type str "CFastaReader", + data { + { + label str "DefLine", + data str ">abcdef##$%^&*(funky_header)! " + } + } + }, + title "abcdef##$%^&*(funky_header)!" + }, + inst { + repr raw, + mol na, + length 12, + seq-data ncbi2na '0DDDF3'H + } + } + } + }, + subject database "/Users/carlo/Documents/branches/hsp-alignment-reformat +/sequenceserver/spec/database/v5/funky_ids/funky_ids.fa", + algorithm-options { + { + name "EvalueThreshold", + value cutoff e-value { 1, 10, 1 } + }, + { + name "MaskAtHash", + value boolean TRUE + }, + { + name "DustFilteringLevel", + value integer 20 + }, + { + name "DustFilteringWindow", + value integer 64 + }, + { + name "DustFilteringLinker", + value integer 1 + }, + { + name "UngappedMode", + value boolean FALSE + }, + { + name "HitlistSize", + value integer 500 + }, + { + name "EffectiveSearchSpace", + value big-integer 7936 + } + } + } + }, + results { + alignments { + }, + masks { + }, + ka-blocks { + { + lambda { 133270576282382, 10, -14 }, + k { 620991117264206, 10, -15 }, + h { 112409184650114, 10, -14 }, + gapped FALSE + }, + { + lambda { 128, 10, -2 }, + k { 46, 10, -2 }, + h { 85, 10, -2 }, + gapped TRUE + } + }, + search-stats { + "Effective search space: 7936", + "Effective search space used: 7936", + "Length adjustment: 7" + } + } +} diff --git a/spec/sequences/Query_1_SI2_2_0_06267.txt b/spec/sequences/Query_1_SI2_2_0_06267.txt index 072632da9..a2417ffd6 100644 --- a/spec/sequences/Query_1_SI2_2_0_06267.txt +++ b/spec/sequences/Query_1_SI2_2_0_06267.txt @@ -1,6 +1,7 @@ ->Query_1:1-199 +>Query_1:1-199_hit_1_hsp_a MNTLWLSLWDYPGKLPLNFMVFDTKDDLQAAYWRDPYSIPLAVIFEDPQPISQRLIYEIRTNPSYTLPPPPTKLYSAPISCRKNKTGHWMDDILSIKTGESCPVNNYLHSGFLALQMITDITKIKLENSDVTIPDIKLIMFPKEPYTADWMLAFRVVIPLYMVLALSQFITYLLILIVGEKENKIKEGMKMMGLNDSVF ->Query_1:1-199_alignment_SI2.2.0_06267:1-199 +>Query_1:1-199_hit_1_hsp_a_alignment_SI2.2.0_06267:1-199 MNTLWLSLWDYPGKLPLNFMVFDTKDDLQAAYWRDPYSIPLAVIFEDPQPISQRLIYEIRTNPSYTLPPPPTKLYSAPISCRKNKTGHWMDDILSIKTGESCPVNNYLHSGFLALQMITDITKIKLENSDVTIPDIKLIMFPKEPYTADWMLAFRVVIPLYMVLALSQFITYLLILIVGEKENKIKEGMKMMGLNDSVF ->SI2.2.0_06267:1-199 +>SI2.2.0_06267:1-199_hit_1_hsp_a MNTLWLSLWDYPGKLPLNFMVFDTKDDLQAAYWRDPYSIPLAVIFEDPQPISQRLIYEIRTNPSYTLPPPPTKLYSAPISCRKNKTGHWMDDILSIKTGESCPVNNYLHSGFLALQMITDITKIKLENSDVTIPDIKLIMFPKEPYTADWMLAFRVVIPLYMVLALSQFITYLLILIVGEKENKIKEGMKMMGLNDSVF + diff --git a/spec/sequences/alignment-2_hits.txt b/spec/sequences/alignment-2_hits.txt index be1f3a97a..3f2bff2ac 100644 --- a/spec/sequences/alignment-2_hits.txt +++ b/spec/sequences/alignment-2_hits.txt @@ -1,12 +1,14 @@ ->Query_1:1-199 +>Query_1:1-199_hit_1_hsp_a MNTLWLSLWDYPGKLPLNFMVFDTKDDLQAAYWRDPYSIPLAVIFEDPQPISQRLIYEIRTNPSYTLPPPPTKLYSAPISCRKNKTGHWMDDILSIKTGESCPVNNYLHSGFLALQMITDITKIKLENSDVTIPDIKLIMFPKEPYTADWMLAFRVVIPLYMVLALSQFITYLLILIVGEKENKIKEGMKMMGLNDSVF ->Query_1:1-199_alignment_SI2.2.0_06267:1-199 +>Query_1:1-199_hit_1_hsp_a_alignment_SI2.2.0_06267:1-199 MNTLWLSLWDYPGKLPLNFMVFDTKDDLQAAYWRDPYSIPLAVIFEDPQPISQRLIYEIRTNPSYTLPPPPTKLYSAPISCRKNKTGHWMDDILSIKTGESCPVNNYLHSGFLALQMITDITKIKLENSDVTIPDIKLIMFPKEPYTADWMLAFRVVIPLYMVLALSQFITYLLILIVGEKENKIKEGMKMMGLNDSVF ->SI2.2.0_06267:1-199 +>SI2.2.0_06267:1-199_hit_1_hsp_a MNTLWLSLWDYPGKLPLNFMVFDTKDDLQAAYWRDPYSIPLAVIFEDPQPISQRLIYEIRTNPSYTLPPPPTKLYSAPISCRKNKTGHWMDDILSIKTGESCPVNNYLHSGFLALQMITDITKIKLENSDVTIPDIKLIMFPKEPYTADWMLAFRVVIPLYMVLALSQFITYLLILIVGEKENKIKEGMKMMGLNDSVF ->SI2.2.0_13722:1-186 + +>SI2.2.0_13722:1-186_hit_1_hsp_a MSANRLNVLVTLMLAVALLVTESGNAQVDGYLQFNPKRSAVSSPQKYCGKKLSNALQIICDGVYNSMFKKSGQDFPPQNKRHIAHRINGNEEESFTTLKSNFLNWCVEVYHRHYRFVFVSEMEMADYPLAYDISPYLPPFLSRARARGMLDGRFAGRRYRRESRGIHEECCINGCTINELTSYCGP ->SI2.2.0_13722:1-186_alignment_SI2.2.0_13722:1-186 +>SI2.2.0_13722:1-186_hit_1_hsp_a_alignment_SI2.2.0_13722:1-186 MSANRLNVLVTLMLAVALLVTESGNAQVDGYLQFNPKRSAVSSPQKYCGKKLSNALQIICDGVYNSMFKKSGQDFPPQNKRHIAHRINGNEEESFTTLKSNFLNWCVEVYHRHYRFVFVSEMEMADYPLAYDISPYLPPFLSRARARGMLDGRFAGRRYRRESRGIHEECCINGCTINELTSYCGP ->SI2.2.0_13722:1-186 +>SI2.2.0_13722:1-186_hit_1_hsp_a MSANRLNVLVTLMLAVALLVTESGNAQVDGYLQFNPKRSAVSSPQKYCGKKLSNALQIICDGVYNSMFKKSGQDFPPQNKRHIAHRINGNEEESFTTLKSNFLNWCVEVYHRHYRFVFVSEMEMADYPLAYDISPYLPPFLSRARARGMLDGRFAGRRYRRESRGIHEECCINGCTINELTSYCGP + From 81c2c1775266caf30f28c098d33d12298c11c116 Mon Sep 17 00:00:00 2001 From: Carlo Kroll Date: Fri, 3 Jun 2022 12:54:12 +0100 Subject: [PATCH 02/38] Reformatted download of HSP alignments --- public/js/alignment_exporter.js | 1 + public/sequenceserver-report.min.js | 8 ++++---- public/sequenceserver-search.min.js | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/public/js/alignment_exporter.js b/public/js/alignment_exporter.js index 7c1926b14..0581c0d9e 100644 --- a/public/js/alignment_exporter.js +++ b/public/js/alignment_exporter.js @@ -1,5 +1,6 @@ import * as Exporter from './exporter'; import _ from 'underscore'; +import { toLetters } from './visualisation_helpers'; export default class AlignmentExporter { constructor() {} diff --git a/public/sequenceserver-report.min.js b/public/sequenceserver-report.min.js index 1facc74c2..185c1fac5 100644 --- a/public/sequenceserver-report.min.js +++ b/public/sequenceserver-report.min.js @@ -16,7 +16,7 @@ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ AlignmentExporter)\n/* harmony export */ });\n/* harmony import */ var _exporter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exporter */ \"./public/js/exporter.js\");\n/* harmony import */ var underscore__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\");\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\n\n\n\nvar AlignmentExporter = /*#__PURE__*/function () {\n function AlignmentExporter() {\n _classCallCheck(this, AlignmentExporter);\n }\n\n _createClass(AlignmentExporter, [{\n key: \"wrap_string\",\n value: function wrap_string(str, width) {\n var idx = 0;\n var wrapped = '';\n\n while (true) {\n wrapped += str.substring(idx, idx + width);\n idx += width;\n\n if (idx < str.length) {\n wrapped += '\\n';\n } else {\n break;\n }\n }\n\n return wrapped;\n }\n }, {\n key: \"generate_fasta\",\n value: function generate_fasta(hsps) {\n var fasta = '';\n\n underscore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].each(hsps, underscore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].bind(function (hsp) {\n fasta += '>' + hsp.query_id + ':' + hsp.qstart + '-' + hsp.qend + '\\n';\n fasta += hsp.qseq + '\\n';\n fasta += '>' + hsp.query_id + ':' + hsp.qstart + '-' + hsp.qend + '_alignment_' + hsp.hit_id + ':' + hsp.sstart + '-' + hsp.send + '\\n';\n fasta += hsp.midline + '\\n';\n fasta += '>' + hsp.hit_id + ':' + hsp.sstart + '-' + hsp.send + '\\n';\n fasta += hsp.sseq + '\\n';\n }, this));\n\n return fasta;\n }\n }, {\n key: \"export_alignments\",\n value: function export_alignments(hsps, filename_prefix) {\n var fasta = this.generate_fasta(hsps);\n var blob = new Blob([fasta], {\n type: 'text/fasta'\n }); // var filename_prefix = query_def + '_' + subject_def;\n // var filename_prefix = query_id + '_' + subject_id;\n\n var filename = _exporter__WEBPACK_IMPORTED_MODULE_0__.sanitize_filename(filename_prefix) + '.txt';\n _exporter__WEBPACK_IMPORTED_MODULE_0__.download_blob(blob, filename);\n }\n }, {\n key: \"export_alignments_of_all\",\n value: function export_alignments_of_all(hsps, name) {}\n }]);\n\n return AlignmentExporter;\n}();\n\n\n\n//# sourceURL=webpack://SequenceServer/./public/js/alignment_exporter.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ AlignmentExporter)\n/* harmony export */ });\n/* harmony import */ var _exporter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exporter */ \"./public/js/exporter.js\");\n/* harmony import */ var underscore__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\");\n/* harmony import */ var _visualisation_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./visualisation_helpers */ \"./public/js/visualisation_helpers.js\");\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\n\n\n\n\nvar AlignmentExporter = /*#__PURE__*/function () {\n function AlignmentExporter() {\n _classCallCheck(this, AlignmentExporter);\n }\n\n _createClass(AlignmentExporter, [{\n key: \"wrap_string\",\n value: function wrap_string(str, width) {\n var idx = 0;\n var wrapped = '';\n\n while (true) {\n wrapped += str.substring(idx, idx + width);\n idx += width;\n\n if (idx < str.length) {\n wrapped += '\\n';\n } else {\n break;\n }\n }\n\n return wrapped;\n }\n }, {\n key: \"generate_fasta\",\n value: function generate_fasta(hsps) {\n var fasta = '';\n\n underscore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].each(hsps, underscore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].bind(function (hsp) {\n fasta += '>' + hsp.query_id + ':' + hsp.qstart + '-' + hsp.qend + '_hit_' + hsp.hit_number + '_hsp_' + (0,_visualisation_helpers__WEBPACK_IMPORTED_MODULE_2__.toLetters)(hsp.number) + '\\n';\n fasta += hsp.qseq + '\\n';\n fasta += '>' + hsp.query_id + ':' + hsp.qstart + '-' + hsp.qend + '_hit_' + hsp.hit_number + '_hsp_' + (0,_visualisation_helpers__WEBPACK_IMPORTED_MODULE_2__.toLetters)(hsp.number) + '_alignment_' + hsp.hit_id + ':' + hsp.sstart + '-' + hsp.send + '\\n';\n fasta += hsp.midline + '\\n';\n fasta += '>' + hsp.hit_id + ':' + hsp.sstart + '-' + hsp.send + '_hit_' + hsp.hit_number + '_hsp_' + (0,_visualisation_helpers__WEBPACK_IMPORTED_MODULE_2__.toLetters)(hsp.number) + '\\n';\n fasta += hsp.sseq + '\\n\\n';\n }, this));\n\n return fasta;\n }\n }, {\n key: \"export_alignments\",\n value: function export_alignments(hsps, filename_prefix) {\n var fasta = this.generate_fasta(hsps);\n var blob = new Blob([fasta], {\n type: 'text/fasta'\n }); // var filename_prefix = query_def + '_' + subject_def;\n // var filename_prefix = query_id + '_' + subject_id;\n\n var filename = _exporter__WEBPACK_IMPORTED_MODULE_0__.sanitize_filename(filename_prefix) + '.txt';\n _exporter__WEBPACK_IMPORTED_MODULE_0__.download_blob(blob, filename);\n }\n }, {\n key: \"export_alignments_of_all\",\n value: function export_alignments_of_all(hsps, name) {}\n }]);\n\n return AlignmentExporter;\n}();\n\n\n\n//# sourceURL=webpack://SequenceServer/./public/js/alignment_exporter.js?"); /***/ }), @@ -82,7 +82,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ _default)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var underscore__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\");\n/* harmony import */ var _kablammo__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./kablammo */ \"./public/js/kablammo.js\");\n/* harmony import */ var _download_fasta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./download_fasta */ \"./public/js/download_fasta.js\");\n/* harmony import */ var _alignment_exporter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./alignment_exporter */ \"./public/js/alignment_exporter.js\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n\n // to download textual alignment\n\n/**\n * Component for each hit. Receives props from Report. Has no state.\n */\n\n\n\n\nvar _default = /*#__PURE__*/function (_Component) {\n _inherits(_default, _Component);\n\n var _super = _createSuper(_default);\n\n function _default(props) {\n var _this;\n\n _classCallCheck(this, _default);\n\n _this = _super.call(this, props);\n _this.accession = _this.accession.bind(_assertThisInitialized(_this));\n _this.sequenceID = _this.sequenceID.bind(_assertThisInitialized(_this));\n _this.hitLength = _this.hitLength.bind(_assertThisInitialized(_this));\n _this.numHSPs = _this.numHSPs.bind(_assertThisInitialized(_this));\n _this.domID = _this.domID.bind(_assertThisInitialized(_this));\n _this.databaseIDs = _this.databaseIDs.bind(_assertThisInitialized(_this));\n _this.showSequenceViewer = _this.showSequenceViewer.bind(_assertThisInitialized(_this));\n _this.viewSequenceLink = _this.viewSequenceLink.bind(_assertThisInitialized(_this));\n _this.downloadFASTA = _this.downloadFASTA.bind(_assertThisInitialized(_this));\n _this.downloadAlignment = _this.downloadAlignment.bind(_assertThisInitialized(_this));\n _this.headerJSX = _this.headerJSX.bind(_assertThisInitialized(_this));\n _this.contentJSX = _this.contentJSX.bind(_assertThisInitialized(_this));\n _this.hitLinks = _this.hitLinks.bind(_assertThisInitialized(_this));\n _this.viewSequenceButton = _this.viewSequenceButton.bind(_assertThisInitialized(_this));\n _this.downloadFASTAButton = _this.downloadFASTAButton.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(_default, [{\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate() {\n return !this.props.hit;\n }\n /**\n * Returns accession number of the hit sequence.\n */\n\n }, {\n key: \"accession\",\n value: function accession() {\n return this.props.hit.accession;\n }\n /**\n * Returns id of the hit sequence.\n */\n\n }, {\n key: \"sequenceID\",\n value: function sequenceID() {\n return this.props.hit.id;\n }\n /**\n * Returns length of the hit sequence.\n */\n\n }, {\n key: \"hitLength\",\n value: function hitLength() {\n return this.props.hit.length;\n }\n }, {\n key: \"numHSPs\",\n value: function numHSPs() {\n return this.props.hit.hsps.length;\n } // Internal helpers. //\n\n /**\n * Returns id that will be used for the DOM node corresponding to the hit.\n */\n\n }, {\n key: \"domID\",\n value: function domID() {\n return 'Query_' + this.props.query.number + '_hit_' + this.props.hit.number;\n }\n }, {\n key: \"databaseIDs\",\n value: function databaseIDs() {\n return underscore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].map(this.props.querydb, underscore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].iteratee('id'));\n }\n }, {\n key: \"showSequenceViewer\",\n value: function showSequenceViewer() {\n this.props.showSequenceModal(this.viewSequenceLink());\n }\n }, {\n key: \"viewSequenceLink\",\n value: function viewSequenceLink() {\n var sequenceIDs = encodeURIComponent(this.sequenceID());\n var databaseIDs = encodeURIComponent(this.databaseIDs());\n return \"get_sequence/?sequence_ids=\".concat(sequenceIDs, \"&database_ids=\").concat(databaseIDs);\n }\n }, {\n key: \"downloadFASTA\",\n value: function downloadFASTA(event) {\n var sequenceIDs = [this.sequenceID()];\n\n (0,_download_fasta__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(sequenceIDs, this.databaseIDs());\n } // Event-handler for exporting alignments.\n // Calls relevant method on AlignmentExporter defined in alignment_exporter.js.\n\n }, {\n key: \"downloadAlignment\",\n value: function downloadAlignment(event) {\n var hsps = underscore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].map(this.props.hit.hsps, underscore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].bind(function (hsp) {\n hsp.query_id = this.props.query.id;\n hsp.hit_id = this.props.hit.id;\n return hsp;\n }, this));\n\n var aln_exporter = new _alignment_exporter__WEBPACK_IMPORTED_MODULE_4__[\"default\"]();\n aln_exporter.export_alignments(hsps, this.props.query.id + '_' + this.props.hit.id);\n }\n }, {\n key: \"headerJSX\",\n value: function headerJSX() {\n var meta = \"length: \".concat(this.hitLength().toLocaleString());\n\n if (this.props.showQueryCrumbs && this.props.showHitCrumbs) {\n // Multiper queries, multiple hits\n meta = \"hit \".concat(this.props.hit.number, \" of query \").concat(this.props.query.number, \", \") + meta;\n } else if (this.props.showQueryCrumbs && !this.props.showHitCrumbs) {\n // Multiple queries, single hit\n meta = \"the only hit of query \".concat(this.props.query.number, \", \") + meta;\n } else if (!this.props.showQueryCrumbs && this.props.showHitCrumbs) {\n // Single query, multiple hits\n meta = \"hit \".concat(this.props.hit.number, \", \") + meta;\n }\n\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(\"div\", {\n className: \"section-header\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(\"h4\", {\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(\"i\", {\n className: \"fa fa-minus-square-o\"\n }), \"\\xA0\", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(\"strong\", {\n children: this.props.hit.id\n }), \"\\xA0\", this.props.hit.title]\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(\"span\", {\n className: \"label label-reset pos-label\",\n children: meta\n })]\n });\n }\n }, {\n key: \"contentJSX\",\n value: function contentJSX() {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(\"div\", {\n className: \"section-content\",\n \"data-parent-hit\": this.domID(),\n children: [this.hitLinks(), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_kablammo__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n query: this.props.query,\n hit: this.props.hit,\n algorithm: this.props.algorithm,\n showHSPCrumbs: this.numHSPs() > 1 && this.numHSPs() < 27,\n collapsed: this.props.veryBig\n }, 'kablammo' + this.props.query.id)]\n });\n }\n }, {\n key: \"hitLinks\",\n value: function hitLinks() {\n var _this2 = this;\n\n var btns = [];\n\n if (!(this.props.imported_xml || this.props.non_parse_seqids)) {\n btns = btns.concat([this.viewSequenceButton(), this.downloadFASTAButton()]);\n }\n\n btns.push(this.downloadAlignmentButton());\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(\"div\", {\n className: \"hit-links\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(\"label\", {\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(\"input\", {\n type: \"checkbox\",\n id: this.domID() + '_checkbox',\n value: this.sequenceID(),\n onChange: function () {\n this.props.selectHit(this.domID() + '_checkbox');\n }.bind(this),\n \"data-target\": '#' + this.domID()\n }), \" Select\"]\n }), btns.map(function (btn) {\n return [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(\"span\", {\n className: \"line\",\n children: \"|\"\n }), _this2.button(btn)];\n }), this.props.hit.links.map(function (link) {\n return [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(\"span\", {\n className: \"line\",\n children: \"|\"\n }), _this2.a(link)];\n })]\n });\n } // Return JSX for view sequence button.\n\n }, {\n key: \"viewSequenceButton\",\n value: function viewSequenceButton() {\n var _this3 = this;\n\n if (this.hitLength() > 10000) {\n return {\n text: 'Sequence',\n icon: 'fa-eye',\n className: 'view-sequence',\n title: 'Sequence too long'\n };\n } else {\n return {\n text: 'Sequence',\n icon: 'fa-eye',\n className: 'view-sequence',\n onClick: function onClick() {\n return _this3.showSequenceViewer();\n }\n };\n }\n }\n }, {\n key: \"downloadFASTAButton\",\n value: function downloadFASTAButton() {\n var _this4 = this;\n\n return {\n text: 'FASTA',\n icon: 'fa-download',\n className: 'download-fa',\n onClick: function onClick() {\n return _this4.downloadFASTA();\n }\n };\n }\n }, {\n key: \"downloadAlignmentButton\",\n value: function downloadAlignmentButton() {\n var _this5 = this;\n\n return {\n text: 'Alignment',\n icon: 'fa-download',\n className: 'download-aln',\n onClick: function onClick() {\n return _this5.downloadAlignment();\n }\n };\n }\n }, {\n key: \"button\",\n value: function button(_ref) {\n var text = _ref.text,\n icon = _ref.icon,\n title = _ref.title,\n className = _ref.className,\n onClick = _ref.onClick;\n\n if (onClick) {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(\"button\", {\n className: \"btn-link \".concat(className),\n title: title,\n onClick: onClick,\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(\"i\", {\n className: \"fa \".concat(icon)\n }), \" \", text]\n });\n } else {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(\"button\", {\n className: \"btn-link view-sequence disabled\",\n title: title,\n disabled: \"true\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(\"i\", {\n className: \"fa \".concat(icon)\n }), \" \", text]\n });\n }\n }\n /**\n * Render URL for sequence-viewer.\n */\n\n }, {\n key: \"a\",\n value: function a(link) {\n if (!link.title || !link.url) return;\n var className = 'btn btn-link';\n if (link[\"class\"]) className = \"\".concat(className, \" \").concat(link[\"class\"]);\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(\"a\", {\n href: link.url,\n className: className,\n target: \"_blank\",\n children: [link.icon && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(\"i\", {\n className: 'fa ' + link.icon\n }), ' ' + link.title + ' ']\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(\"div\", {\n className: \"hit\",\n id: this.domID(),\n \"data-hit-def\": this.props.hit.id,\n \"data-hit-len\": this.props.hit.length,\n \"data-hit-evalue\": this.props.hit.evalue,\n children: [this.headerJSX(), \" \", this.contentJSX()]\n });\n }\n }]);\n\n return _default;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component);\n\n\n\n//# sourceURL=webpack://SequenceServer/./public/js/hit.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ _default)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var underscore__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\");\n/* harmony import */ var _kablammo__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./kablammo */ \"./public/js/kablammo.js\");\n/* harmony import */ var _download_fasta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./download_fasta */ \"./public/js/download_fasta.js\");\n/* harmony import */ var _alignment_exporter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./alignment_exporter */ \"./public/js/alignment_exporter.js\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n\n // to download textual alignment\n\n/**\n * Component for each hit. Receives props from Report. Has no state.\n */\n\n\n\n\nvar _default = /*#__PURE__*/function (_Component) {\n _inherits(_default, _Component);\n\n var _super = _createSuper(_default);\n\n function _default(props) {\n var _this;\n\n _classCallCheck(this, _default);\n\n _this = _super.call(this, props);\n _this.accession = _this.accession.bind(_assertThisInitialized(_this));\n _this.sequenceID = _this.sequenceID.bind(_assertThisInitialized(_this));\n _this.hitLength = _this.hitLength.bind(_assertThisInitialized(_this));\n _this.numHSPs = _this.numHSPs.bind(_assertThisInitialized(_this));\n _this.domID = _this.domID.bind(_assertThisInitialized(_this));\n _this.databaseIDs = _this.databaseIDs.bind(_assertThisInitialized(_this));\n _this.showSequenceViewer = _this.showSequenceViewer.bind(_assertThisInitialized(_this));\n _this.viewSequenceLink = _this.viewSequenceLink.bind(_assertThisInitialized(_this));\n _this.downloadFASTA = _this.downloadFASTA.bind(_assertThisInitialized(_this));\n _this.downloadAlignment = _this.downloadAlignment.bind(_assertThisInitialized(_this));\n _this.headerJSX = _this.headerJSX.bind(_assertThisInitialized(_this));\n _this.contentJSX = _this.contentJSX.bind(_assertThisInitialized(_this));\n _this.hitLinks = _this.hitLinks.bind(_assertThisInitialized(_this));\n _this.viewSequenceButton = _this.viewSequenceButton.bind(_assertThisInitialized(_this));\n _this.downloadFASTAButton = _this.downloadFASTAButton.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(_default, [{\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate() {\n return !this.props.hit;\n }\n /**\n * Returns accession number of the hit sequence.\n */\n\n }, {\n key: \"accession\",\n value: function accession() {\n return this.props.hit.accession;\n }\n /**\n * Returns id of the hit sequence.\n */\n\n }, {\n key: \"sequenceID\",\n value: function sequenceID() {\n return this.props.hit.id;\n }\n /**\n * Returns length of the hit sequence.\n */\n\n }, {\n key: \"hitLength\",\n value: function hitLength() {\n return this.props.hit.length;\n }\n }, {\n key: \"numHSPs\",\n value: function numHSPs() {\n return this.props.hit.hsps.length;\n } // Internal helpers. //\n\n /**\n * Returns id that will be used for the DOM node corresponding to the hit.\n */\n\n }, {\n key: \"domID\",\n value: function domID() {\n return 'Query_' + this.props.query.number + '_hit_' + this.props.hit.number;\n }\n }, {\n key: \"databaseIDs\",\n value: function databaseIDs() {\n return underscore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].map(this.props.querydb, underscore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].iteratee('id'));\n }\n }, {\n key: \"showSequenceViewer\",\n value: function showSequenceViewer() {\n this.props.showSequenceModal(this.viewSequenceLink());\n }\n }, {\n key: \"viewSequenceLink\",\n value: function viewSequenceLink() {\n var sequenceIDs = encodeURIComponent(this.sequenceID());\n var databaseIDs = encodeURIComponent(this.databaseIDs());\n return \"get_sequence/?sequence_ids=\".concat(sequenceIDs, \"&database_ids=\").concat(databaseIDs);\n }\n }, {\n key: \"downloadFASTA\",\n value: function downloadFASTA(event) {\n var sequenceIDs = [this.sequenceID()];\n\n (0,_download_fasta__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(sequenceIDs, this.databaseIDs());\n } // Event-handler for exporting alignments.\n // Calls relevant method on AlignmentExporter defined in alignment_exporter.js.\n\n }, {\n key: \"downloadAlignment\",\n value: function downloadAlignment(event) {\n var hsps = underscore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].map(this.props.hit.hsps, underscore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].bind(function (hsp) {\n hsp.query_id = this.props.query.id;\n hsp.hit_id = this.props.hit.id;\n hsp.hit_number = this.props.hit.number;\n return hsp;\n }, this));\n\n var aln_exporter = new _alignment_exporter__WEBPACK_IMPORTED_MODULE_4__[\"default\"]();\n aln_exporter.export_alignments(hsps, this.props.query.id + '_' + this.props.hit.id);\n }\n }, {\n key: \"headerJSX\",\n value: function headerJSX() {\n var meta = \"length: \".concat(this.hitLength().toLocaleString());\n\n if (this.props.showQueryCrumbs && this.props.showHitCrumbs) {\n // Multiper queries, multiple hits\n meta = \"hit \".concat(this.props.hit.number, \" of query \").concat(this.props.query.number, \", \") + meta;\n } else if (this.props.showQueryCrumbs && !this.props.showHitCrumbs) {\n // Multiple queries, single hit\n meta = \"the only hit of query \".concat(this.props.query.number, \", \") + meta;\n } else if (!this.props.showQueryCrumbs && this.props.showHitCrumbs) {\n // Single query, multiple hits\n meta = \"hit \".concat(this.props.hit.number, \", \") + meta;\n }\n\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(\"div\", {\n className: \"section-header\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(\"h4\", {\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(\"i\", {\n className: \"fa fa-minus-square-o\"\n }), \"\\xA0\", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(\"strong\", {\n children: this.props.hit.id\n }), \"\\xA0\", this.props.hit.title]\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(\"span\", {\n className: \"label label-reset pos-label\",\n children: meta\n })]\n });\n }\n }, {\n key: \"contentJSX\",\n value: function contentJSX() {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(\"div\", {\n className: \"section-content\",\n \"data-parent-hit\": this.domID(),\n children: [this.hitLinks(), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_kablammo__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n query: this.props.query,\n hit: this.props.hit,\n algorithm: this.props.algorithm,\n showHSPCrumbs: this.numHSPs() > 1 && this.numHSPs() < 27,\n collapsed: this.props.veryBig\n }, 'kablammo' + this.props.query.id)]\n });\n }\n }, {\n key: \"hitLinks\",\n value: function hitLinks() {\n var _this2 = this;\n\n var btns = [];\n\n if (!(this.props.imported_xml || this.props.non_parse_seqids)) {\n btns = btns.concat([this.viewSequenceButton(), this.downloadFASTAButton()]);\n }\n\n btns.push(this.downloadAlignmentButton());\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(\"div\", {\n className: \"hit-links\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(\"label\", {\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(\"input\", {\n type: \"checkbox\",\n id: this.domID() + '_checkbox',\n value: this.sequenceID(),\n onChange: function () {\n this.props.selectHit(this.domID() + '_checkbox');\n }.bind(this),\n \"data-target\": '#' + this.domID()\n }), \" Select\"]\n }), btns.map(function (btn) {\n return [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(\"span\", {\n className: \"line\",\n children: \"|\"\n }), _this2.button(btn)];\n }), this.props.hit.links.map(function (link) {\n return [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(\"span\", {\n className: \"line\",\n children: \"|\"\n }), _this2.a(link)];\n })]\n });\n } // Return JSX for view sequence button.\n\n }, {\n key: \"viewSequenceButton\",\n value: function viewSequenceButton() {\n var _this3 = this;\n\n if (this.hitLength() > 10000) {\n return {\n text: 'Sequence',\n icon: 'fa-eye',\n className: 'view-sequence',\n title: 'Sequence too long'\n };\n } else {\n return {\n text: 'Sequence',\n icon: 'fa-eye',\n className: 'view-sequence',\n onClick: function onClick() {\n return _this3.showSequenceViewer();\n }\n };\n }\n }\n }, {\n key: \"downloadFASTAButton\",\n value: function downloadFASTAButton() {\n var _this4 = this;\n\n return {\n text: 'FASTA',\n icon: 'fa-download',\n className: 'download-fa',\n onClick: function onClick() {\n return _this4.downloadFASTA();\n }\n };\n }\n }, {\n key: \"downloadAlignmentButton\",\n value: function downloadAlignmentButton() {\n var _this5 = this;\n\n return {\n text: 'Alignment',\n icon: 'fa-download',\n className: 'download-aln',\n onClick: function onClick() {\n return _this5.downloadAlignment();\n }\n };\n }\n }, {\n key: \"button\",\n value: function button(_ref) {\n var text = _ref.text,\n icon = _ref.icon,\n title = _ref.title,\n className = _ref.className,\n onClick = _ref.onClick;\n\n if (onClick) {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(\"button\", {\n className: \"btn-link \".concat(className),\n title: title,\n onClick: onClick,\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(\"i\", {\n className: \"fa \".concat(icon)\n }), \" \", text]\n });\n } else {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(\"button\", {\n className: \"btn-link view-sequence disabled\",\n title: title,\n disabled: \"true\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(\"i\", {\n className: \"fa \".concat(icon)\n }), \" \", text]\n });\n }\n }\n /**\n * Render URL for sequence-viewer.\n */\n\n }, {\n key: \"a\",\n value: function a(link) {\n if (!link.title || !link.url) return;\n var className = 'btn btn-link';\n if (link[\"class\"]) className = \"\".concat(className, \" \").concat(link[\"class\"]);\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(\"a\", {\n href: link.url,\n className: className,\n target: \"_blank\",\n children: [link.icon && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(\"i\", {\n className: 'fa ' + link.icon\n }), ' ' + link.title + ' ']\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(\"div\", {\n className: \"hit\",\n id: this.domID(),\n \"data-hit-def\": this.props.hit.id,\n \"data-hit-len\": this.props.hit.length,\n \"data-hit-evalue\": this.props.hit.evalue,\n children: [this.headerJSX(), \" \", this.contentJSX()]\n });\n }\n }]);\n\n return _default;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component);\n\n\n\n//# sourceURL=webpack://SequenceServer/./public/js/hit.js?"); /***/ }), @@ -192,7 +192,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ _default)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var underscore__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\");\n/* harmony import */ var _download_fasta__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./download_fasta */ \"./public/js/download_fasta.js\");\n/* harmony import */ var _alignment_exporter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./alignment_exporter */ \"./public/js/alignment_exporter.js\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* provided dependency */ var $ = __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n // to download textual alignment\n\n/**\n * Renders links for downloading hit information in different formats.\n * Renders links for navigating to each query.\n */\n\n\n\n\nvar _default = /*#__PURE__*/function (_Component) {\n _inherits(_default, _Component);\n\n var _super = _createSuper(_default);\n\n function _default(props) {\n var _this;\n\n _classCallCheck(this, _default);\n\n _this = _super.call(this, props);\n _this.downloadFastaOfAll = _this.downloadFastaOfAll.bind(_assertThisInitialized(_this));\n _this.downloadFastaOfSelected = _this.downloadFastaOfSelected.bind(_assertThisInitialized(_this));\n _this.downloadAlignmentOfAll = _this.downloadAlignmentOfAll.bind(_assertThisInitialized(_this));\n _this.downloadAlignmentOfSelected = _this.downloadAlignmentOfSelected.bind(_assertThisInitialized(_this));\n _this.topPanelJSX = _this.topPanelJSX.bind(_assertThisInitialized(_this));\n _this.summaryString = _this.summaryString.bind(_assertThisInitialized(_this));\n _this.indexJSX = _this.indexJSX.bind(_assertThisInitialized(_this));\n _this.downloadsPanelJSX = _this.downloadsPanelJSX.bind(_assertThisInitialized(_this));\n return _this;\n }\n /**\n * Clear sessionStorage - useful to initiate a new search in the same tab.\n * Passing sessionStorage.clear directly as onclick callback didn't work\n * (on macOS Chrome).\n */\n\n\n _createClass(_default, [{\n key: \"clearSession\",\n value: function clearSession() {\n sessionStorage.clear();\n }\n /**\n * Event-handler for downloading fasta of all hits.\n */\n\n }, {\n key: \"downloadFastaOfAll\",\n value: function downloadFastaOfAll() {\n var sequence_ids = [];\n this.props.data.queries.forEach(function (query) {\n return query.hits.forEach(function (hit) {\n return sequence_ids.push(hit.id);\n });\n });\n var database_ids = this.props.data.querydb.map(function (querydb) {\n return querydb.id;\n });\n (0,_download_fasta__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(sequence_ids, database_ids);\n return false;\n }\n /**\n * Handles downloading fasta of selected hits.\n */\n\n }, {\n key: \"downloadFastaOfSelected\",\n value: function downloadFastaOfSelected() {\n var sequence_ids = $('.hit-links :checkbox:checked').map(function () {\n return this.value;\n }).get();\n\n var database_ids = underscore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].map(this.props.data.querydb, underscore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].iteratee('id'));\n\n (0,_download_fasta__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(sequence_ids, database_ids);\n return false;\n }\n }, {\n key: \"downloadAlignmentOfAll\",\n value: function downloadAlignmentOfAll() {\n // Get number of hits and array of all hsps.\n var num_hits = 0;\n var hsps_arr = [];\n this.props.data.queries.forEach(function (query) {\n return query.hits.forEach(function (hit) {\n num_hits++;\n hit.hsps.forEach(function (hsp) {\n hsp.query_id = query.id;\n hsp.hit_id = hit.id;\n hsps_arr.push(hsp);\n });\n });\n });\n var aln_exporter = new _alignment_exporter__WEBPACK_IMPORTED_MODULE_3__[\"default\"]();\n var file_name = \"alignment-\".concat(num_hits, \"_hits\");\n aln_exporter.export_alignments(hsps_arr, file_name);\n return false;\n }\n }, {\n key: \"downloadAlignmentOfSelected\",\n value: function downloadAlignmentOfSelected() {\n var sequence_ids = $('.hit-links :checkbox:checked').map(function () {\n return this.value;\n }).get();\n var hsps_arr = [];\n var aln_exporter = new _alignment_exporter__WEBPACK_IMPORTED_MODULE_3__[\"default\"]();\n console.log('check ' + sequence_ids.toString());\n\n underscore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].each(this.props.data.queries, underscore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].bind(function (query) {\n underscore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].each(query.hits, function (hit) {\n if (underscore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].indexOf(sequence_ids, hit.id) != -1) {\n underscore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].each(hit.hsps, function (hsp) {\n hsp.hit_id = hit.id;\n hsp.query_id = query.id;\n hsps_arr.push(hsp);\n });\n }\n });\n }, this));\n\n aln_exporter.export_alignments(hsps_arr, 'alignment-' + sequence_ids.length + '_hits');\n return false;\n }\n }, {\n key: \"topPanelJSX\",\n value: function topPanelJSX() {\n var path = location.pathname.split('/'); // Get job id.\n\n var job_id = path.pop(); // Deriving rootURL this way is required for subURI deployments\n // - we cannot just send to '/'.\n\n var rootURL = path.join('/');\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(\"div\", {\n className: \"sidebar-top-panel\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"div\", {\n className: \"section-header-sidebar\",\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"h4\", {\n children: this.summaryString()\n })\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(\"div\", {\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(\"a\", {\n href: \"\".concat(rootURL, \"/?job_id=\").concat(job_id),\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"i\", {\n className: \"fa fa-pencil\"\n }), \" Edit search\"]\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"span\", {\n className: \"line\",\n children: \"|\"\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(\"a\", {\n href: \"\".concat(rootURL, \"/\"),\n onClick: this.clearSession,\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"i\", {\n className: \"fa fa-file-o\"\n }), \" New search\"]\n })]\n }), this.props.shouldShowIndex && this.indexJSX()]\n });\n }\n }, {\n key: \"summaryString\",\n value: function summaryString() {\n var program = this.props.data.program;\n var numqueries = this.props.data.queries.length;\n var numquerydb = this.props.data.querydb.length;\n return program.toUpperCase() + ': ' + numqueries + ' ' + (numqueries > 1 ? 'queries' : 'query') + ', ' + numquerydb + ' ' + (numquerydb > 1 ? 'databases' : 'database');\n }\n }, {\n key: \"indexJSX\",\n value: function indexJSX() {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(\"ul\", {\n className: \"nav hover-reset active-bold\",\n children: [\" \", underscore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].map(this.props.data.queries, function (query) {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"li\", {\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"a\", {\n className: \"btn-link nowrap-ellipsis hover-bold\",\n title: 'Query= ' + query.id + ' ' + query.title,\n href: '#Query_' + query.number,\n children: 'Query= ' + query.id\n })\n }, 'Side_bar_' + query.id);\n })]\n });\n }\n }, {\n key: \"downloadsPanelJSX\",\n value: function downloadsPanelJSX() {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(\"div\", {\n className: \"downloads\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"div\", {\n className: \"section-header-sidebar\",\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"h4\", {\n children: \"Download FASTA, XML, TSV\"\n })\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(\"ul\", {\n className: \"nav\",\n children: [!(this.props.data.imported_xml || this.props.data.non_parse_seqids) && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"li\", {\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"a\", {\n href: \"#\",\n className: \"btn-link download-fasta-of-all \".concat(!this.props.atLeastOneHit && 'disabled'),\n onClick: this.downloadFastaOfAll,\n children: \"FASTA of all hits\"\n })\n }), !(this.props.data.imported_xml || this.props.data.non_parse_seqids) && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"li\", {\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(\"a\", {\n href: \"#\",\n className: \"btn-link download-fasta-of-selected disabled\",\n onClick: this.downloadFastaOfSelected,\n children: [\"FASTA of \", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"span\", {\n className: \"text-bold\"\n }), \" selected hit(s)\"]\n })\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"li\", {\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"a\", {\n href: \"#\",\n className: \"btn-link download-alignment-of-all \".concat(!this.props.atLeastOneHit && 'disabled'),\n onClick: this.downloadAlignmentOfAll,\n children: \"Alignment of all hits\"\n })\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"li\", {\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(\"a\", {\n href: \"#\",\n className: \"btn-link download-alignment-of-selected disabled\",\n onClick: this.downloadAlignmentOfSelected,\n children: [\"Alignment of \", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"span\", {\n className: \"text-bold\"\n }), \" selected hit(s)\"]\n })\n }), !this.props.data.imported_xml && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"li\", {\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"a\", {\n className: \"btn-link download\",\n \"data-toggle\": \"tooltip\",\n title: \"15 columns: query and subject ID; scientific name, alignment length, mismatches, gaps, identity, start and end coordinates, e value, bitscore, query coverage per subject and per HSP.\",\n href: 'download/' + this.props.data.search_id + '.std_tsv',\n children: \"Standard tabular report\"\n })\n }), !this.props.data.imported_xml && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"li\", {\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"a\", {\n className: \"btn-link download\",\n \"data-toggle\": \"tooltip\",\n title: \"44 columns: query and subject ID, GI, accessions, and length; alignment details; taxonomy details of subject sequence(s) and query coverage per subject and per HSP.\",\n href: 'download/' + this.props.data.search_id + '.full_tsv',\n children: \"Full tabular report\"\n })\n }), !this.props.data.imported_xml && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"li\", {\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"a\", {\n className: \"btn-link download\",\n \"data-toggle\": \"tooltip\",\n title: \"Results in XML format.\",\n href: 'download/' + this.props.data.search_id + '.xml',\n children: \"Full XML report\"\n })\n })]\n })]\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(\"div\", {\n className: \"sidebar\",\n children: [this.topPanelJSX(), this.downloadsPanelJSX()]\n });\n }\n }]);\n\n return _default;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component);\n\n\n\n//# sourceURL=webpack://SequenceServer/./public/js/sidebar.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ _default)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var underscore__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! underscore */ \"./node_modules/underscore/modules/index-all.js\");\n/* harmony import */ var _download_fasta__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./download_fasta */ \"./public/js/download_fasta.js\");\n/* harmony import */ var _alignment_exporter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./alignment_exporter */ \"./public/js/alignment_exporter.js\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* provided dependency */ var $ = __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n // to download textual alignment\n\n/**\n * Renders links for downloading hit information in different formats.\n * Renders links for navigating to each query.\n */\n\n\n\n\nvar _default = /*#__PURE__*/function (_Component) {\n _inherits(_default, _Component);\n\n var _super = _createSuper(_default);\n\n function _default(props) {\n var _this;\n\n _classCallCheck(this, _default);\n\n _this = _super.call(this, props);\n _this.downloadFastaOfAll = _this.downloadFastaOfAll.bind(_assertThisInitialized(_this));\n _this.downloadFastaOfSelected = _this.downloadFastaOfSelected.bind(_assertThisInitialized(_this));\n _this.downloadAlignmentOfAll = _this.downloadAlignmentOfAll.bind(_assertThisInitialized(_this));\n _this.downloadAlignmentOfSelected = _this.downloadAlignmentOfSelected.bind(_assertThisInitialized(_this));\n _this.topPanelJSX = _this.topPanelJSX.bind(_assertThisInitialized(_this));\n _this.summaryString = _this.summaryString.bind(_assertThisInitialized(_this));\n _this.indexJSX = _this.indexJSX.bind(_assertThisInitialized(_this));\n _this.downloadsPanelJSX = _this.downloadsPanelJSX.bind(_assertThisInitialized(_this));\n return _this;\n }\n /**\n * Clear sessionStorage - useful to initiate a new search in the same tab.\n * Passing sessionStorage.clear directly as onclick callback didn't work\n * (on macOS Chrome).\n */\n\n\n _createClass(_default, [{\n key: \"clearSession\",\n value: function clearSession() {\n sessionStorage.clear();\n }\n /**\n * Event-handler for downloading fasta of all hits.\n */\n\n }, {\n key: \"downloadFastaOfAll\",\n value: function downloadFastaOfAll() {\n var sequence_ids = [];\n this.props.data.queries.forEach(function (query) {\n return query.hits.forEach(function (hit) {\n return sequence_ids.push(hit.id);\n });\n });\n var database_ids = this.props.data.querydb.map(function (querydb) {\n return querydb.id;\n });\n (0,_download_fasta__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(sequence_ids, database_ids);\n return false;\n }\n /**\n * Handles downloading fasta of selected hits.\n */\n\n }, {\n key: \"downloadFastaOfSelected\",\n value: function downloadFastaOfSelected() {\n var sequence_ids = $('.hit-links :checkbox:checked').map(function () {\n return this.value;\n }).get();\n\n var database_ids = underscore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].map(this.props.data.querydb, underscore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].iteratee('id'));\n\n (0,_download_fasta__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(sequence_ids, database_ids);\n return false;\n }\n }, {\n key: \"downloadAlignmentOfAll\",\n value: function downloadAlignmentOfAll() {\n // Get number of hits and array of all hsps.\n var num_hits = 0;\n var hsps_arr = [];\n this.props.data.queries.forEach(function (query) {\n return query.hits.forEach(function (hit) {\n num_hits++;\n hit.hsps.forEach(function (hsp) {\n hsp.query_id = query.id;\n hsp.hit_id = hit.id;\n hsp.hit_number = hit.number;\n hsps_arr.push(hsp);\n });\n });\n });\n var aln_exporter = new _alignment_exporter__WEBPACK_IMPORTED_MODULE_3__[\"default\"]();\n var file_name = \"alignment-\".concat(num_hits, \"_hits\");\n aln_exporter.export_alignments(hsps_arr, file_name);\n return false;\n }\n }, {\n key: \"downloadAlignmentOfSelected\",\n value: function downloadAlignmentOfSelected() {\n var sequence_ids = $('.hit-links :checkbox:checked').map(function () {\n return this.value;\n }).get();\n var hsps_arr = [];\n var aln_exporter = new _alignment_exporter__WEBPACK_IMPORTED_MODULE_3__[\"default\"]();\n console.log('check ' + sequence_ids.toString());\n\n underscore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].each(this.props.data.queries, underscore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].bind(function (query) {\n underscore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].each(query.hits, function (hit) {\n if (underscore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].indexOf(sequence_ids, hit.id) != -1) {\n underscore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].each(hit.hsps, function (hsp) {\n hsp.hit_id = hit.id;\n hsp.query_id = query.id;\n hsp.hit_number = hit.number;\n hsps_arr.push(hsp);\n });\n }\n });\n }, this));\n\n aln_exporter.export_alignments(hsps_arr, 'alignment-' + sequence_ids.length + '_hits');\n return false;\n }\n }, {\n key: \"topPanelJSX\",\n value: function topPanelJSX() {\n var path = location.pathname.split('/'); // Get job id.\n\n var job_id = path.pop(); // Deriving rootURL this way is required for subURI deployments\n // - we cannot just send to '/'.\n\n var rootURL = path.join('/');\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(\"div\", {\n className: \"sidebar-top-panel\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"div\", {\n className: \"section-header-sidebar\",\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"h4\", {\n children: this.summaryString()\n })\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(\"div\", {\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(\"a\", {\n href: \"\".concat(rootURL, \"/?job_id=\").concat(job_id),\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"i\", {\n className: \"fa fa-pencil\"\n }), \" Edit search\"]\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"span\", {\n className: \"line\",\n children: \"|\"\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(\"a\", {\n href: \"\".concat(rootURL, \"/\"),\n onClick: this.clearSession,\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"i\", {\n className: \"fa fa-file-o\"\n }), \" New search\"]\n })]\n }), this.props.shouldShowIndex && this.indexJSX()]\n });\n }\n }, {\n key: \"summaryString\",\n value: function summaryString() {\n var program = this.props.data.program;\n var numqueries = this.props.data.queries.length;\n var numquerydb = this.props.data.querydb.length;\n return program.toUpperCase() + ': ' + numqueries + ' ' + (numqueries > 1 ? 'queries' : 'query') + ', ' + numquerydb + ' ' + (numquerydb > 1 ? 'databases' : 'database');\n }\n }, {\n key: \"indexJSX\",\n value: function indexJSX() {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(\"ul\", {\n className: \"nav hover-reset active-bold\",\n children: [\" \", underscore__WEBPACK_IMPORTED_MODULE_1__[\"default\"].map(this.props.data.queries, function (query) {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"li\", {\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"a\", {\n className: \"btn-link nowrap-ellipsis hover-bold\",\n title: 'Query= ' + query.id + ' ' + query.title,\n href: '#Query_' + query.number,\n children: 'Query= ' + query.id\n })\n }, 'Side_bar_' + query.id);\n })]\n });\n }\n }, {\n key: \"downloadsPanelJSX\",\n value: function downloadsPanelJSX() {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(\"div\", {\n className: \"downloads\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"div\", {\n className: \"section-header-sidebar\",\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"h4\", {\n children: \"Download FASTA, XML, TSV\"\n })\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(\"ul\", {\n className: \"nav\",\n children: [!(this.props.data.imported_xml || this.props.data.non_parse_seqids) && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"li\", {\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"a\", {\n href: \"#\",\n className: \"btn-link download-fasta-of-all \".concat(!this.props.atLeastOneHit && 'disabled'),\n onClick: this.downloadFastaOfAll,\n children: \"FASTA of all hits\"\n })\n }), !(this.props.data.imported_xml || this.props.data.non_parse_seqids) && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"li\", {\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(\"a\", {\n href: \"#\",\n className: \"btn-link download-fasta-of-selected disabled\",\n onClick: this.downloadFastaOfSelected,\n children: [\"FASTA of \", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"span\", {\n className: \"text-bold\"\n }), \" selected hit(s)\"]\n })\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"li\", {\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"a\", {\n href: \"#\",\n className: \"btn-link download-alignment-of-all \".concat(!this.props.atLeastOneHit && 'disabled'),\n onClick: this.downloadAlignmentOfAll,\n children: \"Alignment of all hits\"\n })\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"li\", {\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(\"a\", {\n href: \"#\",\n className: \"btn-link download-alignment-of-selected disabled\",\n onClick: this.downloadAlignmentOfSelected,\n children: [\"Alignment of \", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"span\", {\n className: \"text-bold\"\n }), \" selected hit(s)\"]\n })\n }), !this.props.data.imported_xml && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"li\", {\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"a\", {\n className: \"btn-link download\",\n \"data-toggle\": \"tooltip\",\n title: \"15 columns: query and subject ID; scientific name, alignment length, mismatches, gaps, identity, start and end coordinates, e value, bitscore, query coverage per subject and per HSP.\",\n href: 'download/' + this.props.data.search_id + '.std_tsv',\n children: \"Standard tabular report\"\n })\n }), !this.props.data.imported_xml && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"li\", {\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"a\", {\n className: \"btn-link download\",\n \"data-toggle\": \"tooltip\",\n title: \"44 columns: query and subject ID, GI, accessions, and length; alignment details; taxonomy details of subject sequence(s) and query coverage per subject and per HSP.\",\n href: 'download/' + this.props.data.search_id + '.full_tsv',\n children: \"Full tabular report\"\n })\n }), !this.props.data.imported_xml && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"li\", {\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"a\", {\n className: \"btn-link download\",\n \"data-toggle\": \"tooltip\",\n title: \"Results in XML format.\",\n href: 'download/' + this.props.data.search_id + '.xml',\n children: \"Full XML report\"\n })\n })]\n })]\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(\"div\", {\n className: \"sidebar\",\n children: [this.topPanelJSX(), this.downloadsPanelJSX()]\n });\n }\n }]);\n\n return _default;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component);\n\n\n\n//# sourceURL=webpack://SequenceServer/./public/js/sidebar.js?"); /***/ }), @@ -504,7 +504,7 @@ eval("\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs \****************************************************************/ /***/ ((module, exports, __webpack_require__) => { -eval("/* provided dependency */ var jQuery = __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\");\nvar __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!function (a) { var b = function () { window.asyncWebshims || (window.asyncWebshims = { cfg: [], ready: [] }) }, c = function () { window.jQuery && (a(jQuery), a = function () { return window.webshims }) }; window.webshims = { setOptions: function () { b(), window.asyncWebshims.cfg.push(arguments) }, ready: function () { b(), window.asyncWebshims.ready.push(arguments) }, activeLang: function (a) { b(), window.asyncWebshims.lang = a }, polyfill: function (a) { b(), window.asyncWebshims.polyfill = a }, _curScript: function () { var a, b, c, d, e, f = document.currentScript; if (!f) { try { throw new Error(\"\") } catch (g) { for (c = (g.sourceURL || g.stack || \"\").split(\"\\n\"), e = /(?:fil|htt|wid|abo|app|res)(.)+/i, b = 0; b < c.length; b++)if (d = c[b].match(e)) { c = d[0].replace(/[\\:\\s\\(]+[\\d\\:\\)\\(\\s]+$/, \"\"); break } } for (a = document.scripts || document.getElementsByTagName(\"script\"), b = 0; b < a.length && (!a[b].getAttribute(\"src\") || (f = a[b], \"interactive\" != a[b].readyState && c != a[b].src)); b++); } return f }() }, window.webshim = window.webshims, window.webshims.timer = setInterval(c, 0), c(), true && !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")], __WEBPACK_AMD_DEFINE_FACTORY__ = (a),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) }(function (a) { \"use strict\"; function b(a) { return document.createElement(a) } var c, d, e = window.navigator, f = window.webshims, g = \"dom-support\", h = a.event.special, i = a([]), j = window.asyncWebshims, k = {}, l = window.Object, m = function (a) { return a + \"\\n//# sourceURL=\" + this.url }, n = function (a) { return q.enhanceAuto || \"auto\" != a ? a : !1 }, o = { matchmedia: \"matchMedia\", xhr2: \"filereader\", promise: \"es6\", URL: \"url\" }, p = \"capture\" in b(\"input\"); clearInterval(f.timer), k.advancedObjectProperties = k.objectAccessor = k.ES5 = !!(\"create\" in l && \"seal\" in l), !k.ES5 || \"toJSON\" in Date.prototype || (k.ES5 = !1), d = a.support.hrefNormalized === !1 ? f._curScript.getAttribute(\"src\", 4) : f._curScript.src, d = d.split(\"?\")[0].slice(0, d.lastIndexOf(\"/\") + 1) + \"shims/\", a.extend(f, { version: \"1.16.0\", cfg: { enhanceAuto: window.Audio && (!window.matchMedia || matchMedia(\"(min-device-width: 721px)\").matches), waitReady: !0, loadStyles: !0, wsdoc: document, wspopover: { appendTo: \"auto\", hideOnBlur: !0 }, ajax: { crossDomain: !0 }, loadScript: function (b, c) { a.ajax(a.extend({}, q.ajax, { url: b, success: c, dataType: \"script\", cache: !0, global: !1, dataFilter: m })) }, basePath: d }, support: k, bugs: {}, modules: {}, features: {}, featureList: [], setOptions: function (b, c) { \"string\" == typeof b && arguments.length > 1 ? q[b] = a.isPlainObject(c) ? a.extend(!0, q[b] || {}, c) : c : \"object\" == typeof b && a.extend(!0, q, b) }, _getAutoEnhance: n, addPolyfill: function (b, c) { c = c || {}; var d = c.f || b; r[d] || (r[d] = [], f.featureList.push(d), q[d] = {}), r[d].push(b), c.options = a.extend(q[d], c.options), y(b, c), c.methodNames && a.each(c.methodNames, function (a, b) { f.addMethodName(b) }) }, polyfill: function () { return function (a) { a || (a = f.featureList), \"string\" == typeof a && (a = a.split(\" \")); return f._polyfill(a) } }(), _polyfill: function (b) { var d, e, f = []; c.run || (d = -1 !== a.inArray(\"forms-ext\", b), c(), e = d && !v[\"form-number-date-ui\"].test() || !p && -1 !== a.inArray(\"mediacapture\", b), d && -1 == a.inArray(\"forms\", b) && b.push(\"forms\"), q.loadStyles && w.loadCSS(\"styles/shim\" + (e ? \"-ext\" : \"\") + \".css\")), q.waitReady && (a.readyWait++, t(b, function () { a.ready(!0) })), a.each(b, function (a, b) { return b = o[b] || b, r[b] ? (b !== r[b][0] && t(r[b], function () { s(b, !0) }), void (f = f.concat(r[b]))) : void s(b, !0) }), x(f), a.each(b, function (a, b) { var c = q[b]; c && (\"mediaelement\" == b && (c.replaceUI = n(c.replaceUI)) && c.plugins.unshift(\"mediacontrols\"), c.plugins && c.plugins.length && x(q[b].plugins)) }) }, reTest: function () { var b, c = function (c, d) { var e = v[d], f = d + \"Ready\"; !e || e.loaded || (e.test && a.isFunction(e.test) ? e.test([]) : e.test) || (h[f] && delete h[f], r[e.f], b.push(d)) }; return function (d) { \"string\" == typeof d && (d = d.split(\" \")), b = [], a.each(d, c), x(b) } }(), isReady: function (b, c) { if (b += \"Ready\", c) { if (h[b] && h[b].add) return !0; h[b] = a.extend(h[b] || {}, { add: function (a) { a.handler.call(this, b) } }), a(document).triggerHandler(b) } return !(!h[b] || !h[b].add) || !1 }, ready: function (b, c) { var d = arguments[2]; if (\"string\" == typeof b && (b = b.split(\" \")), d || (b = a.map(a.grep(b, function (a) { return !s(a) }), function (a) { return a + \"Ready\" })), !b.length) return void c(a, f, window, document); var e = b.shift(), g = function () { t(b, c, !0) }; a(document).one(e, g) }, capturingEvents: function (b, c) { document.addEventListener && (\"string\" == typeof b && (b = [b]), a.each(b, function (b, d) { var e = function (b) { return b = a.event.fix(b), c && f.capturingEventPrevented && f.capturingEventPrevented(b), a.event.dispatch.call(this, b) }; h[d] = h[d] || {}, h[d].setup || h[d].teardown || a.extend(h[d], { setup: function () { this.addEventListener(d, e, !0) }, teardown: function () { this.removeEventListener(d, e, !0) } }) })) }, register: function (b, c) { var d = v[b]; if (!d) return void f.error(\"can't find module: \" + b); d.loaded = !0; var e = function () { c(a, f, window, document, void 0, d.options), s(b, !0) }; d.d && d.d.length ? t(d.d, e) : e() }, c: {}, loader: { addModule: function (b, c) { v[b] = c, c.name = c.name || b, c.c || (c.c = []), a.each(c.c, function (a, c) { f.c[c] || (f.c[c] = []), f.c[c].push(b) }) }, loadList: function () { var b = [], c = function (c, d) { \"string\" == typeof d && (d = [d]), a.merge(b, d), w.loadScript(c, !1, d) }, d = function (c, d) { if (s(c) || -1 != a.inArray(c, b)) return !0; var e, f = v[c]; return f ? (e = f.test && a.isFunction(f.test) ? f.test(d) : f.test, e ? (s(c, !0), !0) : !1) : !0 }, e = function (b, c) { if (b.d && b.d.length) { var e = function (b, e) { d(e, c) || -1 != a.inArray(e, c) || c.push(e) }; a.each(b.d, function (b, c) { v[c] ? v[c].loaded || e(b, c) : r[c] && (a.each(r[c], e), t(r[c], function () { s(c, !0) })) }), b.noAutoCallback || (b.noAutoCallback = !0) } }; return function (g) { var h, i, j, k, l = [], m = function (d, e) { return k = e, a.each(f.c[e], function (c, d) { return -1 == a.inArray(d, l) || -1 != a.inArray(d, b) ? (k = !1, !1) : void 0 }), k ? (c(\"combos/\" + k, f.c[k]), !1) : void 0 }; for (i = 0; i < g.length; i++)h = v[g[i]], h && !d(h.name, g) && (h.css && q.loadStyles && w.loadCSS(h.css), h.loadInit && h.loadInit(), e(h, g), h.loaded || l.push(h.name), h.loaded = !0); for (i = 0, j = l.length; j > i; i++)k = !1, h = l[i], -1 == a.inArray(h, b) && (\"noCombo\" != q.debug && a.each(v[h].c, m), k || c(v[h].src || h, h)) } }(), makePath: function (a) { return -1 != a.indexOf(\"//\") || 0 === a.indexOf(\"/\") ? a : (-1 == a.indexOf(\".\") && (a += \".js\"), q.addCacheBuster && (a += q.addCacheBuster), q.basePath + a) }, loadCSS: function () { var b, c = {}; return function (d) { d = this.makePath(d), c[d] || (b = b || a(\"link, style\")[0] || a(\"script\")[0], c[d] = 1, a('').insertBefore(b).attr({ href: d })) } }(), loadScript: function () { var b = {}; return function (c, d, e, f) { if (f || (c = w.makePath(c)), !b[c]) { var g = function () { d && d(), e && (\"string\" == typeof e && (e = e.split(\" \")), a.each(e, function (a, b) { v[b] && (v[b].afterLoad && v[b].afterLoad(), s(v[b].noAutoCallback ? b + \"FileLoaded\" : b, !0)) })) }; b[c] = 1, q.loadScript(c, g, a.noop) } } }() } }); var q = f.cfg, r = f.features, s = f.isReady, t = f.ready, u = f.addPolyfill, v = f.modules, w = f.loader, x = w.loadList, y = w.addModule, z = f.bugs, A = [], B = { warn: 1, error: 1 }, C = a.fn, D = b(\"video\"); f.addMethodName = function (a) { a = a.split(\":\"); var b = a[1]; 1 == a.length ? (b = a[0], a = a[0]) : a = a[0], C[a] = function () { return this.callProp(b, arguments) } }, C.callProp = function (b, c) { var d; return c || (c = []), this.each(function () { var e = a.prop(this, b); if (e && e.apply) { if (d = e.apply(this, c), void 0 !== d) return !1 } else f.warn(b + \" is not a method of \" + this) }), void 0 !== d ? d : this }, f.activeLang = function () { \"language\" in e || (e.language = e.browserLanguage || \"\"); var b = a.attr(document.documentElement, \"lang\") || e.language; return t(\"webshimLocalization\", function () { f.activeLang(b) }), function (a) { if (a) if (\"string\" == typeof a) b = a; else if (\"object\" == typeof a) { var c = arguments, d = this; t(\"webshimLocalization\", function () { f.activeLang.apply(d, c) }) } return b } }(), f.errorLog = [], a.each([\"log\", \"error\", \"warn\", \"info\"], function (a, b) { f[b] = function (a) { (B[b] && q.debug !== !1 || q.debug) && (f.errorLog.push(a), window.console && console.log && console[console[b] ? b : \"log\"](a)) } }), function () { a.isDOMReady = a.isReady; var b = function () { a.isDOMReady = !0, s(\"DOM\", !0), setTimeout(function () { s(\"WINDOWLOAD\", !0) }, 9999) }; c = function () { if (!c.run) { if (!a.isDOMReady && q.waitReady) { var d = a.ready; a.ready = function (a) { return a !== !0 && document.body && b(), d.apply(this, arguments) }, a.ready.promise = d.promise } q.readyEvt ? a(document).one(q.readyEvt, b) : a(b) } c.run = !0 }, a(window).on(\"load\", function () { b(), setTimeout(function () { s(\"WINDOWLOAD\", !0) }, 9) }); var d = [], e = function () { 1 == this.nodeType && f.triggerDomUpdate(this) }; a.extend(f, { addReady: function (a) { var b = function (b, c) { f.ready(\"DOM\", function () { a(b, c) }) }; d.push(b), q.wsdoc && b(q.wsdoc, i) }, triggerDomUpdate: function (b) { if (!b || !b.nodeType) return void (b && b.jquery && b.each(function () { f.triggerDomUpdate(this) })); var c = b.nodeType; if (1 == c || 9 == c) { var e = b !== document ? a(b) : i; a.each(d, function (a, c) { c(b, e) }) } } }), C.clonePolyfill = C.clone, C.htmlPolyfill = function (b) { if (!arguments.length) return a(this.clonePolyfill()).html(); var c = C.html.call(this, b); return c === this && a.isDOMReady && this.each(e), c }, C.jProp = function () { return this.pushStack(a(C.prop.apply(this, arguments) || [])) }, a.each([\"after\", \"before\", \"append\", \"prepend\", \"replaceWith\"], function (b, c) { C[c + \"Polyfill\"] = function (b) { return b = a(b), C[c].call(this, b), a.isDOMReady && b.each(e), this } }), a.each([\"insertAfter\", \"insertBefore\", \"appendTo\", \"prependTo\", \"replaceAll\"], function (b, c) { C[c.replace(/[A-Z]/, function (a) { return \"Polyfill\" + a })] = function () { return C[c].apply(this, arguments), a.isDOMReady && f.triggerDomUpdate(this), this } }), C.updatePolyfill = function () { return a.isDOMReady && f.triggerDomUpdate(this), this }, a.each([\"getNativeElement\", \"getShadowElement\", \"getShadowFocusElement\"], function (a, b) { C[b] = function () { return this.pushStack(this) } }) }(), l.create && (f.objectCreate = function (b, c, d) { var e = l.create(b); return d && (e.options = a.extend(!0, {}, e.options || {}, d), d = e.options), e._create && a.isFunction(e._create) && e._create(d), e }), y(\"swfmini\", { test: function () { return window.swfobject && !window.swfmini && (window.swfmini = window.swfobject), \"swfmini\" in window }, c: [16, 7, 2, 8, 1, 12, 23] }), v.swfmini.test(), y(\"sizzle\", { test: a.expr.filters }), u(\"es5\", { test: !(!k.ES5 || !Function.prototype.bind), d: [\"sizzle\"] }), u(\"dom-extend\", { f: g, noAutoCallback: !0, d: [\"es5\"], c: [16, 7, 2, 15, 30, 3, 8, 4, 9, 10, 25, 31, 34] }), b(\"picture\"), u(\"picture\", { test: \"picturefill\" in window || !!window.HTMLPictureElement || \"respimage\" in window, d: [\"matchMedia\"], c: [18], loadInit: function () { s(\"picture\", !0) } }), u(\"matchMedia\", { test: !(!window.matchMedia || !matchMedia(\"all\").addListener), c: [18] }), u(\"sticky\", { test: -1 != (a(b(\"b\")).attr(\"style\", \"position: -webkit-sticky; position: sticky\").css(\"position\") || \"\").indexOf(\"sticky\"), d: [\"es5\", \"matchMedia\"] }), u(\"es6\", { test: !!(Math.imul && Number.MIN_SAFE_INTEGER && l.is && window.Promise && Promise.all), d: [\"es5\"] }), u(\"geolocation\", { test: \"geolocation\" in e, options: { destroyWrite: !0 }, c: [21] }), function () { u(\"canvas\", { src: \"excanvas\", test: \"getContext\" in b(\"canvas\"), options: { type: \"flash\" }, noAutoCallback: !0, loadInit: function () { var a = this.options.type; !a || -1 === a.indexOf(\"flash\") || v.swfmini.test() && !swfmini.hasFlashPlayerVersion(\"9.0.0\") || (this.src = \"flash\" == a ? \"FlashCanvas/flashcanvas\" : \"FlashCanvasPro/flashcanvas\") }, methodNames: [\"getContext\"], d: [g] }) }(); var E = \"getUserMedia\" in e; u(\"usermedia-core\", { f: \"usermedia\", test: E && !!window.URL, d: [\"url\", g] }), u(\"usermedia-shim\", { f: \"usermedia\", test: !!(E || e.webkitGetUserMedia || e.mozGetUserMedia || e.msGetUserMedia), d: [\"url\", \"mediaelement\", g] }), u(\"mediacapture\", { test: p, d: [\"swfmini\", \"usermedia\", g, \"filereader\", \"forms\", \"canvas\"] }), function () { var c, d, h = \"form-shim-extend\", i = \"formvalidation\", j = \"form-number-date-api\", l = !1, m = !1, o = !1, p = {}, r = b(\"progress\"), s = b(\"output\"), t = function () { var d, f, g = \"1(\", j = b(\"input\"); if (f = a('