Hi,
I have a simple question, but how do you view the .json files that are output from Supernova run? I would like to see the histogram distribution of scaffolds. One of the files is named "histogram_scaffold.json."
Is there any way to view the file? I have been able to use https://playground.anychart.com/aNa8wZhd, but it is not efficient and I think some information is being lost.
Thanks,
Michael
1 answer
Hello Michael,
I created this r-script to visualize Supernova output histograms, I hope it helps you...
Install.packages("jsonlite", "FSA")
library(jsonlite)
library(FSA)
histscaffolds <- fromJSON("~/stats/histogram_scaffolds.json", flatten = TRUE)
xscaffolds <- seq(histscaffolds$min, histscaffolds$max-1, by=histcontig$binsize)
histFromSum(xscaffolds, histscaffolds$vals, breaks=histscaffolds$numbins)
abline(v = #add your summary output value#, col = "red", lwd = 3, lty=2) #This is optional if you want to add the mean or N50 line in your histogram.
Here is one example with molecule length data:
Good luck!
Log in to answer this question.
Do you have news about your question? I would like to know if there is any solution to use or plot that files.