Gnife is a CLI tool for manipulating genomic files and data.
Gnife requires you have installed Java. A binary are available on the releases page.
curl -sSL https://github.com/chrovis/gnife/releases/download/0.1.3/gnife -o gnife
chmod +x gnife
mv gnife [/your/PATH/dir/]
You can use Homebrew on MacOS.
brew install xcoo/formulae/gnife
To build Gnife manually, you must setup Clojure (and Java) in advance.
clojure -T:build bin
cp target/gnife [/your/PATH/dir/]
Each Gnife command can be called by gnife [type] [command]
.
$ gnife hgvs repair "c.123_124GC>AA"
c.123_124delGCinsAA
Gnife commands are grouped by data type. gnife --tree
lists all commands in a
tree-like format.
$ gnife --tree
sequence
dict Create a sequence dictionary for a reference sequence
faidx Index a reference sequence in the FASTA format
sam
view Extract/print all or sub alignments in SAM or BAM format
convert Convert file format based on the file extension
normalize Normalize references of alignments
sort Sort alignments by leftmost coordinates
index Index sorted alignment for fast random access
pileup Generate pileup for the BAM file
level Analyze a BAM file and add level information of alignments
vcf
liftover Convert genomic coordinates in a VCF file between assemblies
variant
liftover Convert a genomic coordinate between assemblies
to-hgvs Convert a VCF-style variant into HGVS
hgvs
format Format HGVS with a specified style
repair Repair an invalid HGVS
to-variant Convert a HGVS into VCF-style variants
gnife [type] [command] --help
to display detailed usage of each command.
To pass extra arguments to the JVM, set the GNIFE_JVM_OPTS
environment
variable.
export GNIFE_JVM_OPTS="-XX:TieredStopAtLevel=1 -Xmx4g"
To run tests,
clojure -X:test
for basic tests, andclojure -X:test:slow-test
for slow tests with remote resources.
Copyright 2024 Xcoo, Inc.
Licensed under the Apache License, Version 2.0.