<?xml version='1.0'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:atom="http://www.w3.org/2005/Atom" >
<channel>
	<title><![CDATA[BOL: Related items]]></title>
	<link>https://bioinformaticsonline.com/related/19792?offset=710</link>
	<atom:link href="https://bioinformaticsonline.com/related/19792?offset=710" rel="self" type="application/rss+xml" />
	<description><![CDATA[]]></description>
	
	<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/pages/view/35176/perloneliner-for-bioinformatician</guid>
	<pubDate>Mon, 15 Jan 2018 04:57:40 -0600</pubDate>
	<link>https://bioinformaticsonline.com/pages/view/35176/perloneliner-for-bioinformatician</link>
	<title><![CDATA[PerlOneLiner for Bioinformatician]]></title>
	<description><![CDATA[<p>FILE SPACING<br />------------</p><p># Double space a file<br />perl -pe '$\="\n"'<br />perl -pe 'BEGIN { $\="\n" }'<br />perl -pe '$_ .= "\n"'<br />perl -pe 's/$/\n/'<br />perl -nE 'say'</p><p># Double space a file, except the blank lines<br />perl -pe '$_ .= "\n" unless /^$/'<br />perl -pe '$_ .= "\n" if /\S/'</p><p># Triple space a file<br />perl -pe '$\="\n\n"'<br />perl -pe '$_.="\n\n"'</p><p># N-space a file<br />perl -pe '$_.="\n"x7'</p><p># Add a blank line before every line<br />perl -pe 's//\n/'</p><p># Remove all blank lines<br />perl -ne 'print unless /^$/'<br />perl -lne 'print if length'<br />perl -ne 'print if /\S/'</p><p># Remove all consecutive blank lines, leaving just one<br />perl -00 -pe ''<br />perl -00pe0</p><p># Compress/expand all blank lines into N consecutive ones<br />perl -00 -pe '$_.="\n"x4'</p><p># Fold a file so that every set of 10 lines becomes one tab-separated line<br />perl -lpe '$\ = $. % 10 ? "\t" : "\n"'</p><p><br />LINE NUMBERING<br />--------------</p><p># Number all lines in a file<br />perl -pe '$_ = "$. $_"'</p><p># Number only non-empty lines in a file<br />perl -pe '$_ = ++$a." $_" if /./'</p><p># Number and print only non-empty lines in a file (drop empty lines)<br />perl -ne 'print ++$a." $_" if /./'</p><p># Number all lines but print line numbers only non-empty lines<br />perl -pe '$_ = "$. $_" if /./'</p><p># Number only lines that match a pattern, print others unmodified<br />perl -pe '$_ = ++$a." $_" if /regex/'</p><p># Number and print only lines that match a pattern<br />perl -ne 'print ++$a." $_" if /regex/'</p><p># Number all lines, but print line numbers only for lines that match a pattern<br />perl -pe '$_ = "$. $_" if /regex/'</p><p># Number all lines in a file using a custom format (emulate cat -n)<br />perl -ne 'printf "%-5d %s", $., $_'</p><p># Print the total number of lines in a file (emulate wc -l)<br />perl -lne 'END { print $. }'<br />perl -le 'print $n=()=&lt;&gt;'<br />perl -le 'print scalar(()=&lt;&gt;)'<br />perl -le 'print scalar(@foo=&lt;&gt;)'<br />perl -ne '}{print $.'<br />perl -nE '}{say $.'</p><p># Print the number of non-empty lines in a file<br />perl -le 'print scalar(grep{/./}&lt;&gt;)'<br />perl -le 'print ~~grep{/./}&lt;&gt;'<br />perl -le 'print~~grep/./,&lt;&gt;'<br />perl -E 'say~~grep/./,&lt;&gt;'</p><p># Print the number of empty lines in a file<br />perl -lne '$a++ if /^$/; END {print $a+0}'<br />perl -le 'print scalar(grep{/^$/}&lt;&gt;)'<br />perl -le 'print ~~grep{/^$/}&lt;&gt;'<br />perl -E 'say~~grep{/^$/}&lt;&gt;'</p><p># Print the number of lines in a file that match a pattern (emulate grep -c)<br />perl -lne '$a++ if /regex/; END {print $a+0}'<br />perl -nE '$a++ if /regex/; END {say $a+0}'</p><p><br />CALCULATIONS<br />------------</p><p># Check if a number is a prime<br />perl -lne '(1x$_) !~ /^1?$|^(11+?)\1+$/ &amp;&amp; print "$_ is prime"'</p><p># Print the sum of all the fields on a line<br />perl -MList::Util=sum -alne 'print sum @F'</p><p># Print the sum of all the fields on all lines<br />perl -MList::Util=sum -alne 'push @S,@F; END { print sum @S }'<br />perl -MList::Util=sum -alne '$s += sum @F; END { print $s }'</p><p># Shuffle all fields on a line<br />perl -MList::Util=shuffle -alne 'print "@{[shuffle @F]}"'<br />perl -MList::Util=shuffle -alne 'print join " ", shuffle @F'</p><p># Find the minimum element on a line<br />perl -MList::Util=min -alne 'print min @F'</p><p># Find the minimum element over all the lines<br />perl -MList::Util=min -alne '@M = (@M, @F); END { print min @M }'<br />perl -MList::Util=min -alne '$min = min @F; $rmin = $min unless defined $rmin &amp;&amp; $min &gt; $rmin; END { print $rmin }'</p><p># Find the maximum element on a line<br />perl -MList::Util=max -alne 'print max @F'</p><p># Find the maximum element over all the lines<br />perl -MList::Util=max -alne '@M = (@M, @F); END { print max @M }'</p><p># Replace each field with its absolute value<br />perl -alne 'print "@{[map { abs } @F]}"'</p><p># Find the total number of fields (words) on each line<br />perl -alne 'print scalar @F'</p><p># Print the total number of fields (words) on each line followed by the line<br />perl -alne 'print scalar @F, " $_"'</p><p># Find the total number of fields (words) on all lines<br />perl -alne '$t += @F; END { print $t}'</p><p># Print the total number of fields that match a pattern<br />perl -alne 'map { /regex/ &amp;&amp; $t++ } @F; END { print $t }'<br />perl -alne '$t += /regex/ for @F; END { print $t }'<br />perl -alne '$t += grep /regex/, @F; END { print $t }'</p><p># Print the total number of lines that match a pattern<br />perl -lne '/regex/ &amp;&amp; $t++; END { print $t }'</p><p># Print the number PI to n decimal places<br />perl -Mbignum=bpi -le 'print bpi(n)'</p><p># Print the number PI to 39 decimal places<br />perl -Mbignum=PI -le 'print PI'</p><p># Print the number E to n decimal places<br />perl -Mbignum=bexp -le 'print bexp(1,n+1)'</p><p># Print the number E to 39 decimal places<br />perl -Mbignum=e -le 'print e'</p><p># Print UNIX time (seconds since Jan 1, 1970, 00:00:00 UTC)<br />perl -le 'print time'</p><p># Print GMT (Greenwich Mean Time) and local computer time<br />perl -le 'print scalar gmtime'<br />perl -le 'print scalar localtime'</p><p># Print local computer time in H:M:S format<br />perl -le 'print join ":", (localtime)[2,1,0]'</p><p># Print yesterday's date<br />perl -MPOSIX -le '@now = localtime; $now[3] -= 1; print scalar localtime mktime @now'</p><p># Print date 14 months, 9 days and 7 seconds ago<br />perl -MPOSIX -le '@now = localtime; $now[0] -= 7; $now[4] -= 14; $now[7] -= 9; print scalar localtime mktime @now'</p><p># Prepend timestamps to stdout (GMT, localtime)<br />tail -f logfile | perl -ne 'print scalar gmtime," ",$_'<br />tail -f logfile | perl -ne 'print scalar localtime," ",$_'</p><p># Calculate factorial of 5<br />perl -MMath::BigInt -le 'print Math::BigInt-&gt;new(5)-&gt;bfac()'<br />perl -le '$f = 1; $f *= $_ for 1..5; print $f'</p><p># Calculate greatest common divisor (GCM)<br />perl -MMath::BigInt=bgcd -le 'print bgcd(@list_of_numbers)'</p><p># Calculate GCM of numbers 20 and 35 using Euclid's algorithm<br />perl -le '$n = 20; $m = 35; ($m,$n) = ($n,$m%$n) while $n; print $m'</p><p># Calculate least common multiple (LCM) of numbers 35, 20 and 8<br />perl -MMath::BigInt=blcm -le 'print blcm(35,20,8)'</p><p># Calculate LCM of 20 and 35 using Euclid's formula: n*m/gcd(n,m)<br />perl -le '$a = $n = 20; $b = $m = 35; ($m,$n) = ($n,$m%$n) while $n; print $a*$b/$m'</p><p># Generate 10 random numbers between 5 and 15 (excluding 15)<br />perl -le '$n=10; $min=5; $max=15; $, = " "; print map { int(rand($max-$min))+$min } 1..$n'</p><p># Find and print all permutations of a list<br />perl -MAlgorithm::Permute -le '$l = [1,2,3,4,5]; $p = Algorithm::Permute-&gt;new($l); print @r while @r = $p-&gt;next'</p><p># Generate the power set<br />perl -MList::PowerSet=powerset -le '@l = (1,2,3,4,5); for (@{powerset(@l)}) { print "@$_" }'</p><p># Convert an IP address to unsigned integer<br />perl -le '$i=3; $u += ($_&lt;&lt;8*$i--) for "127.0.0.1" =~ /(\d+)/g; print $u'<br />perl -le '$ip="127.0.0.1"; $ip =~ s/(\d+)\.?/sprintf("%02x", $1)/ge; print hex($ip)'<br />perl -le 'print unpack("N", 127.0.0.1)'<br />perl -MSocket -le 'print unpack("N", inet_aton("127.0.0.1"))'</p><p># Convert an unsigned integer to an IP address<br />perl -MSocket -le 'print inet_ntoa(pack("N", 2130706433))'<br />perl -le '$ip = 2130706433; print join ".", map { (($ip&gt;&gt;8*($_))&amp;0xFF) } reverse 0..3'<br />perl -le '$ip = 2130706433; $, = "."; print map { (($ip&gt;&gt;8*($_))&amp;0xFF) } reverse 0..3'</p><p><br />STRING CREATION AND ARRAY CREATION<br />----------------------------------</p><p># Generate and print the alphabet<br />perl -le 'print a..z'<br />perl -le 'print ("a".."z")'<br />perl -le '$, = ","; print ("a".."z")'<br />perl -le 'print join ",", ("a".."z")'</p><p># Generate and print all the strings from "a" to "zz"<br />perl -le 'print ("a".."zz")'<br />perl -le 'print "aa".."zz"'</p><p># Create a hex lookup table<br />@hex = (0..9, "a".."f")</p><p># Convert a decimal number to hex using @hex lookup table<br />perl -le '$num = 255; @hex = (0..9, "a".."f"); while ($num) { $s = $hex[($num%16)&amp;15].$s; $num = int $num/16 } print $s'<br />perl -le '$hex = sprintf("%x", 255); print $hex'<br />perl -le '$num = "ff"; print hex $num'</p><p># Generate a random 8 character password<br />perl -le 'print map { ("a".."z")[rand 26] } 1..8'<br />perl -le 'print map { ("a".."z", 0..9)[rand 36] } 1..8'</p><p># Create a string of specific length<br />perl -le 'print "a"x50'</p><p># Create a repeated list of elements<br />perl -le '@list = (1,2)x20; print "@list"'</p><p># Create an array from a string<br />@months = split ' ', "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec"<br />@months = qw/Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec/</p><p># Create a string from an array<br />@stuff = ("hello", 0..9, "world"); $string = join '-', @stuff</p><p># Find the numeric values for characters in the string<br />perl -le 'print join ", ", map { ord } split //, "hello world"'</p><p># Convert a list of numeric ASCII values into a string<br />perl -le '@ascii = (99, 111, 100, 105, 110, 103); print pack("C*", @ascii)'<br />perl -le '@ascii = (99, 111, 100, 105, 110, 103); print map { chr } @ascii'</p><p># Generate an array with odd numbers from 1 to 100<br />perl -le '@odd = grep {$_ % 2 == 1} 1..100; print "@odd"'<br />perl -le '@odd = grep { $_ &amp; 1 } 1..100; print "@odd"'</p><p># Generate an array with even numbers from 1 to 100<br />perl -le '@even = grep {$_ % 2 == 0} 1..100; print "@even"'</p><p># Find the length of the string<br />perl -le 'print length "one-liners are great"'</p><p># Find the number of elements in an array<br />perl -le '@array = ("a".."z"); print scalar @array'<br />perl -le '@array = ("a".."z"); print $#array + 1'</p><p><br />TEXT CONVERSION AND SUBSTITUTION<br />--------------------------------</p><p># ROT13 a string<br />'y/A-Za-z/N-ZA-Mn-za-m/'</p><p># ROT 13 a file<br />perl -lpe 'y/A-Za-z/N-ZA-Mn-za-m/' file</p><p># Base64 encode a string<br />perl -MMIME::Base64 -e 'print encode_base64("string")'<br />perl -MMIME::Base64 -0777 -ne 'print encode_base64($_)' file</p><p># Base64 decode a string<br />perl -MMIME::Base64 -le 'print decode_base64("base64string")'<br />perl -MMIME::Base64 -ne 'print decode_base64($_)' file</p><p># URL-escape a string<br />perl -MURI::Escape -le 'print uri_escape($string)'</p><p># URL-unescape a string<br />perl -MURI::Escape -le 'print uri_unescape($string)'</p><p># HTML-encode a string<br />perl -MHTML::Entities -le 'print encode_entities($string)'</p><p># HTML-decode a string<br />perl -MHTML::Entities -le 'print decode_entities($string)'</p><p># Convert all text to uppercase<br />perl -nle 'print uc'<br />perl -ple '$_=uc'<br />perl -nle 'print "\U$_"'</p><p># Convert all text to lowercase<br />perl -nle 'print lc'<br />perl -ple '$_=lc'<br />perl -nle 'print "\L$_"'</p><p># Uppercase only the first word of each line<br />perl -nle 'print ucfirst lc'<br />perl -nle 'print "\u\L$_"'</p><p># Invert the letter case<br />perl -ple 'y/A-Za-z/a-zA-Z/'</p><p># Camel case each line<br />perl -ple 's/(\w+)/\u$1/g'<br />perl -ple 's/(?&lt;!['])(\w+)/\u\1/g'</p><p># Strip leading whitespace (spaces, tabs) from the beginning of each line<br />perl -ple 's/^[ \t]+//'<br />perl -ple 's/^\s+//'</p><p># Strip trailing whitespace (space, tabs) from the end of each line<br />perl -ple 's/[ \t]+$//'</p><p># Strip whitespace from the beginning and end of each line<br />perl -ple 's/^[ \t]+|[ \t]+$//g'</p><p># Convert UNIX newlines to DOS/Windows newlines<br />perl -pe 's|\n|\r\n|'</p><p># Convert DOS/Windows newlines to UNIX newlines<br />perl -pe 's|\r\n|\n|'</p><p># Convert UNIX newlines to Mac newlines<br />perl -pe 's|\n|\r|'</p><p># Substitute (find and replace) "foo" with "bar" on each line<br />perl -pe 's/foo/bar/'</p><p># Substitute (find and replace) all "foo"s with "bar" on each line<br />perl -pe 's/foo/bar/g'</p><p># Substitute (find and replace) "foo" with "bar" on lines that match "baz"<br />perl -pe '/baz/ &amp;&amp; s/foo/bar/'</p><p># Binary patch a file (find and replace a given array of bytes as hex numbers)<br />perl -pi -e 's/\x89\xD8\x48\x8B/\x90\x90\x48\x8B/g' file</p><p><br />SELECTIVE PRINTING AND DELETING OF CERTAIN LINES<br />------------------------------------------------</p><p># Print the first line of a file (emulate head -1)<br />perl -ne 'print; exit'</p><p># Print the first 10 lines of a file (emulate head -10)<br />perl -ne 'print if $. &lt;= 10'<br />perl -ne '$. &lt;= 10 &amp;&amp; print'<br />perl -ne 'print if 1..10'</p><p># Print the last line of a file (emulate tail -1)<br />perl -ne '$last = $_; END { print $last }'<br />perl -ne 'print if eof'</p><p># Print the last 10 lines of a file (emulate tail -10)<br />perl -ne 'push @a, $_; @a = @a[@a-10..$#a]; END { print @a }'</p><p># Print only lines that match a regular expression<br />perl -ne '/regex/ &amp;&amp; print'</p><p># Print only lines that do not match a regular expression<br />perl -ne '!/regex/ &amp;&amp; print'</p><p># Print the line before a line that matches a regular expression<br />perl -ne '/regex/ &amp;&amp; $last &amp;&amp; print $last; $last = $_'</p><p># Print the line after a line that matches a regular expression<br />perl -ne 'if ($p) { print; $p = 0 } $p++ if /regex/'</p><p># Print lines that match regex AAA and regex BBB in any order<br />perl -ne '/AAA/ &amp;&amp; /BBB/ &amp;&amp; print'</p><p># Print lines that don't match match regexes AAA and BBB<br />perl -ne '!/AAA/ &amp;&amp; !/BBB/ &amp;&amp; print'</p><p># Print lines that match regex AAA followed by regex BBB followed by CCC<br />perl -ne '/AAA.*BBB.*CCC/ &amp;&amp; print'</p><p># Print lines that are 80 chars or longer<br />perl -ne 'print if length &gt;= 80'</p><p># Print lines that are less than 80 chars in length<br />perl -ne 'print if length &lt; 80'</p><p># Print only line 13<br />perl -ne '$. == 13 &amp;&amp; print &amp;&amp; exit'</p><p># Print all lines except line 27<br />perl -ne '$. != 27 &amp;&amp; print'<br />perl -ne 'print if $. != 27'</p><p># Print only lines 13, 19 and 67<br />perl -ne 'print if $. == 13 || $. == 19 || $. == 67'<br />perl -ne 'print if int($.) ~~ (13, 19, 67)'</p><p># Print all lines between two regexes (including lines that match regex)<br />perl -ne 'print if /regex1/../regex2/'</p><p># Print all lines from line 17 to line 30<br />perl -ne 'print if $. &gt;= 17 &amp;&amp; $. &lt;= 30'<br />perl -ne 'print if int($.) ~~ (17..30)'<br />perl -ne 'print if grep { $_ == $. } 17..30'</p><p># Print the longest line<br />perl -ne '$l = $_ if length($_) &gt; length($l); END { print $l }'</p><p># Print the shortest line<br />perl -ne '$s = $_ if $. == 1; $s = $_ if length($_) &lt; length($s); END { print $s }'</p><p># Print all lines that contain a number<br />perl -ne 'print if /\d/'</p><p># Find all lines that contain only a number<br />perl -ne 'print if /^\d+$/'</p><p># Print all lines that contain only characters<br />perl -ne 'print if /^[[:alpha:]]+$/</p><p># Print every second line<br />perl -ne 'print if $. % 2'</p><p># Print every second line, starting the second line<br />perl -ne 'print if $. % 2 == 0'</p><p># Print all lines that repeat<br />perl -ne 'print if ++$a{$_} == 2'</p><p># Print all unique lines<br />perl -ne 'print unless $a{$_}++'</p><p># Print the first field (word) of every line (emulate cut -f 1 -d ' ')<br />perl -alne 'print $F[0]'</p><p><br />HANDY REGULAR EXPRESSIONS<br />-------------------------</p><p># Match something that looks like an IP address<br />/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/<br />/^(\d{1,3}\.){3}\d{1,3}$/</p><p># Test if a number is in range 0-255<br />/^([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$/</p><p># Match an IP address<br />my $ip_part = qr|([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|;<br />if ($ip =~ /^($ip_part\.){3}$ip_part$/) {<br /> say "valid ip";<br />}</p><p># Check if the string looks like an email address<br />/\S+@\S+\.\S+/</p><p># Check if the string is a decimal number<br />/^\d+$/<br />/^[+-]?\d+$/<br />/^[+-]?\d+\.?\d*$/</p><p># Check if the string is a hexadecimal number<br />/^0x[0-9a-f]+$/i</p><p># Check if the string is an octal number<br />/^0[0-7]+$/</p><p># Check if the string is binary<br />/^[01]+$/</p><p># Check if a word appears twice in the string<br />/(word).*\1/</p><p># Increase all numbers by one in the string<br />$str =~ s/(\d+)/$1+1/ge</p><p># Extract HTTP User-Agent string from the HTTP headers<br />/^User-Agent: (.+)$/</p><p># Match printable ASCII characters<br />/[ -~]/</p><p># Match unprintable ASCII characters<br />/[^ -~]/</p><p># Match text between two HTML tags<br />m|&lt;strong&gt;([^&lt;]*)&lt;/strong&gt;|<br />m|&lt;strong&gt;(.*?)&lt;/strong&gt;|</p><p># Replace all &lt;b&gt; tags with &lt;strong&gt;<br />$html =~ s|&lt;(/)?b&gt;|&lt;$1strong&gt;|g</p><p># Extract all matches from a regular expression<br />my @matches = $text =~ /regex/g;</p><p><br />PERL TRICKS<br />-----------</p><p># Print the version of a Perl module<br />perl -MModule -le 'print $Module::VERSION'<br />perl -MLWP::UserAgent -le 'print $LWP::UserAgent::VERSION'</p>]]></description>
	<dc:creator>Shruti Paniwala</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/blog/view/42003/perl-one-liner-for-beginners</guid>
	<pubDate>Fri, 24 Jul 2020 05:58:28 -0500</pubDate>
	<link>https://bioinformaticsonline.com/blog/view/42003/perl-one-liner-for-beginners</link>
	<title><![CDATA[Perl one-liner for beginners !]]></title>
	<description><![CDATA[<p>I often use the following arguments to perl:</p><ul>
<li>-e Makes the line of code be executed instead of a script</li>
<li>-n Forces your line to be called in a loop. Allows you to take lines from the diamond operator (or stdin)</li>
<li>-p Forces your line to be called in a loop. Prints $_ at the end</li>
</ul><p>&nbsp;</p><ul>
<li>This counts the number of quotation marks in each line and prints it
<div>
<blockquote>
<div>perl -ne&nbsp;'$cnt = tr/"//;print "$cnt\n"'&nbsp;inputFileName.txt</div>
</blockquote>
</div>
</li>
</ul><ul>
<li>Adds string to each line, followed by tab
<div>
<blockquote>
<div>perl -pe&nbsp;'s/(.*)/string\t$1/'&nbsp;inFile &gt; outFile</div>
</blockquote>
</div>
</li>
</ul><ul>
<li>Append a new line to each line
<div>
<blockquote>
<div>perl -pe&nbsp;'s//\n/'&nbsp;all.sent.classOnly &gt; all.sent.classOnly.sep</div>
</blockquote>
</div>
</li>
</ul><ul>
<li>Replace all occurrences of pattern1 (e.g. [0-9]) with pattern2
<div>
<blockquote>
<div>perl -p -i.bak -w -e&nbsp;'s/pattern1/pattern2/g'&nbsp;inputFile</div>
</blockquote>
</div>
</li>
</ul><ul>
<li>Go through file and only print words that do not have any uppercase letters.
<div>
<blockquote>
<div>perl -ne&nbsp;'print unless m/[A-Z]/'&nbsp;allWords.txt &gt; allWordsOnlyLowercase.txt</div>
</blockquote>
</div>
</li>
</ul><ul>
<li>Go through file, split line at each space and print words one per line.
<div>
<blockquote>
<div>perl -ne&nbsp;'print join("\n", split(/ /,$_));print("\n")'&nbsp;someText.txt &gt; wordsPerLine.txt</div>
</blockquote>
</div>
</li>
</ul><ul>
<li>or in other words, delete every character that is not a letter, white space or line end (replace with nothing)
<div>
<blockquote>
<div>perl -pne&nbsp;'s/[^a-zA-Z\s]*//g'&nbsp;text_withSpecial.txt &gt; text_lettersOnly.txt</div>
</blockquote>
</div>
</li>
</ul><ul>
<li>
<div>
<div>perl -pne&nbsp;'tr/[A-Z]/[a-z]/'&nbsp;textWithUpperCase.txt &gt; textwithoutuppercase.txt;</div>
</div>
</li>
</ul><ul>
<li>Print only the second column of the data when using tabular as a separator
<div>
<blockquote>
<div>perl -ne&nbsp;'@F = split("\t", $_); print "$F[1]";'&nbsp;columnFileWithTabs.txt &gt; justSecondColumn.txt</div>
</blockquote>
</div>
</li>
</ul><ul>
<li>
<div>One-Liner: Sort lines by their length
<blockquote>
<div>perl -e&nbsp;'print sort {length $a &lt;=&gt; length $b} &lt;&gt;'&nbsp;textFile</div>
</blockquote>
</div>
</li>
</ul><ul>
<li>One-Liner: Print second column, unless it contains a number
<blockquote>
<div>perl"&gt;perl -lane&nbsp;'print $F[1] unless $F[1] =~ m/[0-9]/'&nbsp;wordCounts.txt</div>
</blockquote>
</li>
</ul>]]></description>
	<dc:creator>BioStar</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/blog/view/14011/dynamic-chromosome-breakpoints</guid>
	<pubDate>Wed, 13 Aug 2014 18:38:10 -0500</pubDate>
	<link>https://bioinformaticsonline.com/blog/view/14011/dynamic-chromosome-breakpoints</link>
	<title><![CDATA[Dynamic chromosome breakpoints !!!]]></title>
	<description><![CDATA[<p>Cell division involves the distribution of identical genetic material, DNA, to two daughters&rsquo; cells. During this process, duplicated deoxyribonucleic acid (DNA) goes through a condensation and decondensation process. This is followed by nuclear envelope dissolution, mitotic spindle assembly, migration of the sister chromatid pairs to the metaphase plate, division and segregation of identical sets of chromosomes into daughter nuclei and nuclear envelope reformation.</p><p>The vital metaphase stage of cell division, when the sister chromatids migrated to the centre and lined up in a row, and pulled apart using attached microtubules in such a way that half the DNA ends up in each daughter cell. However, before the mitotic spindle‐mediated movement gets start and pulled DNA apart, the chromosomes are free to undergo <strong>recombination </strong>which involves the exchange of genetic material either between multiple chromosomes or between different regions of the same chromosome.</p><p><img src="http://www.sciencelearn.org.nz/var/sciencelearn/storage/images/contexts/uniquely-me/sci-media/images/chromosomes-crossing-over/464438-1-eng-NZ/Chromosomes-crossing-over.jpg" alt="image" width="504" height="342" style="border: 0px; border: 0px;"></p><p>During recombination, the precise breakage of each strand, exchange between the strands, and sealing of the resulting recombined molecules happens. The &ldquo;<strong>chromosomal breakpoints</strong>&rdquo; refers to these places where they break. Mostly, this process occurs with a high degree of accuracy at high frequency in both eukaryotic and prokaryotic cells. But occasionally this &ldquo;break and sealing/ break and reattach&rdquo; process goes wrong and the reattachment happens in the wrong place which usually create disaster (with few exceptions).These chromosome disaster or abnormalities involve the gain, loss or rearrangement of visible amounts of genetic material during cell division. These abnormalities are of two type, the first one is numerical abnormalities &nbsp;where severe disorders are caused by the loss or gain of whole chromosomes, which affect the copy number of hundreds or even thousands of genes. The second are structural abnormalities which can be unbalanced or balanced. The former are similar to numerical abnormalities in that genetic material is either gained or lost. The natural defects in chromosome segregation are linked to cancer and several genetic diseases (http://en.wikipedia.org/wiki/List_of_genetic_disorders). Therefore, the enzymes involved in regulating cell division are still the attractive drug targets for many diseases.</p><p>&nbsp;</p><p>&nbsp;</p><p><img src="http://upload.wikimedia.org/wikipedia/commons/4/4a/Chromosomal_translocations.svg" alt="image" width="424" height="331" style="border: 0px; border: 0px;"></p><p>&nbsp;</p><p>Apart from certain chromosome abnormalities, these &ldquo;crossing over&rdquo; of segments of maternal and paternal chromosomes to form hybrid chromosomes have some evolutionary importance and considered as a driver of genetic variation. Moreover, the chromosome breakage in evolution is considered to be non-random in nature(http://www.ploscompbiol.org/article/info%3Adoi%2F10.1371%2Fjournal.pcbi.0020014). In addition the study of breakpoint regions and non-breakpoint (stable) regions of chromosomes indicates both the regions evolved in distinctly different ways ( http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2675965/). These breakage may lead to genetic diseases or participate to chromosomal rearranmgnets and contributed in development of new species.</p><p>I will try to explain the genome hotspots/Evolutionary Breakpoint Regions(EBRs)/fragile regions/weak fragments/&nbsp; in my next blog.</p><p><strong>Software for recombination detection:</strong></p><p><strong>RAT</strong> http://cbr.jic.ac.uk/dicks/software/RAT/</p><p><strong>Breakpointer</strong> https://github.com/ruping/Breakpointer</p><p><strong>DRP</strong> http://web.cbio.uct.ac.za/~darren/rdp.html</p><p><strong>RB-finder</strong> http://www.ncbi.nlm.nih.gov/pubmed/18707535</p><p><strong>LDhat2.0</strong> http://ldhat.sourceforge.net/LDhat2.0/instructions.shtml</p><p><strong>Reference:</strong></p><p>http://www.nature.com/scitable/topicpage/genetic-recombination-514#</p><p>Image: Wikipedia , sciencelearn.org.nz</p><p><strong>Recommended Articles:</strong></p><p>http://www.friendshipcircle.org/blog/2012/05/22/13-chromosomal-disorders-youve-never-heard-of/</p><p>http://web.udl.es/usuaris/e4650869/docencia/segoncicle/genclin98/recursos_classe_%28pdf%29/revisionsPDF/chromosyndromes.pdf</p><p>http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2775595/table/T2/</p><p>http://learn.genetics.utah.edu/content/disorders/chromosomal/</p><p>http://www.ncert.nic.in/html/learning_basket/biology/cc&amp;cd.pdf</p>]]></description>
	<dc:creator>Jitendra Narayan</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/bookmarks/view/17926/orange-bioinformatics-2534</guid>
	<pubDate>Mon, 06 Oct 2014 12:51:37 -0500</pubDate>
	<link>https://bioinformaticsonline.com/bookmarks/view/17926/orange-bioinformatics-2534</link>
	<title><![CDATA[Orange-Bioinformatics 2.5.34]]></title>
	<description><![CDATA[<p>Orange Bioinformatics extends <a href="http://orange.biolab.si/">Orange</a>, a data mining software package, with common functionality for bioinformatics. The provided functionality can be accessed as a Python library or through a visual programming interface (Orange Canvas). The latter is also suitable for non-programmers.</p>
<p>Orange Bioinformatics provides access to publicly available data, like GEO data sets, Biomart, GO, KEGG, Atlas, ArrayExpress, and PIPAx database. As for the analytics, there is gene selection, quality control, scoring distances between experiments with multiple factors. All features can be combined with powerful visualization, network exploration and data mining techniques from the Orange data mining framework.</p><p>Address of the bookmark: <a href="https://pypi.python.org/pypi/Orange-Bioinformatics/2.5.34" rel="nofollow">https://pypi.python.org/pypi/Orange-Bioinformatics/2.5.34</a></p>]]></description>
	<dc:creator>Robert M Willioms</dc:creator>
</item>

<item>
  <guid isPermaLink='true'>https://bioinformaticsonline.com/opportunity/view/18380/jrfsrf-at-university-of-hyderabad</guid>
  <pubDate>Fri, 17 Oct 2014 01:55:44 -0500</pubDate>
  <link></link>
  <title><![CDATA[JRF/SRF at University of Hyderabad]]></title>
  <description><![CDATA[
<p>Applications are invited for the following post of Junior Research Fellow (temporary position coterminous with the project) under DBT funded research project on ““Understanding the functions of α1β1γ1/α2β1γ1 selective AMPK Modulators in dissecting the pharmacological role of these isozymes in metabolic diseases”</p>

<p>Qualified and interested candidates can send their curriculum vitae by e-mail to hr@drils.org on or before 27th October 2014 mention in the subject line of the mail the following code: AMPK-Biology.</p>

<p>Selected candidates will be called for a personal interview to Dr. Reddy’s Institute of Life Sciences, University of Hyderabad Campus, Gachibowli, Hyderabad. The selected candidate is expected to report within two weeks from the date of selection to start work on the project.</p>

<p>Junior Research Fellowship (Molecular Modeling/Biology) for two years and Senior Research fellowship for one year</p>

<p>Junior Research Fellowship: Rs. 15,600/- (consolidated) per month for first two years.<br />Senior Research Fellowship: Rs. 18,200/-(consolidated) per month for the 3rd year.</p>

<p>Duration: The duration of the fellowship is for three years. However, the performance of the candidate will be reviewed after the completion of every year and the fellowship will be renewed only upon satisfactory performance.</p>

<p>Responsibilities:</p>

<p>1) Literature search.<br />2) Design, plan and execute experiments under the supervision of the scientist.<br />3) Provide scientific support to the scientist in his/her research activities.<br />4) Book keeping and maintenance of stocks and consumables.</p>

<p>Essential Qualifications:</p>

<p>Required: M.Sc. in Microbiology/Biotechnology/Bioinformatics or any other related branch of basic Sciences from a recognized university/institute with a consistent academic record of minimum 60% aggregate in all qualifying examinations. The candidate should be NET qualified for lectureship. The candidate should be motivated to work with dedication.</p>

<p>Desirable: expertise/experience in both Molecular Modeling and Molecular Biology.</p>

<p>Experience: 0-2 years in the areas of Molecular Modeling and/or Molecular Biology and cell biology and Biochemistry.</p>

<p>Preferable: Relevant research experience as evident from thesis/dissertation/project work.</p>

<p>Advertisement: http://www.ilsresearch.org/userfiles/Junior%20REsearch%20Fellowship%20-%20AMPK(Biology).pdf</p>
]]></description>
</item>

<item>
  <guid isPermaLink='true'>https://bioinformaticsonline.com/opportunity/view/18385/biinformamatics-lead-at-google-life-sciences</guid>
  <pubDate>Fri, 17 Oct 2014 02:24:55 -0500</pubDate>
  <link></link>
  <title><![CDATA[Biinformamatics Lead at Google Life Sciences]]></title>
  <description><![CDATA[
<p>Google Life Sciences is recruiting a technical lead with experience in bioinformatics and clinical bioinformatics, including for biomarker discovery projects such as the Baseline study.</p>

<p>Responsibilities</p>

<p>Lead teams of scientists in structuring, prototyping, and executing large-scale bioinformatic and other analysis.<br />Develop novel bioinformatics, statistical, data processing, pathway, data mining and other algorithms to identify biological signals and their clinical correlates in broad kinds of individual and population data.<br />Develop novel platform-level analytical tools for sequence-based assays (assembly, annotation, variant calling and interpretation, phasing, genome structure, etc.), expression assays (RNAseq and microarray), proteomics, and metabolomics.<br />Develop statistical models that robustly correlate complex laboratory-derived information with phenotypic and clinical information.<br />Create scientifically rigorous visualizations, communications, and presentations of results.</p>

<p>Reference @ https://www.google.com/about/careers/search#!t=jo&amp;jid=62095001</p>
]]></description>
</item>

<item>
  <guid isPermaLink='true'>https://bioinformaticsonline.com/opportunity/view/21471/opening-for-raextended-srf-in-bioinformatics-project-by-dbt-at-bose-institute</guid>
  <pubDate>Sun, 01 Mar 2015 00:50:18 -0600</pubDate>
  <link></link>
  <title><![CDATA[Opening for RA/extended SRF in Bioinformatics project by DBT at Bose Institute]]></title>
  <description><![CDATA[
<p>The institute has evolved over the years into a multi-disciplinary research organization with stress on fundamental research in its pursuit of advancement of knowledge in Science and technology and at the same time developing highly competent and able scientific manpower for the country. The institute has on its staff highly qualified and experienced scientists working in the field of Biological, biochemical, Chemical and Physical sciences placed in long established departments of Physics, Chemistry, Botany, Microbiology, Biochemistry, and Biophysics, and the research sections on plant Molecular &amp; Cellular Genetics, Animal Physiology, Immunotechnology and Environmental science</p>

<p>Walk-in-Interview will be held on 04th March 2015 at 11.30 A.M. in the Bio- Informatics Centre of Bose Institute, P-1/12, C.I.T. Scheme VII-M, Kolkata- 700054 for two (02) positions of Research Associate/ Extended Senior Research Fellow in the DBT sponsored following two projects running under the CoE- Bioinformatics under the guidance of Prof. Pinakpani Chakrabarti, Bioinformatics Centre.</p>

<p>Position : RA/SRF<br />Project title : 1. "Centre of Excellence (CoE) in Bioinformatics at Bose Institute”,2. Project entitled “Setting up of National Facility on Interactive Graphysics Computer System (IGCS) for Biomolecular Modeling, Molecular Dynamics &amp; Structures”</p>

<p>Desired Profile : Ph.D degree in Biological or Chemical Sciences with in-depth understanding of protein structure and dynamics for R.A. position.Those who have submitted thesis can be considered for Extended SRF position<br />Preferred : Knowledge of computer programming and bioinformatics softwares.<br />Stipend : For R.A- Rs. 22,000/- p.m., plus admissible H.R.A. and Medical benefit. For Extended SRF - Rs. 20,000/- p.m., plus admissible H.R.A.and Medical benefit.<br />Age : For R.A- Below 35 years; For Extended SRF - Below 33 years<br />Interested and eligible candidates should appear before the Selection Committee with atyped application addressed to the Sr.Prof. &amp; In-Charge, Registrar's Office, Bose Institute, P- 1/12, CIT Scheme VII-M, Kankurgachi, Kolkata-700054 along with Bio-data giving details of qualification i.e. examination passed, year, division, percentage of marks from Secondary onwards with attested copies of Certificates, Mark-Sheet and testimonials. The candidates should also bring the original mark-sheets, certificates etc. at the time of Interview.</p>

<p>Walk in Interview : 04.03.15</p>

<p>More at http://www.boseinst.ernet.in/ADVT/14/p_34.pdf</p>
]]></description>
</item>

<item>
  <guid isPermaLink='true'>https://bioinformaticsonline.com/opportunity/view/21619/research-associate-biotechnologyjrflab-assistant-indian-institute-of-vegetable-research-iivr-varanasi-uttar-pradesh</guid>
  <pubDate>Wed, 11 Mar 2015 08:59:27 -0500</pubDate>
  <link></link>
  <title><![CDATA[Research Associate Biotechnology/JRF/Lab. Assistant  Indian Institute of Vegetable Research (IIVR) - Varanasi, Uttar Pradesh]]></title>
  <description><![CDATA[
<p>F. No.: 2-19/2011-Adm.I </p>

<p>Research Associate Biotechnology /JRF / Lab. Assistant recruitment in Indian Institute of Vegetable Research </p>

<p>Project:<br />Genomics assisted selection of Solanum chilense introgression lines for enhancing drought tolerance in tomato <br />Post Name : Research Associate <br />Qualification : Ph.D in Biotechnology/ Bioinformatics/Genetics &amp; Plant Breeding. M. Tech in Computer Science with at least one research paper in science citation indexed journal. Desirable: Experience in bioinformatics and next generation sequence data handling. Familiarity in Linux, R, Perl/Phython or other programming languages. Willingness to travel to European partner centers. </p>

<p>Pay Scale : Rs. 36000 for 1st and 2nd year as per rules for Research Associate. Rs. 25000/- for 1st and 2nd year and Rs. 28000 as per rules for Junior Research Fellow. Rs. 7000/- for Lab. Assistant. </p>

<p>Age : Not more than 35 years for Men and 40 years for Women (Relaxable for SC/ST/OBC/PH candidates as per rules) for Research Associate/ Junior Research Fellow. Minimum age will be 21 years and maximum age will be 45 years (Relaxable for SC/ST/OBC/PH candidates as per rules) for Lab.Assistant.</p>

<p>More at http://iivr.org.in/Job%20Oppurtunities/RA20.03.2015.pdf</p>
]]></description>
</item>

<item>
  <guid isPermaLink='true'>https://bioinformaticsonline.com/researchlabs/view/22402/alessandra-carbone-lab</guid>
  <pubDate>Tue, 26 May 2015 08:54:34 -0500</pubDate>
  <link></link>
  <title><![CDATA[Alessandra Carbone Lab]]></title>
  <description><![CDATA[
<p>Our group works on various problems connected with the functioning and evolution of biological systems. We use mathematical tools, coming from statistics and combinatorics, algorithmic tools and molecular physics tools to study basic principles of cellular functioning starting from genomic data. We run several projects in parallel, all aiming at understanding the basic principles of evolution and co-evolution of molecular structures in the cell. They are intimately linked to each other.</p>

<p>Our main research themes are:</p>

<p>Domain annotation and metagenomics <br />Transcriptomics and sequence analysis<br />Protein evolution and interactions<br />Protein conformational dynamics</p>

<p>More at http://www.lcqb.upmc.fr/AnalGenom/home.html</p>
]]></description>
</item>

<item>
  <guid isPermaLink='true'>https://bioinformaticsonline.com/researchlabs/view/22414/x-shirley-liu-lab</guid>
  <pubDate>Tue, 26 May 2015 17:28:23 -0500</pubDate>
  <link></link>
  <title><![CDATA[X. Shirley Liu Lab]]></title>
  <description><![CDATA[
<p>The research in our laboratories are focused on the following three areas: </p>

<p>Bioinformatics<br />Cancer<br />Epigenetics</p>

<p>More at http://liulab.dfci.harvard.edu/</p>
]]></description>
</item>

</channel>
</rss>