# Python Bioinformatics List Operations
## Overview
This project demonstrates Python list operations using biological data examples. Lists are one of the fundamental data structures in Python that allow storing multiple values in an ordered and changeable collection.
The program uses DNA nucleotide-related data to demonstrate different list manipulation techniques including accessing elements, modifying values, adding and removing items, merging lists, searching elements, sorting, and list comprehension.
## Features
- Create and display Python lists
- Access list elements using indexing
- Perform positive and negative indexing
- Extract elements using slicing
- Search elements inside a list
- Update existing list values
- Replace multiple list elements
- Insert elements at specific positions
- Append new elements
- Extend lists with another collection
- Remove elements from lists
- Iterate through list elements
- Apply list comprehension
- Sort lists in ascending and descending order
## Technologies Used
- Python 3
- List Data Structure
- Bioinformatics Data Representation
## Bioinformatics Dataset
The project uses biological terms representing DNA nucleotides:
Adenine Thymine Cytosine Guanine
Additional biological data includes:
Personal Medicine Virus Vaccine Genome Medicine
## Python List Concepts Covered
### 1. Creating a List
A list is created using square brackets `[]`.
Example:
```python
list1 = ["Adenine", "Thymine", "Cytosine", "Guanine"]
Elements can be accessed using index values.
Example:
list1[0]Output:
Adenine
List slicing extracts a range of elements.
Example:
list1[1:3]Negative indexing is also used:
list1[-4:-2]The program checks whether specific biological terms exist in the list.
Example:
"Cytosine" in list1Existing values can be changed using indexes.
Example:
list1[0] = "Aminoacid"The program also demonstrates replacing a range of elements.
list1[1:4] = ["T","C","G"]Adds an element at a specific index.
Example:
list1.insert(0,"Bioinformatics")Adds an element at the end of the list.
Example:
list1.append("Medicine")Combines two lists together.
Example:
list1.extend(list2)The project demonstrates different removal methods.
Removes a specific value.
Example:
list1.remove("Virus")Removes an element using its index.
Example:
list1.pop(4)The program uses loops to access each element.
Example:
for x in range(len(list1)):
print(list1[x])List comprehension is used to create a new list based on conditions.
Example:
newList = [x for x in list1 if 'no' in x]This extracts elements containing the specified characters.
The program sorts biological terms alphabetically.
Ascending order:
list1.sort()Descending order:
list1.sort(reverse=True)- Clone the repository:
git clone https://github.com/FathimaNufla2000/Python-Bioinformatics-List-Operations.git- Navigate to the project folder:
cd Python-Bioinformatics-List-Operations- Run the Python file:
python list_operations.pyThe program displays:
- Original biological list
- Accessed elements
- Sliced elements
- Search results
- Updated list values
- Inserted and appended elements
- Extended list values
- Removed elements
- List comprehension results
- Sorted lists
Through this project, the following concepts are demonstrated:
- Python list data structure
- Data manipulation techniques
- Biological data handling
- Searching and filtering data
- Sorting and organizing information
- Basic computational biology programming
Fathima Nufla
GitHub: https://github.com/FathimaNufla2000
This project is created for educational purposes and Python programming practice in bioinformatics.