saving previous work from home pc
This commit is contained in:
parent
cae9c550a4
commit
be213cb7e9
3 changed files with 146 additions and 106 deletions
|
@ -6,7 +6,7 @@ Created on Tue Jun 18 11:32:28 2019
|
|||
@author: tanushree
|
||||
"""
|
||||
############################################
|
||||
#load libraries
|
||||
# load libraries
|
||||
import pandas as pd
|
||||
import os
|
||||
#############################################
|
||||
|
@ -17,14 +17,29 @@ import os
|
|||
# containing GWAS data
|
||||
#!#########################!
|
||||
|
||||
print(os.getcwd())
|
||||
homedir = os.path.expanduser('~') # spyder/python doesn't recognise tilde
|
||||
os.chdir(homedir + '/git/Data/input/original')
|
||||
#print(os.getcwd())
|
||||
#homedir = os.path.expanduser('~') # spyder/python doesn't recognise tilde
|
||||
#os.chdir(homedir + '/git/Data/pyrazinamide/input/original')
|
||||
print(os.getcwd())
|
||||
|
||||
#%%
|
||||
############# specify variables for input and output paths and filenames
|
||||
drug = 'pyrazinamide'
|
||||
#gene = 'pnca'
|
||||
|
||||
datadir = homedir + '/git/Data'
|
||||
basedir = datadir + '/' + drug + '/input'
|
||||
|
||||
# input
|
||||
inpath = "/original"
|
||||
in_filename = "/aa_codes.csv"
|
||||
infile = basedir + inpath + in_filename
|
||||
print(infile)
|
||||
|
||||
#==========
|
||||
#read file
|
||||
#==========
|
||||
my_aa = pd.read_csv('aa_codes.csv') #20, 6
|
||||
my_aa = pd.read_csv(infile) #20, 6
|
||||
#assign the one_letter code as the row names so that it is easier to create a dict of dicts using index
|
||||
#my_aa = pd.read_csv('aa_codes.csv', index_col = 0) #20, 6 #a way to it since it is the first column
|
||||
my_aa = my_aa.set_index('three_letter_code_lower') #20, 5
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue