• Nenhum resultado encontrado

2016 Dr. Walter F. de Azevedo Jr.

N/A
N/A
Protected

Academic year: 2021

Share "2016 Dr. Walter F. de Azevedo Jr."

Copied!
39
0
0

Texto

(1)

©

20

16

D

r. Wa

lte

r

F

.

de

Az

ev

ed

o

Jr

.

1

000000000000000000000000000000000000000

000000000000000000000000000000000000000

000000000000111111111110001100000000000

000000000001111111111111111111000000001

000000000111111111111111111111111000000

000000000111111111111111111111111000000

000000000011111111111111111111100000000

000000001111111111111111111111111000000

000011111111111111111111111111111000000

001111111111111111111111111111110000000

111111111111111111111111111110000000000

111111111111111111111111111110000000000

000011111111111111111111111111111110000

001111111111111111111111111111111111000

011111111111111111111111111111111111000

001111111111111111111111111111111111100

000000011111111111111111111111111111110

000000001111111111111111111111111111110

000000000001111111111111111111111111110

000000000000011111111111111111111111110

000000000000000111111111111111111111000

000000000000000000000000001111000000000

000000000000000000000000000000000000000

000000000000000000000000000000000000000

000000000000000000000000000000000000000

www.python.org

(2)

2

Hoje veremos a estrutura de dados chamada tuple. Um tuple é similar a uma lista, e é

representado entre parânteses, como mostrado abaixo.

Assim, se quisermos mostrar todo o conteúdo atribuído à variável my_tuple, basta

usarmos um loop for e colocarmos uma função print(), como mostrado abaixo.

A execução do código mostrará um aminoácido por linha, o arquivo show_tuple.py tem

o código do programa.

my_tuple =("ALA","ARG","ASN","ASP","CYS","GLU","GLN","GLY","HIS","ILE",

"LEU","LYS","MET","PHE","PRO","SER","THR","TRP","TYR","VAL")

for aa in my_tuple:

print(aa)

Estrutura de Dados em Python (Tuple)

(3)

3

Estrutura de Dados em Python (Tuple)

www.python.org

Até agora tuple parece bem similar com a lista. Uma das principais diferenças é que

um tuple ocupa menos memória e tem acesso mais rápido. Para programas com listas

extensas é vantajoso o uso de tuple.

Outras diferenças estão mostradas na tabela abaixo.

Lista

Tuple

Mutável

Imutável

Não pode ser usado

como chave para

dicionários

Pode ser usado como

chave para dicionários

[elemento1,....]

(elemento1,....)

(4)

4

CDKs

www.python.org

Vamos ilustrar alguns problemas típicos de análise estrutural de proteínas e como

desenvolvermos códigos para resolvê-los. Considere a seguinte situação, você está

interessado em representar por um gráfico de barras quantas quinases dependentes

de ciclinas (CDKs) estão depositadas no Protein Data Bank.

(5)

5

CDKs

www.python.org

Abaixo temos a página de entrada do Protein Data Bank. Para fazermos download a

partir de critérios pré-definidos usamos “Advanced Search”.

(6)

6

No

“Advanced Search” clicamos em Biology->Enzyme Classification, para

selecionarmos todas as CDKs para classificação enzimática (enzyme classification).

CDKs

(7)

7

CDKs

www.python.org

Digitamos 2.7.11.22 para a classificação enzimática (enzyme classification) e clicamos

em “Submit Query”.

(8)

8

Abaixo temos o resultado da busca. Podemos ter acesso aos códigos PDB clicando

em “Download Files”.

CDKs

(9)

9

Abaixo temos os códigos de acesso PDB para todas CDKs identificadas no PDB.

CDKs

(10)

10

CDKs

www.python.org

A figura mostra um cladograma que indica a similaridade sequencial entre as CDKs

humanas. Quanto mais próximo no gráfico, maior a identidade sequencial das

proteínas.

(11)

11

Realizando-se uma contagem das estruturas de cada um todos tipos de CDK temos

os resultados mostrados no arquivo CSV abaixo.

CDK, Número de Estruturas

