-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added another file from the modeller examples. Work in progress...
- Loading branch information
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
src/MODELLER/modeller-basic-example-julia/build_profile.jl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using PyCall | ||
|
||
@pyimport modeller | ||
|
||
modeller.log[:verbose]() | ||
env = modeller.environ() | ||
|
||
#-- Prepare the input files | ||
|
||
#-- Read in the sequence database | ||
sdb = modeller.sequence_db(env) | ||
sdb[:read](seq_database_file="pdb_95.pir", seq_database_format="PIR", | ||
chains_list="ALL", minmax_db_seq_len=(30, 4000), clean_sequences=true) | ||
|
||
#-- Write the sequence database in binary form | ||
sdb[:write](seq_database_file="pdb_95.bin", seq_database_format="BINARY", | ||
chains_list="ALL") | ||
|
||
#-- Now, read in the binary database | ||
sdb[:read](seq_database_file="pdb_95.bin", seq_database_format="BINARY", | ||
chains_list="ALL") | ||
|
||
#-- Read in the target sequence/alignment | ||
aln = modeller.alignment(env) | ||
aln[:append](file="TvLDH.ali", alignment_format="PIR", align_codes="ALL") | ||
|
||
#-- Convert the input sequence/alignment into | ||
# profile format | ||
prf = aln[:to_profile]() | ||
|
||
#-- Scan sequence database to pick up homologous sequences | ||
prf[:build](sdb, matrix_offset=-450, rr_file="""$(pyeval("\$LIB"))/blosum62.sim.mat""", | ||
gap_penalties_1d=(-500, -50), n_prof_iterations=1, | ||
check_profile=False, max_aln_evalue=0.01) | ||
|
||
#-- Write out the profile in text format | ||
prf[:write](file="build_profile.prf", profile_format="TEXT") | ||
|
||
#-- Convert the profile back to alignment format | ||
aln = prf[:to_alignment]() | ||
|
||
#-- Write out the alignment file | ||
aln[:write](file="build_profile.ali", alignment_format="PIR") | ||
|