-
Notifications
You must be signed in to change notification settings - Fork 7
Using gonomics commands
The default location for Go binaries is ~/go/bin. This is where all the binaries are placed when you run go install ... when in the gonomics directory. To compile and install a single binary: navigate to the directory containing the code for that binary and type go install. The code for each command is located in gonomics/cmd/commandName.
To print a usage statement for any command, run the command with no arguments.
~/go/bin/commandName
To print usage statements for every command in their command group as well as their usage statements, run the gonomics command:
~/go/bin/gonomics
The output will give details about options available for that tool and the syntax that it expects for arguments. All option names must follow a dash to be recognized.
~/go/bin/commandName -option input output
Some options will require a specified input from the user, such as a file path or a bool.
~/go/bin/commandName -optionOne=true -optionTwo=filepath input output
If multiple commands need to be used in conjunction for a pipeline they can be piped together with a small change if the file has an argument dedicated to an output file. Using the keyword stdout instead of a filename will send the output to standard out and using the keyword stdin will read from standard input.
~/go/bin/commandName -option=true inputFilename stdout | ~/go/bin/commandName2 -option=filepath stdin outputFilename
EX:
> ./gtfToBed
gtfToBed - Converts a gtf file into bed format.
Usage:
gtfToBed in.gtf out.bed
options:
-chromSizeFile string
Specifies the name of a chrom.sizes file.
-tss
Return a bed of tss positions annotated only with the geneName. Must provide chrom sizes file.
2023/06/19 14:01:01 gtfToBed.go:72: Error: expecting 2 arguments, but got 0