An open API service indexing awesome lists of open source software.

https://github.com/lindenb/htsplusplus

Select variants from VCF/BCF spaced by a distance 'd'.
https://github.com/lindenb/htsplusplus

bcf bioinformatics c distance htslib variants vcf

Last synced: about 1 month ago
JSON representation

Select variants from VCF/BCF spaced by a distance 'd'.

Awesome Lists containing this project

README

          

# hts++

# Compilation

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

```

# subcommands

## SAMVIEWWITHMATE

select read and their mate that falls within a region from a **query sorted** **BAM**

### Usage

```
hts++ samviewwithmate [options...] (files)
```

### Options

| 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. | |

## BCFPRUNE

Select variants with a fixed distance in a **VCF** file.

### Usage

```
hts++ bcfprune [options...] (files)
```

### Options

| 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 | |

## BCFCONCAT

concatenanate multiple vcf/bcf files

### Usage

```
hts++ bcfconcat in1.bcf in2.vcf.gz in3.vcf
hts++ bcfconcat bcfs.list
cat bcfs.list | hts++ bcfconcat
```

### Options

| 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) | |

## BCFFILTERGT

Select variant using an expression

### Usage

```
hts++ bcffiltergt [options...] (files)
```

### Options

| 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 | |

## BCFHEAD

Show the first 'N' variants in a VCF

### Usage

```
hts++ bcfhead [options...] (files)
```

### Options

| 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 | |

## BCF2INTERVALS

convert VCF/BCF to interval of variants that are distant from 'x' bases.

### Usage

```
hts++ bcf2intervals [options...] (files)
```

### Options

| 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 | |

## SAMRMDUPNAMES

remove duplicated names in sorted BAM (prevent graphtyper from failing)

### Usage

```
hts++ samrmdupnames [options...] (files)
```

### Options

| 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 | |

## FASTQSPLITNFILES

Split FASTQ to N files

### Usage

```
hts++ fastqsplitnfiles [options...] (files)
```

### Options

| 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) | |

## BCFSTREAMUNTIL

Stream a VCF until a position is found.

### Usage

```
hts++ bcfstreamuntil [options...] (files)
```

### Options

| 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' | |

## TESTS

peforms some tests

### Usage

```
hts++ tests [options...] (files)
```

### Options

| short-option | long-option | argument | description | default-value |
|--------------|-------------|----------|-------------|---------------|
| -h | --help | | Display help and exit | |
| -v | --version | | Display Version and exit | |
| -D | --directory | | test directory | |

# Author

Pierre Lindenbaum Phd 2022.