Hi all,
Just wondering if I'm missing something very obvious. I have a SAM file of a bunch of alignments mapped to a reference genome consisting of multiple chromosomes.
I can see from the samtools view
man page how to include alignments by ref seq name in the output, but is there a way to exclude alignments by ref seq name? (I know I could do this with a pipe to grep
or awk
but I figure there must be a way to do it within samtools...) (I could also do it by just listing all the chromosomes I want except the unwanted ones, but that seems clunky and less portable to new scenarios.)
Cheers in advance!
Thanks for your answer, I will give this a go!