Let's recreate the object.
And inside a package called genome info TP which
is automatically loaded when you load genomic ranges.
There's a set of functions for manipulating and dealing with seglevels.
So there's two convenient functions DropSeqlevels and keepSeqlevels.
They do exactly what you would expect.
Say dropSeqlevels(gr) and now you want to say drop chromosome two.
We get back something back where we have drop chromosome two in the same way we
keep a set of seqlevels in order get the same result.
I want to keep chromosome one which is the same as dropping chromosome two.
And I get the same thing.
There's also support for dropping weirdly looking chromosome names.
So let's change a weirdly looking chromosome name, which I usually,
for some organism, small context.
So here we are really talking about small contexts from a well assembled genome.
There's a function called keepStandardChromosomes.