404
+ +Page not found
+ + +Page not found
+ + +This section documents the ssdraw multi command.
usage: generate_docs.py multi [-h] -i INPUT -o OUTPUT
+
+options:
+ -h, --help show this help message and exit
+ -i, --input INPUT Name of input script
+ -o, --output OUTPUT Name of output directory
+
+
+ This section documents the ssdraw single command.
usage: generate_docs.py single [-h] [-f FASTA] [-p PDB] [-n NAME] [-o OUTPUT] [--SS SS] [--chain_id CHAIN_ID] [--color_map [COLOR_MAP ...]]
+ [--scoring_file SCORING_FILE] [--color COLOR] [-conservation_score] [--output_file_type OUTPUT_FILE_TYPE] [-bfactor]
+ [-mview] [--dpi DPI] [--ticks TICKS] [--start START] [--end END] [--dssp_exe DSSP_EXE] [--consurf CONSURF]
+ [--fontsize FONTSIZE] [--fontcolor FONTCOLOR]
+
+options:
+ -h, --help show this help message and exit
+ -f, --fasta FASTA (required) sequence/alignment file in fasta format
+ -p, --pdb PDB (required) pdb file
+ -n, --name NAME (required) id of the protein in the alignment file
+ -o, --output OUTPUT (required) name for output file
+ --SS SS secondary structure annotation in DSSP or .horiz format. If this option is not provided, SSDraw will compute secondary structure
+ from the given PDB file with DSSP.
+ --chain_id CHAIN_ID chain id to use in pdb. Defaults to chain A.
+ --color_map [COLOR_MAP ...]
+ color map to use for heat map
+ --scoring_file SCORING_FILE
+ custom scoring file for alignment
+ --color COLOR color for the image. Can be a color name (eg. white, black, green), or a hex code
+ -conservation_score score alignment by conservation score
+ --output_file_type OUTPUT_FILE_TYPE
+ output file type. Options: png, ps, eps, tif, svg
+ -bfactor score by B-factor
+ -mview color by mview color map
+ --dpi DPI dpi to use for final plot
+ --ticks TICKS set ticks at every nth position
+ --start START
+ --end END
+ --dssp_exe DSSP_EXE The path to your dssp executable. Default: mkdssp
+ --consurf CONSURF consurf or rate4site file to color image with. If rate4site file is given, SSDraw will convert raw scores to grades.
+ --fontsize FONTSIZE font size for residue numbers
+ --fontcolor FONTCOLOR
+ font color for residue numbers
+
+
+ The easiest way to install SSDraw is via pip:
+pip install SSDraw
+
+You can find the package on PyPi here.
+ +SSDraw is a program that generates publication-quality protein secondary structure diagrams from three-dimensional protein structures. To depict relationships between secondary structure and other protein features, diagrams can be colored by conservation score, B-factor, or custom scoring.
+SSDraw also has a colab notebook available (only usable for Chrome). The notebook can be accessed here.
+ +' + escapeHtml(summary) +'
' + noResultsText + '
'); + } +} + +function doSearch () { + var query = document.getElementById('mkdocs-search-query').value; + if (query.length > min_search_length) { + if (!window.Worker) { + displayResults(search(query)); + } else { + searchWorker.postMessage({query: query}); + } + } else { + // Clear results for short queries + displayResults([]); + } +} + +function initSearch () { + var search_input = document.getElementById('mkdocs-search-query'); + if (search_input) { + search_input.addEventListener("keyup", doSearch); + } + var term = getSearchTermFromLocation(); + if (term) { + search_input.value = term; + doSearch(); + } +} + +function onWorkerMessage (e) { + if (e.data.allowSearch) { + initSearch(); + } else if (e.data.results) { + var results = e.data.results; + displayResults(results); + } else if (e.data.config) { + min_search_length = e.data.config.min_search_length-1; + } +} + +if (!window.Worker) { + console.log('Web Worker API not supported'); + // load index in main thread + $.getScript(joinUrl(base_url, "search/worker.js")).done(function () { + console.log('Loaded worker'); + init(); + window.postMessage = function (msg) { + onWorkerMessage({data: msg}); + }; + }).fail(function (jqxhr, settings, exception) { + console.error('Could not load worker.js'); + }); +} else { + // Wrap search in a web worker + var searchWorker = new Worker(joinUrl(base_url, "search/worker.js")); + searchWorker.postMessage({init: true}); + searchWorker.onmessage = onWorkerMessage; +} diff --git a/site/search/search_index.json b/site/search/search_index.json new file mode 100644 index 0000000..8f1ff51 --- /dev/null +++ b/site/search/search_index.json @@ -0,0 +1 @@ +{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"SSDraw SSDraw is a program that generates publication-quality protein secondary structure diagrams from three-dimensional protein structures. To depict relationships between secondary structure and other protein features, diagrams can be colored by conservation score, B-factor, or custom scoring. SSDraw also has a colab notebook available (only usable for Chrome). The notebook can be accessed here .","title":"Home"},{"location":"#ssdraw","text":"SSDraw is a program that generates publication-quality protein secondary structure diagrams from three-dimensional protein structures. To depict relationships between secondary structure and other protein features, diagrams can be colored by conservation score, B-factor, or custom scoring. SSDraw also has a colab notebook available (only usable for Chrome). The notebook can be accessed here .","title":"SSDraw"},{"location":"getting-started/","text":"Installation The easiest way to install SSDraw is via pip: pip install SSDraw You can find the package on PyPi here .","title":"Getting Started"},{"location":"getting-started/#installation","text":"The easiest way to install SSDraw is via pip: pip install SSDraw You can find the package on PyPi here .","title":"Installation"},{"location":"commands/multi/","text":"SSDraw multi Command This section documents the ssdraw multi command. usage: generate_docs.py multi [-h] -i INPUT -o OUTPUT options: -h, --help show this help message and exit -i, --input INPUT Name of input script -o, --output OUTPUT Name of output directory","title":"multi"},{"location":"commands/multi/#ssdraw-multi-command","text":"This section documents the ssdraw multi command. usage: generate_docs.py multi [-h] -i INPUT -o OUTPUT options: -h, --help show this help message and exit -i, --input INPUT Name of input script -o, --output OUTPUT Name of output directory","title":"SSDraw multi Command"},{"location":"commands/single/","text":"SSDraw single Command This section documents the ssdraw single command. usage: generate_docs.py single [-h] [-f FASTA] [-p PDB] [-n NAME] [-o OUTPUT] [--SS SS] [--chain_id CHAIN_ID] [--color_map [COLOR_MAP ...]] [--scoring_file SCORING_FILE] [--color COLOR] [-conservation_score] [--output_file_type OUTPUT_FILE_TYPE] [-bfactor] [-mview] [--dpi DPI] [--ticks TICKS] [--start START] [--end END] [--dssp_exe DSSP_EXE] [--consurf CONSURF] [--fontsize FONTSIZE] [--fontcolor FONTCOLOR] options: -h, --help show this help message and exit -f, --fasta FASTA (required) sequence/alignment file in fasta format -p, --pdb PDB (required) pdb file -n, --name NAME (required) id of the protein in the alignment file -o, --output OUTPUT (required) name for output file --SS SS secondary structure annotation in DSSP or .horiz format. If this option is not provided, SSDraw will compute secondary structure from the given PDB file with DSSP. --chain_id CHAIN_ID chain id to use in pdb. Defaults to chain A. --color_map [COLOR_MAP ...] color map to use for heat map --scoring_file SCORING_FILE custom scoring file for alignment --color COLOR color for the image. Can be a color name (eg. white, black, green), or a hex code -conservation_score score alignment by conservation score --output_file_type OUTPUT_FILE_TYPE output file type. Options: png, ps, eps, tif, svg -bfactor score by B-factor -mview color by mview color map --dpi DPI dpi to use for final plot --ticks TICKS set ticks at every nth position --start START --end END --dssp_exe DSSP_EXE The path to your dssp executable. Default: mkdssp --consurf CONSURF consurf or rate4site file to color image with. If rate4site file is given, SSDraw will convert raw scores to grades. --fontsize FONTSIZE font size for residue numbers --fontcolor FONTCOLOR font color for residue numbers","title":"single"},{"location":"commands/single/#ssdraw-single-command","text":"This section documents the ssdraw single command. usage: generate_docs.py single [-h] [-f FASTA] [-p PDB] [-n NAME] [-o OUTPUT] [--SS SS] [--chain_id CHAIN_ID] [--color_map [COLOR_MAP ...]] [--scoring_file SCORING_FILE] [--color COLOR] [-conservation_score] [--output_file_type OUTPUT_FILE_TYPE] [-bfactor] [-mview] [--dpi DPI] [--ticks TICKS] [--start START] [--end END] [--dssp_exe DSSP_EXE] [--consurf CONSURF] [--fontsize FONTSIZE] [--fontcolor FONTCOLOR] options: -h, --help show this help message and exit -f, --fasta FASTA (required) sequence/alignment file in fasta format -p, --pdb PDB (required) pdb file -n, --name NAME (required) id of the protein in the alignment file -o, --output OUTPUT (required) name for output file --SS SS secondary structure annotation in DSSP or .horiz format. If this option is not provided, SSDraw will compute secondary structure from the given PDB file with DSSP. --chain_id CHAIN_ID chain id to use in pdb. Defaults to chain A. --color_map [COLOR_MAP ...] color map to use for heat map --scoring_file SCORING_FILE custom scoring file for alignment --color COLOR color for the image. Can be a color name (eg. white, black, green), or a hex code -conservation_score score alignment by conservation score --output_file_type OUTPUT_FILE_TYPE output file type. Options: png, ps, eps, tif, svg -bfactor score by B-factor -mview color by mview color map --dpi DPI dpi to use for final plot --ticks TICKS set ticks at every nth position --start START --end END --dssp_exe DSSP_EXE The path to your dssp executable. Default: mkdssp --consurf CONSURF consurf or rate4site file to color image with. If rate4site file is given, SSDraw will convert raw scores to grades. --fontsize FONTSIZE font size for residue numbers --fontcolor FONTCOLOR font color for residue numbers","title":"SSDraw single Command"}]} \ No newline at end of file diff --git a/site/search/worker.js b/site/search/worker.js new file mode 100644 index 0000000..8628dbc --- /dev/null +++ b/site/search/worker.js @@ -0,0 +1,133 @@ +var base_path = 'function' === typeof importScripts ? '.' : '/search/'; +var allowSearch = false; +var index; +var documents = {}; +var lang = ['en']; +var data; + +function getScript(script, callback) { + console.log('Loading script: ' + script); + $.getScript(base_path + script).done(function () { + callback(); + }).fail(function (jqxhr, settings, exception) { + console.log('Error: ' + exception); + }); +} + +function getScriptsInOrder(scripts, callback) { + if (scripts.length === 0) { + callback(); + return; + } + getScript(scripts[0], function() { + getScriptsInOrder(scripts.slice(1), callback); + }); +} + +function loadScripts(urls, callback) { + if( 'function' === typeof importScripts ) { + importScripts.apply(null, urls); + callback(); + } else { + getScriptsInOrder(urls, callback); + } +} + +function onJSONLoaded () { + data = JSON.parse(this.responseText); + var scriptsToLoad = ['lunr.js']; + if (data.config && data.config.lang && data.config.lang.length) { + lang = data.config.lang; + } + if (lang.length > 1 || lang[0] !== "en") { + scriptsToLoad.push('lunr.stemmer.support.js'); + if (lang.length > 1) { + scriptsToLoad.push('lunr.multi.js'); + } + if (lang.includes("ja") || lang.includes("jp")) { + scriptsToLoad.push('tinyseg.js'); + } + for (var i=0; i < lang.length; i++) { + if (lang[i] != 'en') { + scriptsToLoad.push(['lunr', lang[i], 'js'].join('.')); + } + } + } + loadScripts(scriptsToLoad, onScriptsLoaded); +} + +function onScriptsLoaded () { + console.log('All search scripts loaded, building Lunr index...'); + if (data.config && data.config.separator && data.config.separator.length) { + lunr.tokenizer.separator = new RegExp(data.config.separator); + } + + if (data.index) { + index = lunr.Index.load(data.index); + data.docs.forEach(function (doc) { + documents[doc.location] = doc; + }); + console.log('Lunr pre-built index loaded, search ready'); + } else { + index = lunr(function () { + if (lang.length === 1 && lang[0] !== "en" && lunr[lang[0]]) { + this.use(lunr[lang[0]]); + } else if (lang.length > 1) { + this.use(lunr.multiLanguage.apply(null, lang)); // spread operator not supported in all browsers: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator#Browser_compatibility + } + this.field('title'); + this.field('text'); + this.ref('location'); + + for (var i=0; i < data.docs.length; i++) { + var doc = data.docs[i]; + this.add(doc); + documents[doc.location] = doc; + } + }); + console.log('Lunr index built, search ready'); + } + allowSearch = true; + postMessage({config: data.config}); + postMessage({allowSearch: allowSearch}); +} + +function init () { + var oReq = new XMLHttpRequest(); + oReq.addEventListener("load", onJSONLoaded); + var index_path = base_path + '/search_index.json'; + if( 'function' === typeof importScripts ){ + index_path = 'search_index.json'; + } + oReq.open("GET", index_path); + oReq.send(); +} + +function search (query) { + if (!allowSearch) { + console.error('Assets for search still loading'); + return; + } + + var resultDocuments = []; + var results = index.search(query); + for (var i=0; i < results.length; i++){ + var result = results[i]; + doc = documents[result.ref]; + doc.summary = doc.text.substring(0, 200); + resultDocuments.push(doc); + } + return resultDocuments; +} + +if( 'function' === typeof importScripts ) { + onmessage = function (e) { + if (e.data.init) { + init(); + } else if (e.data.query) { + postMessage({ results: search(e.data.query) }); + } else { + console.error("Worker - Unrecognized message: " + e); + } + }; +} diff --git a/site/sitemap.xml b/site/sitemap.xml new file mode 100644 index 0000000..0f8724e --- /dev/null +++ b/site/sitemap.xml @@ -0,0 +1,3 @@ + +