1,

3

2,

375

3,

0

4,

9

5,

1

6,

16

7,

1

8,

20

9,

20

10,

0

11,

0

12,

5

13,

1

14,

0

15,

0

16,

1

17,

0

18,

0

19,

0

20,

0

CDKs

www.python.org

(12)

12

Veremos um programa (csv2barplot001.py) que realiza a leitura deste arquivo CSV e

faz o gráfico de barras para a porcentagem de cada tipo de CDK presente no PDB.

CDK, Número de Estruturas

1,

3

2,

375

3,

0

4,

9

5,

1

6,

16

7,

1

8,

20

9,

20

10,

0

11,

0

12,

5

13,

1

14,

0

15,

0

16,

1

17,

0

18,

0

19,

0

20,

0

CDKs

www.python.org

(13)

def main():

# Get file name

csv_in = "pdbdata1.csv" # Call read_csv x,y = read_csv(csv_in) # Call calc_perc() perc = calc_perc(y)

# Set up arguments for function bar_plot() x_label_in = "CDK Number"

y_label_in = "Percentage of CDK Structures" font_size_in = 18

title_in = ""

bar_width_in = 0.35 # Sep up bar width to move bar in the xticks tuple_in = ("1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20") dpi_in = 900 file_out = "barplot_pdb.png" # Call bar_plot_1() bar_plot_1(x,perc,x_label_in,y_label_in,font_size_in,title_in,bar_width_in,tuple_in,dpi_in,file_out) main()

13

Podemos colocar as chamadas das funções numa função chamada função main().

Esta função depois tem que ser evocada, como mostrado abaixo.

Programa: csv2barplot001.py

(14)

def main():

# Get file name

csv_in = "pdbdata1.csv" # Call read_csv x,y = read_csv(csv_in) # Call calc_perc() perc = calc_perc(y)

# Set up arguments for function bar_plot() x_label_in = "CDK Number"

y_label_in = "Percentage of CDK Structures" font_size_in = 18

title_in = ""

bar_width_in = 0.35 # Sep up bar width to move bar in the xticks tuple_in = ("1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20") dpi_in = 900 file_out = "barplot_pdb.png" # Call bar_plot_1() bar_plot_1(x,perc,x_label_in,y_label_in,font_size_in,title_in,bar_width_in,tuple_in,dpi_in,file_out) main()

14

Inicialmente atribuímos à variável csv_in a string com o nome do arquivo CSV.

Programa: csv2barplot001.py

(15)

def main():

# Get file name

csv_in = "pdbdata1.csv" # Call read_csv x,y = read_csv(csv_in) # Call calc_perc() perc = calc_perc(y)

# Set up arguments for function bar_plot() x_label_in = "CDK Number"

y_label_in = "Percentage of CDK Structures" font_size_in = 18

title_in = ""

bar_width_in = 0.35 # Sep up bar width to move bar in the xticks tuple_in = ("1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20") dpi_in = 900 file_out = "barplot_pdb.png" # Call bar_plot_1() bar_plot_1(x,perc,x_label_in,y_label_in,font_size_in,title_in,bar_width_in,tuple_in,dpi_in,file_out) main()

15

Agora chamamos a função read_csv() que tem como argumento o nome do arquivo

CSV. Esta função retorna os arrays x e y.

Programa: csv2barplot001.py

(16)

def main():

# Get file name

csv_in = "pdbdata1.csv" # Call read_csv x,y = read_csv(csv_in) # Call calc_perc() perc = calc_perc(y)

# Set up arguments for function bar_plot() x_label_in = "CDK Number"

y_label_in = "Percentage of CDK Structures" font_size_in = 18

title_in = ""

bar_width_in = 0.35 # Sep up bar width to move bar in the xticks tuple_in = ("1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20") dpi_in = 900 file_out = "barplot_pdb.png" # Call bar_plot_1() bar_plot_1(x,perc,x_label_in,y_label_in,font_size_in,title_in,bar_width_in,tuple_in,dpi_in,file_out) main()

16

Em seguida chamamos a função calc_perc() que calcula a percentagem de cada

número que está na segunda coluna do arquivo CSV e retorna o float perc.

Programa: csv2barplot001.py

(17)

def main():

# Get file name

csv_in = "pdbdata1.csv" # Call read_csv x,y = read_csv(csv_in) # Call calc_perc() perc = calc_perc(y)

# Set up arguments for function bar_plot() x_label_in = "CDK Number"

y_label_in = "Percentage of CDK Structures" font_size_in = 18

title_in = ""

bar_width_in = 0.35 # Sep up bar width to move bar in the xticks tuple_in = ("1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20") dpi_in = 900 file_out = "barplot_pdb.png" # Call bar_plot_1() bar_plot_1(x,perc,x_label_in,y_label_in,font_size_in,title_in,bar_width_in,tuple_in,dpi_in,file_out) main()

17

As próximas linhas definem os argumentos a serem usados na função bar_plot_1()

Programa: csv2barplot001.py

(18)

def main():

# Get file name

csv_in = "pdbdata1.csv" # Call read_csv x,y = read_csv(csv_in) # Call calc_perc() perc = calc_perc(y)

# Set up arguments for function bar_plot() x_label_in = "CDK Number"

y_label_in = "Percentage of CDK Structures" font_size_in = 18

title_in = ""

bar_width_in = 0.35 # Sep up bar width to move bar in the xticks tuple_in = ("1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20") dpi_in = 900 file_out = "barplot_pdb.png" # Call bar_plot_1() bar_plot_1(x,perc,x_label_in,y_label_in,font_size_in,title_in,bar_width_in,tuple_in,dpi_in,file_out) main()

18

Por último, chamamos a função bar_plot_1()

Programa: csv2barplot001.py

(19)

def read_csv(file_in):

"""Function to read a two-columns csv file and return two arrays""" # Import libraries

import numpy as np import csv

import sys

# Try to open csv file try:

fo = open(file_in,"r") csv1 = csv.reader(fo) except IOError:

sys.exit("I can't find "+csv_in+" file!") # Set up empty list

aux1 = [] aux2 = []

# Assign zero to count_str count_str = 0

# Looping throuh data for line in csv1: print(line[0]) aux1.append(float(line[0])) aux2.append(float(line[1])) count_str += int(line[1]) # Close file fo.close() # Make arrays x = np.array(aux1) y = np.array(aux2) return x,y

19

A função read_csv() é basicamente a repetição do que já foi visto para leitura de

arquivos CSV. As duas colunas são retornadas como arrays.

Programa: csv2barplot001.py

(20)

def calc_perc(y):

"""Function to calculate percentage of structures"""

# Import library import numpy as np

# Set up zero array p = np.zeros(len(y))

# Sum structures count_str = np.sum(y)

# Generate array with percentage i = 0 for line in y: p1 = float(line)/count_str p[i] = 100*p1 i+= 1 return p

20

A função calc_perc() recebe um array e calcula um novo array com a porcentagem de

ocorrência de cada dado disponível no array y. A função retorna um array com as

porcentagens (p).

Programa: csv2barplot001.py

(21)

def bar_plot_1(x_1,y_1,x_label_1,y_label_1,font_size_1,title_1,bar_width_1,tuple_1,dpi_1,file_out_1): """Function to generate bar plot"""

# Import library import matplotlib.pyplot as plt # Generates plot plt.bar(x_1,y_1,color="grey") plt.xlabel(x_label_1,fontsize=font_size_1) plt.ylabel(y_label_1,fontsize=font_size_1) plt.xticks(x_1+bar_width_1,tuple_1) plt.xlim(0,len(y_1)) # Shows plot plt.show()

# Saves plot on png file

plt.savefig(file_out_1,DPI=dpi_1)

21

A função bar_plot_1() gera o gráfico de barras.

Programa: csv2barplot001.py

(22)

22

Abaixo temos o gráfico gerado.

CDK, Número de

Estruturas

1,

3

2,

375

3,

0

4,

9

5,

1

6,

16

7,

1

8,

20

9,

20

10,

