<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.bi.up.ac.za/wiki/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.bi.up.ac.za/wiki/index.php?feed=atom&amp;namespace=0&amp;title=Special%3ANewPages</id>
		<title>Centre for Bioinformatics and Computational Biology - New pages [en]</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.bi.up.ac.za/wiki/index.php?feed=atom&amp;namespace=0&amp;title=Special%3ANewPages"/>
		<link rel="alternate" type="text/html" href="http://wiki.bi.up.ac.za/wiki/index.php/Special:NewPages"/>
		<updated>2026-04-06T06:45:15Z</updated>
		<subtitle>From Centre for Bioinformatics and Computational Biology</subtitle>
		<generator>MediaWiki 1.23.13</generator>

	<entry>
		<id>http://wiki.bi.up.ac.za/wiki/index.php/About</id>
		<title>About</title>
		<link rel="alternate" type="text/html" href="http://wiki.bi.up.ac.za/wiki/index.php/About"/>
				<updated>2019-08-08T06:21:23Z</updated>
		
		<summary type="html">&lt;p&gt;Johann: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Black Mamba is a discussion group hosted by the Centre for Bioinformatics and Computational Biology.&lt;br /&gt;
&lt;br /&gt;
The aim of the discussion group is to expose people to a wide variety of different topics ranging from biology to mathematics and computer sciences. Post-graduate studies often require individuals to focus on only certain topics relevant to their field of study. This creates a situation where many people have very specialised skill sets. With a trend towards cross disciplinary research it has become more important than ever that scientists have an understanding of not only their field of research but also surrounding fields.&lt;br /&gt;
&lt;br /&gt;
The group does not function on a student-teacher dynamic. Each week is chaired by the most knowledgeable person in the topic being discussed. This person's role is to influence and steer discussion, not necessarily teach the group.&lt;br /&gt;
&lt;br /&gt;
Open discussion is actively encouraged. With no one person knowing all there is to know about any topic it becomes important that everyone in the group actively interacts to ensure that topics are explored in as wide a scope as possible.&lt;br /&gt;
&lt;br /&gt;
'''Topics that have been discussed by the group:'''&lt;br /&gt;
* Git&lt;br /&gt;
* Databases and SQL&lt;br /&gt;
* Python basics&lt;br /&gt;
* Machine Learning&lt;br /&gt;
* Pipeline creation (nextflow and snakemake)&lt;/div&gt;</summary>
		<author><name>Hstrydom</name></author>	</entry>

	<entry>
		<id>http://wiki.bi.up.ac.za/wiki/index.php/Python</id>
		<title>Python</title>
		<link rel="alternate" type="text/html" href="http://wiki.bi.up.ac.za/wiki/index.php/Python"/>
				<updated>2019-06-20T06:11:45Z</updated>
		
		<summary type="html">&lt;p&gt;Hstrydom: /* Conditionals */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Variables ===&lt;br /&gt;
