<?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/37592?</link>
	<atom:link href="https://bioinformaticsonline.com/related/37592?" rel="self" type="application/rss+xml" />
	<description><![CDATA[]]></description>
	
	<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/blog/view/42921/run-bash-script-in-perl-program</guid>
	<pubDate>Sat, 27 Feb 2021 01:42:23 -0600</pubDate>
	<link>https://bioinformaticsonline.com/blog/view/42921/run-bash-script-in-perl-program</link>
	<title><![CDATA[Run bash script in Perl program !]]></title>
	<description><![CDATA[<p>BioPerl is a compilation of Perl modules that can be used to build bioinformatics-related Perl scripts. It is used, for example, in the development of source codes, standalone software/tools, and algorithms in bioinformatics programmes. Different modules are easy to instal and include, making it easier to perform different functions. Despite the fact that Python is commonly favoured over Perl, some bioinformatics software, such as the standalone version of 'alienomics', is written in Perl. Often it's a major problem for beginners to execute certain Unix/shell commands in Perl script, so it's hard to determine which feature is unique to a situation.</p><div style="background-color: white;">Perl provides various features and operators for the execution of external commands (described as follows), which are unique in their own way.</div><div style="background-color: white;">&nbsp;</div><div style="background-color: white;">They vary slightly from one another, making it difficult for Perl beginners to choose between them.</div><div style="background-color: white;">&nbsp;</div><div style="background-color: white;"><strong>1. IPC::Open2</strong></div><p>More at https://bioinformaticsonline.com/snippets/view/42919/perl-ipcopen2-module</p><p><strong>2. exec&rdquo;&rdquo;</strong></p><p><em>&nbsp;syntax:&nbsp;</em><code>exec "command";</code></p><div style="background-color: #edfbff;">It's a Perl function (perlfunc) that executes a command but never returns, similar to a function's return statement.</div><div style="background-color: white;">While running the command, it keeps processing the script and does not wait until it finishes first, returns false when the command is not found, but never returns true.</div><p><strong>3. Backticks &ldquo; or qx//</strong></p><p><em>syntax:&nbsp;</em><code>`command`;</code></p><p><em>syntax:&nbsp;</em><code>qx/command/;</code></p><div style="background-color: white;">It's a Perl operator (perlop) that executes a command and then resumes the Perl script once the command has ended, but the return value is the command's STDOUT.</div><p><strong>4. IPC::Open3</strong></p><p><em>syntax:&nbsp;</em><code>$output =&nbsp;open3(\*CHLD_IN, \*CHLD_OUT, \*CHLD_ERR,&nbsp;'command arg1 arg2', 'optarg',...);</code></p><p style="text-align: justify;"><code></code>It is very similar to <code>IPC::Open2</code> with the capability to capture all three file handles of the process, i.e., STDIN, STDOUT, and STDERR. It can also be used with or without the shell. You can read about it more in the documentation: <a href="https://perldoc.perl.org/IPC/Open3.html" target="_blank">IPC::Open3</a>.</p><p><code>$output = open3(my $o ut,&nbsp;my $in, 'command arg1 arg2');</code></p><p>OR without using the shell</p><p><code>$output = open3(my $out,&nbsp;my $in, 'command', 'arg1', 'arg2');</code></p><p><strong>5.a2p</strong></p><p><em>syntax:&nbsp;</em><code>a2p [options] [awkscript]</code></p><p>There is a Perl utility known as <code>a2p</code> which translates <code>awk</code> command to Perl. It takes awk script as input and generates a comparable Perl script as the output. Suppose, you want to execute the following <code>awk</code> statement</p><p><code>awk '{$1 = ""; $2 = ""; print}' f1.txt</code></p><p>This statement gives error sometimes even after escaping the variables (\$1, \$2) but by using <code>a2p</code> it can be easily converted to Perl script:</p><p>For further information, you can read it&rsquo;s documentation: <code><a href="https://perldoc.perl.org/a2p.html" target="_blank">a2p</a></code></p><p>More help at https://bioinformaticsonline.com/snippets/view/42920/perl-script-to-run-awk-inside-perl</p><p><strong>6. system()</strong></p><p><em>syntax:&nbsp;</em><code>system( "command" );</code></p><p>It is also a Perl function (<a href="https://perldoc.perl.org/functions/system.html" target="_blank">perlfunc</a>) that executes a command and waits for it to get finished first and then resume the Perl script. The return value is the exit status of the command. It can be called in two ways:</p><p><code>system( "command arg1 arg2" );</code></p><p>OR</p><p><code>system( "command", "arg1", "arg2" );</code></p><p>HELP</p><p>Here are some useful Perl cheat sheets that can be used as a quick reference guide.--&nbsp;<a href="https://www.pcwdld.com/perl-cheat-sheet" target="_blank">https://www.pcwdld.com/perl-cheat-sheet</a></p>]]></description>
	<dc:creator>Neel</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/bookmarks/view/783/perl-module-installation</guid>
	<pubDate>Fri, 12 Jul 2013 11:19:41 -0500</pubDate>
	<link>https://bioinformaticsonline.com/bookmarks/view/783/perl-module-installation</link>
	<title><![CDATA[Perl Module Installation]]></title>
	<description><![CDATA[<p>Nice step wide information on perl module installation.</p><p>Address of the bookmark: <a href="http://bioinformaticsonline.com/blog/view/710/how-to-install-perl-modules-manually-using-cpan-command-and-other-quick-ways" rel="nofollow">http://bioinformaticsonline.com/blog/view/710/how-to-install-perl-modules-manually-using-cpan-command-and-other-quick-ways</a></p>]]></description>
	<dc:creator>Jitendra Narayan</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/pages/view/22569/reverse-complement-problem-solved-with-perl</guid>
	<pubDate>Tue, 09 Jun 2015 23:37:23 -0500</pubDate>
	<link>https://bioinformaticsonline.com/pages/view/22569/reverse-complement-problem-solved-with-perl</link>
	<title><![CDATA[Reverse Complement Problem Solved with Perl]]></title>
	<description><![CDATA[<p>Question at http://rosalind.info/problems/1b/</p><p>#Find the reverse complement of a DNA string.<br />#Given: A DNA string Pattern.<br />#Return: Pattern, the reverse complement of Pattern.<br /><br />use strict;<br />use warnings;<br /><br />my $string="AAAACCCGGT";<br />my $finalString="";<br />my %hash = (<br />&nbsp;&nbsp; &nbsp;"C" =&gt; "G", <br />&nbsp;&nbsp; &nbsp;"A" =&gt; "T", <br />&nbsp;&nbsp; &nbsp;"T" =&gt; "A", <br />&nbsp;&nbsp; &nbsp;"G" =&gt; "C",<br />);<br /><br />for (my $aa=0; $aa&lt;=(length($string)-1); $aa++) {<br />&nbsp;&nbsp; &nbsp;my $char=substr $string, $aa, 1;<br />&nbsp;&nbsp; &nbsp;#print $hash{$char};<br />&nbsp;&nbsp; &nbsp;$finalString="$hash{$char}"."$finalString";<br />}<br /><br />print $finalString;<br />print "\n";</p>]]></description>
	<dc:creator>Jit</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/pages/view/22572/clump-finding-problem-solved-with-perl</guid>
	<pubDate>Wed, 10 Jun 2015 00:17:17 -0500</pubDate>
	<link>https://bioinformaticsonline.com/pages/view/22572/clump-finding-problem-solved-with-perl</link>
	<title><![CDATA[Clump Finding Problem Solved with Perl]]></title>
	<description><![CDATA[<p>The question at http://rosalind.info/problems/1d/</p><p>Script are moved to&nbsp;http://bioinformaticsonline.com/snippets/view/34633/clump-finding-problem-solved-with-perl</p>]]></description>
	<dc:creator>Jit</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/bookmarks/view/19792/irishgrid-irish-grid-mapping-system</guid>
	<pubDate>Fri, 26 Dec 2014 07:53:24 -0600</pubDate>
	<link>https://bioinformaticsonline.com/bookmarks/view/19792/irishgrid-irish-grid-mapping-system</link>
	<title><![CDATA[irishgrid: Irish Grid Mapping System]]></title>
	<description><![CDATA[<p>Perl module for creating geographic 10km-square maps using either SVG or PNG (with GD library) output format.</p>
<p>Originally design to map the location of objects in a 10 km map IrishGrid includes:</p>
<ul>
<li>native support of the Irish Grid System (see <a href="http://www.osi.ie/">http://www.osi.ie/</a>)</li>
<li>optimize for speed (there's as less as possible data to conversion)</li>
<li>customized color functions</li>
</ul>
<p>https://code.google.com/p/irishgrid/downloads/detail?name=irishgrid.pl</p><p>Address of the bookmark: <a href="https://code.google.com/p/irishgrid/" rel="nofollow">https://code.google.com/p/irishgrid/</a></p>]]></description>
	<dc:creator>Jit</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/bookmarks/view/36927/restrictiondigest-a-powerful-perl-module-for-simulating-genomic-restriction-digests</guid>
	<pubDate>Tue, 12 Jun 2018 13:17:13 -0500</pubDate>
	<link>https://bioinformaticsonline.com/bookmarks/view/36927/restrictiondigest-a-powerful-perl-module-for-simulating-genomic-restriction-digests</link>
	<title><![CDATA[RestrictionDigest: A powerful Perl module for simulating genomic restriction digests]]></title>
	<description><![CDATA[RestrictionDigest can simulate the reference genome digestion and generate comprehensive information of the simulation. It can simulate single-enzyme digestion, double-enzyme digestion and size selection process. It can also analyze multiple genomes at one run and generates concise comparison of enzyme(s) performance across the genomes.

For more information, please see the academic paper published online (http://www.sciencedirect.com/science/article/pii/S071734581630001X).<p>Address of the bookmark: <a href="https://github.com/JINPENG-WANG/RestrictionDigest" rel="nofollow">https://github.com/JINPENG-WANG/RestrictionDigest</a></p>]]></description>
	<dc:creator>Neel</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/bookmarks/view/20471/bioinformatics-scripts</guid>
	<pubDate>Thu, 22 Jan 2015 22:29:39 -0600</pubDate>
	<link>https://bioinformaticsonline.com/bookmarks/view/20471/bioinformatics-scripts</link>
	<title><![CDATA[Bioinformatics Scripts]]></title>
	<description><![CDATA[<p>Some of the useful bioinformatics scripts.</p>
<p>For example ... contig-stats.pl is a Perl script that will automatically describe features of a sequence assembly.</p>
<p>http://milkweedgenome.org/?q=scripts</p><p>Address of the bookmark: <a href="http://milkweedgenome.org/?q=scripts" rel="nofollow">http://milkweedgenome.org/?q=scripts</a></p>]]></description>
	<dc:creator>Jit</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/pages/view/22571/pattern-matching-problem-solution-with-perl</guid>
	<pubDate>Tue, 09 Jun 2015 23:58:45 -0500</pubDate>
	<link>https://bioinformaticsonline.com/pages/view/22571/pattern-matching-problem-solution-with-perl</link>
	<title><![CDATA[Pattern Matching Problem Solution with Perl]]></title>
	<description><![CDATA[<p>Problem at http://rosalind.info/problems/1c/</p><p>#Find all occurrences of a pattern in a string.<br />#Given: Strings Pattern and Genome.<br />#Return: All starting positions in Genome where Pattern appears as a substring. Use 0-based indexing.<br /><br />use strict;<br />use warnings;<br /><br />my $string="GATATATGCATATACTT";<br />my $subStr="ATAT";<br />my $kmer=length($subStr);<br /><br />kmerMatch ($string, $subStr, $kmer);<br /><br />sub kmerMatch { #Check the exact matching kmers with sliding window<br />my ($string, $myStr, $kmer)=@_;<br />for (my $aa=0; $aa&lt;=(length($string)-$kmer); $aa++) {<br />&nbsp;&nbsp;&nbsp; my $myWin=substr&nbsp; $string, $aa,$kmer;<br />&nbsp;&nbsp;&nbsp; if ($myWin eq $myStr) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #print "$myWin eq $myStr\n";<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print $aa;<br />&nbsp;&nbsp;&nbsp; }<br />}<br />}</p>]]></description>
	<dc:creator>Jit</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/bookmarks/view/22961/bioscripts</guid>
	<pubDate>Sun, 28 Jun 2015 07:46:14 -0500</pubDate>
	<link>https://bioinformaticsonline.com/bookmarks/view/22961/bioscripts</link>
	<title><![CDATA[BioScripts]]></title>
	<description><![CDATA[<p>You are requested to please bookmark collection of bioinformatics tools, scripts, codes that can be pieced together in a very easy and flexible manner to perform both simple and complex bioinformatics tasks.</p>
<p>The next-generation sequencing included whole genome sequencing(WGS), transcriptome sequencing (whole cDNA sequencing, RNA-seq), digital gene expression sequencing (Tag-Seq), ChIP-Seq, and so on. And there are many sequencing platform to generate sequece, as well know Sanger/ABi(the frist generation), Solexa/illumina, SOLiD/ABi, 454/Roche. But thier sequence format is different, also they have different error type. High quality data is very important for further analysis or data mining. There are many pipeline for raw sequence quality analysis and control with few of process for reporting reads quality statistical details, trimming, filtering, and error correction. Please bookmarks them for the benefits of bioinformatics community.</p>
<p>https://code.google.com/p/biowiki/</p>
<p>https://code.google.com/p/ngs-pipeline/source/browse/#svn%2Ftrunk</p>
<p>NGSand Perl scripts https://code.google.com/hosting/search?q=NGS+perl&amp;projectsearch=Search+projects</p>
<p>NGS and Python scripts https://code.google.com/hosting/search?q=NGS+Python&amp;projectsearch=Search+projects</p><p>Address of the bookmark: <a href="https://code.google.com/hosting/search?q=bioinformatics&amp;sa=Search" rel="nofollow">https://code.google.com/hosting/search?q=bioinformatics&amp;sa=Search</a></p>]]></description>
	<dc:creator>Rahul Nayak</dc:creator>
</item>

</channel>
</rss>