0

I have the following data frame:

> str(Long_top)
'data.frame':   110 obs. of  6 variables:
 $ Category       : chr  "GOTERM_BP_DIRECT" "GOTERM_CC_DIRECT" "GOTERM_MF_DIRECT" "GOTERM_CC_DIRECT" ...
 $ Term           : chr  "GO:0016579~protein deubiquitination" "GO:0005634~nucleus" "GO:0004843~thiol-dependent ubiquitin-specific protease activity" "GO:0005654~nucleoplasm" ...
 $ Count          : int  13 57 12 43 21 14 11 7 18 14 ...
 $ Genes          : chr  "8287, 64854, 373509, 5071, 55031, 80124, 57646, 126119, 84132, 85015, 159195, 84640, 56957" "9785, 10293, 9425, 6872, 8335, 122402, 80124, 11107, 10419, 54476, 6667, 85015, 10013, 84640, 55206, 5976, 5934"| __truncated__ "80124, 57646, 126119, 8287, 64854, 373509, 84132, 85015, 159195, 84640, 55031, 56957" "9785, 6872, 10293, 4298, 8315, 22992, 11107, 57646, 10419, 79039, 23186, 54531, 54476, 6601, 6667, 11342, 54856"| __truncated__ ...
 $ Fold.Enrichment: num  26.34 2.24 21.31 2.54 5.08 ...
 $ Benjamini      : num  4.05e-11 1.21e-09 1.61e-09 7.00e-08 2.50e-07 ...

I want to subtract all the rows when the number "56957" appears in the Genes column. I add here several rows from my file so if someone wants to practice writen code to validate it works:)

Thank you!

Category    Term    Count   %   PValue  Genes   List Total  Pop Hits    Pop Total   Fold Enrichment Bonferroni  Benjamini   FDR
GOTERM_BP_DIRECT    GO:0016579~protein deubiquitination 13  14.444444444444443  6.470567352790495E-14   8287, 64854, 373509, 5071, 55031, 80124, 57646, 126119, 84132, 85015, 159195, 84640, 56957  88  108 19256   26.33922558922559   4.0583203464450435E-11  4.0505751628468494E-11  3.972928354613364E-11
GOTERM_CC_DIRECT    GO:0005634~nucleus  57  63.33333333333333   7.536809948339279E-12   9785, 10293, 9425, 6872, 8335, 122402, 80124, 11107, 10419, 54476, 6667, 85015, 10013, 84640, 55206, 5976, 5934, 9618, 6047, 64324, 23410, 3010, 5071, 56980, 83860, 4857, 4858, 4674, 64854, 1482, 85509, 57646, 79039, 23186, 54531, 11166, 29081, 54856, 6602, 6604, 56957, 5451, 8287, 6663, 55031, 221613, 8481, 27030, 5928, 57332, 9924, 11011, 84132, 54107, 84333, 8438, 140628    88  5930    20472   2.2361336808217076  1.2134344640202244E-9   1.213426401682624E-9    1.1606687320442489E-9
GOTERM_MF_DIRECT    GO:0004843~thiol-dependent ubiquitin-specific protease activity 12  13.333333333333334  8.618779898787077E-12   80124, 57646, 126119, 8287, 64854, 373509, 84132, 85015, 159195, 84640, 55031, 56957    89  119 18811   21.313568123878763  1.6030916594189648E-9   1.6117118410731834E-9   1.4824301425913772E-9
GOTERM_CC_DIRECT    GO:0005654~nucleoplasm  43  47.77777777777778   8.689750582410526E-10   9785, 6872, 10293, 4298, 8315, 22992, 11107, 57646, 10419, 79039, 23186, 54531, 54476, 6601, 6667, 11342, 54856, 85015, 10013, 6602, 5976, 6604, 5934, 9618, 4261, 9972, 5451, 6663, 6047, 93426, 64324, 23410, 55031, 27030, 5928, 57332, 84132, 83860, 54107, 84333, 8438, 4857, 140628   88  3939    20472   2.5395693415495395  1.399049657235807E-7    6.995249218840473E-8    6.691107948456104E-8
GOTERM_MF_DIRECT    GO:0008270~zinc ion binding 21  23.333333333333332  2.670087630679821E-9    23409, 6047, 10193, 8315, 64324, 131405, 22992, 23410, 5192, 5071, 286827, 80128, 57159, 142678, 85015, 10013, 54469, 5976, 9618, 56957, 140628 89  873 18811   5.084250357156646   4.966361700775579E-7    2.496531934685633E-7    2.296275362384646E-7
GOTERM_MF_DIRECT    GO:0061630~ubiquitin protein ligase activity    14  15.555555555555555  4.03154249513981E-9 10293, 10193, 8315, 55072, 131405, 5071, 286827, 57630, 57159, 54476, 7844, 11342, 344558, 142678   89  328 18811   9.021444231296245   7.498666335647997E-7    2.512994821970482E-7    2.3114176972134912E-7
GOTERM_BP_DIRECT    GO:0006511~ubiquitin-dependent protein catabolic process    11  12.222222222222221  5.735417980008066E-7    57646, 8287, 6872, 64854, 11342, 373509, 84132, 85015, 84640, 55031, 5071   88  282 19256   8.535460992907801   3.5954615828870384E-4   1.7951858277425245E-4   1.7607733198624762E-4
GOTERM_BP_DIRECT    GO:0051865~protein autoubiquitination   7   7.777777777777778   1.2120304473656288E-6   6047, 10193, 57630, 11342, 344558, 131405, 5071 88  76  19256   20.154306220095695  7.596548670514292E-4    2.529103533502945E-4    2.48062231560832E-4

Thanks in advance!

Chemokine1
  • 17
  • 3

0 Answers0