<?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/31976?offset=840</link>
	<atom:link href="https://bioinformaticsonline.com/related/31976?offset=840" 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/bookmarks/view/12944/orione-%E2%80%93-a-web-based-framework-for-ngs-analysis-in-microbiology</guid>
	<pubDate>Wed, 23 Jul 2014 06:43:03 -0500</pubDate>
	<link>https://bioinformaticsonline.com/bookmarks/view/12944/orione-%E2%80%93-a-web-based-framework-for-ngs-analysis-in-microbiology</link>
	<title><![CDATA[Orione – a web-based framework for NGS analysis in microbiology]]></title>
	<description><![CDATA[<p>End-to-end NGS microbiology data analysis requires a diversity of tools covering bacterial resequencing, de novo assembly, scaffolding, bacterial RNA-Seq, gene annotation and metagenomics. However, the construction of computational pipelines that use different software packages is difficult due to a lack of interoperability, reproducibility, and transparency. To overcome these limitations researchers at <a href="http://www.crs4.it/" target="_blank">CRS4</a>, Italy have developed Orione, a Galaxy-based framework consisting of publicly available research software and specifically designed pipelines to build complex, reproducible workflows for NGS microbiology data analysis. Enabling microbiology researchers to conduct their own custom analysis and data manipulation without software installation or programming, Orione provides new opportunities for data-intensive computational analyses in microbiology and metagenomics.</p>
<p>Reference</p>
<p>Cuccuru G1, Orsini M, Pinna A, Sbardellati A, Soranzo N, Travaglione A, Uva P, Zanetti G, Fotia G. (2014)<strong> Orione, a web-based framework for NGS analysis in microbiology.</strong> <em>Bioinformatics</em> [Epub ahead of print]. [<a href="http://bioinformatics.oxfordjournals.org/content/early/2014/03/10/bioinformatics.btu135.long" target="_blank">article</a>]</p><p>Address of the bookmark: <a href="http://orione.crs4.it/" rel="nofollow">http://orione.crs4.it/</a></p>]]></description>
	<dc:creator>Martin Jones</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/news/view/12883/breaking-chromosomes-to-study-cancer</guid>
	<pubDate>Fri, 18 Jul 2014 05:42:09 -0500</pubDate>
	<link>https://bioinformaticsonline.com/news/view/12883/breaking-chromosomes-to-study-cancer</link>
	<title><![CDATA[Breaking chromosomes to study cancer !!!]]></title>
	<description><![CDATA[<p>Chromosomes are present in every cell of our body and they contain the information the body needs to develop and function properly. This information is carried in genes that are arranged along the chromosomes. There are usually 46 chromosomes in every cell. These chromosomes come in pairs, one from our mother and one from our father. The chromosomes can be sorted into 23 pairs by looking at them down a microscope.</p><p>Most people who have a balanced translocation have the right amount of chromosome material but it has been rearranged in some way. This may happen if two chromosomes swap pieces (a reciprocal translocation). In other cases two whole chromosomes may become stuck together (a Robertsonian translocation). This page describes what happens when someone has a reciprocal translocation. <br /><br />Reciprocal chromosomal translocations occur following double-strand breaks (DSBs) in DNA when a section of one chromosome is exchanged with that of another, non-homologous chromosome. These exchanges may produce a dysfunctional fusion gene that disrupts cell growth and survival pathways, such as the translocations seen in leukemia and childhood sarcomas. <br /><br />Chromosomal translocations have been well studied in cancer cell lines which are associated with two types of cancer, acute myeloid leukemia and Ewing's sarcoma, but determining how they contribute to cancer development is complicated by additional mutations and altered gene expression profiles in these cultured cells. Now, Juan Carlos Ramirez, head of the Viral Vector Facility at the Fundacion Centro Nacional de Investigaciones Cardiovasculares (CNIC) and his colleagues Raul Torres at CNIC and Sandra Rodriguez-Peralez at the Spanish National Cancer Center (CNIO) in Madrid, Spain have used a new genome editing tool, CRISPR-Cas9, to induce chromosomal translocations for the first time in a human cell line and in primary cells. The study's authors conclude by stating that the use of this technology will allow for the clarification of how and why chromosomal translocation occurs, which without doubt will allow new anti-cancer therapeutic strategies to be tackled.</p><p>Using RNA-Guided Endonuclease (RGEN) technology or CRISPR/Cas9 genome engineering technology, CNIO and CNIC researchers have shown that it is possible to obtain such chromosomal translocations. The CRISPR-Cas9 system is extremely simple to introduce a cut at the desired locus, easier to design, and cheaper than many other systems. Using the CRISPR-Cas9 system, Ramirez and his colleagues reproduced the translocations observed in Ewing&rsquo;s Sarcoma (ES) and Acute Myeloid Leukemia (AML) patient cell lines in HEK293 cells and also generated the ES translocation in human mesenchymal stem cells and the AML translocation in umbilical cord blood cells.</p><p>By focusing on chromosomal translocation without the confounding characteristics of established cell lines, these new cells lines should help answer the fundamental question of what causes a cell to become cancerous. Ramirez and his team now look forward to modeling other chromosome translocations in a variety of cell types.</p><p>Reference:</p><p>http://en.wikipedia.org/wiki/Chromosomal_translocation</p><p>http://www.nature.com/ncomms/2014/140603/ncomms4964/abs/ncomms4964.html<br /><br /></p>]]></description>
	<dc:creator>Jit</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/bookmarks/view/4208/latest-paper-on-comparison-of-mapping-tools</guid>
	<pubDate>Tue, 03 Sep 2013 18:00:38 -0500</pubDate>
	<link>https://bioinformaticsonline.com/bookmarks/view/4208/latest-paper-on-comparison-of-mapping-tools</link>
	<title><![CDATA[Latest paper on comparison of mapping tools]]></title>
	<description><![CDATA[<p>A. Hatem, D. Bozdag, A. E. Toland, U. V. Catalyurek "Benchmarking short sequence mapping tools" BMC Bioinformatics, 14(1):184, 2013.</p>
<p>http://bmi.osu.edu/hpc/software/benchmark/</p>
<p><a href="http://bmi.osu.edu/hpc/software/pmap/pmap.html">http://bmi.osu.edu/hpc/software/pmap/pmap.html</a></p>
<p>Other similiar papers:</p>
<p><a href="http://online.liebertpub.com/doi/pdf/10.1089/cmb.2012.0022">http://online.liebertpub.com/doi/pdf/10.1089/cmb.2012.0022</a></p>
<p><a href="http://bioinformatics.oxfordjournals.org/content/28/24/3169">http://bioinformatics.oxfordjournals.org/content/28/24/3169</a></p>
<p>Some new Mapping tool links:<a href="http://bmi.osu.edu/hpc/software/benchmark/"></a></p>
<p><strong>GSNAP</strong></p>
<p><a href="http://research-pub.gene.com/gmap/"></a><a href="http://research-pub.gene.com/gmap/">http://research-pub.gene.com/gmap/</a></p>
<p><strong>RMAP</strong></p>
<p><a href="http://rulai.cshl.edu/rmap/"></a><a href="http://rulai.cshl.edu/rmap/">http://rulai.cshl.edu/rmap/</a></p>
<p><strong>mrsFAST</strong></p>
<p><a href="http://mrsfast.sourceforge.net/Home"></a><a href="http://mrsfast.sourceforge.net/Home">http://mrsfast.sourceforge.net/Home</a></p>
<p><a href="http://sourceforge.net/projects/mrsfast/files/mrsfast-ultra-3.1.0/">http://sourceforge.net/projects/mrsfast/files/mrsfast-ultra-3.1.0/</a></p>
<p><strong>BFAST</strong></p>
<p><a href="http://sourceforge.net/apps/mediawiki/bfast/index.php?title=Main_Page">http://sourceforge.net/apps/mediawiki/bfast/index.php?title=Main_Page</a></p>
<p><strong>SHRiMP (for&nbsp;AB SOLiD color-space reads)</strong></p>
<p><a href="http://compbio.cs.toronto.edu/shrimp/">http://compbio.cs.toronto.edu/shrimp/</a></p>
<p><strong>RazerA 3</strong></p>
<p><a href="http://www.seqan.de/projects/razers/">http://www.seqan.de/projects/razers/</a></p><p>Address of the bookmark: <a href="http://www.biomedcentral.com/1471-2105/14/184" rel="nofollow">http://www.biomedcentral.com/1471-2105/14/184</a></p>]]></description>
	<dc:creator>Rahul Agarwal</dc:creator>
</item>

<item>
  <guid isPermaLink='true'>https://bioinformaticsonline.com/opportunity/view/12940/ra-at-iiser-kolkata-computational-biologybioinformatics</guid>
  <pubDate>Wed, 23 Jul 2014 06:24:28 -0500</pubDate>
  <link></link>
  <title><![CDATA[RA at IISER Kolkata Computational Biology/Bioinformatics]]></title>
  <description><![CDATA[
<p>Applications are invited from suitable candidates for research associate (post-doc; Rs. 22000-32000)/research fellow (16000-18000)/project assistant (Rs. 10000-14000) positions in the Department of Biological Sciences, Indian Institute for Science Education and Research Kolkata in the extramural project. Condition to satisfactory performance, the positions is for a period of upto 2 years (or funding of the project).</p>

<p>Brief description: We are looking for suitable candidates in the area o computational biology/bioinformatics/genomics or related field for next-generation sequencing (NGS) data analysis for small-RNAs, RNA-Seq and targeted resequencing of plants and associated organisms. We are an interdisciplinary group where projects equally involve bioinformatics and systems biology (specially microarrays and next-generation sequencing (NGS) data analysis and its use), along with plant molecular biology, genetic engineering, field biology, and analytical plant chemistry for understanding response of plants to biotic stresses.</p>

<p>Essential qualification: MSc/BTech/MTech/PhD (or other suitable qualification) in disciplines preferable to bioinformatics, computational biology, computer application (or equivalent)/ ‘Advance Post-Graduate Diploma in Bioinformatics’. Proficiency in programming languages (such as Perl, C++) and/or statistics (proficient in R for example) is compulsory.</p>

<p>Desirable qualification: Experience in the field of genomics e.g. microarray analysis, NGS, genome annotation, database development and management, software development, systems and network biology (or related fields) will be preferred.</p>

<p>Application process: Applications should contain CV along with brief description (maximum 1 page) of research conducted (highlighting skills and experience) till now. Applications should be sent by e-mail to Shree Prakash Pandey, Department of Biological Sciences, Indian Institute of Science Education and Research Kolkata, Mohanpur Campus, WB, India within 14 days of this advertisement.</p>

<p>E-mail: sppiiserkol@gmail.com, sppandey@iiserkol.ac.in</p>

<p>Advertisement:</p>

<p>http://www.iiserkol.ac.in/announcements/adverts/671-advt_ra_shree_prakash_july_2014</p>
]]></description>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/bookmarks/view/37536/snippy-rapid-haploid-variant-calling-and-core-snp-phylogeny</guid>
	<pubDate>Sat, 11 Aug 2018 11:06:56 -0500</pubDate>
	<link>https://bioinformaticsonline.com/bookmarks/view/37536/snippy-rapid-haploid-variant-calling-and-core-snp-phylogeny</link>
	<title><![CDATA[Snippy: Rapid haploid variant calling and core SNP phylogeny]]></title>
	<description><![CDATA[<p><span>Snippy finds SNPs between a haploid reference genome and your NGS sequence reads. It will find both substitutions (snps) and insertions/deletions (indels). It will use as many CPUs as you can give it on a single computer (tested to 64 cores). It is designed with speed in mind, and produces a consistent set of output files in a single folder. It can then take a set of Snippy results using the same reference and generate a core SNP alignment (and ultimately a phylogenomic tree).</span></p>
<pre><code>snippy --cpus 16 --outdir mysnps --ref Listeria.gbk --R1 FDA_R1.fastq.gz --R2 FDA_R2.fastq.gz</code></pre><p>Address of the bookmark: <a href="https://github.com/tseemann/snippy" rel="nofollow">https://github.com/tseemann/snippy</a></p>]]></description>
	<dc:creator>Neel</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/news/view/13226/you-and-your-friend-have-similar-dna</guid>
	<pubDate>Sun, 27 Jul 2014 20:44:05 -0500</pubDate>
	<link>https://bioinformaticsonline.com/news/view/13226/you-and-your-friend-have-similar-dna</link>
	<title><![CDATA[You and your friend have similar DNA !!!]]></title>
	<description><![CDATA[<p>New research out of Massachusetts claims that people often choose friends that are similar to them in genetics and they are more accurate than you might suppose. A study published on PNAS&nbsp;http://www.pnas.org/content/111/Supplement_3/10796.full found that people are apt to pick friends who are genetically similar to themselves - so much so that friends tend to be as alike at the genetic level as a person's fourth cousin.</p><div style="text-align: center;"><img src="http://i.kinja-img.com/gawker-media/image/upload/s--CwLwHa43--/18fbmlokxcmqcjpg.jpg" alt="image" width="300" height="271" style="border: 0px; border: 0px;"></div><p>Scientists with a long-running Framingham Heart Study looked at 1,932 people (examination of about 1.5 million markers of genetic variations), comparing unrelated friends to unrelated strangers. They found that friends shared about 1% of their genes &mdash; a percentage much higher than those shared with strangers.This new findings made it clear that people have more DNA in common with those who are selected as friends than with strangers in the same population.&nbsp;</p><p>The genes that lined up the most were olfactory genes, which deal with smell. The ones that lined up the least were immune system genes. The researchers weren't sure why that happened :/. Olfactory genes might be a straightforward explanation: People who like the same smells tend to be drawn to similar environments, where they meet others with the same tendencies.</p><p>Reference:</p><p>http://www.pnas.org/content/111/Supplement_3/10796.full</p><p>Image : http://i.kinja-img.com</p>]]></description>
	<dc:creator>Jit</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/bookmarks/view/43110/quasimodo-quasispecies-metric-determination-on-omics</guid>
	<pubDate>Sat, 26 Jun 2021 15:22:56 -0500</pubDate>
	<link>https://bioinformaticsonline.com/bookmarks/view/43110/quasimodo-quasispecies-metric-determination-on-omics</link>
	<title><![CDATA[QuasiModo - Quasispecies Metric Determination on Omics]]></title>
	<description><![CDATA[<p><span>This repository contains the scripts and pipeline that reproduces the results of the HCMV benchmarking study. In this study we evaluated genome assemblers and variant callers on 10 in vitro generated, mixed strain HCMV sequence samples, each consisting of two lab strains in different abundance ratios. This tool can also be used to evaluate assemblies and variant calling results on other similar datasets.</span></p>
<p><span>https://academic.oup.com/bib/article/22/3/bbaa123/5868070</span></p><p>Address of the bookmark: <a href="https://github.com/hzi-bifo/Quasimodo" rel="nofollow">https://github.com/hzi-bifo/Quasimodo</a></p>]]></description>
	<dc:creator>Neel</dc:creator>
</item>

<item>
  <guid isPermaLink='true'>https://bioinformaticsonline.com/opportunity/view/13338/protein-function-annotation-and-machine-learning-upmc-paris-france</guid>
  <pubDate>Sat, 02 Aug 2014 01:22:52 -0500</pubDate>
  <link></link>
  <title><![CDATA[Protein function annotation and machine learning - UPMC - Paris, France]]></title>
  <description><![CDATA[
<p>Protein function annotation and machine learning - UPMC - Paris, France</p>

<p>Job Description: We are interested in finding an excellent postdoc with interests in protein functional annotation, machine learning and computer grids. The position is open for 3.5 years at the Université Pierre et Marie Curie, in the heart of paris.</p>

<p>Research topic: Protein function annotation, multiple probabilistic models, domain architecture, machine learning, combinatorial optimization, computer grid.</p>

<p>Title: A novel integrative platform for large scale protein annotation that exploits a multitude of diversified probabilistic models in several protein signature databases.</p>

<p>We propose a novel integrated approach for large scale protein annotation that will exploit an unprecedented amount of genomic data as well as sophisticated machine learning techniques and combinatorial optimization approaches taking advantages of High Performance Computing (HPC) environments. The idea is to uncover as much as possible the evolutionary processes of protein sequences that took place throughout the whole tree of life and that affected the evolution of a protein family. We have already demonstrated in a previous work that the problem of functional annotation is inherent to the ability of uncovering such paths. Now, we shall extend this approach to large scale genome annotation by considering 11 different protein databases, constituted by about 10^9 protein sequences, and by producing a large pool of diversified probabilistic models coding for about 10^7 evolutionary protein pathways. Such models will be used to search for specific domains in genomes to be annotated. Our previous methodology needs to be fundamentally improved to deal with this large amount of biological data. In this project, we shall work on the algorithms to reduce the space of models and the search complexity, and we shall implement some important algorithmic changes towards the realization of a powerful integrated annotation tool.</p>

<p>Where: This project is run on the Laboratoire de Biologie Computationnelle et Quantitative UMR7238 CNRS-UPMC – Analytical Genomics team, headed by A.Carbone. It is co-advised with Pierre-Henri Wuillemin, Laboratoire d’Informatique de Paris 6 – Equipe DECISION.</p>

<p>Start date: September 1st, 2014<br />Contact Person: Alessandra Carbone<br />Contact: alessandra.carbone@lip6.fr</p>
]]></description>
</item>

</channel>
</rss>