samplot icon indicating copy to clipboard operation
samplot copied to clipboard

How it works, color and vcf

Open yasin-uzun opened this issue 4 years ago • 2 comments

This is an incredible tool that must absolutely be published. Thank you for developing this superb program. I have a couple questions and a comment. Even without given any SV infromation, some reads are marked as duplication, deletion, inversion and so on. How does samplot tag those reads with events? Does it use discordant and chimeric tags from sam/bam file?

As I understand duplication reads are shown with black and normal reads are shown with gray. When multiple grays come over each other, they also look like black, causing confusion. Can a different color (such as purple or brown) can be selected for denoting duplications?

Finally, samplot vcf looks like a great option. But somehow it doesn't work for me, even without filtering. Both the output sh script and test folder are empty. I don't know what is wrong.

samplot vcf \
    --filter "SVTYPE == 'DEL' & SU >= 8" \
    --filter "SVTYPE == 'INV' & SU >= 5" \
    --vcf example.vcf \
    -d test/ \
    -O png \
    --important_regions regions.bed \
    -b example.bam > samplot_commands.sh

yasin-uzun avatar Dec 18 '20 23:12 yasin-uzun

On Dec 18, 2020, at 4:06 PM, yasin-uzun [email protected] wrote:

 This is an incredible tool that must absolutely be published. Thank you for developing this superb program. I have a couple questions and comments. Even without given any SV infromation, some reads are marked as duplication, deletion, inversion and so on. How does samplot tag those reads with events? Does it use discordant and split read tags from sam/bam file?

We use the insert size and strand information to color each read.

As I understand duplication reads are shown with black and normal reads are shown with gray. When multiple grays come over each other, they also look like black, causing confusion. Can a different color (such as purple or brown) can be selected for denoting duplications?

Normal reads will be low on the y-axis. You can modulate how many you see there. DUPs are red, so if you see all black then you only see reads supporting a DEL.

Finally, samplot vcf looks like a great option. But somehow it doesn't work for me, even without filtering. Both the output sh script and test folder are empty. I don't know what is wrong.

samplot vcf
--filter "SVTYPE == 'DEL' & SU >= 8"
--filter "SVTYPE == 'INV' & SU >= 5"
--vcf example.vcf
-d test/
-O png
--important_regions regions.bed
-b example.bam >

Run samplot_commands.sh to generate the images.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

ryanlayer avatar Dec 19 '20 14:12 ryanlayer

A note on the samplot vcf issue: I've noticed some issues with, for example, slightly malformatted VCF files that caused silent failure. To troubleshoot, try out the --debug option, which will print the best-guess reason each un-plotted variant got skipped. Also note that the current iteration of samplot vcf will autorun the samplot_commands.sh file mentioned above, although you can also take manual control using the --manual_run and --command_file options.

jbelyeu avatar Jan 07 '21 23:01 jbelyeu