edgelist2degree.Rd
find the degree for each protein given cleaned molecular interaction data
edgelist2degree_slow(mitab, sep = "\\|", order_by_degree = T)
mitab | data.table containing molecular interaction data, including "IDs_interactor_A" and "IDs_interactor_B" or "pair_id" |
---|---|
sep | how are individual interactors in the pair_id reparated? default: "\|" |
sorted data.table containing degree for each of the nodes in the input, details: mitab
edgelist2degree
uses "IDs_interactor_A", "IDs_interactor_B" columns of a supplied data.table mitab
to compute the degree. mitab
can be generated using cleanMITAB
edgelist2degree_slow
uses pair_id to compute degree. Unique pair_id is the unique identifier of the undirected interaction: ordered alphabetically and concatenated interacting molecule IDs cleanMITAB
edgelist = data.table(pair_id = paste0(rep(c("P", "Q", "R"), each = 30), "|", sample(rep(c("Z", "X", "F"), each = 30)), 1:90)) edgelist2degree_slow(edgelist)#> ID N #> 1: F10 1 #> 2: F11 1 #> 3: F12 1 #> 4: F14 1 #> 5: F2 1 #> 6: F20 1 #> 7: F24 1 #> 8: F25 1 #> 9: F32 1 #> 10: F38 1 #> 11: F42 1 #> 12: F43 1 #> 13: F45 1 #> 14: F47 1 #> 15: F48 1 #> 16: F56 1 #> 17: F59 1 #> 18: F61 1 #> 19: F62 1 #> 20: F63 1 #> 21: F69 1 #> 22: F73 1 #> 23: F74 1 #> 24: F75 1 #> 25: F77 1 #> 26: F80 1 #> 27: F83 1 #> 28: F88 1 #> 29: F89 1 #> 30: F9 1 #> 31: X15 1 #> 32: X22 1 #> 33: X23 1 #> 34: X26 1 #> 35: X28 1 #> 36: X29 1 #> 37: X3 1 #> 38: X30 1 #> 39: X34 1 #> 40: X37 1 #> 41: X41 1 #> 42: X44 1 #> 43: X46 1 #> 44: X49 1 #> 45: X55 1 #> 46: X57 1 #> 47: X58 1 #> 48: X6 1 #> 49: X64 1 #> 50: X65 1 #> 51: X66 1 #> 52: X68 1 #> 53: X7 1 #> 54: X76 1 #> 55: X79 1 #> 56: X81 1 #> 57: X82 1 #> 58: X84 1 #> 59: X87 1 #> 60: X90 1 #> 61: Z1 1 #> 62: Z13 1 #> 63: Z16 1 #> 64: Z17 1 #> 65: Z18 1 #> 66: Z19 1 #> 67: Z21 1 #> 68: Z27 1 #> 69: Z31 1 #> 70: Z33 1 #> 71: Z35 1 #> 72: Z36 1 #> 73: Z39 1 #> 74: Z4 1 #> 75: Z40 1 #> 76: Z5 1 #> 77: Z50 1 #> 78: Z51 1 #> 79: Z52 1 #> 80: Z53 1 #> 81: Z54 1 #> 82: Z60 1 #> 83: Z67 1 #> 84: Z70 1 #> 85: Z71 1 #> 86: Z72 1 #> 87: Z78 1 #> 88: Z8 1 #> 89: Z85 1 #> 90: Z86 1 #> 91: P 30 #> 92: Q 30 #> 93: R 30 #> ID N{ # download full human interactome (clean = TRUE is necessary to produce the right input for edgelist2degree) full = fullInteractome(taxid = "9606", database = "IntActFTP", format = "tab25", clean = TRUE, protein_only = TRUE) degree = edgelist2degree(full$data) }#>#>#>#> Warning: Found and resolved improper quoting out-of-sample. First healed line 25383: <<uniprotkb:P16054 uniprotkb:Q05769 intact:EBI-298451 intact:EBI-298933|uniprotkb:Q543K3 psi-mi:kpce_mouse(display_long)|uniprotkb:Prkce(gene name)|psi-mi:Prkce(display_short)|uniprotkb:Pkce(gene name synonym)|uniprotkb:Pkcea(gene name synonym)|uniprotkb:nPKC-epsilon(gene name synonym) psi-mi:pgh2_mouse(display_long)|uniprotkb:Ptgs2(gene name)|psi-mi:Ptgs2(display_short)|uniprotkb:Cox-2(gene name synonym)|uniprotkb:Cox2(gene name synonym)|uniprotkb:Pghs-b(gene name synonym)|uniprotkb:Tis10(gene na>>. If the fields are not quoted (e.g. field separator does not appear within any field), try quote="" to avoid this warning.