Closed alexpreynolds closed 4 months ago
I have certainly run into headers with ~1000 lines but I have never seen anything approaching 50-100MB.
Do you have an example? And do you know what upstream tools are adding these tags?
I'll see if I can get permission to share an example file, but if it is another upstream tool adding these tags (apologies, if so), I will likely just close this issue.
Just the header would be fine (samtools view -H
) with no real data if that helps.
I guess it could be ft
but ft
"should" only add one line to the header per command.
Here is one example, about 80 MB (uncompressed):
https://resources.altius.org/~areynolds/public/d2_stim_sequel.fire.HAP2.header.txt.gz
Digging into this more, this is almost certainly coming from somewhere else in the pipeline.
I apologize — this data is coming from several steps outside of ft
. I'm going to close this up.
Good to hear @alexpreynolds. Hopefully it isn't too bad to modify the other outputs.
I am very curious about the website/tool you are making. Please let me know if you are ever in a position to share it!
Cheers, Mitchell
Overview: Over the last several months I have been developing a web-based tool for exploring and analysing fiber-seq reads that come out of the fibertools pipeline. There are various libraries the application uses to read and render the data, including @gmod/bam. Before querying for fibers,
bam-js
requires reading in the header of an indexed BAM file into memory.Problem: Some of the headers I encounter in fiber-seq BAMs have been between 50-100 MB in size, give or take. The browser hangs while downloading the full header, and, depending on how many tracks are being rendered, this can also cause the browser to crash altogether. Except for
HD
andSQ
tags, none of the other metadata in the header appears to be of use for rendering.Question: For internal use, I have post-processed reads by reheadering the BAMs down to only what is needed for an indexed query. There may be other criteria for filtering reads (e.g., haplotype) but my question is — to make it easier for the wider public to import their own pipeline result files into this tool — how feasible would it be to add a runtime flag to
ft
to render BAM files that only contain a minimal header sufficient for indexed queries?