Example #1
0
    for items in split_contents:
        fst+=letters[items["res_name"]]
    return fst
        

#pdbfilename="/data/farhan/SoftwareTools/HomopolymerProject/data/pdb/5wvc.pdb"
pdbfile_A=sys.argv[1]
pdbfile_B=sys.argv[2]

#chain_1=sys.argv[2]
#chain_2=sys.argv[3]
dist=sys.argv[3]
outfile=sys.argv[4]
#fasta=sys.argv[6]

split_contents_A=contents2Info(readPDB(pdbfile_A))
split_contents_B=contents2Info(readPDB(pdbfile_B))
chain_1=getChain(pdbfile_A)
chain_2=getChain(pdbfile_B)


cb_list_A=getCB(split_contents_A)
cb_list_B=getCB(split_contents_B)
fasta_A=pdb2FastaFromSplitContents(cb_list_A)
L_A=len(fasta_A)
fasta_B=pdb2FastaFromSplitContents(cb_list_B)
L_B=len(fasta_B)
print (fasta_A)
if (fasta_A != fasta_B):
    print ("Fasta sequences of both files are not same...chosing the one with highest length")
    if (L_A > L_B):
Example #2
0
#pdbfilename="/data/farhan/SoftwareTools/HomopolymerProject/data/pdb/5wvc.pdb"
pdbfilename = sys.argv[1]
#chain_1=sys.argv[2]
#chain_2=sys.argv[3]
#dist=sys.argv[4]
fasta_file = sys.argv[2]
dist = int(sys.argv[3])
outfile = sys.argv[4]

#pdbfilename="/data/farhan/SoftwareTools/HomopolymerProject/data/Actin/monomer/1j6z.pdb"
#chain_1="A"
#chain_2="A"
#dist=8
#outfile="Actin_out/Actin_monomer"

chain_dict = readPDB(pdbfilename)
split_contents_A = contents2Info(readPDB(pdbfilename))
split_contents_B = contents2Info(readPDB(pdbfilename))
chain_1 = getChain(pdbfilename)
chain_2 = getChain(pdbfilename)

cb_list = getCB(split_contents_A)
#Read fasta from fasta_dictionary.txt
fasta = pdb2FastaFromSplitContents(cb_list)
#fasta_dict_file="fasta_dictionary.txt"
#fasta_dict=readFastaDict(fasta_dict_file)
#fasta=getFastaFromDictionary(pdbfilename,fasta_dict)
f_fasta = ""
with open(fasta_file, "r") as f:
    for line in f:
        if line.startswith(">"): continue
def getMaxResNum(pdb_file):
    split_contents=contents2Info(readPDB(pdb_file))
    res_num_first=split_contents[0]["res_num"]
    res_num_last=split_contents[len(split_contents)-1]["res_num"]
    print (res_num_first,res_num_last)
    return (res_num_first,res_num_last)