<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Posts on Simon Boardman</title>
		<link>https://s-boardman.github.io/posts/</link>
		<description>Recent content in Posts on Simon Boardman</description>
		<generator>Hugo -- gohugo.io</generator>
		<language>en-gb</language>
		<copyright>This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.</copyright>
		<lastBuildDate>Sat, 21 Apr 2018 00:00:00 +0000</lastBuildDate>
		<atom:link href="https://s-boardman.github.io/posts/index.xml" rel="self" type="application/rss+xml" />
		
		<item>
			<title>Dirty One Thirty 2018</title>
			<link>https://s-boardman.github.io/dirty-one-thirty-2018/</link>
			<pubDate>Sat, 21 Apr 2018 00:00:00 +0000</pubDate>
			
			<guid>https://s-boardman.github.io/dirty-one-thirty-2018/</guid>
			<description>My account of the Dirty One Thirty (Diddy Dirty Reiver) from 21-04-2018.
I&amp;rsquo;ve wanted to do some proper gravel grinding for ages. This seemed like the perfect opportunity to chase some big skies and long gravel roads as well as exploring a new part of the UK.
{% include image.html file=&amp;ldquo;../assets/images/20180421_071755.png&amp;rdquo; description=&amp;ldquo;Awaiting the start&amp;rdquo; %}
Training did not go as planned, and there was a vague plan. Thanks to the extended period of inclement weather knocking out several weekends, I only managed four rides which could generously qualify as training and so had to hope that my ability to feed well would be the main driver for getting me round what promised to be a challenging course.</description>
			<content type="html"><![CDATA[<p>My account of the Dirty One Thirty (Diddy <a href="https://www.dirtyreiver.co.uk/" target="_blank">Dirty Reiver</a>) from  21-04-2018.</p>

<p>I&rsquo;ve wanted to do some proper gravel grinding for ages. This seemed like the perfect opportunity to chase some big skies and long gravel roads as well as exploring a new part of the UK.</p>

<p>{% include image.html file=&ldquo;../assets/images/20180421_071755.png&rdquo; description=&ldquo;Awaiting the start&rdquo; %}</p>

<p>Training did not go as planned, and there was a vague plan. Thanks to the extended period of inclement weather knocking out several weekends, I only managed four rides which could generously qualify as training and so had to hope that my ability to feed well would be the main driver for getting me round what promised to be a challenging course. As the day approached I was relieved to have only entered the 130 rather than 200km distance as it still felt achievable if the weather played ball.</p>

<p>Mechanical preparation also deviated from any sort of plan, culminating in a new rear hub being fitted just four days before the event (thanks <a href="http://www.woodrupcycles.com/" target="_blank">Woodrup Cycles</a> for sorting this speedily!). I dabbled in the dark arts of tubeless, which worked surprisingly well, fitted a wide range cassette, and finally got some bars where I could comfortably be on the drops and brake (very useful&hellip;). For carrying all my stuff I turned to the good folks at <a href="https://www.alpkit.com/" target="_blank">Alpkit</a> for a frame bag and then promptly stole my wife&rsquo;s bar bag when I realised I couldn&rsquo;t fit everything into aforementioned frame bag. Full dry run of all the mandatory kit plus some food took place on Friday, about two hours before we drove up to Kielder. Nothing like being well prepared&hellip;</p>

<p>We (myself, wife, and dogs) travelled up on Friday to check out the gravel expo and get registered. The weather was looking pretty much perfect and we enjoyed mooching round the stands picking up freebies and chatting with the vendors. I treated myself to a natty banana cycling cap from <a href="https://www.victorychimp.cc/" target="_blank">Victory Chimp</a> and also scored one of the Shimano cowbells. Signing on was nice and easy and there was a great atmosphere in the event village with plenty of people milling about soaking up the atmosphere.</p>

<p>{% include image.html file=&ldquo;../assets/images/20180421_055742.png&rdquo; description=&ldquo;Misty morning drive&rdquo; %}</p>

<p>&ldquo;Race day&rdquo; dawned at 0500 hours to make sure our 45 minute drive to Kielder went smoothly. The car informed us that it was about 3C and the drive over the tops and down into the valley within which Kielder sits was atmospheric with plenty of mist and a spectacular sunrise. After being parked up the road from the start I started affixing luggage to the bike and finally deciding what layers to actually wear. Fortunately my faffing was going better than the three gents from the van next to us with only two front wheels between them&hellip;</p>

<p>{% include image.html file=&ldquo;../assets/images/20180421_071432.png&rdquo; description=&ldquo;Staying warm before the start&rdquo; %}</p>

<p>We rolled down to the start and I found a patch of sunlight to attempt to stay warm. I started out in the non-standard long sleeved jersey over short sleeve jersey since I&rsquo;ve not got a nice packable gilet (yet) and kept my feet warm thanks to wearing my winter boots (something I&rsquo;d later regret when it hit 26C). I couldn&rsquo;t hear any of the pre course briefing but managed to go with the flow setting off decidedly mid-pack with the aim of completing the course in about seven hours.</p>

<p>As it turns out most of the first twenty or so km are up hill. I&rsquo;m fine with hills, good at them even, I&rsquo;m from Yorkshire. But trying to navigate in between many of my 1000 new friends was challenging, so progress was slow. The flip side was that I rapidly warmed up thanks to overdressing and felt comfortable with the gradients. Starting from almost lakeside meant winding up through the forest shadows before eventually emerging into the sunlight where vast areas of deforestation were present to remind you that Kielder is a working forest as well as an adventure playground.</p>

<p>{% include image.html file=&ldquo;../assets/images/IMG_20180421_093327.png&rdquo; description=&ldquo;Big open skies&rdquo; %}</p>

<p>My nervous excitement faded a bit as I got into the routine of climbing, only for this to be rudely interrupted by noisey derailleur issues the result of which was having to stop at the top of every climb and manually move the mech to get out of the biggest cog in my cassette. This slowed progress and by the time I reached the first feed stop, at a village hall no less, I was not feeling confident about getting the whole way round, never mind my self imposed seven hour target. Initially I consoled myself with taking advantage of the vast array of cakes, energy bars, sweets, and scones before having a chat with the resident mechanic who was kind enough to take a look at my bike. Whilst the problem wasn&rsquo;t fixable without spares I felt a more confident about getting round so set off again for the next stretch. By this point I was happily stripped down to my short sleeve <a href="https://albarosacc.com/" target="_blank">Alba Rosa</a> jersey, a fact that I forgot when I was accosted by a fellow rider with a friendly &ldquo;Morning Alba&rdquo;. Unfortunately in my slightly dehydrated and worried about rear mech state it took me a full two minutes to realise why I had been address as Albert&hellip;</p>

<p>Cycling away from the feed station took us into less forested areas with more rolling gravel roads meaning fast progress. By this point it was very warm and my choice of Gore Tex boots to stave off cold toes and potentially give me confidence crossing the infamous ford were beginning to look like a poor decision. Passing through the shortening shadows of the trees gave little respite to the heat. So when I reached the ford I gamely went barefoot and walked across pushing / dragging my bike with one hand and trying not to drop shoes and socks into the water. Whilst the marshal insisted that most people were riding across (it was about <sup>50</sup>&frasl;<sub>50</sub> based on my observations) I was happy to take the opportunity to cool my feet down without the risk of falling off into the river!</p>

<p>{% include image.html file=&ldquo;../assets/images/IMG_20180421_115546.png&rdquo; description=&ldquo;Infamous ford&rdquo; %}</p>

<p>Eventually the forest was left behind entirely and the route began to pass alongside sheep fields and stone walls, before dropping down a superb flowing descent, which gave plenty of opportunity to get on the drops and pick up speed. I&rsquo;ve only recently learnt to descend properly using drop bars and boy was I glad of it. The final bit of this middle section was on tarmacked farm roads, after 90km of gravel this was a welcome change and the final few kilometers to the second feed station passed by fairly quickly.</p>

<p>{% include image.html file=&ldquo;../assets/images/untitled-643.png&rdquo; description=&ldquo;Descending, Photo courtesy of <a href='https://www.instagram.com/steph3nsmith/'>Stephen Smith</a>&rdquo; %}</p>

<p>The second feed station was manned by the good folk from <a href="https://www.alpkit.com/" target="_blank">Alpkit</a> who were merrily dispensing all manner of energy goodness plus litres and litres of energy drink which was gratefully received by everyone. I arrived just before half one and had a fairly short pit stop with just enough time to over indulge on jelly babies and crisps. I resisted the temptation of the bean bags or a lie down in the teepee; I don&rsquo;t think I would&rsquo;ve got going again if I&rsquo;d not stayed standing up! So after giving my chain and squeaky pedals some TLC I was underway again climbing upwards back on proper gravel tracks.</p>

<p>{% include image.html file=&ldquo;../assets/images/IMG_20180421_130858.png&rdquo; description=&ldquo;AlpFood&rdquo; %}</p>

<p>Much of the next 10km was spent climbing up then flitting down roads back in the forest. I caught up with a rider from <a href="https://teamherecomethebelgians.blogspot.co.uk/" target="_blank">Here Come The Belgians</a> (their natty red kit looks a lot like Alba Rosa pink at a distance) and had a good chat. I&rsquo;d ridden most of the way on my own so it was good to have some extended conversation for a while. Unfortunately my fellow rider&rsquo;s front brake hose had split so going downhill was faster (and more nerve wracking than he would&rsquo;ve liked). Although in fairness it wasn&rsquo;t the worst issue I saw all day. That honor belonged to the gents parked up next to us exclaim they&rsquo;d only brought two front wheels between the three of them&hellip;</p>

<p>Bringing up the metric century the route crossed into Scotland, something I hadn&rsquo;t really thought about despite being so close to the border. Much of the next section followed the border, a winding stream, and the surface deteriorated from hard pack forest road to golf ball sized gravel which was a good test of my tubeless tyres. A further complication was the false flat giving even more punishment to the already weary legs. I couldn&rsquo;t any gradient, but my body was loudly informing me it was there!</p>

<p>{% include image.html file=&ldquo;../assets/images/IMG_20180421_141705.png&rdquo; description=&ldquo;Scotland!&rdquo; %}</p>

<p>Returning to England brought us to the point where the route splits, the full Dirty Reiver turning left and the Dirty One Thirty going right, retreating back into the forest back onto roads with plenty of tree cover to keep the heat at bay. Whilst I was happy to be taking the shorter route this time round I am definitely keen to aim for the full 200km next time. The next 10 or so kilometers passed relatively quickly thanks to the mostly downhill gradient and tarmac surface. Reaching the waymarked bike trails signals the final stretch along by the water before you are spat out into what passes for civilisation (the main road) and all that&rsquo;s left is being cowbelled up the short climb to the castle where a handshake and beer were waiting.</p>

<p>I was almost 30 minutes outside my target of 7 hours, but wasn&rsquo;t disappointed at all. The route was fabulous, a great mix of different surfaces and views, the feed stations were very well stocked, and I&rsquo;d managed to get round without any catastrophic mechanical failures! After some recovery food (nachos and chili!) to complement my isotonic beverage, my wife and I spent a good hour or so cheering riders up the hill and just taking in the great atmosphere as more and more people finished. I had a good chat with the folks from Alpkit to confirm some N+1 decisions (thanks Neil!) and then we couldn&rsquo;t possibly leave without sampling the racclette!</p>

<p>The whole event was very impressively coordinated and the range of things to see and do (and eat!) made for an excellent experience. I will definitely be back next year, can we book the same weather?</p>
]]></content>
		</item>
		
		<item>
			<title>Peanut Butter Blondies</title>
			<link>https://s-boardman.github.io/recipe/peanut-butter-blondies/</link>
			<pubDate>Wed, 23 Nov 2016 00:00:00 +0000</pubDate>
			
			<guid>https://s-boardman.github.io/recipe/peanut-butter-blondies/</guid>
			<description>Continuing my theme of loving peanut butter