0

11,

0

12,

5

13,

1

14,

0

15,

0

16,

1

17,

0

18,

0

19,

0

20,

0

Programa: csv2barplot001.py

www.python.org

(23)

23

Vamos considerar que queremos estudar as ligações intermoleculares entre um

ligante ativo (inibidor) e uma proteína alvo. Vamos manter a CDK como exemplo. Para

isto precisamos baixar do PDB todas as estruturas que apresentam informação de

afinidade, por exemplo IC

50

. Abaixo temos parte de um arquivo CSV gerado pelo

programa SAnDReS (Xavier et al., 2016) que integra a informação do ligante com a

afinidade.

# Type of binding information: ic50

CHKLIG,1DI8,DTQ,A, 500,1000.0

CHKLIG,1DM2,HMD,A, 400,70.0

CHKLIG,1E9H,INR,A,1298,148.0

CHKLIG,1FVT,106,A, 299,60.0

CHKLIG,1FVV,107,A, 501,10.0

CHKLIG,1GII,1PU,A, 501,260.0

CHKLIG,1H00,FAP,A,1300,38000.0

CHKLIG,1H07,MFP,A, 301,3000.0

CHKLIG,1H0W,207,A,1299,13000.0

CHKLIG,1H1Q,2A6,A,1298,1433.3333333333333

CHKLIG,1H1R,6CP,A,1298,2300.0

CHKLIG,1JVP,LIG,P, 301,1600.0

CHKLIG,1KE5,LS1,A, 299,560.0

CHKLIG,1KE6,LS2,A, 299,5.7

CHKLIG,1KE7,LS3,A, 299,8.9

CHKLIG,1KE8,LS4,A, 299,1000.0

CHKLIG,1KE9,LS5,A, 299,660.0

CHKLIG,1OGU,ST8,A,1298,34.0

CHKLIG,1OI9,N20,A,1298,379.3333333333333

CHKLIG,1OIQ,HDU,A,1299,2900.0

CHKLIG,1OIR,HDY,A,1298,32.0

CHKLIG,1OIT,HDT,A,1299,2.25

CHKLIG,1OIU,N76,A,1298,210.0

Programa: intermol_interactions.py

www.python.org

(24)

24

No arquivo abaixo a primeira linha é de comentário e indica o tipo de afinidade, no

caso IC

50

. Em seguida temos linhas com informações sobre os ligantes dos arquivos

PDB. O SAnDReS identifica automaticamente qual ligante do arquivo PDB é o ativo,

ou seja, podemos ter mais de um ligante no PDB, assim o ideal é identificarmos qual

ligante é o inibidor.

# Type of binding information: ic50

CHKLIG,1DI8,DTQ,A, 500,1000.0

CHKLIG,1DM2,HMD,A, 400,70.0

CHKLIG,1E9H,INR,A,1298,148.0

CHKLIG,1FVT,106,A, 299,60.0

CHKLIG,1FVV,107,A, 501,10.0

CHKLIG,1GII,1PU,A, 501,260.0

CHKLIG,1H00,FAP,A,1300,38000.0

CHKLIG,1H07,MFP,A, 301,3000.0

CHKLIG,1H0W,207,A,1299,13000.0

CHKLIG,1H1Q,2A6,A,1298,1433.3333333333333

CHKLIG,1H1R,6CP,A,1298,2300.0

CHKLIG,1JVP,LIG,P, 301,1600.0

CHKLIG,1KE5,LS1,A, 299,560.0

CHKLIG,1KE6,LS2,A, 299,5.7

CHKLIG,1KE7,LS3,A, 299,8.9

CHKLIG,1KE8,LS4,A, 299,1000.0

CHKLIG,1KE9,LS5,A, 299,660.0

CHKLIG,1OGU,ST8,A,1298,34.0

CHKLIG,1OI9,N20,A,1298,379.3333333333333

CHKLIG,1OIQ,HDU,A,1299,2900.0

CHKLIG,1OIR,HDY,A,1298,32.0

CHKLIG,1OIT,HDT,A,1299,2.25

