no plottable samples with matched alignment files
I generated a vcf file with sniffles (on PacBio HiFi reads aligned to hg38) and I am trying to visualize SVs using samplot vcf (conda installation).
vcf file stats:
Len Del Dup Inv INS TRA UNK
0-50bp 3326 0 0 3605 162 0
50-100bp 3471 1 0 4094 0 0
100-1000bp 5493 4 14 8393 0 0
1000-10000bp 1180 16 28 1534 0 0
10000+bp 72 20 15 15 0 0
samplot command I used:
samplot vcf --vcf HG033_sniffles_SVs.vcf -d . --sample_ids HG033_sniffles -b HG033_hg38_mnp2.bam --plot_all
But the output is only an empty index.html file.
When I include a --debug flag, there are 2 recurring types of errors:
- For INS -
INS type not supportedI have seen this error in other raised issues and if understand it correctly,samplotdoes not visualize SNPs - For DEL (of any size) -
no plottable samples with matched alignment filesWhat can be causing that?
Also, I do not understand why longer insertions and other types of SVs are not visualized.
Insertions are not currently supported by Samplot, but we are in the planning stages of implementing them. As for the deletions, can you try plotting some individual regions from the VCF with samplot plot?
Also, based on the error, check the sample name in the VCF and see if it matches the sample name in the BAM
Thanks for prompt reply, @mchowdh200!
The sample name in the the VCF file was correct, but I noticed that there was no @RG tag in my bam file.
I used samtools addreplacerg to add it back and it works now!
However, I have another issue.
I prepared the .gff3 file and indexed it as recommended (but I used Homo_sapiens.GRCh38.107.gff3.gz version as I aligned my reads to hg38).
So, I have the annotation column in the index.html file:
But none of the images actually contain the gene track.
For examples this deletion that has an overlap column value gene:

I supplied sorted gff3 file via --gff3 flag, so I am not sure why the track is not displayed below the coverage plot.
From the usage string, I saw this description for the --gff3 option
used when building HTML table and table filters
(default: None)
This leads me to believe that it's used for some sort of table filtering and not for plotting the track. In samplot plot we have the -T option for plotting the gff track underneath the samples, but it doesn't seem to be part of samplot vcf yet.
This leads me to believe that it's used for some sort of table filtering and not for plotting the track. In
samplot plotwe have the-Toption for plotting the gff track underneath the samples, but it doesn't seem to be part ofsamplot vcfyet.
It is actually possible to add additional samplot plot arguments to samplot vcf that will be passed on to each samplot plot call. For the command above it would be something like:
samplot vcf --vcf HG033_sniffles_SVs.vcf -d . --sample_ids HG033_sniffles -b HG033_hg38_mnp2.bam --plot_all --gff3 Homo_sapiens.GRCh38.107.gff3.gz -T Homo_sapiens.GRCh38.107.gff3.gz