File size: 1,988 Bytes
c2a02c6
 
 
0f85c0f
f2a0596
294d34b
 
c2a02c6
81d8138
 
 
 
 
 
c1132e6
dc14b2e
c1132e6
 
dc14b2e
 
c1132e6
c2a02c6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import pdb_featureVector
import alphafold_featureVector
import argparse
from huggingface_hub import hf_hub_download
import streamlit as st
print('I AM HERE GOD DAMN IT')
st.write('I AM HERE GOD DAMN IT')

path = hf_hub_download(repo_id="HuBioDataLab/AlphafoldStructures", filename="AF-A0A075B6Y9-F1-model_v4.pdb.gz",repo_type = 'dataset')

st.write(path)


pdb_path= hf_hub_download(repo_id="HuBioDataLab/AlphafoldStructures",repo_type = 'dataset', filename="AF-A0A075B6Y9-F1-model_v4.pdb.gz")
import gzip
st.write('HER')
with gzip.open(pdb_path, mode="rt") as f:
    file_content = f.read()
    st.write(file_content)
st.write('REH')

parser = argparse.ArgumentParser(description='ASCARIS')

parser.add_argument('-s', '--source_option',
                    help='Selection of input structure data.\n 1: PDB Structures (default), 2: AlphaFold Structures',
                    default=1)
parser.add_argument('-i', '--input_datapoint',
                    help='Input file or query datapoint\n Option 1: Comma-separated list of idenfiers (UniProt ID-wt residue-position-mutated residue (e.g. Q9Y4W6-N-432-T or Q9Y4W6-N-432-T, Q9Y4W6-N-432-T)) \n Option 2: Enter comma-separated file path')

parser.add_argument('-impute', '--imputation_state', default='True',
                    help='Whether resulting feature vector should be imputed or not. Default True.')

args = parser.parse_args()

input_set = args.input_datapoint
mode = args.source_option
impute = args.imputation_state

def run_featureVector(input_set, mode, impute):
    print('*****************************************')
    print('Feature vector generation is in progress. \nPlease check log file for updates..')
    print('*****************************************')
    mode = int(mode)
    if mode == 1:
        pdb_featureVector.pdb(input_set, mode, impute)
    elif mode == 2:
        alphafold_featureVector.alphafold(input_set, mode, impute)

if __name__ == '__main__':
    run_featureVector(input_set, mode, impute)