Recipe Preparation Preheat the oven to 160C/180C/Gas 4. Find and grease your favourite brownie tin (approx 20cm by 20cm). Locate your cooling rack for being super prepared.
Ingredients  200g white chocolate, coarsely chopped 50g salted peanuts, chopped (or unsalted if you like) 200g peanut butter (good quality stuff which uses sustainable palm oil) 150g caster sugar 3 eggs 100g plain flour (could use a gluten free alternative) 1tsp baking powder  Method  Get a pan of water simmering then put the PB, 3&amp;frasl;4 of the chocolate (150g), and the sugar into a heat proof bowl and stick it on top of the pan (don&amp;rsquo;t let the bowl touch the water!</description>
			<content type="html"><![CDATA[

<p>Continuing my theme of loving <a href="https://s-boardman.github.io/recipe/peanut-butter-cookies" target="_blank">peanut butter</a></p>

<h2 id="recipe">Recipe</h2>

<h3 id="preparation">Preparation</h3>

<p>Preheat the oven to 160C/180C/Gas 4. Find and grease your favourite brownie tin (approx 20cm by 20cm). Locate your cooling rack for being super prepared.</p>

<h3 id="ingredients">Ingredients</h3>

<ul>
<li>200g white chocolate, coarsely chopped</li>
<li>50g salted peanuts, chopped (or unsalted if you like)</li>
<li>200g peanut butter (good quality stuff which uses sustainable palm oil)</li>
<li>150g caster sugar</li>
<li>3 eggs</li>
<li>100g plain flour (could use a gluten free alternative)</li>
<li>1tsp baking powder</li>
</ul>

<h3 id="method">Method</h3>

<ol>
<li>Get a pan of water simmering then put the PB, <sup>3</sup>&frasl;<sub>4</sub> of the chocolate (150g), and the sugar into a heat proof bowl and stick it on top of the pan (don&rsquo;t let the bowl touch the water!). Stir gently until the ingredients are combined.</li>
<li>Allow to cool for a couple of minutes before adding the eggs in turn, giving a good mix each time to make sure everything&rsquo;s nicely mixed.</li>
<li>In a separate bowl sift the flour and baking powder then fold in the mass of peanut butter and melted chocolate.</li>
<li>Once this is all mixed together (no visible flour!) pour into your greased tin and stick it in the oven for 25-30 minutes until just about firm in the centre.</li>
<li>Leave to cool a few minutes in the tin before transferring to a wire rack.</li>
<li>Once completely cool cut and devour at will.</li>
</ol>

<p>Recipe adapted slightly from <a href="http://amzn.to/2fSo0og" target="_blank">The Kitchen Shelf</a>.</p>
]]></content>
		</item>
		
		<item>
			<title>Creating Dummy Directories and Contents</title>
			<link>https://s-boardman.github.io/dummy-directories-contents/</link>
			<pubDate>Fri, 15 Jul 2016 00:00:00 +0000</pubDate>
			
			<guid>https://s-boardman.github.io/dummy-directories-contents/</guid>
			<description>Take a source directory and make a copy of its subdirectories and contents.
find src/ -type d -exec mkdir -p dest/{} \; \  -o -type f -exec touch dest/{} \; Use find to identify a directory (-d) under (src/) and create (mkdir -p) the contents under dest/ then (-o) find files (-f) and touch them under dest/ to make empty copies with the same name.
Best done in the source directory, if in the destination directory you get the full file path at the start which requires a move to bring it to the right level and deletion of empty directory structure.</description>
			<content type="html"><![CDATA[<p>Take a source directory and make a copy of its subdirectories and contents.</p>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash">find src/ -type d -exec mkdir -p dest/<span class="o">{}</span> <span class="se">\;</span> <span class="se">\
</span><span class="se"></span>       -o -type f -exec touch dest/<span class="o">{}</span> <span class="se">\;</span></code></pre></div>
<p>Use <code>find</code> to identify a directory (<code>-d</code>) under (<code>src/</code>) and create (<code>mkdir -p</code>) the contents under <code>dest/</code> then (<code>-o</code>) find files (<code>-f</code>) and touch them under <code>dest/</code> to make empty copies with the same name.</p>

<p>Best done in the source directory, if in the destination directory you get the full file path at the start which requires a move to bring it to the right level and deletion of empty directory structure.</p>

<p>Source: <a href="http://stackoverflow.com/a/11952522" target="_blank">StackOverflow</a></p>
]]></content>
		</item>
		
		<item>
			<title>Peanut Butter Cookies</title>
			<link>https://s-boardman.github.io/recipe/peanut-butter-cookies/</link>
			<pubDate>Tue, 07 Jun 2016 00:00:00 +0000</pubDate>
			
			<guid>https://s-boardman.github.io/recipe/peanut-butter-cookies/</guid>
			<description>Mmm peanut butter cookies!
Recipe Preparation Preheat the oven to 175C/155C Fan/Gas 4 and line two flat baking sheets with greaseproof paper. Locate your cooling rack for being super prepared.
Ingredients  75g/2¾oz margarine 100g/3½oz golden caster sugar 1 large free-range egg 100g/3½oz plain flour 1 tbsp golden syrup 100g/3½oz crunchy peanut butter 1 tsp bicarbonate of soda 50g/1¾oz nuts (almonds or peanuts work well) Pinch of salt  Method  Cream together the margarine and the sugar with a wooden spoon until pale.</description>
			<content type="html"><![CDATA[

<p>Mmm peanut butter cookies!</p>

<h3 id="recipe">Recipe</h3>

<h4 id="preparation">Preparation</h4>

<p>Preheat the oven to 175C/155C Fan/Gas 4 and line two flat baking sheets with greaseproof paper. Locate your cooling rack for being super prepared.</p>

<h4 id="ingredients">Ingredients</h4>

<ul>
<li>75g/2¾oz margarine</li>
<li>100g/3½oz golden caster sugar</li>
<li>1 large free-range egg</li>
<li>100g/3½oz plain flour</li>
<li>1 tbsp golden syrup</li>
<li>100g/3½oz crunchy peanut butter</li>
<li>1 tsp bicarbonate of soda</li>
<li>50g/1¾oz nuts (almonds or peanuts work well)</li>
<li>Pinch of salt</li>
</ul>

<h4 id="method">Method</h4>

<ol>
<li>Cream together the margarine and the sugar with a wooden spoon until pale.</li>
<li>Beat in the egg, a little of the flour (20g), the golden syrup and peanut butter.</li>
<li>Stir in the remaining flour and the bicarbonate of soda.</li>
<li>Finally stir through the peanuts.</li>
<li>Put dessertspoons of the mixture onto the prepared baking trays. Leave plenty of space between them as the cookies will spread out during baking.</li>
<li>Bake for 10 minutes, until a pleasing brown colour. Note that they will be quite soft, that&rsquo;s OK.</li>
<li>Remove from the oven, leave to cool for 10 minutes on the trays then transfer to a wire rack to cool completely.</li>
</ol>

<p>Recipe adapted slightly from <a href="http://www.bbc.co.uk/food/chefs/lisa_faulkner" target="_blank">Lisa Faulkner</a> on <a href="http://www.bbc.co.uk/food/recipes/peanut_butter_cookies_02578" target="_blank">BBC Food</a></p>
]]></content>
		</item>
		
		<item>
			<title>All Things Text Manipulation</title>
			<link>https://s-boardman.github.io/text-manipulation/</link>
			<pubDate>Fri, 22 Jan 2016 00:00:00 +0000</pubDate>
			
			<guid>https://s-boardman.github.io/text-manipulation/</guid>
			<description>sed Multiple Find and Replace instances in a Single Command The sed command is one of the most useful to me in day to day work. It makes text manipulation relatively easy and can be great for lossless large scale manpulations by streaming output to a separate file.
I&amp;rsquo;m working on some copy number data I wanted to strip some leading and trailing arrows from the output of an algorithm I was testing.</description>
			<content type="html"><![CDATA[

<h2 id="sed">sed</h2>

<h3 id="multiple-find-and-replace-instances-in-a-single-command">Multiple Find and Replace instances in a Single Command</h3>

<p>The <code>sed</code> command is one of the most useful to me in day to day work. It makes text manipulation relatively easy and can be great for lossless large scale manpulations by streaming output to a separate file.</p>

<p>I&rsquo;m working on some copy number data I wanted to strip some leading and trailing arrows from the output of an algorithm I was testing. I used the following <code>sed</code> command do it in one fell swoop, rather than having to chain more commands together.</p>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash">cat data.txt
<span class="m">1</span>   &lt;DEL&gt;
<span class="m">5</span>   &lt;DUP&gt;
sed <span class="s1">&#39;s/&lt;//g; s/&gt;//g&#39;</span> data.txt
<span class="m">1</span>   DEL
<span class="m">5</span>   DUP</code></pre></div>
<p>Simples.</p>

<h2 id="awk">awk</h2>

<p><code>awk</code> isn&rsquo;t really a command, rather it is more properly described as a language. I use even more than <code>sed</code> because it plays so nicely with tab delimited data.</p>

<p>In this case I had a file where not every row had a value in every column. I wanted to pull out all the rows with a value in the nth column. Using the following <code>awk</code> command was the easiest way to do it:</p>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash">cat data2.txt
<span class="m">1</span>   <span class="m">12345</span>	A
<span class="m">2</span>   <span class="m">23456</span>	B
<span class="m">3</span>   <span class="m">34567</span>
<span class="m">4</span>   <span class="m">45678</span>	C

awk <span class="s1">&#39;$3&#39;</span> data2.txt
<span class="m">1</span>   <span class="m">12345</span>	A
<span class="m">2</span>   <span class="m">23456</span>	B
<span class="m">4</span>   <span class="m">45678</span>	C</code></pre></div>
<p>This printed every row where the third column was True (i.e. had content).</p>

<h2 id="sort">sort</h2>

<p><code>sort</code> is a very useful unix command. I tend to use it mostly for correcting the order of bed files. This employs the very hand version flag (<code>sort -V</code>) which mixes numbers and letters in a logical way.</p>

<p>The below command uses version sort on the first three columns of a file to ensure that regions are in chromosome and coordinate order.</p>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash">sort -V -k1,1 -k2,2 -k3,3 input.bed &gt; sorted.input.bed</code></pre></div>]]></content>
		</item>
		
		<item>
			<title>Setting up a Git Repository Across a Local Network</title>
			<link>https://s-boardman.github.io/bioinformatics/local-git/</link>
			<pubDate>Tue, 12 Jan 2016 00:00:00 +0000</pubDate>
			
			<guid>https://s-boardman.github.io/bioinformatics/local-git/</guid>
			<description>I mostly use GitHub for distributing code I&amp;rsquo;m working on. For the odd occasion I want to distribute across a local network without using a private repository these are the steps I&amp;rsquo;ll need to use for setting up a repository.
Overall Structure The structure I&amp;rsquo;m aiming for is as follows:
 /local_server/repository | |--/local_desktop/repository | |--/local_laptop/repository  Where the work is done on local machines (laptop/desktop) and pushed to the local server for distribution ensuring that both local machines can access the repository easily.</description>
			<content type="html"><![CDATA[

<p>I mostly use <a href="https://github.com" target="_blank">GitHub</a> for distributing code I&rsquo;m working on. For the odd occasion I want to distribute across a local network without using a private repository these are the steps I&rsquo;ll need to use for setting up a repository.</p>

<h2 id="overall-structure">Overall Structure</h2>

<p>The structure I&rsquo;m aiming for is as follows:</p>

<pre>
 /local_server/repository
|
|--/local_desktop/repository
|
|--/local_laptop/repository
</pre>

<p>Where the work is done on local machines (laptop/desktop) and pushed to the local server for distribution ensuring that both local machines can access the repository easily.</p>

<h2 id="setting-up-the-remote">Setting Up the Remote</h2>

<p>On the local server navigate to where the repository is to be hosted:</p>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash"><span class="nb">cd</span> /path/to/remote/host</code></pre></div>
<p>Make a directory for storing all the clever code Git runs. Then initialise a bare repository which has no working tree. This is important for making sure our initial push and pull between remotes works as intended<sup class="footnote-ref" id="fnref:1"><a href="#fn:1">1</a></sup>.</p>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash">mkdir repository_name
<span class="nb">cd</span> repository_name
git init --bare</code></pre></div>
<h2 id="setting-up-a-repository-on-the-local-machines">Setting Up a Repository on the Local Machines</h2>

<p>On each local machine we can now clone the bare remote repository and have them all link together nicely.</p>

<p>To set up the local repository using an existing folder containing files you want to include:</p>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash"><span class="nb">cd</span> /local_machine/path/to/desired/folder
ls
file1	file2
git clone /path/to/remote/host/repository_name
<span class="nb">cd</span> repository_name
git add file1 file2
git commit -m <span class="s1">&#39;first commit&#39;</span>
git push origin master</code></pre></div>
<p>Make sure you include <code>origin master</code> for the first push otherwise you&rsquo;ll get the following errors:</p>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash"> No refs in common and none specified<span class="p">;</span> doing nothing.
Perhaps you should specify a branch such as <span class="s1">&#39;master&#39;</span>.
fatal: The remote end hung up unexpectedly
error: failed to push some refs to <span class="s1">&#39;/path/to/remote/host/repository_name&#39;</span></code></pre></div>
<h2 id="cloning-the-remote-repository-into-a-new-local-location">Cloning the Remote Repository into a new Local Location</h2>

<p>To add the repository onto a new local machine you can clone from the remote (server) and have everything automatically imported and linked up.</p>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash"><span class="nb">cd</span> /local_machine/path/to/desired/folder
git clone /path/to/remote/host/repository_name
<span class="nb">cd</span> repository_name
ls
file1	file2</code></pre></div>
<p>You can then do the normal git things like adding, commiting, making branches, and have all your code and commit history nicely synced up.</p>

<h2 id="troubleshooting">Troubleshooting</h2>

<p>If Git isn&rsquo;t installed the following commands should work on most Unix systems:</p>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash"><span class="c1"># Fedora distributions</span>
sudo yum install git-all

<span class="c1"># Debian distributions</span>
sudo apt-get install git-all</code></pre></div>
<p>Further details on installation are located on the <a href="https://git-scm.com/book/en/v2/Getting-Started-Installing-Git/" target="_blank">Git documentation pages</a>.</p>
<div class="footnotes">

<hr />

<ol>
<li id="fn:1">This <a href="http://stackoverflow.com/questions/7632454/how-do-you-use-git-bare-init-repository" target="_blank">StackOverflow post</a> gives a few more details.
 <a class="footnote-return" href="#fnref:1"><sup>[return]</sup></a></li>
</ol>
</div>
]]></content>
		</item>
		
		<item>
			<title>Useful Shell Commands</title>
			<link>https://s-boardman.github.io/bioinformatics/shell-utilities/</link>
			<pubDate>Tue, 05 Jan 2016 00:00:00 +0000</pubDate>
			
			<guid>https://s-boardman.github.io/bioinformatics/shell-utilities/</guid>
			<description> Using Secure Copy to transfer files between networks Copy local files to remote destination:
scp file_to_copy user@destination.ip:/destination/path Search bash history and repeat command Sometimes I want to repeat a command that I used a while ago. Often I have to Google it which is lazy. Now using this trick I can find it in my history without having to scroll through lots of entries.
#ctrl-R (reverse-i-search)`&amp;#39;: search_term #enter to bring to current line</description>
			<content type="html"><![CDATA[

<h2 id="using-secure-copy-to-transfer-files-between-networks">Using Secure Copy to transfer files between networks</h2>

<p>Copy local files to remote destination:</p>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash">scp file_to_copy user@destination.ip:/destination/path</code></pre></div>
<h2 id="search-bash-history-and-repeat-command">Search bash history and repeat command</h2>

<p>Sometimes I want to repeat a command that I used a while ago. Often I have to Google it which is lazy. Now using this trick I can find it in my history without having to scroll through lots of entries.</p>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash"><span class="c1">#ctrl-R</span>
<span class="o">(</span>reverse-i-search<span class="o">)</span><span class="sb">`</span><span class="err">&#39;</span>: search_term
<span class="c1">#enter to bring to current line</span></code></pre></div>]]></content>
		</item>
		
		<item>
			<title>Finding Allele Frequency from Varscan VCFs</title>
			<link>https://s-boardman.github.io/varscan-frequency/</link>
			<pubDate>Tue, 01 Dec 2015 00:00:00 +0000</pubDate>
			
			<guid>https://s-boardman.github.io/varscan-frequency/</guid>
			<description>To pull the allele frequency for a given position use the following command:
awk &amp;#39;{if($1==&amp;#34;chr3&amp;#34; &amp;amp;&amp;amp; $2==&amp;#34;178922324&amp;#34; &amp;amp;&amp;amp; $5==&amp;#34;A&amp;#34;) print $10}&amp;#39; /path/to/varscan/vcf | awk &amp;#39;{FS=&amp;#34;:&amp;#34;}{print $7}&amp;#39; The first awk command pulls all variants from position chr3:178922324 where the alternate allele is an A. This outputs the INFO field from the vcfs which match the conditions.
The INFO field looks like this:
$ awk &amp;#39;{if($1==&amp;#34;chr3&amp;#34; &amp;amp;&amp;amp; $2==&amp;#34;178922324&amp;#34; &amp;amp;&amp;amp; $5==&amp;#34;A&amp;#34;) print $10}&amp;#39; /path/to/varscan/vcf 0/1:20:5652:5652:5611:17:0.</description>
			<content type="html"><![CDATA[<p>To pull the allele frequency for a given position use the following command:</p>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash">awk <span class="s1">&#39;{if($1==&#34;chr3&#34; &amp;&amp; $2==&#34;178922324&#34; &amp;&amp; $5==&#34;A&#34;) print $10}&#39;</span> /path/to/varscan/vcf <span class="p">|</span> awk <span class="s1">&#39;{FS=&#34;:&#34;}{print $7}&#39;</span></code></pre></div>
<p>The first awk command pulls all variants from position chr3:178922324 where the alternate allele is an A. This outputs the INFO field from the vcfs which match the conditions.</p>

<p>The INFO field looks like this:</p>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash">$ awk <span class="s1">&#39;{if($1==&#34;chr3&#34; &amp;&amp; $2==&#34;178922324&#34; &amp;&amp; $5==&#34;A&#34;) print $10}&#39;</span> /path/to/varscan/vcf
<span class="m">0</span>/1:20:5652:5652:5611:17:0.3%:8.3982E-3:35:16:2569:3042:7:10</code></pre></div>
<p>The second awk command takes the information field we just passed and splits it using a colon as a delimiter then prints the seventh field which is the allele frequency.</p>

<p>From our above example the output we expect to see is:</p>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash">$ awk <span class="err">&#39;</span><span class="o">{</span><span class="nv">FS</span><span class="o">=</span><span class="s2">&#34;:&#34;</span><span class="o">}{</span>print <span class="nv">$7</span><span class="o">}</span>
<span class="m">0</span>.3%</code></pre></div>]]></content>
		</item>
		
		<item>
			<title>Software Carpentry Instructor Training</title>
			<link>https://s-boardman.github.io/bioinformatics/software-carpentry-instructor-training/</link>
			<pubDate>Tue, 24 Nov 2015 00:00:00 +0000</pubDate>
			
			<guid>https://s-boardman.github.io/bioinformatics/software-carpentry-instructor-training/</guid>
			<description>This week I attended the Software Carpentry instructor training workshop hosted by Elixir UK at the University of Manchester. I&amp;rsquo;ve been on one of their courses as part of the Scientist Training Programme and learnt loads. The whole ethos of improving scientific computing for more productive science is something I want to get on board with, so becoming an instructor seemed like a good challenge, as well as a boost for the old CV.</description>
			<content type="html"><![CDATA[

<p>This week I attended the <a href="http://www.software-carpentry.org" target="_blank">Software Carpentry</a> instructor training workshop hosted by <a href="http://www.elixir-uk.org" target="_blank">Elixir UK</a> at the <a href="http://www.manchester.ac.uk" target="_blank">University of Manchester</a>. I&rsquo;ve been on one of their courses as part of the <a href="http://www.nshcs.org.uk/nhs-scientist-training-programme" target="_blank">Scientist Training Programme</a> and learnt loads. The whole ethos of improving scientific computing for more productive science is something I want to get on board with, so becoming an instructor seemed like a good challenge, as well as a boost for the old CV.</p>

<p>Below is a collection of my notes from the two days and a short review about the process.</p>

<h2 id="overall-ethos">Overall Ethos</h2>

<p>Software carpentry is <a href="http://lifehacker.com/the-value-of-marginal-gains-1514453003" target="_blank">marginal gains</a> for teaching. Repeatedly improving understanding by 1% with small simple changes, leads to significant progress over time.</p>

<blockquote>
<p>Progress = Novice -&gt; Competent -&gt; Expert</p>
</blockquote>

<p>Learning is about making the right connections and avoiding misconceptions.</p>

<p>Think through the implications of a broken mental model caused by a pre-existing misconception in order to work out the correct understanding.</p>

<blockquote>
<p>Novice - don&rsquo;t have mental models.</p>

<p>Competent - use the mental models of others.</p>

<p>Expert - create their own mental models.</p>
</blockquote>

<p>Build a mental model of your learner&rsquo;s mental model to help direct your teaching.</p>

<p>Identify the mistakes and misunderstandings you had and guess/determine what your learners may encounter.</p>

<h4 id="simple-lesson-workflow-that-scales">Simple lesson workflow <em>that scales</em></h4>

<p>Think ; Pair ; Share</p>

<p>Learn to listen to your room. Look for the sound of engagement.</p>

<p>Never teach alone; management and feedback assimilation is much easier with more than one pair of eyes.</p>

<h4 id="setting-questions-tests-for-maximum-impact">Setting Questions &amp; Tests for Maximum Impact</h4>

<p>Good questions have diagnostic power in right <em>and</em> wrong answers.</p>

<p>Peer instruction relies on a really good question.</p>

<p>Test the mental model <strong>not</strong> mental knowledge.</p>

<h4 id="soliciting-and-using-feedback">Soliciting and Using Feedback&hellip;</h4>

<p>&hellip;is for students <em>and</em> teachers.</p>

<p>Improving outcomes demands a feedback loop.</p>

<p>Formative feedback is a good way to workout what to teach next.</p>

<h4 id="lesson-delivery">Lesson Delivery</h4>

<p><em>Jugyō kenkyū</em> - <a href="https://en.wikipedia.org/wiki/Lesson_study" target="_blank">lesson study</a></p>

<blockquote>
<p>Collaborative teaching with shared resources and experiences in small groups. Lessons are reviewed by other teachers and feedback is shared across the group leading to improvements in teaching practice.</p>
</blockquote>

<p>Content and delivery are almost independent processes. Good content != Good Delivery and <em>vice versa</em>.</p>

<p>Review both regularly to improve performance. The act of soliciting feedback ensures better feedback in future.</p>

<p>Video review is a good model to implement. Services like [Athena]() and <a href="http://www.beasmartercookie.com" target="_blank">Smarter Cookie</a> look particularly useful. Share videos with peers for performance feedback.</p>

<p>Every teacher has a different stage presence/personality. Who are you on stage? Normally, slightly louder and faster version of self, but not always the case.</p>

<h4 id="concept-map">Concept Map</h4>

<ul>
<li>What are the facts (nodes)?</li>
<li>What processes (arrows) link the facts (nodes) together into a concept?</li>
</ul>

<p>Reflection via <a href="http://cmap.ihmc.us/docs/theory-of-concept-maps" target="_blank">concept maps</a> creates connections and promotes reinforcement of the mental model.</p>

<p><em>Example of the concept map I drew for the patient pathway in clinical genetics</em></p>

<p><img src="/images/2015/12/2015-12-13 16.17.18.jpg" alt="clinical-genetics-concept-map" /></p>

<p>Getting learners to produce a concept map for a given teaching point is useful for gauging whether everyone is on the same page. They are also good for summative assessment (does your concept map match mine?).</p>

<p>NB: Good practice for refreshing memory before teaching.</p>

<h4 id="cognitive-load-theory">Cognitive load theory</h4>

<p>For any activity there is a constant conflict of relative vs extraneous load. If applied appropriately <a href="https://www.mindtools.com/pages/article/cognitive-load-theory.htm" target="_blank">cognitive load theory</a> means presenting information at a pace and at a level of complexity that the learner can fully understand.</p>

<p>The aim is to reduce/remove extraneous cognitive load. Extraneous cognitive loads are not relevant to the lesson and are therefore <strong>distracting</strong>.</p>

<h4 id="faded-examples">Faded Examples</h4>

<p><a href="http://www.learnlab.org/research/wiki/index.php/Does_learning_from_worked-out_examples_improve_tutored_problem_solving%3F" target="_blank">Faded examples</a> are a method of teaching a mental model using a fill in the gaps approach with repeated short problems. They are really good for programming tasks where the learner can work backwards from a complete example to writing the entire code themselves.</p>

<p>Simple steps for creating faded examples:</p>

<ol>
<li>Show all the steps to solve a problem.</li>
<li>Present a similar problem with a single step removed.</li>
<li>Present a similar problem with multiple steps removed.</li>
<li>Repeat until the problem solver is effectively creating an answer from scratch.</li>
</ol>

<p>Works best for well defined problems such as how to do something specific using code.</p>

<h4 id="reverse-instructional-design">Reverse Instructional Design</h4>

<ol>
<li>Write summative assessment

<ul>
<li>This is the knowledge and skills you are aiming to each.</li>
<li>What should learners know and be able to do after this lesson.</li>
</ul></li>
<li>Write formative assessments to gauge assimilation of knowledge and methods during the teaching.

<ul>
<li>Use these to direct the flow of your teaching.</li>
<li>Check you&rsquo;re hitting every part of that final assessment target and that learners are understanding each step.</li>
</ul></li>
<li>Lessons should plug the gaps between the formative and summative assessments.

<ul>
<li>Spend more time on ideas/concepts identified as weak in formative assessments.</li>
<li>What points of the curriculum do your learners already know? These can be taught lightly leaving more time for less well known/understood areas.</li>
</ul></li>
</ol>

<h2 id="mini-review">Mini Review</h2>

<p>The two days were extremely intense. I was shattered at the end of it all! But I did gain a lot and will be completing the process after Christmas. The speakers were all very friendly and approachable. They demonstrated the Software Carpentry ethos fully and I found it extremely inspiring. The location was fine (flat teaching room), it had plenty of power points for laptops, and coffee and lunch were provided. I did the computer bits on my iPad, which personally proved very slow and the etherpad didn&rsquo;t play very nicely. This is possibly because the tablet itself is old and slow, but using a proper laptop is something I&rsquo;d probably consider for future versions of the workshop.</p>
]]></content>
		</item>
		
		<item>
			<title>Extremely Chocolatey Flapjacks</title>
			<link>https://s-boardman.github.io/recipe/extremely-chocolatey-flapjacks/</link>
			<pubDate>Fri, 13 Nov 2015 00:00:00 +0000</pubDate>
			
			<guid>https://s-boardman.github.io/recipe/extremely-chocolatey-flapjacks/</guid>
			<description>The best flapjack I have ever eaten. I usually make a half quantity as it&amp;rsquo;s slightly less daunting to concoct.
Recipe Preparation Preheat your oven to 140 degrees (gas 3) and line a large deepish baking tray; 10x14 inches for the full recipe.
Ingredients Weigh out:
 700g of butter (yes, seven-hundred) 350g of soft brown sugar 350g of dark muscavado sugar 350g of oat flakes 550g of processed oats  Also make sure you have:</description>
			<content type="html"><![CDATA[

<p>The best flapjack I have ever eaten. I usually make a <strong>half quantity</strong> as it&rsquo;s slightly less daunting to concoct.</p>

<h3 id="recipe">Recipe</h3>

<h4 id="preparation">Preparation</h4>

<p>Preheat your oven to 140 degrees (gas 3) and line a large deepish baking tray; 10x14 inches for the full recipe.</p>

<h4 id="ingredients">Ingredients</h4>

<p>Weigh out:</p>

<ul>
<li>700g of butter (yes, seven-hundred)</li>
<li>350g of soft brown sugar</li>
<li>350g of dark muscavado sugar</li>
<li>350g of oat flakes</li>
<li>550g of processed oats</li>
</ul>

<p>Also make sure you have:</p>

<ul>
<li>12 tablespoons of cocoa powder</li>
<li>6 tablespoons of syrup</li>
<li>A selection of nuts and fruits (optional, but recommended).</li>
</ul>

<h4 id="method">Method</h4>

<ol>
<li><p>Melt the butter, sugar and golden syrup in a pan. Make sure the mixture doesn&rsquo;t boil.</p></li>

<li><p>Stir in about half of the oats and makes sure the mixture is thoroughly combined before adding the second half.</p></li>

<li><p>Take the pan off the heat and stir in 12 tablespoons of good quality cocoa powder.</p></li>

<li><p>Stir in the fruit and nuts at this point.</p></li>

<li><p>Spoon the mixture into your loved baking tray and flatten it so there are no peaks of mixture.</p></li>

<li><p>Lick the spoon and feel amazing.</p></li>

<li><p>Put the mixture on the top shelf of the oven and bake for about half an hour.</p></li>

<li><p>Leave to cool for 20 minutes and slice with a sharp knife whilst still in the tin.</p></li>

<li><p>Once completely cool lift the slabs out of the tin and place in the fridge overnight to firm up further.</p></li>

<li><p>Eat an edge piece and discover that you now want to eat every last one.</p></li>

<li><p>Go on a mammoth bike ride to justify scoffing the whole lot!</p></li>
</ol>

<p>Recipe from the lovely people at <a href="http://singletrackworld.com/2015/09/diy-trail-food-recipe-round-up/" target="_blank">Singletrack</a>.</p>
]]></content>
		</item>
		
	</channel>
</rss>
