Created
          March 7, 2019 19:50 
        
      - 
      
 - 
        
Save RyanSchu/dda5c0471cca72932fe7d030176e6403 to your computer and use it in GitHub Desktop.  
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | gene_list = [] | |
| with open('/home/ryan/multi_coding_subset.txt', 'r') as assoc: | |
| for line in assoc: | |
| intron,gene_vec = line.split('\t') | |
| gene_vec = gene_vec.replace('c','').replace('\"','').replace('(','').replace(')','').replace(' ','').replace('\n','') | |
| newvec = gene_vec.split(',') | |
| for i in newvec: | |
| if i not in gene_list: | |
| gene_list.append(str(i)) | |
| out = '/home/ryan/multi_coding_subset_genes.txt' | |
| with open(out, 'w') as output: | |
| for i in gene_list: | |
| output.write((i + '\n').encode('utf-8')) | |
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment