compilation requires a C++ compiler and xsltproc
.
git clone "https://github.com/lindenb/htsplusplus"
autoconf -Wno-syntax
./configure --with-htslib= --with-htslib=${PWD}/../htslib # see ./configure --help and samtools's INSTALL
make
select read and their mate that falls within a region from a query sorted BAM
hts++ samviewwithmate [options...] (files)
short-option | long-option | argument | description | default-value |
---|---|---|---|---|
-h | --help | Display help and exit | ||
-v | --version | Display Version and exit | ||
-o | --output | output or stdout | ||
-R | --reference | FASTA reference | ||
--compression-level | <0-9> | compression-level 0 (low compression) to 9 (best compression) | ||
-O | --bam-output-format | output format for sam: SAM, BAM, CRAM | ||
-@ | --nthreads | Number of threads | ||
-i | --inverse | inverse logic: keep read where no read in the pair overlap the BED file | ||
-B | --bed | A BED file. |
Select variants with a fixed distance in a VCF file.
hts++ bcfprune [options...] (files)
short-option | long-option | argument | description | default-value |
---|---|---|---|---|
-h | --help | Display help and exit | ||
-v | --version | Display Version and exit | ||
-o | --output | output or stdout | ||
--compression-level | <0-9> | compression-level 0 (low compression) to 9 (best compression) | ||
-O | --vcf-output-format | output format for VCF/BCF: z:gzip vcf v:vcf b:bcf (default v) | ||
-d | --distance | distance |
concatenanate multiple vcf/bcf files
hts++ bcfconcat in1.bcf in2.vcf.gz in3.vcf
hts++ bcfconcat bcfs.list
cat bcfs.list | hts++ bcfconcat
short-option | long-option | argument | description | default-value |
---|---|---|---|---|
-h | --help | Display help and exit | ||
-v | --version | Display Version and exit | ||
-o | --output | output or stdout | ||
--compression-level | <0-9> | compression-level 0 (low compression) to 9 (best compression) | ||
-O | --vcf-output-format | output format for VCF/BCF: z:gzip vcf v:vcf b:bcf (default v) |
Select variant using an expression
hts++ bcffiltergt [options...] (files)
short-option | long-option | argument | description | default-value |
---|---|---|---|---|
-h | --help | Display help and exit | ||
-v | --version | Display Version and exit | ||
-o | --output | output or stdout | ||
--compression-level | <0-9> | compression-level 0 (low compression) to 9 (best compression) | ||
-O | --vcf-output-format | output format for VCF/BCF: z:gzip vcf v:vcf b:bcf (default v) | ||
-F | --soft-filter | soft FILTER name. (default: filter out variants) | ||
-e | --expression | Expression as string | ||
-f | --file-expression | Expression as file |
Show the first 'N' variants in a VCF
hts++ bcfhead [options...] (files)
short-option | long-option | argument | description | default-value |
---|---|---|---|---|
-h | --help | Display help and exit | ||
-v | --version | Display Version and exit | ||
-o | --output | output or stdout | ||
--compression-level | <0-9> | compression-level 0 (low compression) to 9 (best compression) | ||
-O | --vcf-output-format | output format for VCF/BCF: z:gzip vcf v:vcf b:bcf (default v) | ||
-n | --count | Number of variants |
convert VCF/BCF to interval of variants that are distant from 'x' bases.
hts++ bcf2intervals [options...] (files)
short-option | long-option | argument | description | default-value |
---|---|---|---|---|
-h | --help | Display help and exit | ||
-v | --version | Display Version and exit | ||
-o | --output | output or stdout | ||
-d | --distance_per_interval | distance | ||
-m | --min-distance | min distance |
remove duplicated names in sorted BAM (prevent graphtyper from failing)
hts++ samrmdupnames [options...] (files)
short-option | long-option | argument | description | default-value |
---|---|---|---|---|
-h | --help | Display help and exit | ||
-v | --version | Display Version and exit | ||
-o | --output | output or stdout | ||
-R | --reference | FASTA reference | ||
--compression-level | <0-9> | compression-level 0 (low compression) to 9 (best compression) | ||
-O | --bam-output-format | output format for sam: SAM, BAM, CRAM | ||
-@ | --nthreads | Number of threads |
Split FASTQ to N files
hts++ fastqsplitnfiles [options...] (files)
short-option | long-option | argument | description | default-value |
---|---|---|---|---|
-h | --help | Display help and exit | ||
-v | --version | Display Version and exit | ||
-o | --output | output or stdout | ||
-p | --prefix | output prefix | ||
-n | --count-files | number of files | ||
--compression-level | <0-9> | compression-level 0 (low compression) to 9 (best compression) |
Stream a VCF until a position is found.
hts++ bcfstreamuntil [options...] (files)
short-option | long-option | argument | description | default-value |
---|---|---|---|---|
-h | --help | Display help and exit | ||
-v | --version | Display Version and exit | ||
--compression-level | <0-9> | compression-level 0 (low compression) to 9 (best compression) | ||
-O | --vcf-output-format | output format for VCF/BCF: z:gzip vcf v:vcf b:bcf (default v) | ||
-o | --output | output or stdout | ||
-p | --position | stop after this position. syntax 'CHROM:POS' |
peforms some tests
hts++ tests [options...] (files)
short-option | long-option | argument | description | default-value |
---|---|---|---|---|
-h | --help | Display help and exit | ||
-v | --version | Display Version and exit | ||
-D | --directory | test directory |
Pierre Lindenbaum Phd 2022.