Skip to content

Commit

Permalink
tweaks for a version of sequence server that the mines can post seque…
Browse files Browse the repository at this point in the history
…nces to
  • Loading branch information
adf-ncgr committed Sep 24, 2024
1 parent f93aa68 commit b5fa131
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
COMPOSE_PROJECT_NAME=lis-blast
COMPOSE_PROJECT_NAME=all-genera-blast3
REVERSE_PROXY_PORT=8010
2 changes: 1 addition & 1 deletion compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ services:
healthcheck:
test: ["CMD-SHELL", "{ curl -qo /dev/null http://localhost:4567/searchdata.json || exit 1; } && [ $$(ps -p $$(pgrep --parent 1 --ful sequenceserver) -o rss=) -lt 4000000 ] || kill 1"]
ports:
- "4567:4567"
- "${REVERSE_PROXY_PORT}:4567"
2 changes: 1 addition & 1 deletion db/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FROM ncbi/blast-static:2.14.1

WORKDIR /db
VOLUME ["/db"]

ENV DATA_STORE=https://data.legumeinfo.org
RUN printf '#!/bin/bash\nset -o pipefail -o errexit -o nounset; curl ${DATA_STORE}/${1} | gzip -dc | makeblastdb -parse_seqids -hash_index -dbtype ${2} -taxid ${3} -title "${4}" -out $(basename ${1#.f*.gz})\n' > /usr/local/bin/mkblastdb \
Expand Down Expand Up @@ -109,3 +108,4 @@ RUN mkblastdb Vigna/angularis/annotations/Gyeongwon.gnm3.ann1.3Nz5/vigan.Gyeongw
RUN mkblastdb Vigna/radiata/annotations/VC1973A.gnm7.ann1.RWBG/vigra.VC1973A.gnm7.ann1.RWBG.protein.faa.gz prot 157791 'Vigna radiata VC1973A v7.1 proteins'
RUN mkblastdb Vigna/unguiculata/annotations/IT97K-499-35.gnm1.ann2.FD7K/vigun.IT97K-499-35.gnm1.ann2.FD7K.protein_primary.faa.gz prot 3917 'Vigna unguiculata IT97K-499-35 v1.2 proteins'

VOLUME ["/db"]
2 changes: 1 addition & 1 deletion lib/sequenceserver/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def defaults
}
},
num_threads: 1,
num_jobs: 1,
num_jobs: 5,
job_lifetime: 43_200,
# Set cloud_share_url to 'disabled' to disable the cloud sharing feature
cloud_share_url: 'https://share.sequenceserver.com/api/v1/shared-job',
Expand Down
14 changes: 10 additions & 4 deletions lib/sequenceserver/links.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,10 @@ def jbrowse
end

# Prepare other fields besides sessionTracks
locStart = coordinates[1][0].to_s()
locEnd = coordinates[1][1].to_s()
#locStart = coordinates[1][0].to_s()
#locEnd = coordinates[1][1].to_s()
locStart = hsps[0].sstart.to_s()
locEnd = hsps[0].send.to_s()
assembly = id.match('^.+gnm\d+')[0]
tracks = 'sequenceserver_track'

Expand Down Expand Up @@ -134,8 +136,12 @@ def jbrowse
sessionTracks << ']}}]'

# Assemble the JBrowse link URL from the fields above
url = 'https://dev.peanutbase.org/tools/jbrowse2/'
url << '?loc=' + id + ':' + locStart + '-' + locEnd
url = 'https://all-genera.lis.ncgr.org/tools/jbrowse2/'
if locStart <= locEnd
url << '?loc=' + id + ':' + locStart + '-' + locEnd
else
url << '?loc=' + id + ':' + locEnd + '-' + locStart
end
url << '&assembly=' + assembly
url << '&tracks=' + tracks
url << '&sessionTracks=' + sessionTracks
Expand Down
2 changes: 1 addition & 1 deletion lib/sequenceserver/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Routes < Sinatra::Base
secret: ENV.fetch('SESSION_SECRET') { SecureRandom.alphanumeric(64) }
)

use Rack::Csrf, raise: true, skip: ['POST:/cloud_share']
#use Rack::Csrf, raise: true, skip: ['POST:/cloud_share']
end

unless ENV['SEQUENCE_SERVER_COMPRESS_RESPONSES'] == 'false'
Expand Down
3 changes: 1 addition & 2 deletions public/js/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ export class Form extends Component {
</div>

<form id="blast" ref={this.formRef} onSubmit={this.handleFormSubmission}>
<input type="hidden" name="_csrf" value={document.querySelector('meta[name="_csrf"]').content} />
<div className="px-4">
<SearchQueryWidget ref="query" onSequenceTypeChanged={this.handleSequenceTypeChanged} onSequenceChanged={this.handleSequenceChanged}/>

Expand Down Expand Up @@ -305,4 +304,4 @@ class MixedNotification extends Component {
</div>
);
}
}
}

0 comments on commit b5fa131

Please sign in to comment.