Question: How to display a VCF/BCF file or stream as a paginated table in a python web framework (e.g. Django)?
0
gravatar for William
4 weeks ago by
William4.0k
Europe
William4.0k wrote:

Does anyone know how display a VCF/BCF file or stream as a paginated table in a python web framework (e.g. Django)?

Is this possible at all?

The number of variants (i.e records) can be kept low trough pagination (e.g. 500).
Number of samples (i.e. columns) might be several 100.

I was thinking to use cyvcf2 to read the first 500 variants at the start of the file or the first 500 in a region of interest https://github.com/brentp/cyvcf2 . cyvcf2 can use the vcf.gz or bcf.csi index.

From the cyvcf2 variant records I can create a simple table that I am looking to display using a python web GUI.

gui vcf • 197 views
ADD COMMENTlink modified 4 weeks ago • written 4 weeks ago by William4.0k
1
gravatar for Pierre Lindenbaum
4 weeks ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum101k wrote:

Is this possible at all?

you could create a binary index file containing the offsets of each variant in the flat vcf file or in the bgzipped-tabix-file. Then to get the ith variant you would just have to read the VCF header , move a pointer (fseek) to the i-th index and read the vcf line...

ADD COMMENTlink written 4 weeks ago by Pierre Lindenbaum101k

I was thinking to use cyvcf2 to read the first 500 variants at the start of the file or the first 500 in a region of interest https://github.com/brentp/cyvcf2 . cyvcf2 can use the vcf.gz or bcf.csi index. From the cyvcf2 variant records I can create a simple table that I am looking to display using a python web GUI.

ADD REPLYlink written 4 weeks ago by William4.0k
1
gravatar for Jeremy Leipzig
4 weeks ago by
Philadelphia, PA
Jeremy Leipzig17k wrote:

Sounds like Varify https://github.com/chop-dbhi/varify or xBrowse

The stack is just too slow for 100 samples...

ADD COMMENTlink modified 4 weeks ago • written 4 weeks ago by Jeremy Leipzig17k

Thanks I will have a look. Is thinks the correct link for xbrowse? https://github.com/macarthur-lab/seqr/tree/master/xbrowse ? It's wat google gives me and it is part of something called seqr. Do you have any additional documentation about xbrowse?

And which stack is too slow for 100 samples?

ADD REPLYlink modified 4 weeks ago • written 4 weeks ago by William4.0k
1

both of them (old xbrowse and varify) are not going to scale beyond a couple trios

seqr is the next generation of xbrowse and I think they have plans to leverage TileDB/GenomicsDB and Hail. Maybe we can get them to chime in here.

ADD REPLYlink written 4 weeks ago by Jeremy Leipzig17k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1370 users visited in the last hour