@@ -1,4 +0,0 @@
-def format:
- del(.hash, .position)
- | .vcf_variants[] |= (del(.hash) | .infos |= map(select(. != "Empty")));
-
@@ -0,0 +1,6 @@
+def format:
+ del(.hash, .position)
+ | .vcf_variants[] |= (del(.hash,.position,.reference,.alternative) | .infos |= map(select(. != "Empty")));
+
+def n_alt_in_constit:
+ (.annotations | map(select(.ConstitAlt != null).ConstitAlt) // [0] | .[0]);
@@ -2,5 +2,6 @@
* Somatic Variants of chrM (25)
```
- zcat /data/longreads_basic_pipe/*/diag/somatic_variants.json.gz | jq -L ./jq_filters -C 'include "format"; [.data[] | select(.position.contig == 25 and ((.annotations[] | select(.ConstitAlt != null).ConstitAlt) // 0) <= 1) | format]'
+zcat /data/longreads_basic_pipe/*/diag/somatic_variants.json.gz | \
+jq -L ./jq_filters -C 'include "jq_filters"; [.data[] | select(.position.contig == 25 and n_in_constit <= 1) | format]'