Hi! I have a question regarding violin plots for m...
# multiqc
n
Hi! I have a question regarding violin plots for multiqc - I have a data file named nFeature_RNA_mqc.txt, and when I run
multiqc .
in the same directory as nFeature_RNA_mqc.txt, it renders fine in a multiqc_report.html file if i set
plot_type: 'box'
but it fails with the below error if I set
plot_type: 'violin'
I am pretty confident nothing is wrong with the data itself, as it works fine as a box plot. There aren't any examples of violin plots in the examples here, which is what I used as a reference to generate my *_mqc.txt files, so I may not be formatting the nFeature_RNA_mqc.txt file in a way that is not accepted by the violin plot function? Thank you in advance! Error:
Copy code
file_search | Search path: /Users/****/sandbox
         searching | ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 40/40  
    custom_content | Not able to parse custom data in nFeature_RNA_mqc.txt
Top 15 lines of nFeature_RNA_mqc.txt:
Copy code
#id: custom_gene_counts
#plot_type: 'violin'
#section_name: 'Gene Counts Per Cell'
#description: 'Cells exhibiting minimal gene expression are categorized as low quality and are subsequently excluded from further analysis. Variation in distribution of number of expressed genes among experiments, particularly those of same/similar conditions, can suggest the existence of batch effects.'
#format: 'tsv'
#pconfig:
#    title: 'Genes Per Cell'
Bladder_BC1	Breast_BC2	Kidney_BC4	Ovary_BC3
1	12	1	2
1	1	1	2
1	1	11	58
6	2	1	1
1	1	1	1
53	1	1	3
93	1	2	2
v
Hi Nora! Thanks for spotting this, we indeed were missing proper support and an example for a violin plot. We fixed it here https://github.com/MultiQC/MultiQC/pull/2957 and added an example here: https://github.com/MultiQC/test-data/commit/0667cc8bbf37e0c5c48499e39d281774d3dd3789 Note that a violin plot expects the same format as a table plot type, i.e. the first column is expected to be a "header" column containing data point (i.e. sample) names. So you might want to add a superfluous column:
Copy code
#plot_type: 'violin'
Sample	Bladder_BC1	Breast_BC2	Kidney_BC4	Ovary_BC3
S1 1	12	1	2
S2 1	1	1	2
S3 1	1	11	58
S4 6	2	1	1
S5 1	1	1	1
S6 53	1	1	3
S7 93	1	2	2
It will generate a violin plot like below:
Screenshot 2024-11-13 at 12.52.15.png
n
@Vlad Savelyev got it working - thanks so much for your help!