Entering edit mode
Hello,
I would like to generate a GRangesList object from multiple narrow
peak
files. I tried this and it works:
ord <- function (ddir, namen){ #ddir is the directory of interest and
namen
a vector with names e.g. "GSM1008569" "GSM1008578" "GSM1008583"
open.list <- sapply (namen, function (x) {feile <- list.files (ddir,
pattern=x, full.names=TRUE)
feile <- read.table (feile)
file.gr <- GRanges (seqnames=feile$V1,
ranges= IRanges (start=feile$V2, end=feile$V3), edensity=feile$V5,
epeak=feile$V10)
}
)
names(open.list) <- namen
return (open.list)
}
After for instance
test <- ord (ddir, namen)
I get a nice list of GRange objects but I would like to transform this
in a
GRangesList. How does it work?
If there is an alternative approach to generate a GRangeList directly
( I
guess there is one but I did not find a way to manage this) please let
me
know.
Thanks
Hermann
[[alternative HTML version deleted]]