CHKLIG,1OIU,N76,A,1298,210.0

Programa: intermol_interactions.py

www.python.org

(25)

25

A palavra-chave “CHKLIG” indica que a informação é sobre um ligante, depois temos o

código PDB, seguido pelo código do ligante, a cadeia do ligante, o número do ligante.

Por último temos os dados de afinidade, em nanomolar (10

-9

M).

# Type of binding information: ic50

CHKLIG,1DI8,DTQ,A, 500,1000.0

CHKLIG,1DM2,HMD,A, 400,70.0

CHKLIG,1E9H,INR,A,1298,148.0

CHKLIG,1FVT,106,A, 299,60.0

CHKLIG,1FVV,107,A, 501,10.0

CHKLIG,1GII,1PU,A, 501,260.0

CHKLIG,1H00,FAP,A,1300,38000.0

CHKLIG,1H07,MFP,A, 301,3000.0

CHKLIG,1H0W,207,A,1299,13000.0

CHKLIG,1H1Q,2A6,A,1298,1433.3333333333333

CHKLIG,1H1R,6CP,A,1298,2300.0

CHKLIG,1JVP,LIG,P, 301,1600.0

CHKLIG,1KE5,LS1,A, 299,560.0

CHKLIG,1KE6,LS2,A, 299,5.7

CHKLIG,1KE7,LS3,A, 299,8.9

CHKLIG,1KE8,LS4,A, 299,1000.0

CHKLIG,1KE9,LS5,A, 299,660.0

CHKLIG,1OGU,ST8,A,1298,34.0

CHKLIG,1OI9,N20,A,1298,379.3333333333333

CHKLIG,1OIQ,HDU,A,1299,2900.0

CHKLIG,1OIR,HDY,A,1298,32.0

CHKLIG,1OIT,HDT,A,1299,2.25

CHKLIG,1OIU,N76,A,1298,210.0

Programa: intermol_interactions.py

www.python.org

(26)

26

O programa intermol_interactions.py realiza a leitura deste tipo de arquivo e extrai as

informações dos ligantes ativos de cada PDB. Esta informação é usada para a

identificação das interações intermoleculares entre inibidor e proteína. Esta informação

é usada para gerarmos um gráfico de barras que tem a participação de cada resíduo

de aminoácido nas interações intermoleculares. Consideramos um valor de corte de

4,5 Å.

# Type of binding information: ic50

CHKLIG,1DI8,DTQ,A, 500,1000.0

CHKLIG,1DM2,HMD,A, 400,70.0

CHKLIG,1E9H,INR,A,1298,148.0

CHKLIG,1FVT,106,A, 299,60.0

CHKLIG,1FVV,107,A, 501,10.0

CHKLIG,1GII,1PU,A, 501,260.0

CHKLIG,1H00,FAP,A,1300,38000.0

CHKLIG,1H07,MFP,A, 301,3000.0

CHKLIG,1H0W,207,A,1299,13000.0

CHKLIG,1H1Q,2A6,A,1298,1433.3333333333333

CHKLIG,1H1R,6CP,A,1298,2300.0

CHKLIG,1JVP,LIG,P, 301,1600.0

CHKLIG,1KE5,LS1,A, 299,560.0

CHKLIG,1KE6,LS2,A, 299,5.7

CHKLIG,1KE7,LS3,A, 299,8.9

CHKLIG,1KE8,LS4,A, 299,1000.0

CHKLIG,1KE9,LS5,A, 299,660.0

CHKLIG,1OGU,ST8,A,1298,34.0

CHKLIG,1OI9,N20,A,1298,379.3333333333333

CHKLIG,1OIQ,HDU,A,1299,2900.0

CHKLIG,1OIR,HDY,A,1298,32.0

CHKLIG,1OIT,HDT,A,1299,2.25

CHKLIG,1OIU,N76,A,1298,210.0

Programa: intermol_interactions.py

www.python.org

(27)

def main():

# Import library import numpy as np

