Commit 0e375a01 authored by Nicolas Delhomme's avatar Nicolas Delhomme

added easyRNASeq-formatted GRanges output

parent c419cb63
......@@ -116,6 +116,14 @@
return(switch(output,
"Genome_intervals" = newgff,
"GRanges" = as(newgff, "GRanges"),
"GRanges" = {
grng <- as(newgff[newgff$type == "exon"], "GRanges")
elt <- elementMetadata(grng)[,colnames(elementMetadata(grng))
%in% c("ID","Parent")]
colnames(elt) <- c("exon","transcript")
elt$gene <- sub("\\.0","",elt$transcript)
elementMetadata(grng) <- elt
grng
},
stop(paste("Cannot generate output of type", output))))
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment