{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"name":"Python_course_2021_exercises_D.ipynb","provenance":[],"collapsed_sections":[],"authorship_tag":"ABX9TyNjSyvLh7SDHkiQSK3gBPn/"},"kernelspec":{"name":"python3","display_name":"Python 3"}},"cells":[{"cell_type":"markdown","metadata":{"id":"xqfYLmi0LWEl"},"source":["# Python course 2021 - Exercises D"]},{"cell_type":"markdown","metadata":{"id":"LRZcpmP8LaR_"},"source":["## Part1 - writing files"]},{"cell_type":"markdown","metadata":{"id":"NDIaKYRcLfz1"},"source":["\n","\n","---\n","1.1) Read the file AtCol0_Exons.fasta and write all headers (starting with '>') into a new file!\n","\n"]},{"cell_type":"code","metadata":{"id":"aO4lTjReLsDC"},"source":[""],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"ddWzYDHlLsMN"},"source":["\n","\n","---\n","1.2) Read the file AtCol0_Exons.fasta and write the following:\n","* Line if it is a header\n","* Length of line if it is a sequence line\n"]},{"cell_type":"code","metadata":{"id":"HAaoquFmL4jV"},"source":[""],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"yvanoP6kL4rn"},"source":["\n","\n","---\n","1.3) Calculate the number of sequences, the cumulative length and the average length in a new file! Are they matching the values of the original file?\n"]},{"cell_type":"code","metadata":{"id":"N5lQi7dyMEXf"},"source":[""],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"L4KLtwRJMEgM"},"source":["\n","\n","---\n","1.4) Write sequences into a new file if their length is a multiple of 10!\n"]},{"cell_type":"code","metadata":{"id":"_87Mx4EUMKw9"},"source":[""],"execution_count":null,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"oOKcgJ_eMTgE"},"source":["## Part2 - characters"]},{"cell_type":"markdown","metadata":{"id":"MMM8BTO3MgXN"},"source":["\n","\n","---\n","2.1) Read the file AtCol0_Exons.fasta and write the following:\n","* Only Arabidopsis Gene Identifier (e.g. AT1G01010)\n","* Gene Identifier, exon name, exon length (tab-delimited)\n","\n","\n"]},{"cell_type":"code","metadata":{"id":"oiHgx5jQMyNX"},"source":[""],"execution_count":null,"outputs":[]}]}
\ No newline at end of file
%% Cell type:markdown id: tags:
# Python course 2021 - Exercises D
%% Cell type:markdown id: tags:
## Part1 - writing files
%% Cell type:markdown id: tags:
---
1.1) Read the file AtCol0_Exons.fasta and write all headers (starting with '>') into a new file!
%% Cell type:code id: tags:
```
```
%% Cell type:markdown id: tags:
---
1.2) Read the file AtCol0_Exons.fasta and write the following:
* Line if it is a header
* Length of line if it is a sequence line
%% Cell type:code id: tags:
```
```
%% Cell type:markdown id: tags:
---
1.3) Calculate the number of sequences, the cumulative length and the average length in a new file! Are they matching the values of the original file?
%% Cell type:code id: tags:
```
```
%% Cell type:markdown id: tags:
---
1.4) Write sequences into a new file if their length is a multiple of 10!
%% Cell type:code id: tags:
```
```
%% Cell type:markdown id: tags:
## Part2 - characters
%% Cell type:markdown id: tags:
---
2.1) Read the file AtCol0_Exons.fasta and write the following:
* Only Arabidopsis Gene Identifier (e.g. AT1G01010)