Skip to content

Commit

Permalink
bgzip-compressed genome (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonvh committed Jul 11, 2019
1 parent 36bf128 commit f8f6774
Show file tree
Hide file tree
Showing 15 changed files with 409 additions and 240 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ dist
eggs
tmp
docs/_build
.vscode
22 changes: 19 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,17 @@ You can configure the index creation using the `genomepy plugin` command (see be

## Configuration

By default genomes will be saved in `~/.local/share/genomes`.

To change the configuration, generate a personal config file:
To change the default configuration, generate a personal config file:

```
$ genomepy config generate
Created config file /home/simon/.config/genomepy/genomepy.yaml
```

### Genome location

By default genomes will be saved in `~/.local/share/genomes`.

To set the default genome directory to `/data/genomes` for instance, edit `~/.config/genomepy/genomepy.yaml` and change the following line:

```
Expand All @@ -96,6 +98,20 @@ genome_dir: /data/genomes

The genome directory can also be explicitly specified in both the Python API as well as on the command-line.

### Compression

Optionally genome FASTA files can be saved using bgzip compression. This means that the FASTA
files will take up less space on disk. To enable this, add the following line to your config
file:

```
bgzip: True
```

Most tools are able to use bgzip-compressed genome files.
One notable exception is `bedtools getfasta`. As an alternative, you can use the `faidx` command-line
script from [pyfaidx](https://github.com/mdshw5/pyfaidx) which comes installed with genomepy.

## Usage

### Command line
Expand Down
2 changes: 2 additions & 0 deletions genomepy/cfg/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ genome_dir: ~/.local/share/genomes/
plugin:
- gaps
- sizes

bgzip: False
Loading

0 comments on commit f8f6774

Please sign in to comment.