SHARE
TWEET

Untitled

a guest May 25th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import pandas as pd
  2. import glob
  3. import os
  4. path = 'Downloads/cistrome_hg38/hg38_cismotifs/'
  5. filelist = glob.glob(path + "/*")
  6. print (filelist[1])
  7. frame = pd.DataFrame()
  8. for file in filelist:
  9.     df2 = pd.read_csv(file,sep='\t')
  10.     df2.columns = ['chr','start','end','score']
  11.     factorname = os.path.basename(file)
  12.     df2['factor'] = factorname
  13.     frame=frame.append(df2,ignore_index=True)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top