54 lines
1.5 KiB
Bash
Executable file
54 lines
1.5 KiB
Bash
Executable file
#!/bin/bash
|
|
#=======================================================================
|
|
# Task: read a pdb file and generate a dssp output file
|
|
# Input:
|
|
# pdb file
|
|
|
|
# Output:
|
|
# pdb_code.dssp
|
|
# needs dssp exe on linux
|
|
# more efficient to run dssp exe locally
|
|
|
|
# note: double quotes for variable interpolation
|
|
#=======================================================================
|
|
# #%%specify variables for input and output paths and filenames
|
|
drug='pyrazinamide'
|
|
gene='pncA'
|
|
#convert to lowercase for consistency in filenames
|
|
gene_l=$(printf $gene | awk '{print tolower($0)}')
|
|
gene_match="${gene}_p."
|
|
#printf "${gene_match}\n"
|
|
|
|
#==========
|
|
# data dir
|
|
#==========
|
|
#indir = 'git/Data/pyrazinamide/input/original'
|
|
#datadir="~git/Data"
|
|
datadir="${HOME}/git/Data"
|
|
|
|
#=======
|
|
# input
|
|
#=======
|
|
indir=${datadir}'/'${drug}'/input'
|
|
printf "Input dir: ${indir}\n"
|
|
in_filename='3pl1.pdb'
|
|
#infile=${basedir}${inpath}${in_filename}
|
|
infile=${indir}'/'${in_filename}
|
|
printf "Input file: ${infile}\n"
|
|
|
|
#=======
|
|
# output
|
|
#=======
|
|
outdir=${datadir}'/'${drug}$'/output'
|
|
printf "Output dir: ${outdir}"
|
|
#out_filename='3pl1.dssp'
|
|
out_filename="${gene_l}.dssp"
|
|
outfile=${outdir}'/'${out_filename}
|
|
printf "Output file: ${outfile}\n"
|
|
|
|
#%%end of variable assignment for input and output files
|
|
#================================================================
|
|
# command line arg to run dssp and create output file
|
|
dssp -i ${infile} -o ${outfile}
|
|
printf "Finished writing: ${outfile}\n"
|
|
#printf "Filename: ${out_filename}\nlocated in: ${outdir}\n"
|