==== Declaration and typing ====&lt;br /&gt;
'''Keyword:''' Declaring variables, variable assignment, boolean values, integers, floats, strings, lists, dictionaries (ordered dictionaries, default dictionaries), tuples, sets, mutable and immutable data types, variable typing.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
####&lt;br /&gt;
# Boolean variables can only contain one of two values: True or False&lt;br /&gt;
#     Boolean values are annotated by using the &amp;quot;bool&amp;quot; keyword&lt;br /&gt;
a: bool = True&lt;br /&gt;
####&lt;br /&gt;
&lt;br /&gt;
####&lt;br /&gt;
# Integers are variables that contain any positive or negative whole number&lt;br /&gt;
#     Integers are annotated using the &amp;quot;int&amp;quot; keyword&lt;br /&gt;
# Floats are variables that contains any positive or negative decimal&lt;br /&gt;
#     Floats are annotated using the &amp;quot;float&amp;quot; keyword&lt;br /&gt;
a: int = 15&lt;br /&gt;
b: int = -23&lt;br /&gt;
&lt;br /&gt;
c: float = 6.4&lt;br /&gt;
d: float = -9.5&lt;br /&gt;
####&lt;br /&gt;
&lt;br /&gt;
####&lt;br /&gt;
# Strings are variables that contain text&lt;br /&gt;
#     Strings are annotated using the &amp;quot;str&amp;quot; keyword&lt;br /&gt;
a: str = &amp;quot;This is a string&amp;quot;&lt;br /&gt;
b: str = 'Strings can be enclosed using single quotes'&lt;br /&gt;
&lt;br /&gt;
# Initializing an empty string:&lt;br /&gt;
a = &amp;quot;&amp;quot;&lt;br /&gt;
####&lt;br /&gt;
&lt;br /&gt;
####&lt;br /&gt;
# Lists are collections of other variables&lt;br /&gt;
#     Lists are annotated using the &amp;quot;list&amp;quot; keyword&lt;br /&gt;
a: list = [&amp;quot;Some string&amp;quot;, 15, 9.6, True]&lt;br /&gt;
&lt;br /&gt;
# Initializing an empty list:&lt;br /&gt;
a = []&lt;br /&gt;
####&lt;br /&gt;
&lt;br /&gt;
####&lt;br /&gt;
# Sets are lists that cannot contain duplicate values&lt;br /&gt;
# They also do not keep the order of the variables&lt;br /&gt;
# Sets are a lot faster than lists when looking for specific values&lt;br /&gt;
#    Sets are annotated using the &amp;quot;set&amp;quot; keyword&lt;br /&gt;
a: set = {&amp;quot;Some string&amp;quot;, 15, 9.6, True}&lt;br /&gt;
&lt;br /&gt;
# Initializing an empty set:&lt;br /&gt;
a = set()&lt;br /&gt;
####&lt;br /&gt;
&lt;br /&gt;
####&lt;br /&gt;
# Tuples are lists that cannot be changed after being created&lt;br /&gt;
# They are useful when returning multiple values from a function&lt;br /&gt;
#     Tuples are annotated using the &amp;quot;tuple&amp;quot; keyword&lt;br /&gt;
a: tuple = (&amp;quot;Some string&amp;quot;, 15, 9.6, True)&lt;br /&gt;
&lt;br /&gt;
# Because tuples cannot be changed there is no point in initializing an empty one&lt;br /&gt;
####&lt;br /&gt;
&lt;br /&gt;
####&lt;br /&gt;
# Dictionaries work of Key - Value pairs&lt;br /&gt;
# Keys can be any immutable type - integers, floats, strings and tuples&lt;br /&gt;
# Dictionaries do not keep the their order&lt;br /&gt;
#     Dictionaries are annotated using the &amp;quot;dict&amp;quot; keyword&lt;br /&gt;
a: dict = {&amp;quot;A&amp;quot;: &amp;quot;Some string&amp;quot;, &amp;quot;B&amp;quot;: 15, &amp;quot;C&amp;quot;: 9.6, &amp;quot;D&amp;quot;: True}&lt;br /&gt;
&lt;br /&gt;
# Initializing an empty dictionary:&lt;br /&gt;
a = {}&lt;br /&gt;
####&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Casting ====&lt;br /&gt;
'''Keywords:''' Casting&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Only certain operations can be performed on certain types of variables&lt;br /&gt;
# Changing between types of variables is called &amp;quot;casting&amp;quot;&lt;br /&gt;
a: str = &amp;quot;15&amp;quot;&lt;br /&gt;
&lt;br /&gt;
b: int = int(a)     # b = 15&lt;br /&gt;
c: float = float(b) # c = 15.0&lt;br /&gt;
d: str = str(c)     # d = &amp;quot;15.0&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Mathematical operations ====&lt;br /&gt;
'''Keywords:''' Operators, string concatenation, list concatenation&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
####&lt;br /&gt;
# Integers and floats support most arithmetic operations&lt;br /&gt;
a = 15&lt;br /&gt;
b = 6&lt;br /&gt;
&lt;br /&gt;
c = a + b # c = 21&lt;br /&gt;
c = a - b # c = 9&lt;br /&gt;
c = a * b # c = 90&lt;br /&gt;
c = a / b # c = 2.5&lt;br /&gt;
&lt;br /&gt;
# There are some special operators:&lt;br /&gt;
# modulus (%) returns what is left after division&lt;br /&gt;
# floor division (//) throws away the decimal place&lt;br /&gt;
c = a % b  # c = 3&lt;br /&gt;
c = a // b # c = 2&lt;br /&gt;
####&lt;br /&gt;
&lt;br /&gt;
####&lt;br /&gt;
# Strings only support 2 mathematical operators&lt;br /&gt;
# The addition (+) is used to concatenate strings&lt;br /&gt;
# The multiplication (*) returns multiples of a string&lt;br /&gt;
a = &amp;quot;Hello&amp;quot;&lt;br /&gt;
b = &amp;quot;World&amp;quot;&lt;br /&gt;
&lt;br /&gt;
c = a + b # c = &amp;quot;HelloWorld&amp;quot;&lt;br /&gt;
c = a * 3 # c = &amp;quot;HelloHelloHello&amp;quot;&lt;br /&gt;
####&lt;br /&gt;
&lt;br /&gt;
####&lt;br /&gt;
# Lists, tuples can be added to each other&lt;br /&gt;
# It concatenates the collections together&lt;br /&gt;
a = [&amp;quot;Hello&amp;quot;, 15]&lt;br /&gt;
b = [9.6, True]&lt;br /&gt;
&lt;br /&gt;
c = a + b # c = [&amp;quot;hello&amp;quot;, 15, 9.6, True]&lt;br /&gt;
####&lt;br /&gt;
&lt;br /&gt;
####&lt;br /&gt;
# You can use &amp;quot;mathematical shorthand&amp;quot; to make some code more readable&lt;br /&gt;
# Shorthand is supported for all operators and works with strings, numbers, lists and tuples&lt;br /&gt;
a = 12&lt;br /&gt;
b = &amp;quot;Hello&amp;quot;&lt;br /&gt;
c = &amp;quot;World&amp;quot;&lt;br /&gt;
&lt;br /&gt;
a = a + 6 # Normal way&lt;br /&gt;
a += 6    # Shorthand gives the same result&lt;br /&gt;
&lt;br /&gt;
b = b + c # Normal way, c = &amp;quot;HelloWorld&amp;quot;&lt;br /&gt;
b += c    # Shorthand gives the same result&lt;br /&gt;
####&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Modifying collections ====&lt;br /&gt;
'''Keywords:''' Collections, lists, tuples, dictionaries, sets&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
####&lt;br /&gt;
# LISTS&lt;br /&gt;
# You can add values to a list by using the append() method:&lt;br /&gt;
a = []&lt;br /&gt;
&lt;br /&gt;
a.append(&amp;quot;Hello&amp;quot;)&lt;br /&gt;
a.append(15)&lt;br /&gt;
a.append(True)&lt;br /&gt;
&lt;br /&gt;
print(a) # a = [&amp;quot;Hello&amp;quot;, 15, True]&lt;br /&gt;
####&lt;br /&gt;
&lt;br /&gt;
####&lt;br /&gt;
# SETS&lt;br /&gt;
# You can add values to a list by using the add() method&lt;br /&gt;
# A list of values can be added to a set by using the update() method&lt;br /&gt;
a = set()&lt;br /&gt;
b = [15, 9.6, True]&lt;br /&gt;
&lt;br /&gt;
a.add(&amp;quot;Hello&amp;quot;)&lt;br /&gt;
a.update(b)&lt;br /&gt;
&lt;br /&gt;
print(a) # a = {&amp;quot;Hello&amp;quot;, 15, 9.6, True}&lt;br /&gt;
####&lt;br /&gt;
&lt;br /&gt;
####&lt;br /&gt;
# TUPLES&lt;br /&gt;
# Tuples cannot be added to, they do not change&lt;br /&gt;
####&lt;br /&gt;
&lt;br /&gt;
####&lt;br /&gt;
# DICTIONARIES&lt;br /&gt;
# You can add a new value pair by assigning the key to a value&lt;br /&gt;
a = {}&lt;br /&gt;
&lt;br /&gt;
a[&amp;quot;A&amp;quot;] = &amp;quot;Hello&amp;quot;&lt;br /&gt;
a[&amp;quot;B&amp;quot;] = 15&lt;br /&gt;
a[&amp;quot;C&amp;quot;] = 9.6&lt;br /&gt;
a[&amp;quot;D&amp;quot;] = True&lt;br /&gt;
&lt;br /&gt;
print(a) # a = {&amp;quot;A&amp;quot;: &amp;quot;Hello&amp;quot;, &amp;quot;B&amp;quot;: 15, &amp;quot;C&amp;quot;: 9.6, &amp;quot;D&amp;quot;: True}&lt;br /&gt;
####&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
'''Keywords:''' Logical operators, and, or, not, in, if statement, if else, else if, try catch blocks, exception handling.&lt;br /&gt;
==== If statement ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# If statements are used when you want to do something when a condition is met&lt;br /&gt;
# The if or elif part occurs when the condition returns true&lt;br /&gt;
# The else part occurs when none of the previous conditions returned true&lt;br /&gt;
a = 12&lt;br /&gt;
b = 15&lt;br /&gt;
&lt;br /&gt;
# The example below will return &amp;quot;Did the elif&amp;quot; because b &amp;gt; a&lt;br /&gt;
if a &amp;gt; b:&lt;br /&gt;
    print(&amp;quot;Did the if&amp;quot;)&lt;br /&gt;
