This is a test version of Biostars. For the public version, visit https://www.biostars.org.
about GRAnges and append

Hi

I would appreciate a piece of advice on the following

I would like to append a GRange object "interactions" that is initially EMPTY

interactions <- append(interactions, interactions_chr[k])

How do I initialize a GRange object "interactions" that is EMPTY at the very beginning?

Thanks,
bogdan

granges

1 answer

I guess you are looking for something like this:

Thank you very much. I would prefer if possible to initially set up : "interactions_chr" to 0 elements ; and to add the new elements as it is necessary with "append" function.

Please could you advise on how I could set up "interactions_chr" to 0 elements initially ? thanks ;) !

It is late and I am caffeine deprived so it is possible that I am missing something here.

If you simply use GRanges() without any parameters you get empty GRanges object. Do you want both to be empty?

Eheee ..now I see the answer to my question:

interactions <- GRanges()

thanks again, and happy weekend!

You are welcome :)

Log in to answer this question.