Skip to content

Commit f534526

Browse files
committed
Update qe documentation
Former-commit-id: 1c118f5
1 parent d796ec6 commit f534526

File tree

2 files changed

+24
-21
lines changed

2 files changed

+24
-21
lines changed

seqware-distribution/docs/site/content/docs/8-query-engine.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,18 @@ In this distribution directory, you can run our command line tools for import.
3232
The first time you run these tools in a new namespace, you may wish to create a common reference and then create an ad hoc tag set that will store all tags that do not match known tags. Most of our command-line tools output a key value file that you can keep in order to record the ID of your created objects.
3333

3434
<pre title="Title of the snippet">
35-
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd>java -classpath seqware-distribution-<%= seqware_release_version %>-qe-full.jar com.github.seqware.queryengine.system.ReferenceCreator</kbd>
35+
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd>java -classpath seqware-distribution-<%= qe_release_version %>-qe-full.jar com.github.seqware.queryengine.system.ReferenceCreator</kbd>
3636
Only 0 arguments found
3737
ReferenceCreator <reference_name> [output_file]
38-
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd>java -classpath seqware-distribution-<%= seqware_release_version %>-qe-full.jar com.github.seqware.queryengine.system.ReferenceCreator hg_19 keyValue_ref.out</kbd>
38+
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd>java -classpath seqware-distribution-<%= qe_release_version %>-qe-full.jar com.github.seqware.queryengine.system.ReferenceCreator hg_19 keyValue_ref.out</kbd>
3939
Reference written with an ID of:
4040
hg_19
4141
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd>cat keyValue_ref.out</kbd>
4242
referenceID hg_19
43-
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd>java -classpath seqware-distribution-<%= seqware_release_version %>-qe-full.jar com.github.seqware.queryengine.system.TagSetCreator</kbd>
43+
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd>java -classpath seqware-distribution-<%= qe_release_version %>-qe-full.jar com.github.seqware.queryengine.system.TagSetCreator</kbd>
4444
Only 0 arguments found
4545
TagSetCreator <TagSet name> [output_file]
46-
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd>java -classpath seqware-distribution-<%= seqware_release_version %>-qe-full.jar com.github.seqware.queryengine.system.TagSetCreator ad_hoc keyValue_adHoc.out</kbd>
46+
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd>java -classpath seqware-distribution-<%= qe_release_version %>-qe-full.jar com.github.seqware.queryengine.system.TagSetCreator ad_hoc keyValue_adHoc.out</kbd>
4747
TagSet written with an ID of:
4848
ad_hoc
4949
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd>cat keyValue_adHoc.out</kbd>
@@ -54,10 +54,10 @@ namespace BATMAN
5454
You may also wish to pre-populate the database with (Sequence Ontology) SO terms in a TagSet:
5555

5656
<pre title="Title of the snippet">
57-
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd>java -classpath seqware-distribution-<%= seqware_release_version %>-qe-full.jar com.github.seqware.queryengine.system.importers.OBOImporter</kbd>
57+
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd>java -classpath seqware-distribution-<%= qe_release_version %>-qe-full.jar com.github.seqware.queryengine.system.importers.OBOImporter</kbd>
5858
Only 0 arguments found
5959
OBOImporter <input_file> [output_file]
60-
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd>java -classpath seqware-distribution-<%= seqware_release_version %>-qe-full.jar com.github.seqware.queryengine.system.importers.OBOImporter ../../seqware-queryengine/src/test/resources/com/github/seqware/queryengine/system/so.obo keyValueOBO.out</kbd>
60+
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd>java -classpath seqware-distribution-<%= qe_release_version %>-qe-full.jar com.github.seqware.queryengine.system.importers.OBOImporter ../../seqware-queryengine-backend/src/test/resources/com/github/seqware/queryengine/system/so.obo keyValueOBO.out</kbd>
6161
6861 terms written to a TagSet written with an ID of:
6262
42860461-0620-4990-bf15-32e6d34701b3
6363
<span class="prompt">dyuen@odl-dyuen:~/seqware_github/seqware-distribution/target$</span> <kbd>cat keyValueOBO.out</kbd>
@@ -68,7 +68,7 @@ namespace BATMAN
6868
The previous steps should only really need to be done once when first setting up a namespace. Afterwards, the VCF file importer can be called repeatedly for each of your datasets. Note that you will need to substitute the TagSetID from the previous step into the next step.
6969

