<?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/42003?offset=10</link>
	<atom:link href="https://bioinformaticsonline.com/related/42003?offset=10" rel="self" type="application/rss+xml" />
	<description><![CDATA[]]></description>
	
	<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/pages/view/22567/rosalind-problem-solution-with-perl</guid>
	<pubDate>Tue, 09 Jun 2015 23:35:18 -0500</pubDate>
	<link>https://bioinformaticsonline.com/pages/view/22567/rosalind-problem-solution-with-perl</link>
	<title><![CDATA[Rosalind Problem Solution with Perl]]></title>
	<description><![CDATA[<p>Rosalind is a platform for learning bioinformatics and programming through problem solving. <a href="http://rosalind.info/problems/list-view/?location=bioinformatics-textbook-track">Take a tour</a> to get the hang of how Rosalind works.</p><p>Bioinformatics Textbook Track</p><p>Find more about Rosalind puzzle at http://rosalind.info/problems/list-view/?location=bioinformatics-textbook-track</p><p>I will provide solution of all the Rosalind problem with Perl for community.</p><p>Check out the right sidebar for more links ...</p>]]></description>
	<dc:creator>Jit</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/bookmarks/view/26424/biotoolbox</guid>
	<pubDate>Fri, 19 Feb 2016 09:14:44 -0600</pubDate>
	<link>https://bioinformaticsonline.com/bookmarks/view/26424/biotoolbox</link>
	<title><![CDATA[BioToolbox]]></title>
	<description><![CDATA[<p>This is a collection of libraries and high-quality end-user scripts for bioinformatic analysis, including working with gene annotation, collecting data scores from a variety of modern file formats, and conversion between file formats. The Bio::ToolBox libraries provide a unified, abstracted interface to multiple common gene annotation formats and the collection of data from multiple data files. They rely on BioPerl SeqFeature libraries and related adaptors to access binary file formats including Bam, BigWig, BigBed, and USeq. The Bio::ToolBox package includes scripts for setting up databases of annotation, collecting annotated features, collecting genomic data relative to features, manipulating and analyzing data, and data format conversion.</p>
<p>More at http://cpansearch.perl.org/src/TJPARNELL/</p><p>Address of the bookmark: <a href="http://cpansearch.perl.org/src/TJPARNELL/" rel="nofollow">http://cpansearch.perl.org/src/TJPARNELL/</a></p>]]></description>
	<dc:creator>Jit</dc:creator>
</item>
<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/blog/view/34864/installing-perl-environment-on-linux</guid>
	<pubDate>Tue, 26 Dec 2017 21:21:50 -0600</pubDate>
	<link>https://bioinformaticsonline.com/blog/view/34864/installing-perl-environment-on-linux</link>
	<title><![CDATA[Installing Perl environment on Linux]]></title>
	<description><![CDATA[<p>By using&nbsp;<code>plenv</code>, you can easily install and switch among different version of Perl. This will be installed under your home directory in<code>~/.plenv</code>.</p><h4>Install latest Perl (with supporting multithreading) and CPANMinus.</h4><pre><code> $ cd
 $ git clone git://github.com/tokuhirom/plenv.git ~/.plenv
 $ git clone git://github.com/tokuhirom/Perl-Build.git ~/.plenv/plugins/perl-build/
 $ echo 'export PATH="$HOME/.plenv/bin:$PATH"' &gt;&gt; ~/.bashrc
 $ echo 'eval "$(plenv init -)"' &gt;&gt; ~/.bashrc
 $ source ~/.bashrc
 $ plenv install 5.18.1 -Dusethreads
 $ plenv rehash
 $ plenv global 5.18.1
 $ plenv install-cpanm
</code></pre><ul>
<li><code>git</code>&nbsp;is a distributed revision control and source code management software which can help you to download files from GitHub server.</li>
<li><code>echo</code>&nbsp;means "print".</li>
<li><code>&gt;&gt;</code>&nbsp;means adding the output into the end of the file, while&nbsp;<code>&gt;</code>&nbsp;means adding the output by overwriting the whole file. Please use<code>&gt;</code>&nbsp;with additional cares.</li>
<li>In Linux system, there are two types of outputs when you execute a command. One is called standard output (or sometimes STDOUT for short), and the other is a standard error (STDERR).&nbsp;<code>1&gt;</code>&nbsp;is for STDOUT only,&nbsp;<code>2&gt;</code>&nbsp;is for STDERR only, and&nbsp;<code>&amp;&gt;</code>means for both. In default&nbsp;<code>&gt;</code>&nbsp;is the same to&nbsp;<code>1&gt;</code>.</li>
<li><code>exec</code>&nbsp;is execution.</li>
<li>Remember to install Perl in supporting multithreading (with option&nbsp;<code>-Dusethreads</code>), which is important for many NGS analysis packages (e.g. Trinity). In this setting, you can use multiple CPU for Perl software.</li>
<li>Install the CPAN (Comprehensive Perl Archive Network) manager software, CPANMinus, by&nbsp;<code>install-cpanm</code>.</li>
</ul><p>You can use&nbsp;<code>plenv global</code>&nbsp;and&nbsp;<code>plenv local</code>&nbsp;to change the different version of Perl to fulfil different needs of your Perl software.</p><p>For example, if the&nbsp;specific version of Perl is not compatible with your script, you can switch to the different version by:</p><pre><code> $ plenv local 
</code></pre><ul>
<li>It is similar to set the local version of your script language when you use&nbsp;<code>pyenv</code>&nbsp;and&nbsp;<code>rbenv</code>&nbsp;as the following.</li>
</ul><p>Put the following path into&nbsp;<code>~/.bashrc file</code>.</p><pre><code>export PERL5LIB="$HOME/.plenv/build/perl-5.18.1/lib"
</code></pre><h4>Install BioPerl and PerlIO::gzip</h4><p>CPANMinus is a very good Perl module manager, use&nbsp;<code>cpanm</code>&nbsp;to install BioPerl can save you a lot of time. Here are some useful modules:</p><pre><code>$ cpanm Bio::Perl
$ cpanm Bio::SearchIO
$ cpanm PerlIO::gzip<br /></code></pre><p><span>For more information, please visit:&nbsp;</span><a href="https://github.com/tokuhirom/plenv">https://github.com/tokuhirom/plenv</a></p><pre><code>&nbsp;</code></pre>]]></description>
	<dc:creator>biogeek</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/22570/frequent-words-problem-solution-by-perl</guid>
	<pubDate>Tue, 09 Jun 2015 23:38:44 -0500</pubDate>
	<link>https://bioinformaticsonline.com/pages/view/22570/frequent-words-problem-solution-by-perl</link>
	<title><![CDATA[Frequent words problem solution by Perl]]></title>
	<description><![CDATA[<div><p>Solved with perl <a href="http://rosalind.info/problems/1a/">http://rosalind.info/problems/1a/</a></p><p>#Find the most frequent k-mers in a string.<br />#Given: A DNA string Text and an integer k.<br />#Return: All most frequent k-mers in Text (in any order).<br /><br />use strict;<br />use warnings;<br /><br />my $string="ACGTTGCATGTCGCATGATGCATGAGAGCT";<br />my $kmer=4; <br />my %myHash;<br />my $max=0;<br /><br />for (my $aa=0; $aa&lt;=(length($string)-4); $aa++) {<br />&nbsp;&nbsp; &nbsp;my $myStr=substr&nbsp; $string, $aa,$kmer;<br />&nbsp;&nbsp; &nbsp;#print "$myStr\n";<br />&nbsp;&nbsp; &nbsp;my $km=kmerMatch ($string, $myStr, $kmer);<br />&nbsp;&nbsp; &nbsp;if ($km &gt; $max) { $max = $km;}<br />&nbsp;&nbsp; &nbsp;#print "$km\t$myStr\n";<br />&nbsp;&nbsp; &nbsp;$myHash{$myStr}=$km;<br />&nbsp;&nbsp; &nbsp;<br />}<br /><br />#Print all key which have matching values<br />foreach my $name (keys %myHash){<br />&nbsp;&nbsp;&nbsp; print "$name " if $myHash{$name} == $max;<br />}<br /><br />sub kmerMatch { #Check the exact matching kmers with sliding window<br />my ($string, $myStr, $kmer)=@_;<br />my $count=0;<br />for (my $aa=0; $aa&lt;=(length($string)-4); $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;#print "$myWin eq $myStr\n";<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;$count++;<br />&nbsp;&nbsp; &nbsp;}<br />}<br />return $count;<br />}</p></div>]]></description>
	<dc:creator>Jit</dc:creator>
</item>
<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/bookmarks/view/10182/biocodesbioscripts</guid>
	<pubDate>Tue, 22 Apr 2014 20:53:33 -0500</pubDate>
	<link>https://bioinformaticsonline.com/bookmarks/view/10182/biocodesbioscripts</link>
	<title><![CDATA[BioCodes/BioScripts]]></title>
	<description><![CDATA[<p>Over the years most bioinformatics people amass a collection of small utility scripts which make their lives easier. Too often they are kept either in private repositories or as part of a public collection to which noone else can contribute. Biocode is a curated repository of general-use utility scripts.</p>
<p>Algorithms scripts @ https://github.com/jschendel/bioinformatics-algorithms-coursera</p><p>Address of the bookmark: <a href="https://github.com/jorvis/biocode" rel="nofollow">https://github.com/jorvis/biocode</a></p>]]></description>
	<dc:creator>Jit</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/pages/view/9029/syntax-for-secure-copy-scp</guid>
	<pubDate>Thu, 13 Mar 2014 17:01:32 -0500</pubDate>
	<link>https://bioinformaticsonline.com/pages/view/9029/syntax-for-secure-copy-scp</link>
	<title><![CDATA[Syntax for Secure Copy (scp)]]></title>
	<description><![CDATA[<div><p>In our day to day research activity, we need to securely copy our data from several to local computer and visa-versa. I am jotting down some of the commonly used SCP command for your future help. Hope you all will like it</p><p>What is Secure Copy?<br /><br />scp allows files to be copied to, from, or between different hosts. It uses ssh for data transfer and provides the same authentication and same level of security as ssh.</p><p><br />Examples</p><p><br /><strong>Copy the file "gene.txt" from a remote host to the local host</strong><br /><br />&nbsp;&nbsp;&nbsp; $ scp your_username@remotehost.edu:gene.txt /some/local/directory<br /><br /><strong>Copy the file "foobar.txt" from the local host to a remote host</strong><br /><br />&nbsp;&nbsp;&nbsp; $ scp gene.txt your_username@remotehost.edu:/some/remote/directory<br /><br /><strong>Copy the directory "chromosome" from the local host to a remote host's directory "bar"</strong><br /><br />&nbsp;&nbsp;&nbsp; $ scp -r chromosome your_username@remotehost.edu:/some/remote/directory/bar<br /><br /><strong>Copy the file "gene.txt" from remote host "rh1.edu" to remote host "rh2.edu"</strong><br /><br />&nbsp;&nbsp;&nbsp; $ scp your_username@rh1.edu:/some/remote/directory/gene.txt \<br />&nbsp;&nbsp;&nbsp; your_username@rh2.edu:/some/remote/directory/<br /><br /><strong>Copying the files "gene.txt" and "cancer.txt" from the local host to your home directory on the remote host</strong><br /><br />&nbsp;&nbsp;&nbsp; $ scp gene.txt cancer.txt your_username@remotehost.edu:~<br /><br /><strong>Copy the file "gene.txt" from the local host to a remote host using port 2264</strong><br /><br />&nbsp;&nbsp;&nbsp; $ scp -P 2264 gene.txt your_username@remotehost.edu:/some/remote/directory<br /><br /><strong>Copy multiple files from the remote host to your current directory on the local host</strong><br /><br />&nbsp;&nbsp;&nbsp; $ scp your_username@remotehost.edu:/some/remote/directory/\{a,b,c\} .<br /><br />&nbsp;&nbsp;&nbsp; $ scp your_username@remotehost.edu:~/\{gene.txt,cancer.txt\} .<br /><br /><strong>scp Performance</strong><br /><br />By default scp uses the Triple-DES cipher to encrypt the data being sent. Using the Blowfish cipher has been shown to increase speed. This can be done by using option -c blowfish in the command line.<br /><br />&nbsp;&nbsp;&nbsp; $ scp -c blowfish some_file your_username@remotehost.edu:~<br /><br />It is often suggested that the -C option for compression should also be used to increase speed. The effect of compression, however, will only significantly increase speed if your connection is very slow. Otherwise it may just be adding extra burden to the CPU. An example of using blowfish and compression:<br /><br />&nbsp;&nbsp;&nbsp; $ scp -c blowfish -C local_file your_username@remotehost.edu:~</p></div>]]></description>
	<dc:creator>Rahul Nayak</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/pages/view/10409/check-linux-server-configuration</guid>
	<pubDate>Tue, 06 May 2014 01:10:57 -0500</pubDate>
	<link>https://bioinformaticsonline.com/pages/view/10409/check-linux-server-configuration</link>
	<title><![CDATA[Check Linux server configuration !!]]></title>
	<description><![CDATA[<p>Bioinformatician uses servers for computational analysis. Sometime we need to check the server details before running our programs or tools. Here I am showing some basic commands using them you can gather the system/server information.<br /><br />To check what version of Operating System is installed on the server you can use the following commands:-<br />&nbsp;=================================================================<br />1.cat /etc/issue<br />[root@localhost ~]# cat /etc/issue<br />Red Hat Enterprise Linux Server release 5.5 (Tikanga)<br />Kernel \r on an \m<br /><br />2.cat /etc/redhat-release<br />[root@localhost ~]# cat /etc/redhat-release<br />Red Hat Enterprise Linux Server release 5.5 (Tikanga)<br /><br /><br />3.lsb_release -a<br />[root@localhost ~]# lsb_release -a<br />LSB Version:&nbsp;&nbsp;&nbsp; :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch<br />Distributor ID: RedHatEnterpriseServer<br />Description:&nbsp;&nbsp;&nbsp; Red Hat Enterprise Linux Server release 5.5 (Tikanga)<br />Release:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5.5<br />Codename:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Tikanga<br /><br /><br /><br />To check whether the operating system is 32 or 64bit:-<br />================================<br /># uname -i<br />[root@localhost ~]# uname -i<br />i386<br />(i386 represents that server is having 32bit operating system)<br /><br />[root@localhost ~]# uname -i<br />x86_64<br />(x86_64 represents that server is having 64bit operating system)<br /><br />To see the processor/CPU information:-<br />=============================<br /># cat /proc/cpuinfo<br />[root@localhost ~] cat /proc/cpuinfo<br />processor&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0<br />vendor_id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : GenuineIntel<br />cpu family&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 6<br />model&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 15<br />model name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Intel(R) Xeon(R) CPU&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5130&nbsp; @ 2.00GHz<br />stepping&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 6<br />cpu MHz&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 1995.087<br />cache size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 4096 KB<br />physical id&nbsp;&nbsp;&nbsp;&nbsp; : 0<br />siblings&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 2<br />core id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0<br />cpu cores&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 2<br />apicid&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0<br />fdiv_bug&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : no<br />hlt_bug&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : no<br />f00f_bug&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : no<br />coma_bug&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : no<br />fpu&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : yes<br />fpu_exception&nbsp;&nbsp; : yes<br />cpuid level&nbsp;&nbsp;&nbsp;&nbsp; : 10<br />wp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : yes<br />flags&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx tm2 ssse3 cx16 xtpr lahf_lm<br />bogomips&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 3990.17<br />(Here processor number 0 indicates that the system is having one process(processor number starts with zero))<br /><br /><br /><br /><br />To check memory information:-<br />===========================<br /># free -m<br />[root@localhost ~]# free -m<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; total&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; used&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; free&nbsp;&nbsp;&nbsp;&nbsp; shared&nbsp;&nbsp;&nbsp; buffers&nbsp;&nbsp;&nbsp;&nbsp; cached<br />Mem:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5066&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3513&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1552&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 612&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2319<br />-/+ buffers/cache:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 582&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4484<br />Swap:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1983&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1983<br /><br /><br /><br /># cat /proc/meminfo<br />[root@localhost ~]# cat /proc/meminfo<br />MemTotal:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5187752 kB<br />MemFree:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1639300 kB<br />Buffers:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 627024 kB<br />Cached:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2374944 kB<br />SwapCached:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 kB<br />Active:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2458788 kB<br />Inactive:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 920964 kB<br />HighTotal:&nbsp;&nbsp;&nbsp;&nbsp; 4325164 kB<br />HighFree:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1561936 kB<br />LowTotal:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 862588 kB<br />LowFree:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 77364 kB<br />SwapTotal:&nbsp;&nbsp;&nbsp;&nbsp; 2031608 kB<br />SwapFree:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2031608 kB<br />Dirty:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 704 kB<br />Writeback:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 kB<br />AnonPages:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 377892 kB<br />Mapped:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 35328 kB<br />Slab:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 153036 kB<br />PageTables:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6316 kB<br />NFS_Unstable:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 kB<br />Bounce:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 kB<br />CommitLimit:&nbsp;&nbsp; 4625484 kB<br />Committed_AS:&nbsp;&nbsp; 977132 kB<br />VmallocTotal:&nbsp;&nbsp; 116728 kB<br />VmallocUsed:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4492 kB<br />VmallocChunk:&nbsp;&nbsp; 112124 kB<br />HugePages_Total:&nbsp;&nbsp;&nbsp;&nbsp; 0<br />HugePages_Free:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />HugePages_Rsvd:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />Hugepagesize:&nbsp;&nbsp;&nbsp;&nbsp; 2048 kB<br /><br /><br />To check the model and serial name of the server:-<br />=======================================<br />[root@localhost ~]#&nbsp; dmidecode | egrep -i "product name|Serial number"<br />Product Name: PowerEdge R710<br />Serial Number: AB8CDE1<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br /><br />To check the host name:-<br />=====================<br />[root@localhost ~]# uname -n<br />localhost<br /><br />[root@localhost ~]# hostname<br />localhost<br /><br />To check the kernel version:-<br />========================<br />[root@localhost ~]# uname -r<br />2.6.18-238.9.1.el5PAE</p>]]></description>
	<dc:creator>Rahul Nayak</dc:creator>
</item>

</channel>
</rss>