summaryrefslogtreecommitdiff
path: root/plugins/samtools
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2021-07-11 19:58:51 -0600
committerTuowen Zhao <ztuowen@gmail.com>2021-07-11 19:58:51 -0600
commit617ed3bd9f3d9519fe2354941f3dbf15b0c712ee (patch)
treecaf617b35d3f5f7b5786483eedfcda9361dca108 /plugins/samtools
parent0144641b7d8e4e6ff6ce153039b5a827f5347904 (diff)
parent36f444ed7325720ec05f182781ec7d6c9a4d675c (diff)
downloadzsh-617ed3bd9f3d9519fe2354941f3dbf15b0c712ee.tar.gz
zsh-617ed3bd9f3d9519fe2354941f3dbf15b0c712ee.tar.bz2
zsh-617ed3bd9f3d9519fe2354941f3dbf15b0c712ee.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'plugins/samtools')
-rw-r--r--plugins/samtools/README.md5
-rw-r--r--plugins/samtools/_samtools40
2 files changed, 45 insertions, 0 deletions
diff --git a/plugins/samtools/README.md b/plugins/samtools/README.md
new file mode 100644
index 000000000..f4baf41f7
--- /dev/null
+++ b/plugins/samtools/README.md
@@ -0,0 +1,5 @@
+# Samtools plugin
+
+This plugin adds support for [samtools](http://www.htslib.org/):
+
+* Adds autocomplete options for all samtools sub commands.
diff --git a/plugins/samtools/_samtools b/plugins/samtools/_samtools
new file mode 100644
index 000000000..ddb002ae2
--- /dev/null
+++ b/plugins/samtools/_samtools
@@ -0,0 +1,40 @@
+#compdef samtools
+#autoload
+
+local curcontext="$curcontext" state line ret=1
+local -a _files
+
+_arguments -C \
+ '1: :->cmds' \
+ '2:: :->args' && ret=0
+
+case $state in
+ cmds)
+ _values "samtools command" \
+ "view[SAM<->BAM conversion]" \
+ "sort[sort alignment file]" \
+ "mpileup[multi-way pileup]" \
+ "depth[compute the depth]" \
+ "faidx[index/extract FASTA]" \
+ "tview[text alignment viewer]" \
+ "index[index alignment]" \
+ "idxstats[BAM index stats (r595 or later)]" \
+ "fixmate[fix mate information]" \
+ "flagstat[simple stats]" \
+ "calmd[recalculate MD/NM tags and '=' bases]" \
+ "merge[merge sorted alignments]" \
+ "rmdup[remove PCR duplicates]" \
+ "reheader[replace BAM header]" \
+ "cat[concatenate BAMs]" \
+ "bedcov[read depth per BED region]" \
+ "targetcut[cut fosmid regions (for fosmid pool only)]" \
+ "phase[phase heterozygotes]" \
+ "bamshuf[shuffle and group alignments by name]"
+ ret=0
+ ;;
+ *)
+ _files
+ ;;
+esac
+
+return ret