This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Check values in columns of a window of fragments and return new table based on condition in R

I have a table like this :

  V1    V2   V3 V4 V5 V6 V7 V8 V9 
  1     1  7512  1  0  0  0  0  0  
  1  7506 10949  0  0  0  0  0  1
  1 10943 13175  0  0  0  0  0  0      
  1 13169 20070  0  1  1  0  0  0

Each line in the table is a fragment so the fragnum is 4. Con1 includes V4, V5, V6 and con2 V7, V8, V9 I want to create a new table in R in which i will check if elements in con1 and con 2 are zero or one . If there is at least 1 in elements of each condition it is covered if not it is uncovered so the table will look like this :

label fragnum covered uncovered 
con1  4       2       2 
con2  4       1       3

How to do it in R ?

r fragments column table

Please spend at least 1 day trying to do this on your own. testing

Hello dzisis1986!

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

Not a bioinformatics question.

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!

0 answers

No answers yet.

Log in to answer this question.