Add batch mode support for Folddisco queries#117
Open
igmorv-genesis wants to merge 1 commit intosoedinglab:masterfrom
Open
Add batch mode support for Folddisco queries#117igmorv-genesis wants to merge 1 commit intosoedinglab:masterfrom
igmorv-genesis wants to merge 1 commit intosoedinglab:masterfrom
Conversation
Add support for querying multiple protein structures with multiple motifs in a single Folddisco job request. API changes: - Accept queries[] and motifs[] array parameters for batch submissions - Each motifs[] entry may contain multiple motifs separated by ";" - Add configurable --top N parameter (default: 1000) - Support both multipart/form-data and URL-encoded requests Backend changes: - Add FoldDiscoJob.Motifs and queries fields for batch state - Add WriteBatchFiles() to generate per-query structure files and a 3-column tab-separated batch file (structure, motif, output path) - Generate per-database batch files with column 3 output paths so each query writes to its own file, avoiding interleaved output and enabling full multi-threading - Concatenate per-query result files into the final alignment output - Extract validateFolddiscoDatabases() and ismmCIFFirstLine() helpers - Include Top and batch fields in job hash for correct caching
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add support for querying multiple protein structures with multiple motifs in a single Folddisco job request, using the
folddisco query -q <batch_file>CLI interface.API changes
queries[]andmotifs[]array parameters for batch submissions via bothmultipart/form-dataand URL-encoded requestsmotifs[]entry may contain multiple motifs separated by;, allowing a single structure to be searched with several motif specifications without re-uploadingtopparameter to control the number of results per query (default: 1000)q+motifparameters) remains fully backward-compatibleBackend changes
folddiscojob.go: AddMotifs [][]stringandqueries []stringfields for batch state. AddWriteBatchFiles()to generate per-query structure files and a 3-column tab-separated batch file (structure path, motif, output path). ExtractvalidateFolddiscoDatabases()helper. IncludeTopand batch fields in job hash for correct caching.jobsystem.go: Dispatch toWriteBatchFiles()for batch jobs inWriteSupportFiles.server.go: Parsequeries[]/motifs[]arrays in the ticket handler, split;-separated motifs, and route toNewFoldDiscoBatchJobRequestorNewFoldDiscoJobRequest.worker.go: For batch jobs, generate a per-database 3-column batch file with output paths in column 3 so each query writes to its own file (avoiding interleaved multi-threaded output). Run a singlefolddisco query -q <batch_file>invocation with full threading. Concatenate per-query result files into the final alignment output. ExtractismmCIFFirstLine(),readBatchLines(), andconcatFiles()helpers.Batch file format
The generated batch file follows the
folddisco query -qspecification:Example usage