Bioinformatics Programming
How to execute Unix/shell commands in PHP?

Besides, Python & Perl, PHP is another language mostly used in bioinformatics programming. In this article, we provide a simple command to execute shell commands in a PHP script.
shell_exec()
It runs command via shell and returns the output as a string.
syntax: $output = shell_exec($command);
If you are using variables inside your command, you need to use escapeshellarg().
syntax: $output = shell_exec($command);
Let’s assume, if you are running the blastp command on a query file with a variable filename, then it could be run like this:
$output = shell_exec("blastp -query ".escapeshellarg($filename.'.fasta')." -db /path/to/db -out output.txt");
Bioinformatics Programming
How to commit changes to GitHub repository using vs code?

In this article, we are providing a few commands that are used to commit changes to GitHub repositories using VS code terminal.
Bioinformatics Programming
Extracting first and last residue from helix file in DSSP format.
Bioinformatics Programming
How to extract x,y,z coordinates of atoms from PDB file?

The x, y, and z coordinates of atoms are provided in the PDB file. One way to extract them is by using the Biopython package [1]. In this article, we will extract coordinates of C-alpha atoms for each residue from the PDB file using Biopython. (more…)
You must be logged in to post a comment Login