Thomas 1 år sedan
förälder
incheckning
def7533bef
3 ändrade filer med 8 tillägg och 5 borttagningar
  1. 0 4
      jq_filters/format.jq
  2. 6 0
      jq_filters/jq_filters.jq
  3. 2 1
      src/README.md

+ 0 - 4
jq_filters/format.jq

@@ -1,4 +0,0 @@
-def format:
-  del(.hash, .position)
-  | .vcf_variants[] |= (del(.hash) | .infos |= map(select(. != "Empty")));
-

+ 6 - 0
jq_filters/jq_filters.jq

@@ -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 - 1
src/README.md

@@ -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]'
 ```