Yes, I can extract the data from the html output f...
# spatialaxe
s
Yes, I can extract the data from the html output from baysor 👍
✅ 1
p
Does it not output the data in any other formats?
Parsing HTML is very brittle and a bit nasty sadpanda
s
no it just generates an html
p
shared a GIF
s
luckily the data is passed as a huge json object via 3 seperate variables
p
ah ok good, that helps a lot
🤞 1
Might be getting to the point where it's best to write a new module for MultiQC for this tool
👮‍♂️ 1
💪 1
s
I would keep it as a template script in the pipeline though. As one of the subcommands generates a segmentation
geojson
, another creates a
.loom
file and one creates an html🫠
p
I'm not sure I understand, what difference does that make?
s
what I mean is the only output that we would want to visualize is from the preview command which is what I am trying to achieve right now. But the segmentation output and the loom file would not make much sense in the multiqc report.
p
yeah but that's fine, MultiQC supports samtools logs even though samtools makes bam files.. 😅
I don't see why the presence of other files we don't care about is a reason not to make a MultiQC module?
s
One reason is that we already have the general stats in the multiqc report, baysor uses the same transcripts.parquet file and reassigns the transcripts, better than the segmentation algorithm under xeniumranger
It just changes the transcript labels
but yes, the preview output can be implemented with beautiful plots🙌
p
If you have a standard file from a public tool which has data suitable for a MultiQC report, then that fits the criteria for a MultiQC module. Then anyone running MultiQC in any situation with Baysor outputs will get a nice report ✨ (rather than only users of this pipeline)
❣️ 1
s
then we can move ahead with a module for baysor🙌
I am updating the python script to extract the data, I will share the link soon
👍🏻 1
Hi @Phil Ewels, here is a script to extract the data from html file which is the output of the baysor preview command, maybe not the best implementation but does the job🫠 Usage:
Copy code
python3 extract_data.py preview.html ./data/
I am not able to run this script in a nf module implemented as template as the groovy interpretor is not able to handle the
js_to_json
function
but this script can very well parse the html and extract all data
Here is an example of the baysor output
This is the error when run as a template