<?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/31502?offset=0</link>
	<atom:link href="https://bioinformaticsonline.com/related/31502?offset=0" rel="self" type="application/rss+xml" />
	<description><![CDATA[]]></description>
	
	<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/bookmarks/view/37509/vcftools-perform-common-tasks-with-vcf-files-such-as-file-validation-file-merging-intersecting-complements</guid>
	<pubDate>Tue, 07 Aug 2018 10:01:46 -0500</pubDate>
	<link>https://bioinformaticsonline.com/bookmarks/view/37509/vcftools-perform-common-tasks-with-vcf-files-such-as-file-validation-file-merging-intersecting-complements</link>
	<title><![CDATA[VCFtools: perform common tasks with VCF files such as file validation, file merging, intersecting, complements]]></title>
	<description><![CDATA[<p>VCFtools contains a Perl API (<a href="http://vcftools.sourceforge.net/perl_module.html#Vcf.pm">Vcf.pm</a>) and a number of Perl scripts that can be used to perform common tasks with VCF files such as file validation, file merging, intersecting, complements, etc. The Perl tools support all versions of the VCF specification (3.2, 3.3, 4.0, 4.1 and 4.2), nevertheless, the users are encouraged to use the latest versions VCFv4.1 or VCFv4.2. The VCFtools in general have been used mainly with diploid data, but the Perl tools aim to support polyploid data as well. Run any of the Perl scripts with the&nbsp;<strong>--help</strong>&nbsp;switch to obtain more help.</p>
<p>Many of the&nbsp;<strong>Perl scripts require that the VCF files are compressed by&nbsp;<span>bgzip</span>&nbsp;and indexed by&nbsp;<span>tabix</span></strong>&nbsp;(both tools are part of the tabix package, available for&nbsp;<a href="https://sourceforge.net/projects/samtools/files/tabix/">download here</a>). The VCF files can be compressed and indexed using the following commands</p>
<p>bgzip my_file.vcf<br>tabix -p vcf my_file.vcf.gz</p>
<p>&nbsp;</p>
<p>http://vcftools.sourceforge.net/perl_module.html</p><p>Address of the bookmark: <a href="http://vcftools.sourceforge.net/perl_module.html" rel="nofollow">http://vcftools.sourceforge.net/perl_module.html</a></p>]]></description>
	<dc:creator>Rahul Nayak</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/pages/view/9242/check-the-size-of-a-directory-free-disk-space</guid>
	<pubDate>Mon, 17 Mar 2014 02:35:32 -0500</pubDate>
	<link>https://bioinformaticsonline.com/pages/view/9242/check-the-size-of-a-directory-free-disk-space</link>
	<title><![CDATA[Check the Size of a directory &amp; Free disk space.]]></title>
	<description><![CDATA[<p>The amount of databases we bioinformatician deal are just HUGE &hellip; In such cases, we always need to check our server for free spaces etc. I planned this article to explains 2 simple commands that most bioinformatician want to know when they start using Linux / BioLinux. First: Size of a directory (du) and and second: free disk space that exists on your machine (df).</p><p><br /><strong>'du' &ndash; Check the size of a directory</strong></p><p><br />$ du<br />This command ( du) gives you a list of directories that exist in the current working directory along with their sizes in kilobytes (default). The last line of the output gives you the total size of the current directory including its subdirectories. <br /><br />$ du /home/jin1<br />The above command would give you the directory size of the directory /home/david<br /><br />$ du -h<br />The same &ldquo;du&rdquo;command with some flag gives you a better output than the default one. The option '-h' stands for human readable format. Therefore, in order to print the sizes of the files / directories in your desire notation use this time suffixed with a 'k' if its kilobytes and 'M' if its Megabytes and 'G' if its Gigabytes.<br /><br />$ du -ah<br />If you are interested in checking everything present in a folder use above mentioned command. It gives us not only the directories but also all the files that are present in the current directory. The &ldquo;-a&rdquo; flag displays the filenames along with the directory names in the output. <br /><br />$ du -c<br />This gives you a grand total as the last line of the output. So if your directory occupies 30MB the last 2 lines of the output would be 30M.<br /><br />$ du -s<br />Use this command to displays a summary of the directory size. It is the simplest way to know the total size of the current directory.<br /><br />$ du -S<br />This would display the size of the current directory excluding the size of the subdirectories that exist within that directory. So it basically shows you the total size of all the files that exist in the current directory.<br /><br />$ du --exculde=mp3<br />Several times it required to exclude some directory in our size calculation. In such cases the above command would display the size of the current directory along with all its subdirectories, but it would exclude all the files having the given pattern present in their filenames.</p><p><br /><strong>'df' - finding the disk free space / disk usage</strong><br /><br />$ df<br />Hmmm &hellip; now &ldquo;df&rdquo; command is really useful, and I guess you are going to use it over time. Typing the above command, outputs a table consisting of 6 columns. All the columns are very easy to understand. Remember that the 'Size', 'Used' and 'Avail' columns use kilobytes as the unit. The 'Use%' column shows the usage as a percentage which is also very useful.<br /><br />$ df -h<br />Displays the same output as the previous command but the '-h' indicates human readable format. Hence instead of kilobytes as the unit the output would have 'M' for Megabytes and 'G' for Gigabytes.<br /><br />Example: Linux installed on /dev/hda1<br />$ df -h | grep /dev/hda1</p><p><br />All right, this is not the only option to check the sizes and free spaces but there are a few more options that can be used with 'du' and 'df' . I will discuss it later.<br /><br /></p>]]></description>
	<dc:creator>Jitendra Narayan</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/bookmarks/view/44366/mitofinder</guid>
	<pubDate>Tue, 29 Aug 2023 02:13:01 -0500</pubDate>
	<link>https://bioinformaticsonline.com/bookmarks/view/44366/mitofinder</link>
	<title><![CDATA[MitoFinder]]></title>
	<description><![CDATA[<p dir="auto">Allio, R., Schomaker-Bastos, A., Romiguier, J., Prosdocimi, F., Nabholz, B., &amp; Delsuc, F. (2020) Mol Ecol Resour. 20, 892-905. (<a href="https://doi.org/10.1111/1755-0998.13160">publication link</a>)</p>
<p dir="auto" style="text-align: center;"><a href="https://github.com/RemiAllio/MitoFinder/blob/master/image/logo.png" target="_blank"><img src="https://github.com/RemiAllio/MitoFinder/raw/master/image/logo.png" alt="Drawing" width="250" style="border: 0px;"></a></p>
<p dir="auto"><span>Mitofinder</span>&nbsp;is a pipeline to&nbsp;<span>assemble</span>&nbsp;mitochondrial genomes and&nbsp;<span>annotate</span>&nbsp;mitochondrial genes from trimmed read sequencing data.</p>
<p dir="auto"><span>MitoFinder</span>&nbsp;is also designed to&nbsp;<span>find</span>&nbsp;and&nbsp;<span>annotate</span>&nbsp;mitochondrial sequences in existing genomic assemblies (generated from Hifi/PacBio/Nanopore/Illumina sequencing data...)</p>
<p dir="auto"><span>MitoFinder</span>&nbsp;is distributed under the&nbsp;<a href="https://github.com/RemiAllio/MitoFinder/blob/master/License/LICENSE">license</a>.</p><p>Address of the bookmark: <a href="https://github.com/RemiAllio/MitoFinder" rel="nofollow">https://github.com/RemiAllio/MitoFinder</a></p>]]></description>
	<dc:creator>Neel</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/bookmarks/view/38670/ltr-finder-an-efficient-program-for-finding-full-length-ltr-retrotranspsons-in-genome-sequences</guid>
	<pubDate>Sun, 13 Jan 2019 07:05:53 -0600</pubDate>
	<link>https://bioinformaticsonline.com/bookmarks/view/38670/ltr-finder-an-efficient-program-for-finding-full-length-ltr-retrotranspsons-in-genome-sequences</link>
	<title><![CDATA[LTR_Finder: an efficient program for finding full-length LTR retrotranspsons in genome sequences.]]></title>
	<description><![CDATA[<p>LTR_Finder is an efficient program for finding full-length LTR retrotranspsons in genome sequences.</p>
<p>The Program first constructs all exact match pairs by a suffix-array based algorithm and extends them to long highly similar pairs. Then Smith-Waterman algorithm is used to adjust the ends of LTR pair candidates to get alignment boundaries. These boundaries are subject to re-adjustment using supporting information of TG..CA box and TSRs and reliable LTRs are selected. Next, LTR_FINDER tries to identify PBS, PPT and RT inside LTR pairs by build-in aligning and counting modules. RT identification includes a dynamic programming to process frame shift. For other protein domains, LTR_FINDER calls ps_scan (from PROSITE,&nbsp;<a href="http://www.expasy.org/prosite/">http://www.expasy.org/prosite/</a>) to locate cores of important enzymes if they occur.</p><p>Address of the bookmark: <a href="https://github.com/xzhub/LTR_Finder" rel="nofollow">https://github.com/xzhub/LTR_Finder</a></p>]]></description>
	<dc:creator>Neel</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/news/view/396/bioinformatics-introduction-to-perl</guid>
	<pubDate>Thu, 11 Jul 2013 09:49:37 -0500</pubDate>
	<link>https://bioinformaticsonline.com/news/view/396/bioinformatics-introduction-to-perl</link>
	<title><![CDATA[Bioinformatics: Introduction to PERL]]></title>
	<description><![CDATA[<p>This course is aimed at those new to programming and provides an introduction to programming using <strong>Perl</strong>. By the end of this course, attendees should be able to write simple <strong>Perl</strong> programs and to understand more complex <strong>Perl</strong> programs written by others. The course will be taught using the online <a href="http://sofiarobb.com/learning-perl-toc/" title="http://sofiarobb.com/learning-perl-toc/">Learning Perl</a> materials created by <a href="http://stajich.bioinformatics.ucr.edu/members/sofia-robb" title="http://stajich.bioinformatics.ucr.edu/members/sofia-robb">Sofia Robb</a> of the <a href="http://www.ucr.edu/" title="http://www.ucr.edu/">University of California Riverside</a>. Further information is <a href="http://ruddles.bio.cam.ac.uk/%7Edpjudge/Descriptions/PERL.php" title="http://ruddles.bio.cam.ac.uk/~dpjudge/Descriptions/PERL.php">available</a>.</p>]]></description>
	<dc:creator>Archana Malhotra</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/blog/view/1182/installing-perl-gd-module</guid>
	<pubDate>Mon, 22 Jul 2013 14:02:01 -0500</pubDate>
	<link>https://bioinformaticsonline.com/blog/view/1182/installing-perl-gd-module</link>
	<title><![CDATA[Installing Perl GD Module]]></title>
	<description><![CDATA[<div><p>In comparative genome analysis work, we usually compare more than two genomes and looks for syntenic regions amongst them. In my research I used Evolution Highway (RH) <a href="http://eh-demo.ncsa.uiuc.edu/">http://eh-demo.ncsa.uiuc.edu/</a>, which is a collaborative project designed to provide a visual means for simultaneously comparing genomes of multiple amniote species. The tool removes the burden of manually aligning these maps and allows cognitive skills to be used toward something more valuable than preparation and transformation of data. In addition to EH, attractive Circos (<a href="http://circos.ca/">http://circos.ca/</a>) is also very popular for this kind of analysis.</p><p>The EH is available online, and can be easily access and use, whereas Circos installation is not entirely straightforward. One of the most difficult parts of the installation involves installing the GD library. Since there weren't good instructions for installing this library on the internet I decided to post instructions here in case they are useful to anyone else.</p><p><strong>Following are the steps to install GD modules in Mac OS</strong><br /><br />1. Setup<br /><br />Create a folder for the files:<br /><br />$ mkdir -p /SourceCache<br />$ cd /SourceCache<br /><br />Get and unpack the required Jpeg-6b and GD libraries:<br />Download Jpeg-6b (<a href="http://code.google.com/p/google-desktop-for-linux-mirror/downloads/detail?name=jpeg-6b.tar.gz&amp;can=2&amp;q">http://code.google.com/p/google-desktop-for-linux-mirror/downloads/detail?name=jpeg-6b.tar.gz&amp;can=2&amp;q</a>)<br />Download GD (<a href="http://search.cpan.org/%7Elds/GD-2.46/">http://search.cpan.org/~lds/GD-2.46/</a>)<br /><br />Place the "tar.gz" files in "/SourceCache" and double click to unpack.<br /><br />2. Install libjpeg<br /><br />Copy the "config.sub" and "config.guess" files to "/SourceCache". Note that your "config.sub" and ""config.guess" files may be in a slightly different location. The commands below show where they were on my machine:<br /><br />$ cd /SourceCache/jpeg-6b/src<br />$ cp /usr/share/libtool/config/config.sub .<br />$ cp /usr/share/libtool/config/config.guess .<br /><br />Configure libjpeg as follows. Note that this was installed on a 64 bit machine. However, this method may configure it in a 32 bit format. This may not be the best way to configure the installation but it works.<br /><br />$ .configure --enable-shared<br />$ make<br /><br />Check to see if the following directories exist on your machine. Create the missing directories in the following manner:<br /><br />$ mkdir -p /usr/local/include<br />$ mkdir -p /usr/local/bin<br />$ mkdir -p /usr/local/lib<br />$ mkdir -p /usr/local/man/man1<br /><br />Finish making and installing libjpeg:<br /><br />$ make install<br /><br />3. Install GD<br /><br />$ cd /SourceCache/GD-2.46/GD/<br />$ perl Makefile.PL<br />$ make<br />$ make test (optional)<br />$ make html (optional)<br />$ make install</p><p><strong>Other way for Mac OS</strong><br />The easiest way to get a lot of these is with a program called Fink, which is similar in nature to the CPAN installer, but installs common GNU utilities. Fink is available from &lt;<a href="http://sourceforge.net/projects/fink/%3E">http://sourceforge.net/projects/fink/&gt;</a>.<br /><br />Follow the instructions for setting up Fink. Once it's installed, you'll want to run the following as root: fink install gd<br /><br />It will prompt you for a number of dependencies, type 'y' and hit enter to install all of the dependencies. Then watch it work.<br /><br />To prevent creating conflicts with the software that Apple installs by default, Fink creates its own directory tree at /sw where it installs most of the software that it installs. This means your libraries and headers for libgd will be at /sw/lib and /sw/include instead of /usr/lib and /usr/local/include. Because of these changed locations for the libraries, the Perl GD module will not install directly via CPAN, because it looks for the specific paths instead of getting them from your environment. But there's a way around that :-)<br /><br />Instead of typing "install GD" at the cpan&gt; prompt, type look GD. This should go through the motions of downloading the latest version of the GD module, then it will open a shell and drop you into the build directory. Apply below patch to the Makefile.PL file (save the patch into a file and use the command patch &lt; patchfile.)<br /><br />Then, run these commands to finish the installation of the GD module:<br /><br />perl Makefile.PL<br />make<br />make test<br />make install<br />And don't forget to run exit to get back to CPAN.</p><p>&nbsp;</p><p><strong>Install on MS Window, using PPM</strong></p><p>C:\Documents and Settings\Owner&gt;ppm<br />PPM interactive shell (2.2.0) - type 'help' for available commands.<br />PPM&gt; install GD<br />Install package 'GD?' (y/N): y<br />Installing package 'GD'...<br />Downloading <a href="http://ppm.ActiveState.com/PPMPackages/5.6plus/MSW">http://ppm.ActiveState.com/PPMPackages/5.6plus/MSW</a>. ...<br />Installing C:\Perl\site\lib\auto\GD\GD.bs<br />Installing C:\Perl\site\lib\auto\GD\GD.dll<br />Installing C:\Perl\site\lib\auto\GD\GD.exp<br />Installing C:\Perl\site\lib\auto\GD\GD.lib<br />Installing C:\Perl\html\site\lib\GD.html<br />Installing C:\Perl\site\lib\GD.pm<br />Installing C:\Perl\site\lib\qd.pl<br />Installing C:\Perl\site\lib\auto\GD\autosplit.ix<br />PPM&gt;<br /><br /><br />If you can't install it from ppm. You can download it:<br /><a href="http://ppm.ActiveState.com/PPMPackages/5.6plus/MSW">http://ppm.ActiveState.com/PPMPackages/5.6plus/MSW</a>.<br /><br /><br />BTW,All Perl 5.6.1 Modules are located at:<br /><br /><a href="http://ppm.ActiveState.com/PPMPackages/5.6plus/MSW">http://ppm.ActiveState.com/PPMPackages/5.6plus/MSW</a>.</p><p>&nbsp;</p><p><strong>Install the Perl GD Module on Linux</strong><br /><br />$ sudo perl -MCPAN -e shell<br /><br />Since it was the first time I had run this command on this particular machine I had to answer a lot of questions but simply selected the defaults for everything as this usually works for me. Once in the CPAN shell I entered<br /><br />$ install Bundle::CPAN<br /><br />and selected all of the defaults again. Once the CPAN bundle had finished installing I tried to install GD::Graph by typing<br /><br />$ install GD::Graph<br /><br />but it failed with hundreds of errors &ndash; the first of which was<br /><br />GD.xs:7:16: error: gd.h: No such file or directory<br /><br />This was fixed with the following apt-get command (in the bash shell)<br /><br />$ sudo apt-get install libgd2-xpm-dev<br /><br />back in the CPAN shell I still couldn&rsquo;t get GD::Graph to build and I guessed this was because of some left over files from the failed build. I don&rsquo;t know the command to clean things up inside the CPAN shell and am too lazy to read the docs so I simply went into the .cpan/build directory in my home directory and deleted anything that started with GD &ndash; eg<br /><br />$ rm -rf GD-2.35-HC_vkB<br /><br />$ rm -rf GDGraph-1.44-Evfibe<br /><br />and so on. Those strings at the end (VkB and so on) look random so they might be different on your machine. Then I went back into the CPAN shell and ran<br /><br />$ install GD::Graph<br /><br />There were a few dependencies which the script fetched and installed for me but everything worked smoothly.</p><p>Manual and other Perl Module instalation are mentioned in my previous blog @ <a href="http://bioinformaticsonline.com/blog/view/710/how-to-install-perl-modules-manually-using-cpan-command-and-other-quick-ways">http://bioinformaticsonline.com/blog/view/710/how-to-install-perl-modules-manually-using-cpan-command-and-other-quick-ways</a></p></div>]]></description>
	<dc:creator>Jit</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/bookmarks/view/2376/citrus-perl</guid>
	<pubDate>Wed, 14 Aug 2013 14:57:44 -0500</pubDate>
	<link>https://bioinformaticsonline.com/bookmarks/view/2376/citrus-perl</link>
	<title><![CDATA[Citrus Perl]]></title>
	<description><![CDATA[<p>Citrus Perl is a binary distribution of Perl created for GUI application developers. The distribution includes <a href="http://wxperl.sourceforge.net">wxPerl</a>, the Perl wrapper for <a href="http://www.wxwidgets.org">wxWidgets</a>. Where supported by the operating system wxWidgets is available as a package for the 2.8.x stable branch and the 2.9.x development branch.</p><p>Address of the bookmark: <a href="http://www.citrusperl.com/" rel="nofollow">http://www.citrusperl.com/</a></p>]]></description>
	<dc:creator>Jitendra Narayan</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/bookmarks/view/4037/perl-and-bioperl-tutorials</guid>
	<pubDate>Wed, 28 Aug 2013 05:51:38 -0500</pubDate>
	<link>https://bioinformaticsonline.com/bookmarks/view/4037/perl-and-bioperl-tutorials</link>
	<title><![CDATA[Perl and BioPerl Tutorials]]></title>
	<description><![CDATA[<p>This bookmark is created to store the useful Perl and BioPerl tutorial links at one place. Feel free to share and add more useful tutorial links here ....&nbsp;</p>
<p>&nbsp;</p><p>Address of the bookmark: <a href="http://cbb.sjtu.edu.cn/course/database/beginning.pdf" rel="nofollow">http://cbb.sjtu.edu.cn/course/database/beginning.pdf</a></p>]]></description>
	<dc:creator>Jitendra Narayan</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/pages/view/11181/perl-one-liner-for-bioinformatician</guid>
	<pubDate>Fri, 30 May 2014 05:49:07 -0500</pubDate>
	<link>https://bioinformaticsonline.com/pages/view/11181/perl-one-liner-for-bioinformatician</link>
	<title><![CDATA[Perl one-liner for bioinformatician !!!]]></title>
	<description><![CDATA[<p>With the emergence of NGS technologies, and sequencing data most of the bioinformaticians mung and wrangle around massive amounts of genomics text. There are several "standardized" file formats (FASTQ, SAM, VCF, etc.) and some tools for manipulating them (fastx toolkit, samtools, vcftools, etc.), there are still times where knowing a little bit of Perl onliner is extremely helpful.</p><p>Perl one-liners are small and awesome Perl programs that fit in a single line of code and they do one thing really well. These things include changing line spacing, numbering lines, doing calculations, converting and substituting text, deleting and printing certain lines, parsing logs, editing files in-place, doing statistics, carrying out system administration tasks, updating a bunch of files at once, and many more. Perl one-liners will make you the shell warrior. Anything that took you minutes to solve, will now take you seconds!<br /><br />perl -pe '$\="\n"'&nbsp; &nbsp;<br />#double space a file<br /><br />perl -pe '$_ .= "\n" unless /^$/' <br />#double space a file except blank lines<br /><br />perl -pe '$_.="\n"x7' <br />#7 space in a line.<br /><br />perl -ne 'print unless /^$/' <br />#remove all blank lines<br /><br />perl -lne 'print if length($_) &lt; 20' <br />#print all lines with length less than 20.<br /><br />perl -00 -pe '' <br />#If there are multiple spaces, delete all leaving one(make the file a single spaced file).<br /><br />perl -00 -pe '$_.="\n"x4' <br />#Expand single blank lines into 4 consecutive blank lines<br /><br />perl -pe '$_ = "$. $_"'<br />#Number all lines in a file<br /><br />perl -pe '$_ = ++$a." $_" if /./' <br />#Number only non-empty lines in a file<br /><br />perl -ne 'print ++$a." $_" if /./' <br />#Number and print only non-empty lines in a file<br /><br />perl -pe '$_ = ++$a." $_" if /regex/' <br />#Number only lines that match a pattern<br /><br />perl -ne 'print ++$a." $_" if /regex/' <br />#Number and print only lines that match a pattern<br /><br />perl -ne 'printf "%-5d %s", $., $_ if /regex/' <br />#Left align lines with 5 white spaces if matches a pattern (perl -ne 'printf "%-5d %s", $., $_' : for all the lines)<br /><br />perl -le 'print scalar(grep{/./}&lt;&gt;)' <br />#prints the total number of non-empty lines in a file<br /><br />perl -lne '$a++ if /regex/; END {print $a+0}' <br />#print the total number of lines that matches the pattern<br /><br />perl -alne 'print scalar @F' <br />#print the total number fields(words) in each line.<br /><br />perl -alne '$t += @F; END { print $t}' <br />#Find total number of words in the file<br /><br />perl -alne 'map { /regex/ &amp;&amp; $t++ } @F; END { print $t }' <br />#find total number of fields that match the pattern<br /><br />perl -lne '/regex/ &amp;&amp; $t++; END { print $t }' <br />#Find total number of lines that match a pattern<br /><br />perl -le '$n = 20; $m = 35; ($m,$n) = ($n,$m%$n) while $n; print $m' <br />#will calculate the GCD of two numbers.<br /><br />perl -le '$a = $n = 20; $b = $m = 35; ($m,$n) = ($n,$m%$n) while $n; print $a*$b/$m' <br />#will calculate lcd of 20 and 35.<br /><br />perl -le '$n=10; $min=5; $max=15; $, = " "; print map { int(rand($max-$min))+$min } 1..$n' <br />#Generates 10 random numbers between 5 and 15.<br /><br />perl -le 'print map { ("a".."z",&rdquo;0&rdquo;..&rdquo;9&rdquo;)[rand 36] } 1..8'<br />#Generates a 8 character password from a to z and number 0 &ndash; 9.<br /><br />perl -le 'print map { ("a",&rdquo;t&rdquo;,&rdquo;g&rdquo;,&rdquo;c&rdquo;)[rand 4] } 1..20'<br />#Generates a 20 nucleotide long random residue.<br /><br />perl -le 'print "a"x50'<br />#generate a string of &lsquo;x&rsquo; 50 character long<br /><br />perl -le 'print join ", ", map { ord } split //, "hello world"'<br />#Will print the ascii value of the string hello world.<br /><br />perl -le '@ascii = (99, 111, 100, 105, 110, 103); print pack("C*", @ascii)'<br />#converts ascii values into character strings.<br /><br />perl -le '@odd = grep {$_ % 2 == 1} 1..100; print "@odd"'<br />#Generates an array of odd numbers.<br /><br />perl -le '@even = grep {$_ % 2 == 0} 1..100; print "@even"'<br />#Generate an array of even numbers<br /><br />perl -lpe 'y/A-Za-z/N-ZA-Mn-za-m/' file <br />#Convert the entire file into 13 characters offset(ROT13)<br /><br />perl -nle 'print uc' <br />#Convert all text to uppercase:<br /><br />perl -nle 'print lc' <br />#Convert text to lowercase:<br /><br />perl -nle 'print ucfirst lc' <br />#Convert only first letter of first word to uppercas<br /><br />perl -ple 'y/A-Za-z/a-zA-Z/' <br />#Convert upper case to lower case and vice versa<br /><br />perl -ple 's/(\w+)/\u$1/g' <br />#Camel Casing<br /><br />perl -pe 's|\n|\r\n|' <br />#Convert unix new lines into DOS new lines:<br /><br />perl -pe 's|\r\n|\n|' <br />#Convert DOS newlines into unix new line<br /><br />perl -pe 's|\n|\r|' <br />#Convert unix newlines into MAC newlines:<br /><br />perl -pe '/regexp/ &amp;&amp; s/foo/bar/' <br />#Substitute a foo with a bar in a line with a regexp.</p><p>Reference/Sources:</p><p>http://genomics-array.blogspot.in/2010/11/some-unixperl-oneliners-for.html</p><p><a href="http://genomespot.blogspot.com/2013/08/a-selection-of-useful-bash-one-liners.html">http://genomespot.blogspot.com/2013/08/a-selection-of-useful-bash-one-liners.html</a></p><p><a href="http://biowize.wordpress.com/2012/06/15/command-line-magic-for-your-gene-annotations/">http://biowize.wordpress.com/2012/06/15/command-line-magic-for-your-gene-annotations/</a></p><p><a href="http://genomics-array.blogspot.com/2010/11/some-unixperl-oneliners-for.html">http://genomics-array.blogspot.com/2010/11/some-unixperl-oneliners-for.html</a></p><p><a href="http://bioexpressblog.wordpress.com/2013/04/05/split-multi-fasta-sequence-file/">http://bioexpressblog.wordpress.com/2013/04/05/split-multi-fasta-sequence-file/</a></p>]]></description>
	<dc:creator>Abhimanyu Singh</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>

</channel>
</rss>