File tree Expand file tree Collapse file tree 5 files changed +34
-23
lines changed Expand file tree Collapse file tree 5 files changed +34
-23
lines changed Original file line number Diff line number Diff line change 31
31
pip install -r docs/requirements.txt
32
32
python3 -m bash_kernel.install
33
33
34
+ - name : Install bcftools
35
+ run : |
36
+ sudo apt-get install bcftools
37
+
34
38
- name : Install package
35
39
run : |
36
40
python3 -m pip install .
Original file line number Diff line number Diff line change 25
25
sphinx :
26
26
extra_extensions :
27
27
- 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
Original file line number Diff line number Diff line change @@ -11,10 +11,10 @@ RETVAL=$?
11
11
if [ $RETVAL -ne 0 ]; then
12
12
if [ -e $REPORTDIR ]; then
13
13
echo " Error occured; showing saved reports"
14
- cat $REPORTDIR /*
14
+ cat $REPORTDIR /* / *
15
15
fi
16
16
else
17
17
# Clear out any old reports
18
- rm -f $REPORTDIR /*
18
+ rm -fR $REPORTDIR /*
19
19
fi
20
20
exit $RETVAL
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ need for small, intermediate and large datasets.
22
22
23
23
<div id =" vcf2zarr_convert " ></div >
24
24
<script >
25
- AsciinemaPlayer .create (' _static/vcf2zarr_convert.cast' ,
25
+ AsciinemaPlayer .create (' ../ _static/vcf2zarr_convert.cast' ,
26
26
document .getElementById (' vcf2zarr_convert' ), {
27
27
cols: 80 ,
28
28
rows: 12
@@ -33,7 +33,7 @@ need for small, intermediate and large datasets.
33
33
34
34
<div id =" vcf2zarr_explode " ></div >
35
35
<script >
36
- AsciinemaPlayer .create (' _static/vcf2zarr_explode.cast' ,
36
+ AsciinemaPlayer .create (' ../ _static/vcf2zarr_explode.cast' ,
37
37
document .getElementById (' vcf2zarr_explode' ), {
38
38
cols: 80 ,
39
39
rows: 12
Original file line number Diff line number Diff line change
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
+ ---
1
12
(sec-vcfpartition)=
2
13
# vcfpartition
14
+ ``` {code-cell}
15
+ :tags: [remove-cell]
16
+ cp ../../tests/data/vcf/CEUTrio.20.21.gatk3.4.g.bcf* ./
17
+ ```
3
18
4
19
## Overview
5
20
6
21
Partition a given VCF file into (approximately) a give number of regions:
7
22
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
23
26
```
24
27
25
- These reqion strings can then be used to split computation of the VCF
26
- into chunks for parallelisation.
27
28
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
+ ```
29
33
30
- ** WARNING that this does not take into account that indels may overlap**
You can’t perform that action at this time.
0 commit comments