7070
<pre title="Title of the snippet">
71-
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd>java -classpath seqware-distribution-<%= seqware_release_version %>-qe-full.jar com.github.seqware.queryengine.system.importers.SOFeatureImporter</kbd>
71+
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd>java -classpath seqware-distribution-<%= qe_release_version %>-qe-full.jar com.github.seqware.queryengine.system.importers.SOFeatureImporter</kbd>
7272
usage: SOFeatureImporter
7373
-a <adHocTagSet> (optional) an ID for an ad hoc TagSet, Tags will
7474
either be found or added to this set, a new TagSet
@@ -91,7 +91,7 @@ usage: SOFeatureImporter
9191
our import
9292
-w <worker> (required) the work module and thus the type of file
9393
we are working with
94-
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd>java -classpath seqware-distribution-<%= seqware_release_version %>-qe-full.jar com.github.seqware.queryengine.system.importers.SOFeatureImporter -i ../../seqware-queryengine/src/test/resources/com/github/seqware/queryengine/system/FeatureImporter/consequences_annotated.vcf -o keyValueVCF.out -r hg_19 -s 42860461-0620-4990-bf15-32e6d34701b3 -a ad_hoc -w VCFVariantImportWorker </kbd>
94+
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd>java -classpath seqware-distribution-<%= qe_release_version %>-qe-full.jar com.github.seqware.queryengine.system.importers.SOFeatureImporter -i ../../seqware-queryengine-backend/src/test/resources/com/github/seqware/queryengine/system/FeatureImporter/consequences_annotated.vcf -o keyValueVCF.out -r hg_19 -s 42860461-0620-4990-bf15-32e6d34701b3 -a ad_hoc -w VCFVariantImportWorker </kbd>
9595
FeatureSet written with an ID of:
9696
4bd2ced0-5e37-4930-bffe-207b862a09a6
9797
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd> echo $? </kbd>
@@ -107,20 +107,20 @@ The ID of your feature sets and parameters will obviously change from run to run
107107
The SOFeatureImporter will output a FeatureSet ID that should be used as part of the input to the VCFDumper command in order to export a FeatureSet.
108108

109109
<pre title="Title of the snippet">
110-
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd> java -classpath seqware-distribution-<%= seqware_release_version %>-qe-full.jar com.github.seqware.queryengine.system.exporters.VCFDumper</kbd>
110+
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd> java -classpath seqware-distribution-<%= qe_release_version %>-qe-full.jar com.github.seqware.queryengine.system.exporters.VCFDumper</kbd>
111111
0 arguments found
112112
VCFDumper <featureSetID> [outputFile]
113-
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd> java -classpath seqware-distribution-<%= seqware_release_version %>-qe-full.jar com.github.seqware.queryengine.system.exporters.VCFDumper 4bd2ced0-5e37-4930-bffe-207b862a09a6 test_out.vcf</kbd>
113+
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd> java -classpath seqware-distribution-<%= qe_release_version %>-qe-full.jar com.github.seqware.queryengine.system.exporters.VCFDumper 4bd2ced0-5e37-4930-bffe-207b862a09a6 test_out.vcf</kbd>
114114
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd> sort test_out.vcf > sorted_test_out.vcf</kbd>
115-
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd> sort ../../seqware-queryengine/src/test/resources/com/github/seqware/queryengine/system/FeatureImporter/consequences_annotated.vcf > control.vcf</kbd>
115+
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd> sort ../../seqware-queryengine-backend/src/test/resources/com/github/seqware/queryengine/system/FeatureImporter/consequences_annotated.vcf > control.vcf</kbd>
116116
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd> diff -b sorted_test_out.vcf control.vcf</kbd>
117117
</pre>
118118

119119
Most of these commands use non-zero return codes to indicate that an error occurred. For example:
120120

