├── README.md ├── _config.yml ├── stylesheets ├── pygment_trac.css └── styles.css └── index.md /README.md: -------------------------------------------------------------------------------- 1 | ### Python course website 2 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | title: Solving biological problems with Python 2 | description: 3 | google_analytics: 4 | show_downloads: true 5 | theme: jekyll-theme-minimal 6 | 7 | gems: 8 | - jekyll-mentions 9 | -------------------------------------------------------------------------------- /stylesheets/pygment_trac.css: -------------------------------------------------------------------------------- 1 | .highlight { background: #ffffff; } 2 | .highlight .c { color: #999988; font-style: italic } /* Comment */ 3 | .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ 4 | .highlight .k { font-weight: bold } /* Keyword */ 5 | .highlight .o { font-weight: bold } /* Operator */ 6 | .highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */ 7 | .highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */ 8 | .highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */ 9 | .highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */ 10 | .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ 11 | .highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */ 12 | .highlight .ge { font-style: italic } /* Generic.Emph */ 13 | .highlight .gr { color: #aa0000 } /* Generic.Error */ 14 | .highlight .gh { color: #999999 } /* Generic.Heading */ 15 | .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ 16 | .highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */ 17 | .highlight .go { color: #888888 } /* Generic.Output */ 18 | .highlight .gp { color: #555555 } /* Generic.Prompt */ 19 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 20 | .highlight .gu { color: #800080; font-weight: bold; } /* Generic.Subheading */ 21 | .highlight .gt { color: #aa0000 } /* Generic.Traceback */ 22 | .highlight .kc { font-weight: bold } /* Keyword.Constant */ 23 | .highlight .kd { font-weight: bold } /* Keyword.Declaration */ 24 | .highlight .kn { font-weight: bold } /* Keyword.Namespace */ 25 | .highlight .kp { font-weight: bold } /* Keyword.Pseudo */ 26 | .highlight .kr { font-weight: bold } /* Keyword.Reserved */ 27 | .highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */ 28 | .highlight .m { color: #009999 } /* Literal.Number */ 29 | .highlight .s { color: #d14 } /* Literal.String */ 30 | .highlight .na { color: #008080 } /* Name.Attribute */ 31 | .highlight .nb { color: #0086B3 } /* Name.Builtin */ 32 | .highlight .nc { color: #445588; font-weight: bold } /* Name.Class */ 33 | .highlight .no { color: #008080 } /* Name.Constant */ 34 | .highlight .ni { color: #800080 } /* Name.Entity */ 35 | .highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */ 36 | .highlight .nf { color: #990000; font-weight: bold } /* Name.Function */ 37 | .highlight .nn { color: #555555 } /* Name.Namespace */ 38 | .highlight .nt { color: #000080 } /* Name.Tag */ 39 | .highlight .nv { color: #008080 } /* Name.Variable */ 40 | .highlight .ow { font-weight: bold } /* Operator.Word */ 41 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 42 | .highlight .mf { color: #009999 } /* Literal.Number.Float */ 43 | .highlight .mh { color: #009999 } /* Literal.Number.Hex */ 44 | .highlight .mi { color: #009999 } /* Literal.Number.Integer */ 45 | .highlight .mo { color: #009999 } /* Literal.Number.Oct */ 46 | .highlight .sb { color: #d14 } /* Literal.String.Backtick */ 47 | .highlight .sc { color: #d14 } /* Literal.String.Char */ 48 | .highlight .sd { color: #d14 } /* Literal.String.Doc */ 49 | .highlight .s2 { color: #d14 } /* Literal.String.Double */ 50 | .highlight .se { color: #d14 } /* Literal.String.Escape */ 51 | .highlight .sh { color: #d14 } /* Literal.String.Heredoc */ 52 | .highlight .si { color: #d14 } /* Literal.String.Interpol */ 53 | .highlight .sx { color: #d14 } /* Literal.String.Other */ 54 | .highlight .sr { color: #009926 } /* Literal.String.Regex */ 55 | .highlight .s1 { color: #d14 } /* Literal.String.Single */ 56 | .highlight .ss { color: #990073 } /* Literal.String.Symbol */ 57 | .highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */ 58 | .highlight .vc { color: #008080 } /* Name.Variable.Class */ 59 | .highlight .vg { color: #008080 } /* Name.Variable.Global */ 60 | .highlight .vi { color: #008080 } /* Name.Variable.Instance */ 61 | .highlight .il { color: #009999 } /* Literal.Number.Integer.Long */ 62 | 63 | .type-csharp .highlight .k { color: #0000FF } 64 | .type-csharp .highlight .kt { color: #0000FF } 65 | .type-csharp .highlight .nf { color: #000000; font-weight: normal } 66 | .type-csharp .highlight .nc { color: #2B91AF } 67 | .type-csharp .highlight .nn { color: #000000 } 68 | .type-csharp .highlight .s { color: #A31515 } 69 | .type-csharp .highlight .sc { color: #A31515 } 70 | -------------------------------------------------------------------------------- /stylesheets/styles.css: -------------------------------------------------------------------------------- 1 | @import url(https://fonts.googleapis.com/css?family=Lato:300italic,700italic,300,700); 2 | 3 | body { 4 | padding:50px; 5 | font:14px/1.5 Lato, "Helvetica Neue", Helvetica, Arial, sans-serif; 6 | color:#777; 7 | font-weight:300; 8 | } 9 | 10 | h1, h2, h3, h4, h5, h6 { 11 | color:#222; 12 | margin:0 0 20px; 13 | } 14 | 15 | p, ul, ol, table, pre, dl { 16 | margin:0 0 20px; 17 | } 18 | 19 | h1, h2, h3 { 20 | line-height:1.1; 21 | } 22 | 23 | h1 { 24 | font-size:28px; 25 | } 26 | 27 | h2 { 28 | color:#393939; 29 | } 30 | 31 | h3, h4, h5, h6 { 32 | color:#494949; 33 | } 34 | 35 | a { 36 | color:#39c; 37 | font-weight:400; 38 | text-decoration:none; 39 | } 40 | 41 | a small { 42 | font-size:11px; 43 | color:#777; 44 | margin-top:-0.6em; 45 | display:block; 46 | } 47 | 48 | .wrapper { 49 | width:860px; 50 | margin:0 auto; 51 | } 52 | 53 | blockquote { 54 | border-left:1px solid #e5e5e5; 55 | margin:0; 56 | padding:0 0 0 20px; 57 | font-style:italic; 58 | } 59 | 60 | code, pre { 61 | font-family:Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal; 62 | color:#333; 63 | font-size:12px; 64 | } 65 | 66 | pre { 67 | padding:8px 15px; 68 | background: #f8f8f8; 69 | border-radius:5px; 70 | border:1px solid #e5e5e5; 71 | overflow-x: auto; 72 | } 73 | 74 | table { 75 | width:100%; 76 | border-collapse:collapse; 77 | } 78 | 79 | th, td { 80 | text-align:left; 81 | padding:5px 10px; 82 | border-bottom:1px solid #e5e5e5; 83 | } 84 | 85 | dt { 86 | color:#444; 87 | font-weight:700; 88 | } 89 | 90 | th { 91 | color:#444; 92 | } 93 | 94 | img { 95 | max-width:100%; 96 | } 97 | 98 | header { 99 | width:270px; 100 | float:left; 101 | position:fixed; 102 | } 103 | 104 | header ul { 105 | list-style:none; 106 | height:40px; 107 | 108 | padding:0; 109 | 110 | background: #eee; 111 | background: -moz-linear-gradient(top, #f8f8f8 0%, #dddddd 100%); 112 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f8f8f8), color-stop(100%,#dddddd)); 113 | background: -webkit-linear-gradient(top, #f8f8f8 0%,#dddddd 100%); 114 | background: -o-linear-gradient(top, #f8f8f8 0%,#dddddd 100%); 115 | background: -ms-linear-gradient(top, #f8f8f8 0%,#dddddd 100%); 116 | background: linear-gradient(top, #f8f8f8 0%,#dddddd 100%); 117 | 118 | border-radius:5px; 119 | border:1px solid #d2d2d2; 120 | box-shadow:inset #fff 0 1px 0, inset rgba(0,0,0,0.03) 0 -1px 0; 121 | width:270px; 122 | } 123 | 124 | header li { 125 | width:89px; 126 | float:left; 127 | border-right:1px solid #d2d2d2; 128 | height:40px; 129 | } 130 | 131 | header ul a { 132 | line-height:1; 133 | font-size:11px; 134 | color:#999; 135 | display:block; 136 | text-align:center; 137 | padding-top:6px; 138 | height:40px; 139 | } 140 | 141 | strong { 142 | color:#222; 143 | font-weight:700; 144 | } 145 | 146 | header ul li + li { 147 | width:88px; 148 | border-left:1px solid #fff; 149 | } 150 | 151 | header ul li + li + li { 152 | border-right:none; 153 | width:89px; 154 | } 155 | 156 | header ul a strong { 157 | font-size:14px; 158 | display:block; 159 | color:#222; 160 | } 161 | 162 | section { 163 | width:500px; 164 | float:right; 165 | padding-bottom:50px; 166 | } 167 | 168 | small { 169 | font-size:11px; 170 | } 171 | 172 | hr { 173 | border:0; 174 | background:#e5e5e5; 175 | height:1px; 176 | margin:0 0 20px; 177 | } 178 | 179 | footer { 180 | width:270px; 181 | float:left; 182 | position:fixed; 183 | bottom:50px; 184 | } 185 | 186 | @media print, screen and (max-width: 960px) { 187 | 188 | div.wrapper { 189 | width:auto; 190 | margin:0; 191 | } 192 | 193 | header, section, footer { 194 | float:none; 195 | position:static; 196 | width:auto; 197 | } 198 | 199 | header { 200 | padding-right:320px; 201 | } 202 | 203 | section { 204 | border:1px solid #e5e5e5; 205 | border-width:1px 0; 206 | padding:20px 0; 207 | margin:0 0 20px; 208 | } 209 | 210 | header a small { 211 | display:inline; 212 | } 213 | 214 | header ul { 215 | position:absolute; 216 | right:50px; 217 | top:52px; 218 | } 219 | } 220 | 221 | @media print, screen and (max-width: 720px) { 222 | body { 223 | word-wrap:break-word; 224 | } 225 | 226 | header { 227 | padding:0; 228 | } 229 | 230 | header ul, header p.view { 231 | position:static; 232 | } 233 | 234 | pre, code { 235 | word-wrap:normal; 236 | } 237 | } 238 | 239 | @media print, screen and (max-width: 480px) { 240 | body { 241 | padding:15px; 242 | } 243 | 244 | header ul { 245 | display:none; 246 | } 247 | } 248 | 249 | @media print { 250 | body { 251 | padding:0.4in; 252 | font-size:12pt; 253 | color:#444; 254 | } 255 | } 256 | -------------------------------------------------------------------------------- /index.md: -------------------------------------------------------------------------------- 1 | This page provides information and links to these two Python courses: 2 | 3 | - **[Introduction to solving biological problems with Python](https://github.com/pycam/python-basic)**; and 4 | - **[Data science in Python](https://github.com/pycam/python-data-science)** 5 | 6 | run by the [Graduate School of Life Sciences](http://www.training.cam.ac.uk/) of the University of Cambridge, UK. 7 | 8 | ### Course description 9 | Since February 2017, the original two days course, taught over many years (on GitHub since 2013), has been rewritten into two separate courses running over four days. 10 | 11 | - **Introduction to solving biological problems with Python**: This course provides a practical introduction to the writing of Python programs for the complete novice. Participants are lead through the core aspects of Python illustrated by a series of example programs. Upon completion of the course, attentive participants will be able to write simple Python programs and customise more complex code to fit their needs. 12 | 13 | - **Data science in Python**: This course covers *concepts and strategies for working more effectively with Python* with the aim of writing reusable code. We will be using Python libraries to explore data in files, creating functions and modules to write reusable code, manipulating data using Pandas, visualising data with Matplotlib and working with biological data using BioPython. 14 | 15 | ### Course materials 16 | The course materials are available as [Jupyter notebook](http://jupyter.org/) files, one for each session of the course. Jupyter notebooks allow you to interactively run python code in your browser and if you [install Jupyter](https://jupyter.readthedocs.io/en/latest/install.html) on your own machine, you can then run the notebooks and experiment with the example code. A quick installation guide is also available in our introductory course repository on GitHub in the [README.md file](https://github.com/pycam/python-basic/blob/master/README.md). 17 | 18 | The notebook and example data files as well as scripts used in both courses are available to download from our course's repositories: 19 | 20 | - [python-basic course repo](https://github.com/pycam/python-basic) for _'Introduction to solving biological problems with Python'_ course 21 | 22 | - [python-data-science course repo](https://github.com/pycam/python-data-science) for _'Data science in Python'_ course 23 | 24 | Static renderings of the notebooks (that do not support interactively running the examples) 25 | are also available (using the [Jupyter notebook viewer](http://nbviewer.jupyter.org/)) as a service from GitHub. 26 | 27 | Web-based collaborative editor is used during some courses, allowing everyone to simultaneously ask questions by editing a text document, and see all participants' edits in real-time: 28 | 29 | - [Etherpad for Dec16 course](https://public.etherpad-mozilla.org/p/pycam-dec16) 30 | 31 | 32 | ### Course schedule 33 | 34 | - **Introduction to solving biological problems with Python** 35 | - [Day 1 - Introduction: objectives and course schedule](https://github.com/pycam/python-basic/blob/master/python_basic_1_intro.ipynb) 36 | - [Day 2 - Introduction: objectives and course schedule](https://github.com/pycam/python-basic/blob/master/python_basic_2_intro.ipynb) 37 | - **Data science in Python** 38 | - [Day 1 - Aims, objectives and course schedule](https://github.com/pycam/python-data-science/blob/master/10_python_data_intro.ipynb) 39 | - [Day 2 - Aims, objectives and course schedule](https://github.com/pycam/python-data-science/blob/master/20_python_data_intro.ipynb) 40 | 41 | ### Course objectives 42 | - **Introduction to solving biological problems with Python** 43 | - Edit and run Python code 44 | - Write file-processing python programs that produce output to the terminal and/or external files 45 | - Create stand-alone python programs to process biological data 46 | - Know how to develop your skills in Python after the course 47 | - During this course you will learn about: 48 | - Core concepts about Python syntax: data types, variables, blocks and indentation, writing code in file 49 | - Different ways to control program flow using loops and conditional tests 50 | - Reading from and writing to files 51 | - **Data science in Python** 52 | - Writing **reusable** code, using **functions** and **libraries** 53 | - Acquiring a working knowledge of **key concepts** which are prerequisites for advanced programming in Python like writing classes to build objects 54 | - During this course you will learn about: 55 | - Using Python libraries to explore data in files 56 | - Creating functions and modules to write reusable code 57 | - Manipulating data using Pandas 58 | - Visualising data with Matplotlib 59 | - Working with biological data using BioPython 60 | 61 | ### Exercise solutions 62 | Example solutions to all of the exercises from the course materials are available from the course repository in the `solutions` folder. The solution scripts are named sequentially for each session. 63 | 64 | Note that these solutions are just examples, and there are many 'correct' solutions to these exercises. If you spot any issues or bugs with the solutions, or indeed any of the course materials, please let us know (pull requests are welcome!) 65 | 66 | ### Presenters 67 | - **Current presenters**: 68 | - Mukarram Hossain, University of Cambridge 69 | - Samuel Lewis, University of Cambridge 70 | - Sebastian Mueller, University of Cambridge 71 | - Anne Pajon, CRUK-CI, University of Cambridge 72 | - Fabio Puddu, Gurdon Institute, University of Cambridge 73 | - Cristian Riccio, University of Cambridge 74 | - Previous presenters: 75 | - Gabor Bunkoczi, CIMR, University of Cambridge 76 | - Tom Carroll, MRC Clinical Sciences Centre, Imperial College London 77 | - Tomás Di Domenico, University of Cambridge 78 | - Mareike Herzog, University of Cambridge 79 | - Maire Lawlor, Sanger Institute 80 | - David Molnar, University of Cambridge 81 | - Sergio Martinez Cuesta, CRUK-CI, University of Cambridge 82 | - James Morris, CRUK-CI, University of Cambridge 83 | - Graham Ritchie, Usher Institute of Population Health Sciences & Informatics, University of Edinburgh 84 | - Inês de Santiago, CRUK-CI, University of Cambridge 85 | - Tim Stevens, MRC Laboratory of Molecular Biology 86 | --------------------------------------------------------------------------------