Hi,
I was trying to obtain the gene names from the column "Parent" in the GRangesList (from gff3) with 1 range and 23 as follows:
countDF <- data.frame(row.names=names(gffsub))
GRangesList with 1 range and 23 metadata shortened as follows:
> gffsub
GRangesList of length 4449:
[[1]]
GRanges with 1 range and 23 metadata columns:
seqnames ranges strand | ....................Parent
But countDF returned null. How can I modify the code to give me a row of the gene names?
Thanks
Have you tried just doing
parents <- elementMetadata(gffsub)$Parent)
. Anyway, you're not creating an actual dataframe, which would seem to be the root of your problem.as a sidenote,
mcols()
will do the same thing aselementMetadata()
Thanks guys!
I have tried mcols and Parents <- elementMetadata(gffsub)$Parent;
Going further using the following code threw errors (obviously because countDF = NULL):
cross posted on SE: http://seqanswers.com/forums/showthread.php?t=35329
Post is no longer on SE: http://seqanswers.com/forums/showthread.php?t=35329