elif b &amp;gt; a: # Condition returns true&lt;br /&gt;
    print(&amp;quot;Did the elif&amp;quot;)&lt;br /&gt;
else:&lt;br /&gt;
    print(&amp;quot;Did the else&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# The operators available:&lt;br /&gt;
# &amp;gt; &amp;lt; &amp;gt;= &amp;lt;= ==&lt;br /&gt;
# != (not equal) can be used or the keyword &amp;quot;not&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# If you want to create more complex conditions you can make use of &amp;quot;and&amp;quot;, &amp;quot;or&amp;quot; and &amp;quot;in&amp;quot;&lt;br /&gt;
# And requires that all conditionals return true&lt;br /&gt;
# Or requires that one of the conditionals return true&lt;br /&gt;
# In returns true if a certain value is found inside a collection&lt;br /&gt;
a = [15, 9, 6]&lt;br /&gt;
b = 6&lt;br /&gt;
&lt;br /&gt;
if 15 in a:&lt;br /&gt;
    print(&amp;quot;Found it&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# Would not run the code inside the if statement&lt;br /&gt;
if (15 in a) and (b &amp;gt; 9):&lt;br /&gt;
    print(&amp;quot;The item is in the list and 6 &amp;gt; 9&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# Would run the code inside the if statement&lt;br /&gt;
if (15 in a) or (b &amp;gt; 9):&lt;br /&gt;
    print(&amp;quot;The item is in the list or 6 &amp;gt; 9?&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# You can have calculations and function calls inside conditions:&lt;br /&gt;
if (15 + 2) &amp;gt; b:&lt;br /&gt;
    print(&amp;quot;17 &amp;gt; 6&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Try except ====&lt;br /&gt;
&lt;br /&gt;
=== Loops ===&lt;br /&gt;
=== Functions ===&lt;br /&gt;
=== Classes ===&lt;/div&gt;</summary>
		<author><name>Hstrydom</name></author>	</entry>

	</feed>