Skip to content

Releases: PHILIPP111007/matrix_table_consumer

v1.2.8

10 Sep 15:51

Choose a tag to compare

View

Now you can view vcf files from terminal:

  • arrow down -> next line
  • arrow up -> previous line
  • arrow right -> right
  • arrow left -> left
  • ENTER -> next page
  • SPACE -> enter line number
  • ESC -> quit
vcf_tools -view -vcf ./data/merge/test_merged.vcf

Zarr format

You can convert .vcf file to zarr (.vcz) format:

vcf_tools -save_vcf_as_zarr \
    -vcf ./data/ALL.chr1.phase3_shapeit2_mvncall_integrated_v5b.20130502.genotypes.vcf.gz \
    -o ./data/test.vcz \
    -show_progress \
    -num_cpu 7
  • MatrixTableConsumer().save_vcf_as_zarr convert .vcf file to zarr (.vcz) format
  • MatrixTableConsumer().load_zarr_data loads zarr data
  • MatrixTableConsumer().sample_qc_analysis sample quality analysis

v1.2.7

08 Sep 10:35

Choose a tag to compare

Now it is possible to merge multiple vcf files:

vcf_tools -merge \
    --file_with_vcfs ./data/vcfs.txt \
    -o ./data/test_merged.vcf

Where vcfs.txt is:

./data/merge/test1.vcf
./data/merge/test2.vcf

v1.2.5

06 Sep 17:48
c65aadf

Choose a tag to compare

You can filter .vcf and .vcf.gz files (&& and || operators is available):

python matrix_table_consumer/vcf_tools.py -filter \
    -o ./data/test_1.vcf \
    -vcf ./data/ALL.chr1.phase3_shapeit2_mvncall_integrated_v5b.20130502.genotypes.vcf.gz \
    -i "(QUAL>=90 && AF>=0.00001) || AF>=0.001" \
    -gzip \
    -num_cpu 7

v1.2.2

24 Aug 13:31

Choose a tag to compare

MatrixTableConsumer v1.2.2

You can look at the benchmarks.md file, which contains benchmark of my program and bcftools

Now you can filter .vcf files (currently only the && operator is available):

python matrix_table_consumer/vcf_tools.py -filter \
    -o ./data/test_1.vcf \
    -vcf ./data/ALL.chr1.phase3_shapeit2_mvncall_integrated_v5b.20130502.genotypes.vcf.gz \
    -i "QUAL>=90 && AF>=0.00001" \
    -gzip \
    -num_cpu 7

You may donate to matrix_table_consumer project:

  • Ethereum: 0xE2e2D675a3843f4ED211BB93847ad18b0A6fe7c6

v1.1.0

22 Aug 16:29

Choose a tag to compare

MatrixTableConsumer v1.1.0

To run tests, use:

pytest

You may donate to matrix_table_consumer project:

  • Ethereum: 0xE2e2D675a3843f4ED211BB93847ad18b0A6fe7c6

v1.0.0

22 Aug 16:24

Choose a tag to compare

MatrixTableConsumer v1.1.0

To install this package run (you need to have Go):

pip install build
pip install .

To compile Go modules with C types to work with Python run:

export CGO_ENABLED=1

go build -o functions.so -buildmode=c-shared functions/functions.go

We have a class MatrixTableConsumer, which performs operations on Hail matrix table:

  • MatrixTableConsumer().prepare_metadata_for_saving saves matrix table metadata to json format

  • MatrixTableConsumer().prepare_metadata_for_loading loads table metadata

  • MatrixTableConsumer().collect gives num_rows rows from vcf file (it can also open vcf.gz)

  • MatrixTableConsumer().collect_all collects all table rows from vcf file (it can also open vcf.gz)

  • MatrixTableConsumer().convert_rows_to_hail converts rows to Matrix Table format

  • MatrixTableConsumer().create_hail_table collects table from rows

  • MatrixTableConsumer().combine_hail_matrix_table_and_table combines MatrixTable and Table

  • MatrixTableConsumer().count returns number of rows in the vcf file

You may donate to matrix_table_consumer project:

  • Ethereum: 0xE2e2D675a3843f4ED211BB93847ad18b0A6fe7c6