<jupyter_start><jupyter_text>4. Introduction to Biopython Biopython is a set of freely available Python tools for computational biology and bioinformatics. It is a distributed collaborative effort to develop Python libraries and applications which address the needs of current and future work in bioinformatics. Before diving into your (biological) data and try analyzing it with complex self-written scripts, it makes sense to search through the [Biopython documentation](http://biopython.org/DIST/docs/tutorial/Tutorial.html) and look for out-of-the-box solutions as part of Biopython.  In the next chapters, we'll learn some of Biopython's most frequently used functionalities.  4.1 InstallationThere are several ways of installing and importing Biopython. First, the module needs to be installed with one of the following options: - In the Environments section of Anaconda Navigator and manually selecting the package, - Installing in the Conda environment: `conda install -c conda-forge biopython`, - Installing in the Jupyter Notebook: `pip install biopython`<jupyter_code>pip install biopython --upgrade<jupyter_output>Requirement already satisfied: biopython in c:\users\tuurm\anaconda3\lib\site-packages (1.78)
Note: you may need to restart the kernel to use updated packages.
Requirement already satisfied: numpy in c:\users\tuurm\anaconda3\lib\site-packages (from biopython) (1.19.5)<jupyter_text>After a successful installation of the package, we can import the library as such:<jupyter_code># Import the Biopython library
import Bio<jupyter_output><empty_output><jupyter_text>If there was no error doing this, than you're probably good to go. You can surely check this with asking Python what version you have installed.<jupyter_code># Check version for proper installment (v1.74)
print(Bio.__version__)<jupyter_output>1.78<jupyter_text>Of course it makes sense to install functions or submodules that are part of Biopython in order to ease the use. Imagine that you want to work with sequences, you can import the `Seq`-object in the following way. This will allow you to work directly with the `Seq` (sequence) object.<jupyter_code>from Bio.Seq import Seq
help(Seq)<jupyter_output>Help on class Seq in module Bio.Seq:

class Seq(builtins.object)
 |  Seq(data, alphabet=Alphabet())
 |  
 |  Read-only sequence object (essentially a string with an alphabet).
 |  
 |  Like normal python strings, our basic sequence object is immutable.
 |  This prevents you from doing my_seq[5] = "A" for example, but does allow
 |  Seq objects to be used as dictionary keys.
 |  
 |  The Seq object provides a number of string like methods (such as count,
 |  find, split and strip), which are alphabet aware where appropriate.
 |  
 |  In addition to the string like sequence, the Seq object has an alphabet
 |  property. This is an instance of an Alphabet class from Bio.Alphabet,
 |  for example generic DNA, or IUPAC DNA. This describes the type of molecule
 |  (e.g. RNA, DNA, protein) and may also indicate the expected symbols
 |  (letters).
 |  
 |  The Seq object also provides some biological methods, such as complement,
 |  reverse_complement, transcribe, back_transcribe and translate [...]
{'fraction_non_alphanumeric': 0.06373008434864105, 'fraction_numerical': 0.005935645110902843, 'mean_word_length': 4.843065693430657, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '519810', 'license': 'CC-BY-4.0', 'n_tokens_mistral': 897, 'n_tokens_neox': 858, 'n_words': 410, 'path': '04_Biopython_Introduction.ipynb', 'repo_name': 'vibbits/python-data-analysis', 'size': '3201'}