I have a .sam file and I want to extract random alignments from it.
I googled a bit and there are quite a few tools that have commands to "downsample a sam file" like Picard and GATK. I couldn't really find if these tools would allow me to extract a certain percentage or certain number of alignments from the SAM file.
But I would like to do the same thing using Picard or GATK (or any other tool for that matter) because I am "curious" whether there are any tools that can reproduce the results using a single line of code. Any suggestions? I am just asking for suggestions and not for complete answers. I am just inquisitive and even a little hint would be helpful.
For people who think this is a cross posting, I posted this on www.seqanswers.com as well but received no response and which is why I am posting it here. This is my post on seqanswers.com
Thanks in advance!