Thank you rpolicastro ! This is perfect!
Hello Biostars Community,
I made a txdb object using:
mm39.txdb <- makeTxDbFromEnsembl(organism = "Mus musculus")
and then made the CompressedGRangesList :
txns <- GRangesList(cds(mm39.txdb, columns = c("CDSSTART","CDSEND")))
I am trying to figure out how to rename CDSSTART to cdsStart and CDSEND to cdsEnd. Help? Please?
The reason for this renaming is so that nothing "breaks" in the package when plugging in the final data files it requires.
I feel like this is such a simple task, but I am not sure exactly to do it... I've probably been trying to figure out this tiny thing for like 2 hours now... I tried exploring GenomeInfoDb for something similar to
seqlevelsStyle(mm39.txdb) <- "UCSC"
No success, yet...
Thank you in advance!
-Pratik
1 answer
You can set the mcols (which is a DataFrame).
mcols(txns, level="within")[, "cdsStart"] <- mcols(txns, level="within")[, "CDSSTART"]
mcols(txns, level="within")[, "cdsEnd"] <- mcols(txns, level="within")[, "CDSEND"]
txns <- txns[, c("cdsStart", "cdsEnd")]
> txns
GRangesList object of length 1:
[[1]]
GRanges object with 528396 ranges and 2 metadata columns:
seqnames ranges strand | cdsStart cdsEnd
<Rle> <IRanges> <Rle> | <integer> <integer>
[1] 1 4878137-4878205 + | 4878137 4878205
[2] 1 4878137-4878205 + | 4878137 4878205
[3] 1 4878137-4878205 + | 4878137 4878205
[4] 1 4878137-4878205 + | 4878137 4878205
[5] 1 4878137-4878205 + | 4878137 4878205
... ... ... ... . ... ...
[528392] JH584304.1 55480-55701 - | 55480 55701
[528393] JH584304.1 56986-57151 - | 56986 57151
[528394] JH584304.1 56986-57151 - | 56986 57151
[528395] JH584304.1 58564-58616 - | 58564 58616
[528396] JH584304.1 58564-58616 - | 58564 58616
-------
seqinfo: 61 sequences (1 circular) from an unspecified genome
Log in to answer this question.
For the full picture: I am trying to create a
genomeInfo.mm39list object for theSesameDatapackage so I could plug it into thesesameR package. The currentSesameDataonly hasgenomeInfo.mm10.For reference,
genomeInfo.mm10is obtained bytxnsis aCompressedGRangesListwithin thegenomeInfo.*list, obtained by: