<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Marios Braindump &#187; scripting</title>
	<atom:link href="http://www.mfasold.net/blog/tag/scripting/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mfasold.net/blog</link>
	<description>Just shouting my thoughts out</description>
	<lastBuildDate>Fri, 23 Jul 2010 14:21:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Project Organization Advice</title>
		<link>http://www.mfasold.net/blog/2010/06/project-organization-advice/</link>
		<comments>http://www.mfasold.net/blog/2010/06/project-organization-advice/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 19:41:14 +0000</pubDate>
		<dc:creator>Mario</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[research]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://www.mfasold.net/blog/?p=432</guid>
		<description><![CDATA[Have you ever had the problem of re-finding how you created this particular image or that specific result of your recent bioinformatics project? I did, and not only once.  In his article &#8220;A quick guide to organizing computational biology projects&#8220;, the distinguished scientist William S. Noble gives great advice on how to organize a research [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever had the problem of re-finding how you created this particular image or that specific result of your recent bioinformatics project? I did, and not only once.  In his article &#8220;<a href="http://www.ploscompbiol.org/article/info%3Adoi%2F10.1371%2Fjournal.pcbi.1000424">A quick guide to organizing computational biology projects</a>&#8220;, the distinguished scientist William S. Noble gives great advice on how to organize a research project practically. His key suggestions include:</p>
<ul>
<li>use a date-based directory structure for the experiments you perform</li>
<li>keep a lab-notebook containing documentation and code for each experiment (How about Org-mode?)</li>
<li>create generate scripts that work on original data and a general runner script for the complete experiment</li>
</ul>
<p>His work flow is applies mostly to *nix enviroments. One thing I&#8217;d like to add: Use symbolic links! Due to huge amounts of data and backup strategies, it might be impractical to have all the project&#8217;s data in a single directory. Create subdirectories of your data and result directories according to the naming convention and link them to other network drives using the &#8216;ln -s&#8217; command.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mfasold.net/blog/2010/06/project-organization-advice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working with a List of Tuples in Shell Scripting</title>
		<link>http://www.mfasold.net/blog/2009/10/working-with-a-list-of-tuples-in-shell-scripting/</link>
		<comments>http://www.mfasold.net/blog/2009/10/working-with-a-list-of-tuples-in-shell-scripting/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 13:08:17 +0000</pubDate>
		<dc:creator>Mario</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[commandline]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.mfasold.net/blog/?p=367</guid>
		<description><![CDATA[Several people have recently asked me whether or not it is possible to use tuples in their shell script. One example is running a program with a varying set of parameters. Since they often did not find a good solution, they began to formulate their problem in a higher-level scripting language like Ruby. Surprisingly, you [...]]]></description>
			<content:encoded><![CDATA[<p>Several people have recently asked me whether or not it is possible to use tuples in their shell script. One example is running a program with a varying set of parameters. Since they often did not find a good solution, they began to formulate their problem in a higher-level scripting language like Ruby. Surprisingly, you can accomplish the same task easily with simple shell scripting (supported by bash, zsh,..). Consider the following (semi-stupid) example</p>
<blockquote><p><code>#!/bin/bash<br />
paramset="foo.txt 1 --with-graphics<br />
bar.txt 8 --no-graphics<br />
flock.txt 4 --with-graphics"</code></p>
<p><code>echo "$du" | while read file p1 p2 ; do<br />
     ./myProgram $file -t $p1 --verbose $p2<br />
done</code></p></blockquote>
<p>We here run the program <code>myProgram</code> three times (for each line in the multi-line string). Every line contains three white-space separated values (words), to which we assign the variable names <code>file, p1, p2</code> in the loop header. Note that the last variable (in this case <code>p2</code>) always contains all remaining words of a given line if there are more words then variables.</p>
<p>The set of parameters can also be stored in a file. In that case, replace the loop header with <code>cat params.txt  | while read file p1 p2 ; do</code>. If the script is not working properly, examine the Input-Field-Separator (IFS) variable, which should be set to <code>IFS=" "</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mfasold.net/blog/2009/10/working-with-a-list-of-tuples-in-shell-scripting/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
