Exercise

o Login to smith.bioinformatics.nl (see instructions on Brightspace)
o Q1: In which directory do you enter the server?

wang500@smith:~$ pwd
/home/wang500

o Create a directory “C1” in your home directory and move into it
o Download the file data_c1.tgz from
https://www.bioinformatics.nl/courses/BIF-30806/docs/data_c1.tgz and unzip it
o Q2: which directories are present in the directory “data_c1”?

wang500@smith:~$ mkdir C1
wang500@smith:~$ cd C1
wang500@smith:~/C1$ wget https://www.bioinformatics.nl/courses/BIF-30806/docs/data_c1.tgz
wang500@smith:~/C1$ tar zxvf data_c1.tgz -C ./
wang500@smith:~/C1$ cd data_c1
wang500@smith:~/C1/data_c1$ ll
total 208
drwx------ 5 wang500 domain users  126 Oct 25  2024 ./
drwxr-xr-x 3 wang500 domain users   54 Oct 28 11:24 ../
-rw-r--r-- 1 wang500 domain users  120 Oct 25  2024 ._.DS_Store
-rw-r--r-- 1 wang500 domain users 6148 Oct 25  2024 .DS_Store
drwx------ 2 wang500 domain users  224 Oct 25  2024 pdb/
drwx------ 2 wang500 domain users   52 Oct 28 11:24 scripts/
drwx------ 2 wang500 domain users  274 Oct 28 11:24 tomato/

o Move into the directory “scripts”
o Run the python script by typing python3 name.py
o Q3: What is the output of the script?

wang500@smith:~/C1/data_c1$ cd scripts
wang500@smith:~/C1/data_c1/scripts$ ll
total 112
drwx------ 2 wang500 domain users  52 Oct 28 11:24 ./
drwx------ 5 wang500 domain users 126 Oct 25  2024 ../
-rw-r--r-- 1 wang500 domain users 220 Oct 25  2024 ._name.py
-rw-r--r-- 1 wang500 domain users 449 Oct 25  2024 name.py
wang500@smith:~/C1/data_c1/scripts$ python3 name.py
Hello !
/home/wang500/C1/data_c1/scripts
You are running this script with Python version:  3.13.7 (main, Sep 22 2025, 13:05:03) [GCC 11.4.0]

o Use FileZilla or WinSCP to copy the script to your local computer.
o Open the file with a simple text editor (e.g. Notepad) and modify line 15: Put your name between the quotation marks
o If you have Python installed, run the script again (on Windows, use the Command Prompt; on Linux/Mac, use a terminal)
o If you do not have Python installed, copy the file to the server again, but this time to your home folder. Run again, but now type python name.py
o Q4: What is the output of the script now?

wang500@smith:~/C1/data_c1/scripts$ vim name.py
wang500@smith:~/C1/data_c1/scripts$ python3 name.py
Hello Wang Jingming
/home/wang500/C1/data_c1/scripts
You are running this script with Python version:  3.13.7 (main, Sep 22 2025, 13:05:03) [GCC 11.4.0]

o On the server, navigate to the directory “pdb”.
o Q5: What kind of crystal structure is stored in the file 1EHZ.pdb?

wang500@smith:~/C1/data_c1$ cd pdb
wang500@smith:~/C1/data_c1/pdb$ head 1EVV.pdb
HEADER    RNA                                     20-APR-00   1EVV              
TITLE     CRYSTAL STRUCTURE OF YEAST PHENYLALANINE TRANSFER RNA AT 2.0 A        
TITLE    2 RESOLUTION                                                           
COMPND    MOL_ID: 1;                                                            
COMPND   2 MOLECULE: PHENYLALANINE TRANSFER RNA;                                
COMPND   3 CHAIN: A                                                             
SOURCE    MOL_ID: 1;                                                            
SOURCE   2 ORGANISM_SCIENTIFIC: SACCHAROMYCES;                                  
SOURCE   3 ORGANISM_TAXID: 4930                                                 
KEYWDS    TRANSFER RNA, PHENYLALANINE, PHE-TRNA, YEAST, AMINO-ACID TRANSPORT,

o Q6: What is the difference in resolution between the structure in 1EHZ.pdb and 1EVV.pdb? You can find this info in the first few lines of the file.

wang500@smith:~/C1/data_c1/pdb$ head -3 1EVV.pdb
HEADER    RNA                                     20-APR-00   1EVV              
TITLE     CRYSTAL STRUCTURE OF YEAST PHENYLALANINE TRANSFER RNA AT 2.0 A        
TITLE    2 RESOLUTION                                                           
wang500@smith:~/C1/data_c1/pdb$ head -3 1EHZ.pdb
HEADER    RNA                                     23-FEB-00   1EHZ              
TITLE     THE CRYSTAL STRUCTURE OF YEAST PHENYLALANINE TRNA AT 1.93 A RESOLUTION
COMPND    MOL_ID: 1;     

o Q7: how many lines start with the word ATOM in the file 1EHZ.pdb?

wang500@smith:~/C1/data_c1/pdb$ grep -c 'ATOM' 1EHZ.pdb
1346

o Q8: what are the lowest and highest x-coordinates that are found in the list of coordinates for all ATOM lines? Use the documentation on the PDB format to figure out where the x-coordinate is in the line. (hint, with the cut command you can select specific character positions in a line and the sort command allows you to sort lines)

wang500@smith:~/C1/data_c1/pdb$ grep 'ATOM' 1EHZ.pdb | cut -c 31-38 | grep '\<[0-9][0-9]\?\>' > lis
wang500@smith:~/C1/data_c1/pdb$ sort -nr lis | head -1
  84.715
wang500@smith:~/C1/data_c1/pdb$ sort -n lis | head -1
  32.161