This is a test version of Biostars. For the public version, visit https://www.biostars.org.
R programming question

I have below list:

V1  V2  V3  V4  V5  V6

A   1   2   3   4   5

B   1   2   

C   3   5   

D   3   

E   4   5   6   1   8

and I would like to get below results (extract all V1 elements matches to unique element from V2~V6):

1   A   B   E

2   A   B   

3   A   C   D

4   A   E   

5   A   C   E

6   E       

8   E

I was trying to write code in R, but I keep getting errors.. Can you please help with this code?

Thank you in advance.

r program

It's not very clear how your data structure is: could you use appropriate brackets to separate them?

Also, your question is very vague and I can't grasp what you want to do.

Finally, when you post in Biostars as well as any other somehow-IT related forum, always copy-paste the error that you retrieve (or a meaningful subset of it, in case it is too long)

Or a picture of head(your.data)

> head(input)

   V1 V2 V3 V4 V5 V6

1  A  1  2  3  4  5

2  B  1  2 NA NA NA

3  C  3  5 NA NA NA

4  D  3 NA NA NA NA

5  E  4  5  6  1  8

Hello genetic!

We believe that this post does not fit the main topic of this site.

Not strictly bioinformatics, try Stack Overflow

For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.

Cheers!

I need this code for my NGS data. We have whole exome sequencing data, and need to transform to interpret them.

Thank you.

I can reopen this question if you adapt your initial question to clarify what you are doing - this is not clear how this relates to whole exome sequencing data.

0 answers

No answers yet.

Log in to answer this question.