about GRAnges and append
1
0
Entering edit mode
9.4 years ago
Bogdan ★ 1.4k

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 • 6.9k views
ADD COMMENT
1
Entering edit mode
9.4 years ago
zero323 ▴ 30

I guess you are looking for something like this:

ADD COMMENT
0
Entering edit mode

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 ;) !

ADD REPLY
0
Entering edit mode

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?

ADD REPLY
0
Entering edit mode

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

interactions <- GRanges()

thanks again, and happy weekend!

ADD REPLY
0
Entering edit mode

You are welcome :)

ADD REPLY

Login before adding your answer.

Traffic: 2468 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6