igvteam / igv-reports

Python application to generate self-contained pages embedding IGV visualizations, with no dependency on original input files.
MIT License
347 stars 51 forks source link

Suggestion: add support for BCF files #55

Closed fgvieira closed 2 years ago

fgvieira commented 3 years ago

create_report only supports vcf.gz files, but would it be possible to also support bcf? thanks,

jrobinso commented 3 years ago

@fgvieira This might actually work with very minor changes, but I don't have time to pursue it. If you want to try, modify "getreader" in utils.py to return a vcf.VcrReader for file type bcf. Since pysam understands bcf files it might just work (almost). The other step would be to create a igv.js track of type "vcf", since igv.js does not support bcf. Again this might just work with no code changes other than a tweak to the format specifier for the output json, the format field in "get_track_json_dict" from tracks.py. In this respect bcf is very similar to cram, which is actually output in the report as bam.

fgvieira commented 2 years ago

I've just made pull request #56 with changes to support BCF files. I tested it on a small file, but can you double check if it makes sense?

thanks,