Difference between revisions of "Python"

From wiki
Jump to: navigation, search
(Created page with "The issue with python on Marvin is that the simple "python" executable is not the bioinformatic python version. It's a version just for the system only. Instead, you have to...")
 
 
Line 1: Line 1:
The issue with python on Marvin is that the simple "python" executable is not the bioinformatic python version. It's a version just for the system only.
+
The issue with python on Marvin is that the simple "python" executable is not the bioinformatic python version. It's a version just for the system only and is the wrong version for bioinformatics analyses.
  
 
Instead, you have to use "python2.7" and this version does indeed have many of the necessary bioinformatics modules such as biopython and PyVCF. It also is installed by default, so you do not need to "module load" it. If you try this and "import vcf" and "import Bio" you'll get no errors which means PyVCF and Biopython are installed.
 
Instead, you have to use "python2.7" and this version does indeed have many of the necessary bioinformatics modules such as biopython and PyVCF. It also is installed by default, so you do not need to "module load" it. If you try this and "import vcf" and "import Bio" you'll get no errors which means PyVCF and Biopython are installed.
  
Also, if you have a python script which uses just "python" or "#!/usr/bin/python" or #!/usr/bin/env python" they will not use bioinformatic version. There script should be changed to read either "python2.7" or  "#!/usr/bin/env python2.7"
+
Also, if you have a python script which uses just "python" or "#!/usr/bin/python" or #!/usr/bin/env python" they will not use bioinformatic version. These script should be changed to read either "python2.7" or  "#!/usr/bin/env python2.7"

Latest revision as of 11:19, 8 April 2016

The issue with python on Marvin is that the simple "python" executable is not the bioinformatic python version. It's a version just for the system only and is the wrong version for bioinformatics analyses.

Instead, you have to use "python2.7" and this version does indeed have many of the necessary bioinformatics modules such as biopython and PyVCF. It also is installed by default, so you do not need to "module load" it. If you try this and "import vcf" and "import Bio" you'll get no errors which means PyVCF and Biopython are installed.

Also, if you have a python script which uses just "python" or "#!/usr/bin/python" or #!/usr/bin/env python" they will not use bioinformatic version. These script should be changed to read either "python2.7" or "#!/usr/bin/env python2.7"