121121
<pre title="Title of the snippet">
122-
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd>java -classpath seqware-distribution-<%= seqware_release_version %>-qe-full.jar com.github.seqware.queryengine.system.importers.SOFeatureImporter -i ../../seqware-queryengine/src/test/resources/com/github/seqware/queryengine/system/FeatureImporter/test_invalid.vcf -o keyValueVCF.out -r hg_19 -s 42860461-0620-4990-bf15-32e6d34701b3 -a ad_hoc -w VCFVariantImportWorker</kbd>
123-
[SeqWare Query Engine] 1 [Thread-3] FATAL com.github.seqware.queryengine.system.importers.workers.VCFVariantImportWorker - Exception thrown with file: ../../seqware-queryengine/src/test/resources/com/github/seqware/queryengine/system/FeatureImporter/test_invalid.vcf
122+
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd>java -classpath seqware-distribution-<%= qe_release_version %>-qe-full.jar com.github.seqware.queryengine.system.importers.SOFeatureImporter -i ../../seqware-queryengine-backend/src/test/resources/com/github/seqware/queryengine/system/FeatureImporter/test_invalid.vcf -o keyValueVCF.out -r hg_19 -s 42860461-0620-4990-bf15-32e6d34701b3 -a ad_hoc -w VCFVariantImportWorker</kbd>
123+
[SeqWare Query Engine] 1 [Thread-3] FATAL com.github.seqware.queryengine.system.importers.workers.VCFVariantImportWorker - Exception thrown with file: ../../seqware-queryengine-backend/src/test/resources/com/github/seqware/queryengine/system/FeatureImporter/test_invalid.vcf
124124
java.lang.NumberFormatException: For input string: "51xxx"
125125
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
126126
at java.lang.Integer.parseInt(Integer.java:458)
@@ -144,12 +144,12 @@ In general, operations that iterate through a feature set, read or update indivi
144144

145145
### Querying Data via Query Language
146146

