<?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>The Bioinformatics Blog</title>
	<atom:link href="http://bioinformatics.whatheblog.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://bioinformatics.whatheblog.com</link>
	<description>One base pair at a time...</description>
	<lastBuildDate>Sun, 28 Mar 2010 16:51:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Handy One Liners (awk)</title>
		<link>http://bioinformatics.whatheblog.com/2010/03/handy-one-liners-awk/</link>
		<comments>http://bioinformatics.whatheblog.com/2010/03/handy-one-liners-awk/#comments</comments>
		<pubDate>Sun, 28 Mar 2010 16:47:01 +0000</pubDate>
		<dc:creator>Abbas</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[awk]]></category>

		<guid isPermaLink="false">http://bioinformatics.whatheblog.com/?p=44</guid>
		<description><![CDATA[Compiled by Eric Pement

Latest version of this file (in English) is usually at:
   http://www.pement.org/awk/awk1line.txt

This file will also be available in other languages:
   Chinese  - http://ximix.org/translation/awk1line_zh-CN.txt   

USAGE:

   Unix: awk '/pattern/ {print "$1"}'    # standard Unix shells
DOS/Win: awk '/pattern/ {print "$1"}'    # [...]]]></description>
			<content:encoded><![CDATA[<pre>Compiled by Eric Pement

Latest version of this file (in English) is usually at:
   http://www.pement.org/awk/awk1line.txt

This file will also be available in other languages:
   Chinese  - http://ximix.org/translation/awk1line_zh-CN.txt   

USAGE:

   Unix: awk '/pattern/ {print "$1"}'    # standard Unix shells
DOS/Win: awk '/pattern/ {print "$1"}'    # compiled with DJGPP, Cygwin
         awk "/pattern/ {print \"$1\"}"  # GnuWin32, UnxUtils, Mingw

Note that the DJGPP compilation (for DOS or Windows-32) permits an awk
script to follow Unix quoting syntax '/like/ {"this"}'. HOWEVER, if the
command interpreter is CMD.EXE or COMMAND.COM, single quotes will not
protect the redirection arrows (&lt;, &gt;) nor do they protect pipes (|).
These are special symbols which require "double quotes" to protect them
from interpretation as operating system directives. If the command
interpreter is bash, ksh or another Unix shell, then single and double
quotes will follow the standard Unix usage.

Users of MS-DOS or Microsoft Windows must remember that the percent
sign (%) is used to indicate environment variables, so this symbol must
be doubled (%%) to yield a single percent sign visible to awk.

If a script will not need to be quoted in Unix, DOS, or CMD, then I
normally omit the quote marks. If an example is peculiar to GNU awk,
the command 'gawk' will be used. Please notify me if you find errors or
new commands to add to this list (total length under 65 characters). I
usually try to put the shortest script first. To conserve space, I
normally use '1' instead of '{print}' to print each line. Either one
will work.

FILE SPACING:

 # double space a file
 awk '1;{print ""}'
 awk 'BEGIN{ORS="\n\n"};1'
<span id="more-44"></span>
 # double space a file which already has blank lines in it. Output file
 # should contain no more than one blank line between lines of text.
 # NOTE: On Unix systems, DOS lines which have only CRLF (\r\n) are
 # often treated as non-blank, and thus 'NF' alone will return TRUE.
 awk 'NF{print $0 "\n"}'

 # triple space a file
 awk '1;{print "\n"}'

NUMBERING AND CALCULATIONS:

 # precede each line by its line number FOR THAT FILE (left alignment).
 # Using a tab (\t) instead of space will preserve margins.
 awk '{print FNR "\t" $0}' files*

 # precede each line by its line number FOR ALL FILES TOGETHER, with tab.
 awk '{print NR "\t" $0}' files*

 # number each line of a file (number on left, right-aligned)
 # Double the percent signs if typing from the DOS command prompt.
 awk '{printf("%5d : %s\n", NR,$0)}'

 # number each line of file, but only print numbers if line is not blank
 # Remember caveats about Unix treatment of \r (mentioned above)
 awk 'NF{$0=++a " :" $0};1'
 awk '{print (NF? ++a " :" :"") $0}'

 # count lines (emulates "wc -l")
 awk 'END{print NR}'

 # print the sums of the fields of every line
 awk '{s=0; for (i=1; i&lt;=NF; i++) s=s+$i; print s}'

 # add all fields in all lines and print the sum
 awk '{for (i=1; i&lt;=NF; i++) s=s+$i}; END{print s}'

 # print every line after replacing each field with its absolute value
 awk '{for (i=1; i&lt;=NF; i++) if ($i &lt; 0) $i = -$i; print }'
 awk '{for (i=1; i&lt;=NF; i++) $i = ($i &lt; 0) ? -$i : $i; print }'

 # print the total number of fields ("words") in all lines
 awk '{ total = total + NF }; END {print total}' file

 # print the total number of lines that contain "Beth"
 awk '/Beth/{n++}; END {print n+0}' file

 # print the largest first field and the line that contains it
 # Intended for finding the longest string in field #1
 awk '$1 &gt; max {max=$1; maxline=$0}; END{ print max, maxline}'

 # print the number of fields in each line, followed by the line
 awk '{ print NF ":" $0 } '

 # print the last field of each line
 awk '{ print $NF }'

 # print the last field of the last line
 awk '{ field = $NF }; END{ print field }'

 # print every line with more than 4 fields
 awk 'NF &gt; 4'

 # print every line where the value of the last field is &gt; 4
 awk '$NF &gt; 4'

STRING CREATION:

 # create a string of a specific length (e.g., generate 513 spaces)
 awk 'BEGIN{while (a++&lt;513) s=s " "; print s}'

 # insert a string of specific length at a certain character position
 # Example: insert 49 spaces after column #6 of each input line.
 gawk --re-interval 'BEGIN{while(a++&lt;49)s=s " "};{sub(/^.{6}/,"&amp;" s)};1'

ARRAY CREATION:

 # These next 2 entries are not one-line scripts, but the technique
 # is so handy that it merits inclusion here.

 # create an array named "month", indexed by numbers, so that month[1]
 # is 'Jan', month[2] is 'Feb', month[3] is 'Mar' and so on.
 split("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec", month, " ")

 # create an array named "mdigit", indexed by strings, so that
 # mdigit["Jan"] is 1, mdigit["Feb"] is 2, etc. Requires "month" array
 for (i=1; i&lt;=12; i++) mdigit[month[i]] = i

TEXT CONVERSION AND SUBSTITUTION:

 # IN UNIX ENVIRONMENT: convert DOS newlines (CR/LF) to Unix format
 awk '{sub(/\r$/,"")};1'   # assumes EACH line ends with Ctrl-M

 # IN UNIX ENVIRONMENT: convert Unix newlines (LF) to DOS format
 awk '{sub(/$/,"\r")};1'

 # IN DOS ENVIRONMENT: convert Unix newlines (LF) to DOS format
 awk 1

 # IN DOS ENVIRONMENT: convert DOS newlines (CR/LF) to Unix format
 # Cannot be done with DOS versions of awk, other than gawk:
 gawk -v BINMODE="w" '1' infile &gt;outfile

 # Use "tr" instead.
 tr -d \r &lt;infile &gt;outfile            # GNU tr version 1.22 or higher

 # delete leading whitespace (spaces, tabs) from front of each line
 # aligns all text flush left
 awk '{sub(/^[ \t]+/, "")};1'

 # delete trailing whitespace (spaces, tabs) from end of each line
 awk '{sub(/[ \t]+$/, "")};1'

 # delete BOTH leading and trailing whitespace from each line
 awk '{gsub(/^[ \t]+|[ \t]+$/,"")};1'
 awk '{$1=$1};1'           # also removes extra space between fields

 # insert 5 blank spaces at beginning of each line (make page offset)
 awk '{sub(/^/, "     ")};1'

 # align all text flush right on a 79-column width
 awk '{printf "%79s\n", $0}' file*

 # center all text on a 79-character width
 awk '{l=length();s=int((79-l)/2); printf "%"(s+l)"s\n",$0}' file*

 # substitute (find and replace) "foo" with "bar" on each line
 awk '{sub(/foo/,"bar")}; 1'           # replace only 1st instance
 gawk '{$0=gensub(/foo/,"bar",4)}; 1'  # replace only 4th instance
 awk '{gsub(/foo/,"bar")}; 1'          # replace ALL instances in a line

 # substitute "foo" with "bar" ONLY for lines which contain "baz"
 awk '/baz/{gsub(/foo/, "bar")}; 1'

 # substitute "foo" with "bar" EXCEPT for lines which contain "baz"
 awk '!/baz/{gsub(/foo/, "bar")}; 1'

 # change "scarlet" or "ruby" or "puce" to "red"
 awk '{gsub(/scarlet|ruby|puce/, "red")}; 1'

 # reverse order of lines (emulates "tac")
 awk '{a[i++]=$0} END {for (j=i-1; j&gt;=0;) print a[j--] }' file*

 # if a line ends with a backslash, append the next line to it (fails if
 # there are multiple lines ending with backslash...)
 awk '/\\$/ {sub(/\\$/,""); getline t; print $0 t; next}; 1' file*

 # print and sort the login names of all users
 awk -F ":" '{print $1 | "sort" }' /etc/passwd

 # print the first 2 fields, in opposite order, of every line
 awk '{print $2, $1}' file

 # switch the first 2 fields of every line
 awk '{temp = $1; $1 = $2; $2 = temp}' file

 # print every line, deleting the second field of that line
 awk '{ $2 = ""; print }'

 # print in reverse order the fields of every line
 awk '{for (i=NF; i&gt;0; i--) printf("%s ",$i);print ""}' file

 # concatenate every 5 lines of input, using a comma separator
 # between fields
 awk 'ORS=NR%5?",":"\n"' file

SELECTIVE PRINTING OF CERTAIN LINES:

 # print first 10 lines of file (emulates behavior of "head")
 awk 'NR &lt; 11'

 # print first line of file (emulates "head -1")
 awk 'NR&gt;1{exit};1'

  # print the last 2 lines of a file (emulates "tail -2")
 awk '{y=x "\n" $0; x=$0};END{print y}'

 # print the last line of a file (emulates "tail -1")
 awk 'END{print}'

 # print only lines which match regular expression (emulates "grep")
 awk '/regex/'

 # print only lines which do NOT match regex (emulates "grep -v")
 awk '!/regex/'

 # print any line where field #5 is equal to "abc123"
 awk '$5 == "abc123"'

 # print only those lines where field #5 is NOT equal to "abc123"
 # This will also print lines which have less than 5 fields.
 awk '$5 != "abc123"'
 awk '!($5 == "abc123")'

 # matching a field against a regular expression
 awk '$7  ~ /^[a-f]/'    # print line if field #7 matches regex
 awk '$7 !~ /^[a-f]/'    # print line if field #7 does NOT match regex

 # print the line immediately before a regex, but not the line
 # containing the regex
 awk '/regex/{print x};{x=$0}'
 awk '/regex/{print (NR==1 ? "match on line 1" : x)};{x=$0}'

 # print the line immediately after a regex, but not the line
 # containing the regex
 awk '/regex/{getline;print}'

 # grep for AAA and BBB and CCC (in any order on the same line)
 awk '/AAA/ &amp;&amp; /BBB/ &amp;&amp; /CCC/'

 # grep for AAA and BBB and CCC (in that order)
 awk '/AAA.*BBB.*CCC/'

 # print only lines of 65 characters or longer
 awk 'length &gt; 64'

 # print only lines of less than 65 characters
 awk 'length &lt; 64'

 # print section of file from regular expression to end of file
 awk '/regex/,0'
 awk '/regex/,EOF'

 # print section of file based on line numbers (lines 8-12, inclusive)
 awk 'NR==8,NR==12'

 # print line number 52
 awk 'NR==52'
 awk 'NR==52 {print;exit}'          # more efficient on large files

 # print section of file between two regular expressions (inclusive)
 awk '/Iowa/,/Montana/'             # case sensitive

SELECTIVE DELETION OF CERTAIN LINES:

 # delete ALL blank lines from a file (same as "grep '.' ")
 awk NF
 awk '/./'

 # remove duplicate, consecutive lines (emulates "uniq")
 awk 'a !~ $0; {a=$0}'

 # remove duplicate, nonconsecutive lines
 awk '!a[$0]++'                     # most concise script
 awk '!($0 in a){a[$0];print}'      # most efficient script

CREDITS AND THANKS:

Special thanks to the late Peter S. Tillier (U.K.) for helping me with
the first release of this FAQ file, and to Daniel Jana, Yisu Dong, and
others for their suggestions and corrections.

For additional syntax instructions, including the way to apply editing
commands from a disk file instead of the command line, consult:

  "sed &amp; awk, 2nd Edition," by Dale Dougherty and Arnold Robbins
  (O'Reilly, 1997)

  "UNIX Text Processing," by Dale Dougherty and Tim O'Reilly (Hayden
  Books, 1987)

  "GAWK: Effective awk Programming," 3d edition, by Arnold D. Robbins
  (O'Reilly, 2003) or at http://www.gnu.org/software/gawk/manual/

To fully exploit the power of awk, one must understand "regular
expressions." For detailed discussion of regular expressions, see
"Mastering Regular Expressions, 3d edition" by Jeffrey Friedl (O'Reilly,
2006).

The info and manual ("man") pages on Unix systems may be helpful (try
"man awk", "man nawk", "man gawk", "man regexp", or the section on
regular expressions in "man ed").

USE OF '\t' IN awk SCRIPTS: For clarity in documentation, I have used
'\t' to indicate a tab character (0x09) in the scripts.  All versions of
awk should recognize this abbreviation.

#---end of file---</pre>
]]></content:encoded>
			<wfw:commentRss>http://bioinformatics.whatheblog.com/2010/03/handy-one-liners-awk/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Ggplot2 Tutelage</title>
		<link>http://bioinformatics.whatheblog.com/2010/03/ggplot2-tutelage/</link>
		<comments>http://bioinformatics.whatheblog.com/2010/03/ggplot2-tutelage/#comments</comments>
		<pubDate>Sat, 27 Mar 2010 19:12:52 +0000</pubDate>
		<dc:creator>Abbas</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[ggplot2]]></category>
		<category><![CDATA[R]]></category>

		<guid isPermaLink="false">http://bioinformatics.whatheblog.com/?p=40</guid>
		<description><![CDATA[For those interested in some ggplot2 tutelage, Hadley Wickham (the creator of ggplot2) recently posted a 2 hour short course on data visualization with R (via ggplot2).
A blog post describing it is here:
 http://blog.revolution-computing.com/2010/03/video-hadley-wickham-gives-a-short-course-on-graphics-with-r.html
The actual video is here:
 http://had.blip.tv/
The supposed slides (because you really can&#8217;t see the details all to well in the video) are [...]]]></description>
			<content:encoded><![CDATA[<p>For those interested in some ggplot2 tutelage, Hadley Wickham (the creator of ggplot2) recently posted a 2 hour short course on data visualization with R (via ggplot2).</p>
<p>A blog post describing it is here:<br />
<a href="http://blog.revolution-computing.com/2010/03/video-hadley-wickham-gives-a-short-course-on-graphics-with-r.html"> http://blog.revolution-computing.com/2010/03/video-hadley-wickham-gives-a-short-course-on-graphics-with-r.html</a></p>
<p>The actual video is here:<br />
<a href="http://had.blip.tv/"> http://had.blip.tv/</a></p>
<p>The supposed slides (because you really can&#8217;t see the details all to well in the video) are here:<br />
<a href="http://had.co.nz/rice-vis/"> http://had.co.nz/rice-vis/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://bioinformatics.whatheblog.com/2010/03/ggplot2-tutelage/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Metagenomics Resources</title>
		<link>http://bioinformatics.whatheblog.com/2009/10/metagenomics-resources/</link>
		<comments>http://bioinformatics.whatheblog.com/2009/10/metagenomics-resources/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 05:37:10 +0000</pubDate>
		<dc:creator>Abbas</dc:creator>
				<category><![CDATA[Science]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[genome. microbiome]]></category>
		<category><![CDATA[metagenomics]]></category>

		<guid isPermaLink="false">http://bioinformatics.whatheblog.com/?p=39</guid>
		<description><![CDATA[
MEGAN MEtaGenome ANalyzer. A stand-alone metagenome analysis tool.
Metagenomics and Our Microbial Planet A website on metagenomics and the vital role of microbes on Earth from the National Academies.
The New Science of Metagenomics: Revealing the Secrets of Our Microbial Planet A report released by the National Research Council in March 2007. Also, see the Report In [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li><a class="external text" rel="nofollow" href="http://www-ab.informatik.uni-tuebingen.de/software/megan/">MEGAN</a> MEtaGenome ANalyzer. A stand-alone metagenome analysis tool.</li>
<li><a class="external text" rel="nofollow" href="http://dels.nas.edu/metagenomics/">Metagenomics and Our Microbial Planet</a> A website on metagenomics and the vital role of microbes on Earth from the <a class="external text" rel="nofollow" href="http://nationalacademies.org/">National Academies.</a></li>
<li><a class="external text" rel="nofollow" href="http://books.nap.edu/catalog.php?record_id=11902">The New Science of Metagenomics: Revealing the Secrets of Our Microbial Planet</a> A report released by the National Research Council in March 2007. Also, see the <a class="external text" rel="nofollow" href="http://dels.nas.edu/dels/rpt_briefs/metagenomics_brief_final.pdf">Report In Brief.</a></li>
<li><a class="external text" rel="nofollow" href="http://img.jgi.doe.gov/m">IMG/M</a> The Integrated Microbial Genomes system, for metagenome analysis by the DOE-JGI.</li>
<li><a class="external text" rel="nofollow" href="http://camera.calit2.net/index.php">CAMERA</a> Cyberinfrastructure for Metagenomics, data repository and tools for metagenomics research.</li>
<li><a class="external text" rel="nofollow" href="http://www.scq.ubc.ca/?p=509">A good overview of metagenomics from the Science Creative Quarterly</a></li>
<li><a class="external text" rel="nofollow" href="http://www.genomesonline.org/gold.cgi?want=Metagenomes">list of Metagenome Projects from genomesonline.org</a></li>
<li><a class="external text" rel="nofollow" href="http://metagenomics.nmpdr.org/">MG-RAST</a> publicly available, free, metagenomics annotation pipeline and repository for pyrosequences, Sanger sequences, and other sequence approaches.</li>
<li><a class="mw-redirect" title="Human microbiome project" href="http://en.wikipedia.org/wiki/Human_microbiome_project">Human microbiome project</a></li>
<li><a class="external text" rel="nofollow" href="http://www.metahit.eu/">MetaHIT</a> official website for the EU-funded project : Metagenomics of the Human Intestinal Tract</li>
<li><a class="external text" rel="nofollow" href="http://annotathon.univ-mrs.fr/">Annotathon</a> Bioinformatics Training Through Metagenomic Sequence Annotation</li>
<li><a class="external text" rel="nofollow" href="http://www.highveld.com/pages/metagenomics.html">Metagenomics</a> Metagenomics research and applications</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://bioinformatics.whatheblog.com/2009/10/metagenomics-resources/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Next Gen. Sequencing</title>
		<link>http://bioinformatics.whatheblog.com/2009/10/next-gen-sequencing/</link>
		<comments>http://bioinformatics.whatheblog.com/2009/10/next-gen-sequencing/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 18:50:32 +0000</pubDate>
		<dc:creator>Abbas</dc:creator>
				<category><![CDATA[Science]]></category>
		<category><![CDATA[nextgen]]></category>
		<category><![CDATA[videos]]></category>

		<guid isPermaLink="false">http://bioinformatics.whatheblog.com/?p=38</guid>
		<description><![CDATA[With IBM tossing it&#8217;s hat into the ring of &#8220;next-next-generation&#8221; sequencing, I&#8217;m starting to get lost as to which generation is which. For the moment, I&#8217;m sort of lumping things together, while I wait to see how the field plays out. In my mind, first generation is anything that requires chain termination, Second generation is [...]]]></description>
			<content:encoded><![CDATA[<p>With IBM tossing it&#8217;s hat into the ring of &#8220;next-next-generation&#8221; sequencing, I&#8217;m starting to get lost as to which generation is which. For the moment, I&#8217;m sort of lumping things together, while I wait to see how the field plays out. In my mind, first generation is anything that requires chain termination, Second generation is chemical based pyrosequencing, and third generation is single molecule sequencing based on a nano-scale mechanical process. It&#8217;s a crude divide, but it seems to have some consistency.</p>
<p>At any rate, I decided I&#8217;d collect a few videos to illustrate each one. For Sanger, there are a LOT of videos, many of which are quite excellent, but I only wanted one. (Sorry if I didn&#8217;t pick yours.) For second and third generation DNA sequencing videos, the selection kind of flattens out, and two of them come from corporate sites, rather than youtube &#8211; which seems to be the general consensus repository of technology videos.</p>
<p>Personally, I find it interesting to see how each group is selling themselves. You&#8217;ll notice some videos press heavily on the technology, while others focus on the workflow.</p>
<p>As an aside, I also find it interesting to look for places where the illustrations don&#8217;t make sense&#8230; there&#8217;s a lovely place in the 454 video where two strands of DNA split from each other on the bead, leaving the two full strands and a complete primer sequence&#8230; mysterious! (Yes, I do enjoy looking for inconsistencies when I go to the movies.)</p>
<p>Ok, get out your popcorn.</p>
<p><span style="font-weight: bold;">First Generation:</span><br />
Sanger Entry: <a href="http://www.youtube.com/watch?v=oYpllbI0qF8">Link</a><br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/oYpllbI0qF8&amp;hl=en&amp;fs=1&amp;" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/oYpllbI0qF8&amp;hl=en&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><span style="font-weight: bold;">Second Generation:</span><br />
Pyrosequencing Entry: <a href="http://www.youtube.com/watch?v=nFfgWGFe0aA">Link</a><br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/nFfgWGFe0aA&amp;hl=en&amp;fs=1&amp;" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/nFfgWGFe0aA&amp;hl=en&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><span id="more-38"></span></p>
<p>Helicose Entry: <a href="http://www.youtube.com/watch?v=TboL7wODBj4">Link</a><br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="426" height="259" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/TboL7wODBj4&amp;hl=en&amp;fs=1&amp;" /><embed type="application/x-shockwave-flash" width="426" height="259" src="http://www.youtube.com/v/TboL7wODBj4&amp;hl=en&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Illumina (Corporate site): <a href="http://www.illumina.com/downloads/GASequencingVid/illumina_sequencing_hi.swf">Link</a><br />
(<a href="http://www.illumina.com/downloads/GASequencingVid/illumina_sequencing_hi.swf">Click to see the Flash animation</a>)</p>
<p>454 Entry: <a href="http://www.youtube.com/watch?v=bFNjxKHP8Jc">Link</a><br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/bFNjxKHP8Jc&amp;hl=en&amp;fs=1&amp;" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/bFNjxKHP8Jc&amp;hl=en&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><span style="font-weight: bold;">Third Generation:</span></p>
<p>Pacific Biosciences: <a href="http://www.pacificbiosciences.com/video_lg.html">Link</a><br />
(<a href="http://www.pacificbiosciences.com/video_lg.html">Click to see the Flash Video</a>)</p>
<p>Oxford Nanopore Entry: <a href="http://www.youtube.com/watch?v=HbjAMJehSlg">Link</a><br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="419" height="255" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/HbjAMJehSlg&amp;hl=en&amp;fs=1&amp;" /><embed type="application/x-shockwave-flash" width="419" height="255" src="http://www.youtube.com/v/HbjAMJehSlg&amp;hl=en&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>IBM&#8217;s Entry: <a href="http://www.youtube.com/watch?v=wvclP3GySUY">Link</a><br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/wvclP3GySUY&amp;hl=en&amp;fs=1&amp;" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/wvclP3GySUY&amp;hl=en&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Note: If I&#8217;ve missed something, please let me know.  I&#8217;m happy to add to this post whenever something new comes up.</p>
<p class="blogger-labels">Labels: <a rel="tag" href="http://www.fejes.ca/labels/Sequencing.html">Sequencing</a>, <a rel="tag" href="http://www.fejes.ca/labels/SMRT.html">SMRT</a>, <a rel="tag" href="http://www.fejes.ca/labels/Solexa__Illumina.html">Solexa/Illumina</a></p>
]]></content:encoded>
			<wfw:commentRss>http://bioinformatics.whatheblog.com/2009/10/next-gen-sequencing/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>NYTimes on Probiotics</title>
		<link>http://bioinformatics.whatheblog.com/2009/10/nytimes-on-probiotics/</link>
		<comments>http://bioinformatics.whatheblog.com/2009/10/nytimes-on-probiotics/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 05:12:03 +0000</pubDate>
		<dc:creator>Abbas</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Science]]></category>
		<category><![CDATA[probiotics]]></category>

		<guid isPermaLink="false">http://bioinformatics.whatheblog.com/?p=37</guid>
		<description><![CDATA[There was an article on probiotics in the New York Times today. By Tara Parker-Pope it addresses some important issues rarely covered in the press about probiotics (see Well &#8211; Probiotics &#8211; Looking Underneath the Yogurt Label &#8211; NYTimes.com).
On the one hand, the article does a decent job of pointing out that there is great [...]]]></description>
			<content:encoded><![CDATA[<p>There was an article on probiotics in the New York Times today. By Tara Parker-Pope it addresses some important issues rarely covered in the press about probiotics (see <a href="http://www.nytimes.com/2009/09/29/health/29well.html?_r=1">Well &#8211; Probiotics &#8211; Looking Underneath the Yogurt Label &#8211; NYTimes.com).</a></p>
<p>On the one hand, the article does a decent job of pointing out that there is great strain to strain variation among microbes labelled as probiotics. In this regard there is a great quote by Gregor Reid:</p>
<blockquote><p>Lactobacillus is just the bacterium,” said Gregor Reid, director of the Canadian Research and Development Center for Probiotics. “To say a product contains Lactobacillus is like saying you’re bringing <a title="More articles about George Clooney" href="http://topics.nytimes.com/top/reference/timestopics/people/c/george_clooney/index.html?inline=nyt-per">George Clooney</a> to a party. It may be the actor, or it may be an 85-year-old guy from Atlanta who just happens to be named George Clooney. With probiotics, there are strain-to-strain differences.”</p></blockquote>
<blockquote><p><span id="more-37"></span></p></blockquote>
<p>Personally I think the article did a poor job of discussing one of the real complexities of probiotics (and actually any drug) in that seems to suggest that particular strains are going to be useful for certain ailments or not. In reality, the human gut is a horribly complex place, and the effectiveness of particular strains is no doubt going to depend on health status, history, other microbes being present, gender, age, genetics, and much much more. Thus it would have been good to include some more discussion of just how complex the interaction between probiotics and &#8220;health&#8221; is likely to be.</p>
<p>Interestingly, the article suggests:</p>
<blockquote><p>Consumers interested in probiotics should look for products that list the specific strain on the label and offer readers easy access to scientific studies supporting the claims. A good place to find studies on various probiotic strains is the Web site <a href="http://www.pubmed.gov/" target="_">www.PubMed.gov</a>.</p></blockquote>
<p>On the one hand, I am very happy that the Times is suggesting consumers look up information in Pubmed, a great resource. On the other hand, much of the published work on probiotics is still hidden from consumers being the veil of corporate and society publishing practices. Perhaps the Times author had access to all these articles. But the consumer right now does not. Too bad the Times missed a chance to discuss this important component of getting consumers involved in making their own health decisions.</p>
]]></content:encoded>
			<wfw:commentRss>http://bioinformatics.whatheblog.com/2009/10/nytimes-on-probiotics/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New Look at Cancer Biology</title>
		<link>http://bioinformatics.whatheblog.com/2009/10/new-look-at-cancer-biology/</link>
		<comments>http://bioinformatics.whatheblog.com/2009/10/new-look-at-cancer-biology/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 05:08:07 +0000</pubDate>
		<dc:creator>Abbas</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Science]]></category>
		<category><![CDATA[cancer]]></category>
		<category><![CDATA[watson]]></category>

		<guid isPermaLink="false">http://bioinformatics.whatheblog.com/?p=36</guid>
		<description><![CDATA[Sure, James Watson has been known, especially recently, to say some outrageous things. But here is something I think everyone, scientists and the public should read &#8211; an opinoin piece in the NY Times today by Watson ( Op-Ed Contributor &#8211; To Fight Cancer, Know the Enemy &#8211; NYTimes.com)
This piece is worth reading because it [...]]]></description>
			<content:encoded><![CDATA[<p>Sure, James Watson has been known, especially recently, to say some outrageous things. But here is something I think everyone, scientists and the public should read &#8211; an opinoin piece in the NY Times today by Watson ( <a href="http://www.nytimes.com/2009/08/06/opinion/06watson.html?_r=2">Op-Ed Contributor &#8211; To Fight Cancer, Know the Enemy &#8211; NYTimes.com)</a></p>
<p>This piece is worth reading because it contains some critical ideas and wisdom which has been missing in discussions of the fight against cancer.</p>
<p>First, Watson discusses the critical importance of basic science and says that when he expressed this importance to the National Cancer Institute advisory board many years ago, he was eventually booted off.</p>
<p>Second, he discusses how we have only recently begun to understand the basic biology of cancer (he also mentions how the human genome project has helped in this). The genome project will, he says, allow for the determination of most/all of the major genetic changes that occur in cancer cells.</p>
<p><span id="more-36"></span></p>
<p>Third, he discusses some limitations of the FDA drug approval process that limit the ability to test combinations of drugs which Watson believes will be needed in the fight against cancer.</p>
<p>Fourth he suggests that the National Cancer Institute should help support small biotech companies in the development of new drugs since venture capital has dried up for such endeavors.</p>
<p>As usual, Watson would not be Watson if he did not say something potentially controversial. In this, the most controversial thing is probably how he discusses that the National Cancer Institute has become a &#8220;a largely rudderless ship in dire need of a bold captain who will settle only for total victory. &#8221; Now, I do not have any opinion about this since I have not followed NCI or its leadership. But it is certainly worth considering Watson&#8217;s opinion here.</p>
<p>In the end, Watson says the time is now to reinvigorate the &#8220;War on Cancer.&#8221; Despite misgivings about many things he has been up to recently, I found myself agreeing with almost everything he said in this piece. Again, definitely worth a read.</p>
]]></content:encoded>
			<wfw:commentRss>http://bioinformatics.whatheblog.com/2009/10/new-look-at-cancer-biology/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Pervasive Effects of an Antibiotic on the Gut</title>
		<link>http://bioinformatics.whatheblog.com/2009/10/the-pervasive-effects-of-an-antibiotic-on-the-human-gut-microbiota/</link>
		<comments>http://bioinformatics.whatheblog.com/2009/10/the-pervasive-effects-of-an-antibiotic-on-the-human-gut-microbiota/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 21:45:02 +0000</pubDate>
		<dc:creator>Abbas</dc:creator>
				<category><![CDATA[Science]]></category>
		<category><![CDATA[metagenomics]]></category>
		<category><![CDATA[microbiome]]></category>

		<guid isPermaLink="false">http://bioinformatics.whatheblog.com/?p=35</guid>
		<description><![CDATA[The Pervasive Effects of an Antibiotic on the Human Gut Microbiota, as Revealed by Deep 16S rRNA Sequencing
Dethlefsen L, Huse S, Sogin ML, Relman DA
PLoS Biology Vol. 6, No. 11, e280 doi:10.1371/journal.pbio.0060280

A paper in PLOS Biology from the Relman lab investigates the effect of a treatment with the antibiotic ciprofloxacin on the bacteria in the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://biology.plosjournals.org/perlserv/?request=get-document&amp;doi=10.1371%2Fjournal.pbio.0060280&amp;ct=1&amp;SESSID=dd86d748dd6a153ff711b9ea44203c7f">The Pervasive Effects of an Antibiotic on the Human Gut Microbiota, as Revealed by Deep 16S rRNA Sequencing</a></p>
<div>Dethlefsen L, Huse S, Sogin ML, Relman DA<br />
PLoS Biology Vol. 6, No. 11, e280 doi:10.1371/journal.pbio.0060280</div>
<div></div>
<div>A paper in PLOS Biology from the Relman lab investigates the effect of a treatment with the antibiotic ciprofloxacin on the bacteria in the intestine. They collected over 7,000 full-length 16S rDNA sequences (1100-1400 bp) by Sanger sequencing and over 900,000 reads (~250 bp) from 454 sequencing of the V3 and the V6 regions.</div>
<div></div>
<div>There are many important results in this paper, but it is particularly relevant that 454 sequencing reveals more taxonomic variation with greater stability than traditional sequencing. In my own work, I have found that sequence variants that occur only once in the experiment cannot be used to differentiate samples. Deep sequencing reveals more taxa, and also reduces the frequency of singletons. A rare sequence variant (OTU) that occurs only once in the ~7000 full-length sequences occurs about 65 times in the 454 data set, providing more than enough &#8220;probability of detection&#8221; to be used for comparisons between samples.</div>
<div>&#8220;This set of 7,208 sequences is among the largest datasets of full-length 16S rRNA sequences from the human microbiota (or any environment), the rarefaction curves for V6 and V3 tag pyrosequencing eventually rise higher and display more curvature toward the horizontal than the OTU0.01 curve. These features show that a single run of the [454] FLX sequencer targeting V6 or V3 tags from the human gut microbiota can reveal more taxa, and capture a larger proportion of the detectable taxa, than a more extensive effort directed toward full-length 16S rRNA clone sequencing.&#8221;</div>
]]></content:encoded>
			<wfw:commentRss>http://bioinformatics.whatheblog.com/2009/10/the-pervasive-effects-of-an-antibiotic-on-the-human-gut-microbiota/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Converting between Unix and Windows text files?</title>
		<link>http://bioinformatics.whatheblog.com/2009/04/how-do-i-convert-between-unix-and-windows-text-files/</link>
		<comments>http://bioinformatics.whatheblog.com/2009/04/how-do-i-convert-between-unix-and-windows-text-files/#comments</comments>
		<pubDate>Sat, 11 Apr 2009 22:09:48 +0000</pubDate>
		<dc:creator>Abbas</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[converting]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[newline]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://bioinformatics.whatheblog.com/?p=34</guid>
		<description><![CDATA[The format of Windows and Unix text files differs slightly. In Windows, lines end with both the line feed and carriage return ASCII characters, but Unix uses only a line feed.  As a consequence, some Windows applications will not show the line breaks in Unix-format files.  Likewise, Unix programs may display the carriage [...]]]></description>
			<content:encoded><![CDATA[<p>The format of Windows and <a href="http://kb.iu.edu/data/agat.html">Unix</a> text files differs slightly. In Windows, lines end with both the line feed and carriage return <a href="http://kb.iu.edu/data/afht.html">ASCII</a> characters, but Unix uses only a line feed.  As a consequence, some Windows applications will not show the line breaks in Unix-format files.  Likewise, Unix programs may display the carriage returns in Windows text files with <code>Ctrl-m</code> (<code> ^M </code>) characters at the end of each line.</p>
<p>There are many ways to solve this problem. This document provides instructions for using <a href="http://kb.iu.edu/data/aerg.html">FTP</a>, screen capture, <a href="http://kb.iu.edu/data/acux.html">unix2dos</a> and <a href="http://kb.iu.edu/data/acux.html">dos2unix</a>, <code>tr</code>, <a href="http://kb.iu.edu/data/afja.html">awk</a>, <a href="http://kb.iu.edu/data/afhp.html">Perl</a>, and <a href="http://kb.iu.edu/data/adxz.html">vi</a> to do the conversion.  Before you use these utilities, the files you are converting must first be on a Unix computer.</p>
<p><strong>Note:</strong> In the instructions below, replace <code>unixfile.txt</code> with the name of the Unix file you are transferring, and replace <code>winfile.txt</code> with the name of the Windows file you are transferring.</p>
<h3>FTP</h3>
<p>When using an FTP program to move a text file between Unix and Windows, be sure the file is transferred in <a href="http://kb.iu.edu/data/afht.html">ASCII</a> format. This will ensure that the document is transformed into a text format appropriate for the host.  Some FTP programs, especially graphical applications like Hummingbird FTP, do this automatically.  If you are using FTP from the command line, however, before you begin the file transfer, be sure to enter at the FTP prompt:</p>
<p><span class="example"> ascii</span></p>
<p><strong>Note:</strong> You need to use a client that supports secure FTP to transfer files to and from Indiana University&#8217;s central systems. For more, see <a href="http://kb.iu.edu/data/ahjh.html">At IU, what SSH/SFTP clients are supported and where can I get them?</a></p>
<h3>Screen capture</h3>
<p>You can also convert files from Unix to Windows format when transferring them to a PC with a communications program by selecting ASCII text download.  Select this option with your communications program to capture all the text subsequently displayed to your screen, and then enter at the Unix prompt:</p>
<p><span class="example"> cat unixfile.txt</span></p>
<p>Most communications programs will add carriage returns to the stream of text as they save it to your computer&#8217;s hard drive.  Once the file has finished displaying, abort the text download.</p>
<p><strong>Note:</strong> This method may be slow for large text files. Also, no error checking is performed on the file as it is transferred.</p>
<h3><code>dos2unix</code> and <code>unix2dos</code></h3>
<p>On systems using <a href="http://kb.iu.edu/data/agjq.html">Solaris</a>, the utilities <code>dos2unix</code> and <code>unix2dos</code> are available.  These utilities provide a straightforward method for converting files from the Unix command line.</p>
<p>To use either command, simply type the command followed by the name of the file you wish to convert, and the name of a file which will contain the converted results.  Thus, to convert a Windows file to a Unix file, at the Unix prompt, enter:</p>
<p><span class="example"> dos2unix winfile.txt unixfile.txt</span></p>
<p><span id="more-34"></span></p>
<p>To convert a Unix file to Windows, enter:</p>
<p><span class="example"> unix2dos unixfile.txt winfile.txt</span></p>
<p><strong>Note:</strong> These utilities are available only on Solaris systems.  To determine what variety of Unix is running on your computer, see <a href="http://kb.iu.edu/data/aaya.html">In Unix, how can I display information about the operating system?</a></p>
<h3><code>tr</code></h3>
<p>You can use <code>tr</code> to remove all carriage returns and <code>Ctrl-z</code> (<code> ^Z </code>) characters from a Windows file by entering:</p>
<p><span class="example"> tr -d &#8216;\15\32&#8242; &lt; winfile.txt &gt; unixfile.txt</span></p>
<p>You cannot use <code>tr</code> to convert a document from Unix format to Windows.</p>
<h3><code>awk</code></h3>
<p>To use <a href="http://kb.iu.edu/data/afja.html">awk</a> to convert a Windows file to Unix, at the Unix prompt, enter:</p>
<p><span class="example"> awk &#8216;{ sub(&#8221;\r$&#8221;, &#8220;&#8221;); print }&#8217; winfile.txt &gt; unixfile.txt</span></p>
<p>To convert a Unix file to Windows using <code>awk</code>, at the command line, enter:</p>
<p><span class="example"> awk &#8217;sub(&#8221;$&#8221;, &#8220;\r&#8221;)&#8217; unixfile.txt &gt; winfile.txt</span></p>
<p>On some systems, the version of <code>awk</code> may be old and not include the function <code>sub</code>.  If so, try the same command, but with <code>gawk</code> or <code>nawk</code> replacing <code>awk</code>.</p>
<h3>Perl</h3>
<p>To convert a Windows text file to a Unix text file using <a href="http://kb.iu.edu/data/afhp.html">Perl</a>, at the Unix <a href="http://kb.iu.edu/data/agvf.html">shell</a> prompt, enter:</p>
<p><span class="example"> perl -p -e &#8217;s/\r$//&#8217; &lt; winfile.txt &gt; unixfile.txt</span></p>
<p>To convert from a Unix text file to a Windows text file with Perl, at the Unix shell prompt, enter:</p>
<p><span class="example"> perl -p -e &#8217;s/\n/\r\n/&#8217; &lt; unixfile.txt &gt; winfile.txt</span></p>
<p>You must use single quotation marks in either command line.  This prevents your shell from trying to evaluate anything inside.  Perl is installed on all <a href="http://kb.iu.edu/data/ahaw.html">UITS</a> shared central Unix systems.</p>
<h3>vi</h3>
<p>In <a href="http://kb.iu.edu/data/adxz.html">vi</a>, you can remove the carriage return ( <code>^M</code> ) characters with the following command:</p>
<p><span class="example"> :1,$s/^M//g</span></p>
<p><strong>Note:</strong> To input the <code>^M</code> character, press <code>Ctrl-v </code>, then press <code>Enter</code> or <code>return</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://bioinformatics.whatheblog.com/2009/04/how-do-i-convert-between-unix-and-windows-text-files/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Linux: Who&#8217;s on the server???</title>
		<link>http://bioinformatics.whatheblog.com/2009/03/linux-whos-on-the-server/</link>
		<comments>http://bioinformatics.whatheblog.com/2009/03/linux-whos-on-the-server/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 15:19:16 +0000</pubDate>
		<dc:creator>Eli Roberson</dc:creator>
				<category><![CDATA[Science]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[analysis]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://bioinformatics.whatheblog.com/?p=33</guid>
		<description><![CDATA[Linux? You geeks use Linux?
If you work in science, and you work on big datasets (such as analyzing next generation sequencing data), chances are that you use Linux for some of your work. I frequent several of our lab&#8217;s Red Hat servers for data analysis and code development purposes. However, these aren&#8217;t just my servers [...]]]></description>
			<content:encoded><![CDATA[<h2>Linux? You geeks use Linux?</h2>
<p>If you work in science, and you work on big datasets (such as <a href="2009/02/next-gen-tools/">analyzing</a> <a href="solid.appliedbiosystems.com">next</a> <a href="http://www.454.com">generation</a> <a href="http://www.illumina.com/pages.ilmn?ID=203">sequencing</a> data), chances are that you use <a href="http://en.wikipedia.org/wiki/Linux">Linux</a> for some of your work. I frequent several of our lab&#8217;s Red Hat servers for data analysis and code development purposes. However, these aren&#8217;t just my servers to use. Other lab members and, depending on the server, IT staff use them too. I try to remember to check and see who is on and what they&#8217;re running before getting too involved with something that&#8217;s going to hog memory or processor time. But, of course, I don&#8217;t always remember.</p>
<p>I decided to automate this process to take the remembering part out. By adding in a shell script + some code in my profile file, my ssh login immediately displays relevant information without having to invoke it manually.</p>
<h2>Shell Script</h2>
<p>The code is based on the Bash shell, so it may our may not apply to your ssh login. I keep the shell script in my /home/user directory with the name &#8220;.greeting.sh&#8221;. Adding the leading period just makes it invisible to standard &#8220;ls&#8221; queries so it doesn&#8217;t add to the clutter in my home directory. The code for the &#8220;.greeting.sh&#8221; follows between the lines of # signs:</p>
<p>##################################################<br />
#!/bin/bash</p>
<p>UNAME=`whoami`<br />
TIME=`date`<br />
HOST=`hostname`<br />
UCNT=`users | wc -w`<br />
ULST=`users`<br />
PROC=`ps aux|awk &#8216;NR &gt; 0 { s +=$3 }; END {printf(&#8221;%d\n&#8221;, s + 0.5);}&#8217;`<br />
MPCT=`free | grep Mem | awk &#8216;{printf(&#8221;%d\n&#8221;, $3 / $2 * 100 + 0.5);}&#8217;`<br />
MYSHELL=`echo $SHELL`</p>
<p>echo<br />
echo &#8220;$TIME&#8221;<br />
echo &#8220;Shell: $MYSHELL&#8221;<br />
echo &#8220;Hello $UNAME! Welcome to $HOST!&#8221;</p>
<p>if [ $UCNT -ge 2 ]<br />
then<br />
echo &#8220;$UCNT users are currently logged into $HOST:&#8221;<br />
echo &#8220;$ULST&#8221;<br />
else<br />
echo &#8220;No other users currently logged in.&#8221;<br />
fi</p>
<p>echo &#8220;System Status:&#8221;</p>
<p>if [ $PROC -ge 80 ]<br />
then<br />
echo &#8220;High processor usage at ${PROC}%&#8221;<br />
elif [ $PROC -ge 50 ]<br />
then<br />
echo &#8220;Medium processor usage at ${PROC}%&#8221;<br />
else<br />
echo &#8220;Low processor usage at ${PROC}%&#8221;<br />
fi</p>
<p>if [ $MPCT -ge 80 ]<br />
then<br />
echo &#8220;High memory usage at ${MPCT}%&#8221;<br />
elif [ $MPCT -ge 50 ]<br />
then<br />
echo &#8220;Medium memory usage at ${MPCT}%&#8221;<br />
else<br />
echo &#8220;Low memory usage at ${MPCT}%&#8221;<br />
fi</p>
<p>echo</p>
<p>exit 0<br />
##################################################</p>
<p>For example, the code above prints the following when logging in: The date, a greeting, the hostname, my current shell, whether other users are logged in (and the list of users if others are on), and information about current processor and memory usage. I customize this script depending on the primary use of the server. If you have a server that should always be running a certain program, add a line that looks for that program. If it were called &#8220;myprogram&#8221; you could add the following line to the program:</p>
<p>PROG=`ps aux | grep -v grep | grep myprogram | wc -l`</p>
<p>If the program is running, then it will return 1 (if only one instance is running), or 0 if it isn&#8217;t running. By adding in some language later testing if $PROG -ge 1, a message could print saying the program was running or not.</p>
<p>Take note! Don&#8217;t forget to alter the permissions on the script to allow execution, using something like &#8220;chmod +x .greeting.sh&#8221;. Also note that the variables are defined using backticks (same key as the ~ on standard US QWERTY keyboards), not single quotes.</p>
<h2>Automatically running</h2>
<p>The script isn&#8217;t much use if you have to run it manually (if I remembered to do that, why would I need a script?), so I like to set the script to run automatically immediately following an ssh login. As I said before, I use Bash on most of the Linux servers I use. For this shell, there is a file called &#8220;.bash_profile&#8221; in the home directory of each user. This profile file is executed on every ssh connection to set some common environment variables, like PATH. By adding in code to run the greeting script, the output from the script will be displayed immediately after login. Example code to add to the bottom of your profile file:</p>
<p>##################################################<br />
if [ -e "/home/user/.greeting.sh" ]<br />
then<br />
/home/user/.greeting.sh<br />
fi<br />
##################################################</p>
<p>That&#8217;s all there is to it. A simple, but powerfull script to automatically give you information on server login. Feel free to your system and purpose.</p>
]]></content:encoded>
			<wfw:commentRss>http://bioinformatics.whatheblog.com/2009/03/linux-whos-on-the-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Craig Venter: On the verge of creating synthetic life</title>
		<link>http://bioinformatics.whatheblog.com/2009/02/craig-venter-on-the-verge-of-creating-synthetic-life/</link>
		<comments>http://bioinformatics.whatheblog.com/2009/02/craig-venter-on-the-verge-of-creating-synthetic-life/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 08:25:29 +0000</pubDate>
		<dc:creator>Abbas</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Science]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[synthetic]]></category>
		<category><![CDATA[venter]]></category>

		<guid isPermaLink="false">http://bioinformatics.whatheblog.com/?p=32</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/nKZ-GjSaqgo&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/nKZ-GjSaqgo&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://bioinformatics.whatheblog.com/2009/02/craig-venter-on-the-verge-of-creating-synthetic-life/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