# Set up the number of residues nres = 298 # Call read_access_codes() p,l = read_access_codes("chklig_cdk2.in") # Call sum_intermol_contacts() c = sum_intermol_contacts(p,l,nres) # Call my_csv() make_csv(c,"data1.csv")

# Set up arguments for function bar_plot_2()

x = np.arange(0,len(c)) # Set up x-axis array x_label_in = "Residue Number" # Set up x-axis label y_label_in = "Number of Intermolecular Contacts" # Set up y-axis label

font_size_in = 16 # Set up font size for axis labels title_in = "" # Set up title

bar_width_in = 0.35 # Sep up bar width to move bar in the xticks dpi_in = 900 # Set up dots per inch

file_out = "barplot_pdb.png" # Set up output file name

# Call bar_plot()

bar_plot_2(x,c,x_label_in,y_label_in,font_size_in,title_in,bar_width_in,dpi_in,file_out)

main()

27

Abaixo temos a função main() do programa intermol_interactions.py.

Programa: intermol_interactions.py

(28)

def main():

# Import library import numpy as np

# Set up the number of residues

nres = 298 # Call read_access_codes() p,l = read_access_codes("chklig_cdk2.in") # Call sum_intermol_contacts() c = sum_intermol_contacts(p,l,nres) # Call my_csv() make_csv(c,"data1.csv")

# Set up arguments for function bar_plot_2()

x = np.arange(0,len(c)) # Set up x-axis array x_label_in = "Residue Number" # Set up x-axis label y_label_in = "Number of Intermolecular Contacts" # Set up y-axis label

font_size_in = 16 # Set up font size for axis labels title_in = "" # Set up title

bar_width_in = 0.35 # Sep up bar width to move bar in the xticks dpi_in = 900 # Set up dots per inch

file_out = "barplot_pdb.png" # Set up output file name

# Call bar_plot()

bar_plot_2(x,c,x_label_in,y_label_in,font_size_in,title_in,bar_width_in,dpi_in,file_out)

main()

28

Inicialmente atribuímos o número de resíduos de aminoácido à variável nres.

Programa: intermol_interactions.py

(29)

def main():

# Import library import numpy as np

# Set up the number of residues

nres = 298 # Call read_access_codes() p,l = read_access_codes("chklig_cdk2.in") # Call sum_intermol_contacts() c = sum_intermol_contacts(p,l,nres) # Call my_csv() make_csv(c,"data1.csv")

# Set up arguments for function bar_plot_2()

x = np.arange(0,len(c)) # Set up x-axis array x_label_in = "Residue Number" # Set up x-axis label y_label_in = "Number of Intermolecular Contacts" # Set up y-axis label

font_size_in = 16 # Set up font size for axis labels title_in = "" # Set up title

bar_width_in = 0.35 # Sep up bar width to move bar in the xticks dpi_in = 900 # Set up dots per inch

file_out = "barplot_pdb.png" # Set up output file name

# Call bar_plot()

bar_plot_2(x,c,x_label_in,y_label_in,font_size_in,title_in,bar_width_in,dpi_in,file_out)

main()

29

Em seguida é chamada a função read_access_codes() que retorna duas listas com os

códigos PDB e os códigos dos ligantes ativos.

Programa: intermol_interactions.py

(30)

def main():

# Import library import numpy as np

# Set up the number of residues

nres = 298 # Call read_access_codes() p,l = read_access_codes("chklig_cdk2.in") # Call sum_intermol_contacts() c = sum_intermol_contacts(p,l,nres) # Call my_csv() make_csv(c,"data1.csv")

# Set up arguments for function bar_plot_2()

x = np.arange(0,len(c)) # Set up x-axis array x_label_in = "Residue Number" # Set up x-axis label y_label_in = "Number of Intermolecular Contacts" # Set up y-axis label

font_size_in = 16 # Set up font size for axis labels title_in = "" # Set up title

bar_width_in = 0.35 # Sep up bar width to move bar in the xticks dpi_in = 900 # Set up dots per inch

file_out = "barplot_pdb.png" # Set up output file name

# Call bar_plot()

bar_plot_2(x,c,x_label_in,y_label_in,font_size_in,title_in,bar_width_in,dpi_in,file_out)