147-
The <code>QueryVCFDumper</code> allows you to test queries written in our query language. This class takes in a featureID as input in order to perform a query and output the last feature set to VCF format. Our query language is currently specified [here](https://github.com/SeqWare/seqware/blob/3b96ae372bbdbf523090a4edf600bb7d34e9cdda/seqware-queryengine/src/main/java/com/github/seqware/queryengine/kernel/README.md) but will be migrated to this site.
147+
The <code>QueryVCFDumper</code> allows you to test queries written in our query language. This class takes in a featureID as input in order to perform a query and output the last feature set to VCF format. Our query language is currently specified [here](https://github.com/SeqWare/queryengine/blob/develop/seqware-queryengine-backend/src/main/java/com/github/seqware/queryengine/kernel/README.md) but will be migrated to this site.
148148

149149
Here is an example of how to interact with the utility, here we run through compiling a few queries and running them.
150150

151151
<pre title="Title of the snippet">
152-
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd> java -cp seqware-distribution-<%= seqware_release_version %>-qe-full.jar com.github.seqware.queryengine.system.exporters.QueryVCFDumper</kbd>
152+
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd> java -cp seqware-distribution-<%= qe_release_version %>-qe-full.jar com.github.seqware.queryengine.system.exporters.QueryVCFDumper</kbd>
153153
usage: QueryVCFDumper
154154
-f <feature set ID> (required) the ID of the featureset that we will
155155
be querying and exporting
@@ -167,9 +167,9 @@ org.apache.commons.cli.MissingOptionException: Missing required options: f, [-s
167167
at org.apache.commons.cli.Parser.parse(Parser.java:85)
168168
at com.github.seqware.queryengine.system.exporters.QueryVCFDumper.runMain(QueryVCFDumper.java:78)
169169
at com.github.seqware.queryengine.system.exporters.QueryVCFDumper.main(QueryVCFDumper.java:42)
170-
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd>java -classpath seqware-distribution-<%= seqware_release_version %>-qe-full.jar com.github.seqware.queryengine.system.exporters.QueryVCFDumper -f 0737bf87-28c5-4323-a285-7898137e22ab -k keyValue.out -o output.vcf -s "seqid==\"21\""</kbd>
171-
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd>java -classpath seqware-distribution-<%= seqware_release_version %>-qe-full.jar com.github.seqware.queryengine.system.exporters.QueryVCFDumper -f 0737bf87-28c5-4323-a285-7898137e22ab -k keyValue.out -o output.vcf -s "seqid==\"21\" && start >= 20000000 && stop &lt;= 30000000"</kbd>
172-
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd>java -classpath seqware-distribution-<%= seqware_release_version %>-qe-full.jar com.github.seqware.queryengine.system.exporters.QueryVCFDumper -f 0737bf87-28c5-4323-a285-7898137e22ab -k keyValue.out -o output.vcf -s "seqid==\"21\" && start >= 20000000 && stop &lt;= 30000000 && tagOccurrence(\"ad_hoc\",\"non_synonymous_codon\")"</kbd>
170+
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd>java -classpath seqware-distribution-<%= qe_release_version %>-qe-full.jar com.github.seqware.queryengine.system.exporters.QueryVCFDumper -f 0737bf87-28c5-4323-a285-7898137e22ab -k keyValue.out -o output.vcf -s "seqid==\"21\""</kbd>
171+
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd>java -classpath seqware-distribution-<%= qe_release_version %>-qe-full.jar com.github.seqware.queryengine.system.exporters.QueryVCFDumper -f 0737bf87-28c5-4323-a285-7898137e22ab -k keyValue.out -o output.vcf -s "seqid==\"21\" && start >= 20000000 && stop &lt;= 30000000"</kbd>
172+
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd>java -classpath seqware-distribution-<%= qe_release_version %>-qe-full.jar com.github.seqware.queryengine.system.exporters.QueryVCFDumper -f 0737bf87-28c5-4323-a285-7898137e22ab -k keyValue.out -o output.vcf -s "seqid==\"21\" && start >= 20000000 && stop &lt;= 30000000 && tagOccurrence(\"ad_hoc\",\"non_synonymous_codon\")"</kbd>
173173
</pre>
174174

175175

@@ -180,10 +180,10 @@ The <code>QueryVCFDumper</code> also allows you to quickly test Java queries wri
180180
Here is an example of how to interact with the utility, here we run through compiling a few queries and running them.
181181

182182
<pre title="Title of the snippet">
183-
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd> cp ../../seqware-queryengine/src/test/java/com/github/seqware/queryengine/system/test/queryDumper/VCFDumperParameterExample.java QueryTutorial.java</kbd>
183+
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd> cp ../../seqware-queryengine-backend/src/test/java/com/github/seqware/queryengine/system/test/queryDumper/VCFDumperParameterExample.java QueryTutorial.java</kbd>
184184
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd> gvim QueryTutorial.java</kbd>
185-
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd> javac -cp seqware-distribution-<%= seqware_release_version %>-qe-full.jar QueryTutorial.java</kbd>
186-
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd> java -cp .:seqware-distribution-<%= seqware_release_version %>-qe-full.jar com.github.seqware.queryengine.system.exporters.QueryVCFDumper -f 4bd2ced0-5e37-4930-bffe-207b862a09a6 -k keyValue.out -o output.vcf -p QueryTutorial</kbd>
185+
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd> javac -cp seqware-distribution-<%= qe_release_version %>-qe-full.jar QueryTutorial.java</kbd>
186+
<span class="prompt">~/seqware_github/seqware-distribution/target$</span> <kbd> java -cp .:seqware-distribution-<%= qe_release_version %>-qe-full.jar com.github.seqware.queryengine.system.exporters.QueryVCFDumper -f 4bd2ced0-5e37-4930-bffe-207b862a09a6 -k keyValue.out -o output.vcf -p QueryTutorial</kbd>
187187
</pre>
188188

189189
During the <code>gvim</code> step, it is important to delete the package line, delete the import from the test package, change the classname, and then perform the required changes to the queries. For example, to search for intron_variants rather than non_synonymous_codon, we will need to change the file to the following:

seqware-distribution/docs/site/lib/helpers/variables.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@ def server_name
55
def seqware_release_version
66
"1.0.11"
77
end
8+
def qe_release_version
9+
"1.0.6"
10+
end
811
end

0 commit comments

Comments
 (0)