Skip to content

Commit a1ddde0

Browse files
Merge pull request #210 from jeromekelleher/docs-more-docs
More docs infrastructure
2 parents 4461ba1 + 81fb76b commit a1ddde0

File tree

5 files changed

+34
-23
lines changed

5 files changed

+34
-23
lines changed

.github/workflows/docs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ jobs:
3131
pip install -r docs/requirements.txt
3232
python3 -m bash_kernel.install
3333
34+
- name: Install bcftools
35+
run: |
36+
sudo apt-get install bcftools
37+
3438
- name: Install package
3539
run: |
3640
python3 -m pip install .

docs/_config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,7 @@ html:
2525
sphinx:
2626
extra_extensions:
2727
- sphinx_click.ext
28+
config:
29+
# This is needed to make sure that text is output in single block from
30+
# bash cells.
31+
nb_merge_streams: true

docs/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ RETVAL=$?
1111
if [ $RETVAL -ne 0 ]; then
1212
if [ -e $REPORTDIR ]; then
1313
echo "Error occured; showing saved reports"
14-
cat $REPORTDIR/*
14+
cat $REPORTDIR/*/*
1515
fi
1616
else
1717
# Clear out any old reports
18-
rm -f $REPORTDIR/*
18+
rm -fR $REPORTDIR/*
1919
fi
2020
exit $RETVAL

docs/vcf2zarr/tutorial.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ need for small, intermediate and large datasets.
2222

2323
<div id="vcf2zarr_convert"></div>
2424
<script>
25-
AsciinemaPlayer.create('_static/vcf2zarr_convert.cast',
25+
AsciinemaPlayer.create('../_static/vcf2zarr_convert.cast',
2626
document.getElementById('vcf2zarr_convert'), {
2727
cols:80,
2828
rows:12
@@ -33,7 +33,7 @@ need for small, intermediate and large datasets.
3333

3434
<div id="vcf2zarr_explode"></div>
3535
<script>
36-
AsciinemaPlayer.create('_static/vcf2zarr_explode.cast',
36+
AsciinemaPlayer.create('../_static/vcf2zarr_explode.cast',
3737
document.getElementById('vcf2zarr_explode'), {
3838
cols:80,
3939
rows:12

docs/vcfpartition/overview.md

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,33 @@
1+
---
2+
jupytext:
3+
formats: md:myst
4+
text_representation:
5+
extension: .md
6+
format_name: myst
7+
kernelspec:
8+
display_name: Bash
9+
language: bash
10+
name: bash
11+
---
112
(sec-vcfpartition)=
213
# vcfpartition
14+
```{code-cell}
15+
:tags: [remove-cell]
16+
cp ../../tests/data/vcf/CEUTrio.20.21.gatk3.4.g.bcf* ./
17+
```
318

419
## Overview
520

621
Partition a given VCF file into (approximately) a give number of regions:
722

8-
```
9-
vcf_partition 20201028_CCDG_14151_B01_GRM_WGS_2020-08-05_chr20.recalibrated_variants.vcf.gz -n 10
10-
```
11-
gives
12-
```
13-
chr20:1-6799360
14-
chr20:6799361-14319616
15-
chr20:14319617-21790720
16-
chr20:21790721-28770304
17-
chr20:28770305-31096832
18-
chr20:31096833-38043648
19-
chr20:38043649-45580288
20-
chr20:45580289-52117504
21-
chr20:52117505-58834944
22-
chr20:58834945-
23+
24+
```{code-cell}
25+
vcfpartition CEUTrio.20.21.gatk3.4.g.bcf -n 3
2326
```
2427

25-
These reqion strings can then be used to split computation of the VCF
26-
into chunks for parallelisation.
2728

28-
**TODO give a nice example here using xargs**
29+
```{code-cell}
30+
vcfpartition CEUTrio.20.21.gatk3.4.g.bcf -n 3 \
31+
| xargs -P 3 -I {} sh -c "bcftools view -Hr {} CEUTrio.20.21.gatk3.4.g.bcf | wc -l"
32+
```
2933

30-
**WARNING that this does not take into account that indels may overlap**

0 commit comments

Comments
 (0)