main()

30

O programa agora chama a função sum_intermol_contacts() que faz a leitura de cada

arquivo PDB e identifica as interações intermoleculares para cada resíduo.

Programa: intermol_interactions.py

(31)

def main():

# Import library import numpy as np

# Set up the number of residues

nres = 298 # Call read_access_codes() p,l = read_access_codes("chklig_cdk2.in") # Call sum_intermol_contacts() c = sum_intermol_contacts(p,l,nres) # Call my_csv() make_csv(c,"data1.csv")

# Set up arguments for function bar_plot_2()

x = np.arange(0,len(c)) # Set up x-axis array x_label_in = "Residue Number" # Set up x-axis label y_label_in = "Number of Intermolecular Contacts" # Set up y-axis label

font_size_in = 16 # Set up font size for axis labels title_in = "" # Set up title

bar_width_in = 0.35 # Sep up bar width to move bar in the xticks dpi_in = 900 # Set up dots per inch

file_out = "barplot_pdb.png" # Set up output file name

# Call bar_plot()

bar_plot_2(x,c,x_label_in,y_label_in,font_size_in,title_in,bar_width_in,dpi_in,file_out)

main()

31

A função make_csv () gera um arquivo CSV com o número de contatos por resíduo

(data1.csv).

Programa: intermol_interactions.py

(32)

def main():

# Import library import numpy as np

# Set up the number of residues

nres = 298 # Call read_access_codes() p,l = read_access_codes("chklig_cdk2.in") # Call sum_intermol_contacts() c = sum_intermol_contacts(p,l,nres) # Call my_csv() make_csv(c,"data1.csv")

# Set up arguments for function bar_plot_2()

x = np.arange(0,len(c)) # Set up x-axis array x_label_in = "Residue Number" # Set up x-axis label y_label_in = "Number of Intermolecular Contacts" # Set up y-axis label

font_size_in = 16 # Set up font size for axis labels title_in = "" # Set up title

bar_width_in = 0.35 # Sep up bar width to move bar in the xticks dpi_in = 900 # Set up dots per inch

file_out = "barplot_pdb.png" # Set up output file name

# Call bar_plot()

bar_plot_2(x,c,x_label_in,y_label_in,font_size_in,title_in,bar_width_in,dpi_in,file_out)

main()

32

Em seguida são atribuídos os valores dos argumentos da função bar_plot_2().

Programa: intermol_interactions.py

(33)

def main():

# Import library import numpy as np

# Set up the number of residues

nres = 298 # Call read_access_codes() p,l = read_access_codes("chklig_cdk2.in") # Call sum_intermol_contacts() c = sum_intermol_contacts(p,l,nres) # Call my_csv() make_csv(c,"data1.csv")

# Set up arguments for function bar_plot_2()

x = np.arange(0,len(c)) # Set up x-axis array x_label_in = "Residue Number" # Set up x-axis label y_label_in = "Number of Intermolecular Contacts" # Set up y-axis label

font_size_in = 16 # Set up font size for axis labels title_in = "" # Set up title

bar_width_in = 0.35 # Sep up bar width to move bar in the xticks dpi_in = 900 # Set up dots per inch

file_out = "barplot_pdb.png" # Set up output file name

# Call bar_plot()

bar_plot_2(x,c,x_label_in,y_label_in,font_size_in,title_in,bar_width_in,dpi_in,file_out)

main()

33

O programa chama a função bar_plot_2() que gera o gráfico de barras.

Programa: intermol_interactions.py

(34)

34

Abaixo temos o gráfico gerado.

Programa: intermol_interactions.py

(35)

35

Acesse o site do SAnDReS (

www.sandres.net

) faça download do código e instale no

seu computador.

No site do SAnDReS vá para

http://www.sandres.net/DIY-Projects.php

e escolha

Aceticolinaesterase ou Beta-lactamase. Nestas página há links para download de

arquivos CSV com os códigos PDB para estruturas com a informação de afinidade.

Trabalho

(36)

36

