Guest User

stub

a guest
Feb 14th, 2020
79
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import itertools
  2. from itertools import combinations
  3.  
  4. # Acuertdate de dropear duplicados
  5.  
  6. genes = ['A', 'B', 'C']
  7.  
  8. combs = []
  9.  
  10. for i in range(1, len(genes)+1):
  11.     els = [list(x) for x in itertools.combinations(genes, i)]
  12.     combs.extend(els)
  13.  
  14.  
  15. for geneset in combs:
  16.  cuentas = data[data['Hugo_Symbol'].isin(geneset)]['case_id'].value_counts()
  17.  cuentas = cuentas[cuentas == len(geneset)]
  18.  len(cuentas)
RAW Paste Data