Closed hannahvanm closed 8 months ago
Questions about usage of Bioconductor software are best asked on our support site.
But before that, make sure to check the man page for renameSeqlevels
(with ?renameSeqlevels
). It says:
Usage:
...
renameSeqlevels(x, value)
...
Arguments:
x: Any object having a Seqinfo class in which the seqlevels will
be kept, dropped or renamed.
value: A named or unnamed character vector.
...
In the case of ‘renameSeqlevels’, the names are used to map
new sequence levels to the old (names correspond to the old
levels). When ‘value’ is unnamed, the replacement vector must
the same length and in the same order as the original
‘seqlevels(x)’.
Looks like it answers your question :wink:
Got it, thank you very much, it does answer my question. I suppose I was trying to finagle a way to get a list of the seqlevels from the annotation and use that as input, as there are many non-standard chromosome names in this genome and doing it manually would be a pill.
Unfortunately though, because the NCBI and annotations don't match in the number of unplaced and unnamed scaffolds, I had to cut down to only standard chr(1-85) for both the BSgenome and annotation file...
I'll post a follow-up about that on the support site (sorry in advance). See you there and thanks for all of your help!
Hi there,
I'm trying to get the chromosomes of a forged BSgenome object from NCBI (kPetMar1.pri) to match the seqnames of a peaks GRanges object for use with Signac LinkPeaks. The peak's annotation file is the same genome assembly but uses a GTF not from NCBI.
First, I tried to change the seqlevelstyle of the the forged genome to UCSC, but that didn't work.
Now I'm trying to use renameSeqlevels to do this manually, using the seqnames from the peaks object as a df. But here's the error
renameSeqlevels(BSgenome.Pmarinus.NCBI.kPetMar1.pri, da_peaks_seqnames)
So I'm curious about what the format of value should be in renameSeqlevels to correctly change all of the BSgenome chr names to that of the annotation file. Thank you so much for all of your help so far working with this package!
multiome_session_info.txt