Clique nos link e baixe a pasta zipada com os códigos. Em cada pasta você terá o

arquivo pdbCodes.csv que traz em uma linha os códigos PDB das estruturas para as

quais há informação experimental sobre a afinidade. Crie uma pasta e copie o arquivo

pdbCodes.csv para esta pasta. Esta pasta será o Diretório Projeto (Project Directory)

do SAnDReS.

Trabalho

(37)

37

Ative

o

SAnDReS

como

indicado

no

tutorial

do

SAnDReS

(

http://www.sandres.net/Tutorials.php

). Use o SAnDReS para realizar o download das

estruturas indicadas no arquivo pdbCodes.csv e depois faça a etapa de pre-docking

do SAnDReS.

Trabalho

(38)

38

Ao finalizar o pre-docking do SAnDReS você terá o arquivo chklig.in que será usado

no programa : intermol_interactions.py para gerar o gráfico de barras. Faça os gráficos

para todos os tipos de afinidade da proteína indicada.

Data de entrega: 28/11/2016.

Trabalho

(39)

-BRESSERT, Eli. SciPy and NumPy. Sebastopol: O’Reilly Media, Inc., 2013. 56 p.

-DAWSON, Michael. Python Programming, for the absolute beginner. 3ed. Boston: Course Technology, 2010. 455 p.

-HETLAND, Magnus Lie. Python Algorithms. Mastering Basic Algorithms in the Python Language. Nova York: Springer

Science+Business Media LLC, 2010. 316 p.

-IDRIS, Ivan. NumPy 1.5. An action-packed guide dor the easy-to-use, high performance, Python based free open source

NumPy mathematical library using real-world examples. Beginner’s Guide. Birmingham: Packt Publishing Ltd., 2011. 212 p.

-KIUSALAAS, Jaan. Numerical Methods in Engineering with Python. 2ed. Nova York: Cambridge University Press, 2010. 422

p.

-LANDAU, Rubin H. A First Course in Scientific Computing: Symbolic, Graphic, and Numeric Modeling Using Maple, Java,

Mathematica, and Fortran90. Princeton: Princeton University Press, 2005. 481p.

-LANDAU, Rubin H., PÁEZ, Manuel José, BORDEIANU, Cristian C. A Survey of Computational Physics. Introductory

Computational Physics. Princeton: Princeton University Press, 2008. 658 p.

-LUTZ, Mark. Programming Python. 4ed. Sebastopol: O’Reilly Media, Inc., 2010. 1584 p.

-MODEL, Mitchell L. Bioinformatics Programming Using Python. Sebastopol: O’Reilly Media, Inc., 2011. 1584 p.

-TOSI, Sandro. Matplotlib for Python Developers. Birmingham: Packt Publishing Ltd., 2009. 293 p.

Última atualização: 07 de novembro de 2016.

39

Referências

Referências

Documentos relacionados

Anais / 1 Escola Regional de Alto Desempenho; editores Tiarajú Asmuz Diverio, - Porto Alegre: SBC/ Instituto de Informática da UFRGS/ Faculdade de Informática da

A composição e edição do boletim de informação da FPAm, «FPAm NEWS», é da responsabilidade da Federação Portuguesa de Aeromodelismo, sendo o boletim de publicação mensal,

já tinha apresentado na reunião anterior, como as vantagens de se utilizar câmaras de arbitragem para a solução de contenciosos envolvendo cargas, armadores, embarcadores, agentes

[r]

Chefe de Departamento Centro de Ciências Exatas e Tecnologia (CCET) Departamento de Informática Aplicada Escola de Informática

01) A Chanchada é um gênero musical utilizado como trilha sonora para a produção dos filmes de comédia que reúnem elementos do circo, do teatro e do cinema estrangeiro.

· Indicações sobre cuidados médicos urgentes e tratamentos especiais necessários Não existe mais nenhuma informação relevante disponível.. 5 Medidas de combate a incêndios ·

· Utilizações identificadas relevantes da substância ou mistura e utilizações desaconselhadas Não existe mais nenhuma informação relevante disponível.. · Utilização